
|
[openbeosnetteam]
||
[Date Prev]
[02-2002 Date Index]
[Date Next]
||
[Thread Prev]
[02-2002 Thread Index]
[Thread Next]
[openbeosnetteam] Re: Directory Structure...
- From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
- To: openbeosnetteam@xxxxxxxxxxxxx
- Date: Fri, 08 Feb 2002 17:43:35 CET (+0100)
>
> Did Jean say you were looking at how net=5Fserver talks to the network
> cards=3F
> That's really the first thing we need before we can go anywhere
> real...
That's the easy part.
Apart from using read/write as you would expect to, it uses some ioctls
to speak to the driver:
enum {
ETHER=5FGETADDR =3D B=5FDEVICE=5FOP=5FCODES=5FEND, /* get ethernet
address */
ETHER=5FINIT,
/* set irq and port */
ETHER=5FNONBLOCK,
/* set/unset nonblocking
mode */
ETHER=5FADDMULTI,
/* add multicast addr */
ETHER=5FREMMULTI,
/* rem multicast addr */
ETHER=5FSETPROMISC, /* set
promiscuous */
ETHER=5FGETFRAMESIZE /* get
frame size */
};
ETHER=5FINIT is only of interest for ISA cards.
ETHER=5FGETFRAMESIZE & ETHER=5FNONBLOCK work like this:
case ETHER=5FGETFRAMESIZE:
D(bug("ioctl: get frame size\n"));
*(uint32*)buf =3D MAX=5FFRAME=5FSIZE;
return B=5FNO=5FERROR;
case ETHER=5FNONBLOCK:
info->blockFlag =3D *(int32 *)buf =3F B=5FTIMEOUT : 0;
D(bug("ioctl: non blocking =3F %s\n",info->blockFlag =3F "yes" :
"no"));
return B=5FNO=5FERROR;
Any more questions=3F
Adios...
Axel.
|

|