Re: 2questions

1999-12-13 Thread Kurt Olsen

> - the size of the X server includes the size of video RAM mapped from 
>   the card.

The 3dfx cards also map significantly more memory than there is RAM
on the card itself. Mostly for control registers and stuff. It might
be as much as 32 MB on top of the actual RAM available.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: Porting ether-wake.c from Linux

2000-01-04 Thread Kurt Olsen

I've not looked at ether-wake, but I use the attached program to wake up
machines. It's not very fancy, but it does work for me. The limitation that
an ARP entry for the destination machine is somewhat annoying, but not
insurmountable. As you can see, it uses UDP packets instead of constructing
raw packets to be sent.

Kurt Olsen
[EMAIL PROTECTED]

---

/*
 * the wakie-wakie program
 */

#include 
#include 
#include 
#include 

#define BUF_LEN 256

void fatal_error(char *message)
{
  fprintf(stderr, "%s", message);
  exit(1);
}

void parse(char *addr_in, u_int32_t *addr_out)
{
  int i,j,k;

  j = 0;
  for (i = 0; i < 50 && addr_in[i] != '\0'; i++)
{
if (addr_in[i] == '.')
  j++;
}

  if (j != 3)
fatal_error("Need four octets in ip address.\n");

  *addr_out = 0;
  for (j = 0, i = 0; i < 4; i++)
{
k = atoi(&addr_in[j]);
if (k < 0 || k > 255)
  fatal_error("Individual octets in ip address must be in the range 0-255.\n");
*addr_out = *addr_out * 256 + k;
while (i < 3 && addr_in[j] != '.')
  j++;
j++;
}
  *addr_out = htonl(*addr_out);
}

int main(int argc, char **argv)
{
  char buf[BUF_LEN];
  int i,j,k,l,m;
  int thesock;
  struct sockaddr_in to;

  memset (buf, 0, BUF_LEN);

  if (argc < 3 || ((argc-1)&0x1) == 1)
{
fprintf(stderr, "Need ip and ethernet address pairs.\n");
fprintf(stderr, "\t%s   [ ...]\n", *argv);
exit(1);
}

  for (m = 1; m < argc; m+=2, argv+=2)
{
thesock = socket(AF_INET, SOCK_DGRAM, 0);
if (thesock < 0)
  fatal_error("Couldn't make a socket.\n");

if (strlen(*(argv+2)) != 12)
  fatal_error("Ethernet addresses require 12 digits.\n");

buf[0] = 0xff; buf[1] = 0xff; buf[2] = 0xff;
buf[3] = 0xff; buf[4] = 0xff; buf[5] = 0xff;

for (i = 1; i < 17; i++)
  {
  for (j = 0; j < 6; j++)
{
k = *(*(argv+2)+j*2);
if (k >= 'a' && k <= 'f') k -= ('a'-'A');
l = *(*(argv+2)+j*2+1);
if (l >= 'a' && l <= 'f') l -= ('a'-'A');
k -= '0'; if (k > 9) k -= 7;
l -= '0'; if (l > 9) l -= 7;
k = k * 16 + l;
buf[j+i*6] = k;
}
  }

to.sin_len = sizeof(to);
to.sin_family = AF_INET;
to.sin_port = 5432;
parse(*(argv+1), &(to.sin_addr.s_addr));
  
if (sendto(thesock,&buf,BUF_LEN,0,(struct sockaddr *)&to,sizeof(to)) < 0)
  fatal_error("Couldn't send UDP packet.\n");
close(thesock);
}
}


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: 3.4 cdroms and xdm

2000-01-28 Thread Kurt Olsen

Re: XDM problem.

Make sure that each users' .xsession file is set as executable for the
owner.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: 3.4 cdroms and xdm

2000-01-28 Thread Kurt Olsen

>And, for any user who cannot login via XDM, login over the network and
>read the .xsession-errors file created in their home directory.

Additionally, if you don't have a network you can hit Ctrl-F1 to get back
to a text terminal. Or just enter the username, hit Enter, enter the passwordd
and hit F1 which will log you in in failsafe mode.



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: CFD: "bogomips" CPU performance metric

1999-09-02 Thread Kurt Olsen

We have this for 586+ class machines:

CPU: Pentium/P54C (132.73-MHz 586-class CPU)
  Origin = "GenuineIntel"  Id = 0x52c  Stepping=12
  Features=0x1bf

Seems more precise and informative. For 386/486 based hardware
someone could adapt one of the numerous CPU speed detection routines
out there.


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-hackers" in the body of the message



Re: CFD: "bogomips" CPU performance metric

1999-09-02 Thread Kurt Olsen


We have this for 586+ class machines:

CPU: Pentium/P54C (132.73-MHz 586-class CPU)
  Origin = "GenuineIntel"  Id = 0x52c  Stepping=12
  Features=0x1bf

Seems more precise and informative. For 386/486 based hardware
someone could adapt one of the numerous CPU speed detection routines
out there.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message