Deprecate af.h.
This commit is contained in:
parent
9638fd585a
commit
bf98a55f37
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)af.c 7.6 (Berkeley) 6/28/90
|
||||
* $Id: af.c,v 1.4 1993/12/18 00:40:47 mycroft Exp $
|
||||
* $Id: af.c,v 1.5 1994/02/10 17:25:03 mycroft Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -40,8 +40,6 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/socketvar.h>
|
||||
|
||||
#include <net/af.h>
|
||||
|
||||
/*
|
||||
* Nothing in the file should be needed anymore.
|
||||
*/
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)if.c 7.14 (Berkeley) 4/20/91
|
||||
* $Id: if.c,v 1.10 1994/02/02 01:21:38 hpeyerl Exp $
|
||||
* $Id: if.c,v 1.11 1994/02/10 17:25:04 mycroft Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -45,7 +45,6 @@
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/af.h>
|
||||
#include <net/if_dl.h>
|
||||
#include <net/if_types.h>
|
||||
#include <net/route.h>
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)route.c 7.22 (Berkeley) 6/27/91
|
||||
* $Id: route.c,v 1.6 1994/01/16 02:22:56 cgd Exp $
|
||||
* $Id: route.c,v 1.7 1994/02/10 17:25:05 mycroft Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -45,7 +45,6 @@
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/af.h>
|
||||
#include <net/route.h>
|
||||
#include <net/raw_cb.h>
|
||||
#include <net/netisr.h>
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)rtsock.c 7.18 (Berkeley) 6/27/91
|
||||
* $Id: rtsock.c,v 1.6 1994/01/16 02:22:57 cgd Exp $
|
||||
* $Id: rtsock.c,v 1.7 1994/02/10 17:25:06 mycroft Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -43,7 +43,6 @@
|
||||
#include <sys/domain.h>
|
||||
#include <sys/protosw.h>
|
||||
|
||||
#include <net/af.h>
|
||||
#include <net/if.h>
|
||||
#include <net/route.h>
|
||||
#include <net/raw_cb.h>
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)in.c 7.17 (Berkeley) 4/20/91
|
||||
* $Id: in.c,v 1.9 1994/02/02 05:59:13 hpeyerl Exp $
|
||||
* $Id: in.c,v 1.10 1994/02/10 17:25:16 mycroft Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -42,7 +42,6 @@
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/route.h>
|
||||
#include <net/af.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/in_var.h>
|
||||
|
@ -62,7 +62,6 @@ int ip_mrtproto; /* for netstat only */
|
||||
#include <sys/socketvar.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <net/af.h>
|
||||
#include <net/if.h>
|
||||
#include <net/route.h>
|
||||
#include <net/raw_cb.h>
|
||||
|
146
sys/netiso/iso.c
146
sys/netiso/iso.c
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)iso.c 7.14 (Berkeley) 6/27/91
|
||||
* $Id: iso.c,v 1.3 1993/12/18 00:43:11 mycroft Exp $
|
||||
* $Id: iso.c,v 1.4 1994/02/10 17:26:35 mycroft Exp $
|
||||
*/
|
||||
|
||||
/***********************************************************
|
||||
@ -281,150 +281,6 @@ register int len; /* length of buffer */
|
||||
|
||||
return(h);
|
||||
}
|
||||
#ifdef notdef
|
||||
/*
|
||||
* FUNCTION: iso_hash
|
||||
*
|
||||
* PURPOSE: Fill in fields of afhash structure based upon addr passed.
|
||||
*
|
||||
* RETURNS: none
|
||||
*
|
||||
* SIDE EFFECTS:
|
||||
*
|
||||
* NOTES:
|
||||
*/
|
||||
iso_hash(siso, hp)
|
||||
struct sockaddr_iso *siso; /* address to perform hash on */
|
||||
struct afhash *hp; /* RETURN: hash info here */
|
||||
{
|
||||
u_long buf[sizeof(struct sockaddr_iso)+1/4];
|
||||
register int bufsize;
|
||||
|
||||
|
||||
bzero(buf, sizeof(buf));
|
||||
|
||||
bufsize = iso_netof(&siso->siso_addr, buf);
|
||||
hp->afh_nethash = iso_hashchar((caddr_t)buf, bufsize);
|
||||
|
||||
IFDEBUG(D_ROUTE)
|
||||
printf("iso_hash: iso_netof: bufsize = %d\n", bufsize);
|
||||
ENDDEBUG
|
||||
|
||||
hp->afh_hosthash = iso_hashchar((caddr_t)&siso->siso_addr,
|
||||
siso->siso_addr.isoa_len);
|
||||
|
||||
IFDEBUG(D_ROUTE)
|
||||
printf("iso_hash: %s: nethash = x%x, hosthash = x%x\n",
|
||||
clnp_iso_addrp(&siso->siso_addr), hp->afh_nethash,
|
||||
hp->afh_hosthash);
|
||||
ENDDEBUG
|
||||
}
|
||||
/*
|
||||
* FUNCTION: iso_netof
|
||||
*
|
||||
* PURPOSE: Extract the network portion of the iso address.
|
||||
* The network portion of the iso address varies depending
|
||||
* on the type of address. The network portion of the
|
||||
* address will include the IDP. The network portion is:
|
||||
*
|
||||
* TYPE DESC
|
||||
* t37 The AFI and x.121 (IDI)
|
||||
* osinet The AFI, orgid, snetid
|
||||
* rfc986 The AFI, vers and network part of
|
||||
* internet address.
|
||||
*
|
||||
* RETURNS: number of bytes placed into buf.
|
||||
*
|
||||
* SIDE EFFECTS:
|
||||
*
|
||||
* NOTES: Buf is assumed to be big enough
|
||||
*/
|
||||
iso_netof(isoa, buf)
|
||||
struct iso_addr *isoa; /* address */
|
||||
caddr_t buf; /* RESULT: network portion of address here */
|
||||
{
|
||||
u_int len = 1; /* length of afi */
|
||||
|
||||
switch (isoa->isoa_afi) {
|
||||
case AFI_37:
|
||||
/*
|
||||
* Due to classic x.25 tunnel vision, there is no
|
||||
* net portion of an x.121 address. For our purposes
|
||||
* the AFI will do, so that all x.25 -type addresses
|
||||
* map to the single x.25 SNPA. (Cannot have more than
|
||||
* one, obviously).
|
||||
*/
|
||||
|
||||
break;
|
||||
|
||||
/* case AFI_OSINET:*/
|
||||
case AFI_RFC986: {
|
||||
u_short idi; /* value of idi */
|
||||
|
||||
/* osinet and rfc986 have idi in the same place */
|
||||
CTOH(isoa->rfc986_idi[0], isoa->rfc986_idi[1], idi);
|
||||
|
||||
if (idi == IDI_OSINET)
|
||||
/*
|
||||
* Network portion of OSINET address can only be the IDI. Clearly,
|
||||
* with one x25 interface, one could get to several orgids, and
|
||||
* several snetids.
|
||||
len += (ADDROSINET_IDI_LEN + OVLOSINET_ORGID_LEN +
|
||||
OVLOSINET_SNETID_LEN);
|
||||
*/
|
||||
len += ADDROSINET_IDI_LEN;
|
||||
else if (idi == IDI_RFC986) {
|
||||
u_long inetaddr;
|
||||
struct ovl_rfc986 *o986 = (struct ovl_rfc986 *)isoa;
|
||||
|
||||
/* bump len to include idi and version (1 byte) */
|
||||
len += ADDRRFC986_IDI_LEN + 1;
|
||||
|
||||
/* get inet addr long aligned */
|
||||
bcopy(o986->o986_inetaddr, &inetaddr, sizeof(inetaddr));
|
||||
inetaddr = ntohl(inetaddr); /* convert to host byte order */
|
||||
|
||||
IFDEBUG(D_ROUTE)
|
||||
printf("iso_netof: isoa ");
|
||||
dump_buf(isoa, sizeof(*isoa));
|
||||
printf("iso_netof: inetaddr 0x%x ", inetaddr);
|
||||
ENDDEBUG
|
||||
|
||||
/* bump len by size of network portion of inet address */
|
||||
if (IN_CLASSA(inetaddr)) {
|
||||
len += 4-IN_CLASSA_NSHIFT/8;
|
||||
IFDEBUG(D_ROUTE)
|
||||
printf("iso_netof: class A net len is now %d\n", len);
|
||||
ENDDEBUG
|
||||
} else if (IN_CLASSB(inetaddr)) {
|
||||
len += 4-IN_CLASSB_NSHIFT/8;
|
||||
IFDEBUG(D_ROUTE)
|
||||
printf("iso_netof: class B net len is now %d\n", len);
|
||||
ENDDEBUG
|
||||
} else {
|
||||
len += 4-IN_CLASSC_NSHIFT/8;
|
||||
IFDEBUG(D_ROUTE)
|
||||
printf("iso_netof: class C net len is now %d\n", len);
|
||||
ENDDEBUG
|
||||
}
|
||||
} else
|
||||
len = 0;
|
||||
} break;
|
||||
|
||||
default:
|
||||
len = 0;
|
||||
}
|
||||
|
||||
bcopy((caddr_t)isoa, buf, len);
|
||||
IFDEBUG(D_ROUTE)
|
||||
printf("in_netof: isoa ");
|
||||
dump_buf(isoa, len);
|
||||
printf("in_netof: net ");
|
||||
dump_buf(buf, len);
|
||||
ENDDEBUG
|
||||
return len;
|
||||
}
|
||||
#endif notdef
|
||||
/*
|
||||
* Generic iso control operations (ioctl's).
|
||||
* Ifp is 0 if not an interface-specific ioctl.
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)ns.c 7.8 (Berkeley) 6/27/91
|
||||
* $Id: ns.c,v 1.3 1993/12/18 00:44:23 mycroft Exp $
|
||||
* $Id: ns.c,v 1.4 1994/02/10 17:25:24 mycroft Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -44,7 +44,6 @@
|
||||
|
||||
#include <net/if.h>
|
||||
#include <net/route.h>
|
||||
#include <net/af.h>
|
||||
|
||||
#include <netns/ns.h>
|
||||
#include <netns/ns_if.h>
|
||||
|
Loading…
Reference in New Issue
Block a user