| plan 9 kernel history: overview | file list | diff list |
2002/0507/ip/ip.h (diff list | history)
| 2002/0325/sys/src/9/ip/ip.h:24,29 – 2002/0507/sys/src/9/ip/ip.h:24,34 (short | long | prev | next) | ||
| 1998/0313 | typedef struct Arp Arp; | |
| 1998/0306 | typedef struct Route Route; | |
| 1997/0327 | ||
| 2002/0507 | typedef struct Routerparams Routerparams; typedef struct Hostparams Hostparams; typedef struct v6router v6router; typedef struct v6params v6params; | |
| 1997/0327 | enum { Addrlen= 64, | |
| 2002/0325/sys/src/9/ip/ip.h:44,52 – 2002/0507/sys/src/9/ip/ip.h:49,59 | ||
| 1998/0306 | /* ip versions */ V4= 4, V6= 6, | |
| 2002/0507 | IP_VER4= 0x40, IP_VER6= 0x60, | |
| 1998/0313 | /* 2^Lroot trees in the root table */ | |
| 2002/0507 | Lroot= 10, | |
| 2001/0527 | Maxpath = 64, | |
| 1997/0327 | }; | |
| 2002/0325/sys/src/9/ip/ip.h:78,84 – 2002/0507/sys/src/9/ip/ip.h:85,91 | ||
| 1997/0327 | uint ttl; /* max time to live */ | |
| 1999/0817 | uint tos; /* type of service */ | |
| 1997/0327 | ||
| 2001/0527 |
| |
| 2002/0507 | char *owner; /* protections */ | |
| 1997/0327 | int perm; int inuse; /* opens of listen/data/ctl */ int length; | |
| 2002/0325/sys/src/9/ip/ip.h:138,143 – 2002/0507/sys/src/9/ip/ip.h:145,153 | ||
| 1999/0731 | void (*ares)(Fs*, int, uchar*, uchar*, int, int); /* resolve */ void (*areg)(Ipifc*, uchar*); /* register */ | |
| 1998/0630 | ||
| 2002/0507 | /* v6 address generation */ void (*pref2addr)(uchar *pref, uchar *ea); | |
| 1998/0307 | int unbindonclose; /* if non-zero, unbind on last close */ | |
| 1997/0327 | }; | |
| 2002/0325/sys/src/9/ip/ip.h:148,153 – 2002/0507/sys/src/9/ip/ip.h:158,169 | ||
| 1998/0306 | uchar mask[IPaddrlen]; uchar remote[IPaddrlen]; uchar net[IPaddrlen]; | |
| 2002/0507 | uchar tentative; /* =1 => v6 dup disc on, =0 => confirmed unique */ uchar onlink; /* =1 => onlink, =0 offlink. */ uchar autoflag; /* v6 autonomous flag */ long validlt; /* v6 valid lifetime */ long preflt; /* v6 preferred lifetime */ long origint; /* time when addr was added */ | |
| 1998/0306 | Iplink *link; /* addresses linked to this lifc */ Iplifc *next; | |
| 1997/0327 | }; | |
| 2002/0325/sys/src/9/ip/ip.h:164,169 – 2002/0507/sys/src/9/ip/ip.h:180,204 | ||
| 1997/0423 | int ref; }; | |
| 2002/0507 | /* rfc 2461, pp.40--43. */ /* default values, one per stack */ struct Routerparams { int mflag; int oflag; int maxraint; int minraint; int linkmtu; int reachtime; int rxmitra; int ttl; int routerlt; }; struct Hostparams { int rxmithost; }; | |
| 1998/0306 | struct Ipifc | |
| 1997/0327 | { | |
| 1998/0306 | RWlock; | |
| 2002/0325/sys/src/9/ip/ip.h:189,194 – 2002/0507/sys/src/9/ip/ip.h:224,234 | ||
| 1998/0306 | ||
| 1997/0327 | ulong in, out; /* message statistics */ ulong inerr, outerr; /* ... */ | |
| 2002/0507 | uchar sendra6; /* == 1 => send router advs on this ifc */ uchar recvra6; /* == 1 => recv router advs on this ifc */ Routerparams rp; /* router parameters as in RFC 2461, pp.40--43. used only if node is router */ | |
| 1998/0306 | }; | |
| 1997/0327 | ||
| 1998/0306 | /* | |
| 2002/0325/sys/src/9/ip/ip.h:267,272 – 2002/0507/sys/src/9/ip/ip.h:307,313 | ||
| 1998/0313 | void *priv; | |
| 1997/0327 | }; | |
| 2002/0507 | ||
| 1998/0313 | /* * one per IP protocol stack */ | |
| 2002/0325/sys/src/9/ip/ip.h:284,289 – 2002/0507/sys/src/9/ip/ip.h:325,331 | ||
| 1998/0313 | IP *ip; Ipselftab *self; Arp *arp; | |
| 2002/0507 | v6params *v6p; | |
| 1998/0313 | Route *v4root[1<<Lroot]; /* v4 routing forest */ Route *v6root[1<<Lroot]; /* v6 routing forest */ | |
| 2002/0325/sys/src/9/ip/ip.h:293,302 – 2002/0507/sys/src/9/ip/ip.h:335,362 | ||
| 1998/1118 | Ifclog *ilog; | |
| 2000/0116 | char ndb[1024]; /* an ndb entry for this interface */ | |
| 2002/0324 |
| |
| 2002/0325 |
| |
| 1997/0327 | }; | |
| 1998/0313 | ||
| 2002/0507 | /* one per default router known to host */ struct v6router { uchar inuse; Ipifc *ifc; int ifcid; uchar routeraddr[IPaddrlen]; long ltorigin; Routerparams rp; }; struct v6params { Routerparams rp; /* v6 params, one copy per node now */ Hostparams hp; v6router v6rlist[3]; /* max 3 default routers, currently */ int cdrouter; /* uses only v6rlist[cdrouter] if */ /* cdrouter >= 0. */ }; | |
| 1998/0313 | int Fsconnected(Conv*, char*); Conv* Fsnewcall(Conv*, uchar*, ushort, uchar*, ushort); | |
| 1997/0327 | int Fspcolstats(char*, int); | |
| 2002/0325/sys/src/9/ip/ip.h:310,316 – 2002/0507/sys/src/9/ip/ip.h:370,375 | ||
| 1998/0306 | char* Fsstdbind(Conv*, char**, int); | |
| 2001/0922 | ulong scalednconv(void); | |
| 1999/0910 | void closeconv(Conv*); | |
| 2001/0922 | ||
| 1998/0306 | /* * logging */ | |
| 2002/0325/sys/src/9/ip/ip.h:449,455 – 2002/0507/sys/src/9/ip/ip.h:508,514 | ||
| 1998/0306 | { uchar ip[IPaddrlen]; uchar mac[MAClen]; | |
| 2002/0507 | Medium *type; /* media type */ | |
| 1998/0306 | Arpent* hash; Block* hold; Block* last; | |
| 2002/0325/sys/src/9/ip/ip.h:456,467 – 2002/0507/sys/src/9/ip/ip.h:515,531 | ||
| 1998/0306 | uint time; uint used; uchar state; | |
| 2002/0507 | Arpent *nextrxt; /* re-transmit chain */ uint rxtat; uchar rxtsrem; Ipifc *ifc; uchar ifcid; /* must match ifc->id */ | |
| 1998/0306 | }; | |
| 1998/0313 | extern void arpinit(Fs*); extern int arpread(Arp*, char*, ulong, int); | |
| 1998/0630 | extern int arpwrite(Fs*, char*, int); | |
| 1998/0313 |
| |
| 2002/0507 | extern Arpent* arpget(Arp*, Block *bp, int version, Ipifc *ifc, uchar *ip, uchar *h); | |
| 1998/0313 | extern void arprelease(Arp*, Arpent *a); extern Block* arpresolve(Arp*, Arpent *a, Medium *type, uchar *mac); | |
| 1998/0630 | extern void arpenter(Fs*, int version, uchar *ip, uchar *mac, int len, int norefresh); | |
| 2002/0325/sys/src/9/ip/ip.h:509,514 – 2002/0507/sys/src/9/ip/ip.h:573,579 | ||
| 1998/0306 | extern Medium* ipfindmedium(char *name); | |
| 1998/0423 | extern void addipmedium(Medium *med); | |
| 1998/0313 | extern int ipforme(Fs*, uchar *addr); | |
| 2002/0507 | extern int iptentative(Fs*, uchar *addr); | |
| 1998/0728 | extern int ipisbm(uchar *); | |
| 1998/0306 | extern int ipismulticast(uchar *); | |
| 1998/0313 | extern Ipifc* findipifc(Fs*, uchar *remote, int type); | |
| 2002/0325/sys/src/9/ip/ip.h:516,521 – 2002/0507/sys/src/9/ip/ip.h:581,587 | ||
| 1998/0313 | extern void findlocalip(Fs*, uchar *local, uchar *remote); | |
| 1998/0306 | extern int ipv4local(Ipifc *ifc, uchar *addr); extern int ipv6local(Ipifc *ifc, uchar *addr); | |
| 2002/0507 | extern int ipv6anylocal(Ipifc *ifc, uchar *addr); | |
| 1998/0306 | extern Iplifc* iplocalonifc(Ipifc *ifc, uchar *ip); | |
| 1998/0313 | extern int ipproxyifc(Fs *f, Ipifc *ifc, uchar *ip); | |
| 1998/0306 | extern int ipismulticast(uchar *ip); | |
| 2002/0325/sys/src/9/ip/ip.h:528,536 – 2002/0507/sys/src/9/ip/ip.h:594,605 | ||
| 1998/0306 | extern void ipifcremmulti(Conv *c, uchar *ma, uchar *ia); extern void ipifcaddmulti(Conv *c, uchar *ma, uchar *ia); extern char* ipifcrem(Ipifc *ifc, char **argv, int argc, int dolock); | |
| 2002/0507 | extern char* ipifcadd(Ipifc *ifc, char **argv, int argc, int tentative, Iplifc *lifcp); | |
| 1998/0313 | extern long ipselftabread(Fs*, char *a, ulong offset, int n); | |
| 1998/0306 | ||
| 2002/0507 | extern char* ipifcaddgate6(Fs *f, Ipifc *ifc, char**argv, int argc); extern char* ipifcaddpref6(Ipifc *ifc, char**argv, int argc); extern void ipsendra6(Fs *f, int on); extern long ipgateread6(Fs *f, char *cp, ulong offset, int n); | |
| 1998/0306 | /* * ip.c */ | |
| 2002/0325/sys/src/9/ip/ip.h:537,547 – 2002/0507/sys/src/9/ip/ip.h:606,617 | ||
| 1998/0314 | extern void iprouting(Fs*, int); | |
| 1998/0306 | extern void closeifcconv(Ifcconv*); | |
| 1998/0313 | extern void icmpnoconv(Fs*, Block*); | |
| 2001/0623 |
| |
| 1998/0313 |
| |
| 2002/0507 | extern void icmpttlexceeded(Fs*, uchar*, Block*); | |
| 1998/0306 | extern ushort ipcsum(uchar*); | |
| 2001/0623 |
| |
| 1999/0817 |
| |
| 2002/0507 | extern void ipiput4(Fs*, Ipifc*, Block*); extern void ipiput6(Fs*, Ipifc*, Block*); extern void ipoput4(Fs*, Block*, int, int, int); extern void ipoput6(Fs*, Block*, int, int, int); | |
| 1998/0313 | extern int ipstats(Fs*, char*, int); | |
| 1998/0306 | extern ushort ptclbsum(uchar*, int); extern ushort ptclcsum(Block*, int, int); | |
| 2002/0325/sys/src/9/ip/ip.h:548,554 – 2002/0507/sys/src/9/ip/ip.h:618,623 | ||
| 1998/0313 | extern void ip_init(Fs*); | |
| 2001/1117 | extern void update_mtucache(uchar*, ulong); extern ulong restrict_mtu(uchar*, ulong); | |
| 1998/0306 |
| |
| 1998/0313 | * bootp.c */ | |
| 2002/0325/sys/src/9/ip/ip.h:573,575 – 2002/0507/sys/src/9/ip/ip.h:642,645 | ||
| 1998/0306 | extern int debug; extern Fs fs; extern void (*igmpreportfn)(Ipifc*, uchar*); | |
| 2002/0507 | ||