Commit | Line | Data |
---|---|---|
bb33353b SL |
1 | /* pup.c 4.1 82/06/13 */ |
2 | ||
3 | #include "../h/param.h" | |
4 | #include "../h/mbuf.h" | |
5 | #include "../h/protosw.h" | |
6 | #include "../h/socket.h" | |
7 | #include "../h/socketvar.h" | |
8 | #include "../net/in.h" | |
9 | #include "../net/in_systm.h" | |
10 | #include "../net/af.h" | |
11 | #include "../net/pup.h" | |
12 | ||
13 | #ifdef PUP | |
14 | pup_hash(spup, hp) | |
15 | struct sockaddr_pup *spup; | |
16 | struct afhash *hp; | |
17 | { | |
18 | COUNT(PUP_HASH); | |
19 | hp->afh_nethash = spup->spup_addr.pp_net; | |
20 | hp->afh_hosthash = spup->spup_addr.pp_host; | |
21 | if (hp->afh_hosthash < 0) | |
22 | hp->afh_hosthash = -hp->afh_hosthash; | |
23 | } | |
24 | ||
25 | pup_netmatch(spup1, spup2) | |
26 | struct sockaddr_pup *spup1, *spup2; | |
27 | { | |
28 | COUNT(PUP_NETMATCH); | |
29 | return (spup1->spup_addr.pp_net == spup2->spup_addr.pp_net); | |
30 | } | |
31 | #endif |