|
|
| version 1.2, 2003/06/17 04:29:52 | version 1.3, 2004/03/11 09:38:59 |
|---|---|
| Line 36 | Line 36 |
| * SUCH DAMAGE. | * SUCH DAMAGE. |
| * | * |
| * $FreeBSD: src/usr.sbin/IPXrouted/af.c,v 1.6 1999/08/28 01:15:01 peter Exp $ | * $FreeBSD: src/usr.sbin/IPXrouted/af.c,v 1.6 1999/08/28 01:15:01 peter Exp $ |
| * $DragonFly: src/usr.sbin/IPXrouted/af.c,v 1.1 2003/06/16 07:16:10 dillon Exp $ | * $DragonFly$ |
| * | * |
| * @(#)af.c 8.1 (Berkeley) 6/5/93 | * @(#)af.c 8.1 (Berkeley) 6/5/93 |
| */ | */ |
| Line 88 union ipx_net ipx_anynet; | Line 88 union ipx_net ipx_anynet; |
| union ipx_net ipx_zeronet; | union ipx_net ipx_zeronet; |
| void | void |
| ipxnet_hash(sipx, hp) | ipxnet_hash(struct sockaddr_ipx *sipx, struct afhash *hp) |
| register struct sockaddr_ipx *sipx; | |
| struct afhash *hp; | |
| { | { |
| long hash; | long hash; |
| #if 0 | #if 0 |
| Line 121 ipxnet_hash(sipx, hp) | Line 119 ipxnet_hash(sipx, hp) |
| } | } |
| int | int |
| ipxnet_netmatch(sxn1, sxn2) | ipxnet_netmatch(struct sockaddr_ipx *sxn1, struct sockaddr_ipx *sxn2) |
| struct sockaddr_ipx *sxn1, *sxn2; | |
| { | { |
| return (ipx_neteq(sxn1->sipx_addr, sxn2->sipx_addr)); | return (ipx_neteq(sxn1->sipx_addr, sxn2->sipx_addr)); |
| } | } |
| Line 131 ipxnet_netmatch(sxn1, sxn2) | Line 128 ipxnet_netmatch(sxn1, sxn2) |
| * Verify the message is from the right port. | * Verify the message is from the right port. |
| */ | */ |
| int | int |
| ipxnet_portmatch(sipx) | ipxnet_portmatch(struct sockaddr_ipx *sipx) |
| register struct sockaddr_ipx *sipx; | |
| { | { |
| return (ntohs(sipx->sipx_addr.x_port) == IPXPORT_RIP ); | return (ntohs(sipx->sipx_addr.x_port) == IPXPORT_RIP ); |
| Line 146 ipxnet_portmatch(sipx) | Line 142 ipxnet_portmatch(sipx) |
| int do_output = 0; | int do_output = 0; |
| #endif | #endif |
| void | void |
| ipxnet_output(s, flags, sipx, size) | ipxnet_output(int s, int flags, struct sockaddr_ipx *sipx, int size) |
| int s; | |
| int flags; | |
| struct sockaddr_ipx *sipx; | |
| int size; | |
| { | { |
| struct sockaddr_ipx dst; | struct sockaddr_ipx dst; |
| Line 167 ipxnet_output(s, flags, sipx, size) | Line 159 ipxnet_output(s, flags, sipx, size) |
| * ALL connected nets | * ALL connected nets |
| */ | */ |
| if (ipx_neteqnn(sipx->sipx_addr.x_net, ipx_zeronet)) { | if (ipx_neteqnn(sipx->sipx_addr.x_net, ipx_zeronet)) { |
| extern struct interface *ifnet; | extern struct interface *ifnet; |
| register struct interface *ifp; | struct interface *ifp; |
| for (ifp = ifnet; ifp; ifp = ifp->int_next) { | for (ifp = ifnet; ifp; ifp = ifp->int_next) { |
| sipx->sipx_addr.x_net = | sipx->sipx_addr.x_net = |
| Line 189 ipxnet_output(s, flags, sipx, size) | Line 181 ipxnet_output(s, flags, sipx, size) |
| * point to point links. | * point to point links. |
| */ | */ |
| int | int |
| ipxnet_checkhost(sipx) | ipxnet_checkhost(struct sockaddr_ipx *sipx) |
| struct sockaddr_ipx *sipx; | |
| { | { |
| register struct interface *ifp = if_ifwithnet((struct sockaddr *)sipx); | struct interface *ifp = if_ifwithnet((struct sockaddr *)sipx); |
| /* | /* |
| * We want this route if there is no more than one | * We want this route if there is no more than one |
| * point to point interface with this network. | * point to point interface with this network. |
| Line 206 ipxnet_checkhost(sipx) | Line 197 ipxnet_checkhost(sipx) |
| * for a host, 0 for a network. | * for a host, 0 for a network. |
| */ | */ |
| int | int |
| ipxnet_ishost(sipx) | ipxnet_ishost(struct sockaddr_ipx *sipx) |
| struct sockaddr_ipx *sipx; | |
| { | { |
| register u_short *s = sipx->sipx_addr.x_host.s_host; | u_short *s = sipx->sipx_addr.x_host.s_host; |
| if ((s[0]==0x0000) && (s[1]==0x0000) && (s[2]==0x0000)) | if ((s[0]==0x0000) && (s[1]==0x0000) && (s[2]==0x0000)) |
| return (0); | return (0); |
| Line 220 struct sockaddr_ipx *sipx; | Line 210 struct sockaddr_ipx *sipx; |
| } | } |
| void | void |
| ipxnet_canon(sipx) | ipxnet_canon(struct sockaddr_ipx *sipx) |
| struct sockaddr_ipx *sipx; | |
| { | { |
| sipx->sipx_addr.x_port = 0; | sipx->sipx_addr.x_port = 0; |
| } | } |
| void | void |
| null_hash(addr, hp) | null_hash(struct sockaddr *addr, struct afhash *hp) |
| struct sockaddr *addr; | |
| struct afhash *hp; | |
| { | { |
| hp->afh_nethash = hp->afh_hosthash = 0; | hp->afh_nethash = hp->afh_hosthash = 0; |
| } | } |
| int | int |
| null_netmatch(a1, a2) | null_netmatch(struct sockaddr *a1, struct sockaddr *a2) |
| struct sockaddr *a1, *a2; | |
| { | { |
| return (0); | return (0); |
| } | } |
| void | void |
| null_output(s, f, a1, n) | null_output(int s, int f, struct sockaddr *a1, int n) |
| int s; | |
| int f; | |
| struct sockaddr *a1; | |
| int n; | |
| { | { |
| ; | ; |
| } | } |
| int | int |
| null_portmatch(a1) | null_portmatch(struct sockaddr *a1) |
| struct sockaddr *a1; | |
| { | { |
| return (0); | return (0); |
| } | } |
| int | int |
| null_portcheck(a1) | null_portcheck(struct sockaddr *a1) |
| struct sockaddr *a1; | |
| { | { |
| return (0); | return (0); |
| } | } |
| int | int |
| null_ishost(a1) | null_ishost(struct sockaddr *a1) |
| struct sockaddr *a1; | |
| { | { |
| return (0); | return (0); |
| } | } |
| int | int |
| null_checkhost(a1) | null_checkhost(struct sockaddr *a1) |
| struct sockaddr *a1; | |
| { | { |
| return (0); | return (0); |
| } | } |
| void | void |
| null_canon(a1) | null_canon(struct sockaddr *a1) |
| struct sockaddr *a1; | |
| { | { |
| ; | ; |