## diffname port/netif.h 1993/0525
## diff -e /dev/null /n/fornaxdump/1993/0525/sys/src/brazil/port/netif.h
0a
typedef struct Etherpkt Etherpkt;
typedef struct Netfile Netfile;
typedef struct Netif Netif;
enum
{
Nmaxaddr= 64,
Ncloneqid= 1,
N2ndqid,
N3rdqid,
Ndataqid,
Nctlqid,
Nstatqid,
Ntypeqid,
};
/*
* Macros to manage Qid's used for multiplexed devices
*/
#define NETTYPE(x) ((x)&0x1f)
#define NETID(x) (((x)&~CHDIR)>>5)
#define NETQID(i,t) (((i)<<5)|(t))
/*
* one per multiplexed connection
*/
struct Netfile
{
QLock;
int inuse;
ulong mode;
char owner[NAMELEN];
int type; /* multiplexor type */
int prom; /* promiscuous mode */
Queue *in; /* input buffer */
};
/*
* a network interface
*/
struct Netif
{
QLock;
/* multiplexing */
char *name; /* for top level directory */
int nfile; /* max number of Netfiles */
Netfile **f;
Queue *out; /* output buffer */
/* about net */
int limit; /* flow control */
int alen; /* address length */
uchar addr[Nmaxaddr];
uchar bcast[Nmaxaddr];
int prom;
/* statistics */
int misses;
int inpackets;
int outpackets;
int crcs; /* input crc errors */
int oerrs; /* output erros */
int frames; /* framing errors */
int overflows; /* packet overflows */
int buffs; /* buffering errors */
/* routines for touching the hardware */
void *arg;
void (*promiscuous)(void*, int);
};
void netifinit(Netif*, char*, int, ulong);
int netifwalk(Netif*, Chan*, char*);
Chan* netifopen(Netif*, Chan*, int);
void netifclose(Netif*, Chan*);
long netifread(Netif*, Chan*, void*, long, ulong);
long netifwrite(Netif*, Chan*, void*, long);
void netifwstat(Netif*, Chan*, char*);
void netifstat(Netif*, Chan*, char*);
/*
* Ethernet specific
*/
enum
{
Eaddrlen= 6,
ETHERMINTU = 60, /* minimum transmit size */
ETHERMAXTU = 1514, /* maximum transmit size */
ETHERHDRSIZE = 14, /* size of an ethernet header */
};
struct Etherpkt
{
uchar d[Eaddrlen];
uchar s[Eaddrlen];
uchar type[2];
uchar data[1500];
};
extern uchar etherbcast[6];
/*
* FDDI specific
*/
.
## diffname port/netif.h 1994/0629
## diff -e /n/fornaxdump/1993/0525/sys/src/brazil/port/netif.h /n/fornaxdump/1994/0629/sys/src/brazil/port/netif.h
60c
int prom; /* number of promiscuous opens */
int all; /* number of -1 multiplexors */
.
## diffname port/netif.h 1995/0113
## diff -e /n/fornaxdump/1994/0629/sys/src/brazil/port/netif.h /n/fornaxdump/1995/0113/sys/src/brazil/port/netif.h
107,110d
## diffname port/netif.h 1995/0711
## diff -e /n/fornaxdump/1995/0113/sys/src/brazil/port/netif.h /n/fornaxdump/1995/0711/sys/src/brazil/port/netif.h
71a
int soverflows; /* software overflow */
.
## diffname port/netif.h 1995/0804
## diff -e /n/fornaxdump/1995/0711/sys/src/brazil/port/netif.h /n/fornaxdump/1995/0804/sys/src/brazil/port/netif.h
68c
int oerrs; /* output errors */
.
15a
Nifstatqid,
.
## diffname port/netif.h 1996/0706
## diff -e /n/fornaxdump/1995/0804/sys/src/brazil/port/netif.h /n/fornaxdump/1996/0706/sys/src/brazil/port/netif.h
54d
## diffname port/netif.h 1997/0327
## diff -e /n/fornaxdump/1996/0706/sys/src/brazil/port/netif.h /n/emeliedump/1997/0327/sys/src/brazil/port/netif.h
106,107d
83a
Block* netifbread(Netif*, Chan*, long, ulong);
.
51c
char name[NAMELEN]; /* for top level directory */
.
40c
Queue *in; /* input buffer */
.
37,38c
int type; /* multiplexor type */
int prom; /* promiscuous mode */
.
## diffname port/netif.h 1997/0401
## diff -e /n/emeliedump/1997/0327/sys/src/brazil/port/netif.h /n/emeliedump/1997/0401/sys/src/brazil/port/netif.h
76a
void (*multicast)(void*, char*, int);
.
59a
Netaddr *maddr; /* multicast addresses */
.
43a
* a network address
*/
struct Netaddr
{
Netaddr *next;
char *addr;
int ref;
};
/*
.
1a
typedef struct Netaddr Netaddr;
.
## diffname port/netif.h 1997/0403
## diff -e /n/emeliedump/1997/0401/sys/src/brazil/port/netif.h /n/emeliedump/1997/0403/sys/src/brazil/port/netif.h
71a
int nmaddr; /* number of multicast addresses */
.
39a
uchar maddr[8]; /* bitmask of multicast addresses requested */
int nmaddr; /* number of multicast addresses */
.
## diffname port/netif.h 1997/0404
## diff -e /n/emeliedump/1997/0403/sys/src/brazil/port/netif.h /n/emeliedump/1997/0404/sys/src/brazil/port/netif.h
103a
int activemulti(Netif*, uchar*, int);
.
92c
void (*multicast)(void*, uchar*, int);
.
73,74c
Netaddr *maddr; /* known multicast addresses */
int nmaddr; /* number of known multicast addresses */
Netaddr *mhash[Nmhash]; /* hash table of multicast addresses */
.
51,52c
Netaddr *next; /* allocation chain */
Netaddr *hnext;
uchar addr[Nmaxaddr];
.
8a
Nmhash= 31,
.
## diffname port/netif.h 1999/0316
## diff -e /n/emeliedump/1997/0404/sys/src/brazil/port/netif.h /n/emeliedump/1999/0316/sys/src/brazil/port/netif.h
11a
Naddrqid,
.
## diffname port/netif.h 1999/0625
## diff -e /n/emeliedump/1999/0316/sys/src/brazil/port/netif.h /n/emeliedump/1999/0625/sys/src/brazil/port/netif.h
41a
int bridge; /* bridge mode */
int headersonly; /* headers only - no data */
.
## diffname port/netif.h 2001/0527
## diff -e /n/emeliedump/1999/0625/sys/src/brazil/port/netif.h /n/emeliedump/2001/0527/sys/src/9/port/netif.h
108,109c
int netifwstat(Netif*, Chan*, uchar*, int);
int netifstat(Netif*, Chan*, uchar*, int);
.
102c
Walkqid* netifwalk(Netif*, Chan*, Chan*, char **, int);
.
69c
char name[KNAMELEN]; /* for top level directory */
.
38c
char owner[KNAMELEN];
.
25,27c
#define NETTYPE(x) (((ulong)x)&0x1f)
#define NETID(x) ((((ulong)x))>>5)
#define NETQID(i,t) ((((ulong)i)<<5)|(t))
.
## diffname port/netif.h 2003/0118
## diff -e /n/emeliedump/2001/0527/sys/src/9/port/netif.h /n/emeliedump/2003/0118/sys/src/9/port/netif.h
98a
void (*scanbs)(void*, uint); /* scan for base stations */
.
81a
int scan; /* number of base station scanners */
.
41a
int scan; /* base station scanning interval */
.
## diffname port/netif.h 2003/0209
## diff -e /n/emeliedump/2003/0118/sys/src/9/port/netif.h /n/emeliedump/2003/0209/sys/src/9/port/netif.h
76a
int mbps; /* megabits per sec */
.
|