Remove support for OSI networking in user-land (#ifdef OSI aor CCITT)
in preparation for its removal from the kernel source tree. NB: because a function was deleted, libc is now at version 3.0 (was 2.2 previously).
This commit is contained in:
parent
c87204dc2d
commit
0761cb293e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13940
@ -6,8 +6,8 @@
|
||||
# from CFLAGS below. To remove these strings from just the system call
|
||||
# stubs, remove just -DSYSLIBC_RCS from CFLAGS.
|
||||
LIB=c
|
||||
SHLIB_MAJOR= 2
|
||||
SHLIB_MINOR= 2
|
||||
SHLIB_MAJOR= 3
|
||||
SHLIB_MINOR= 0
|
||||
CFLAGS+=-DLIBC_RCS -DSYSLIBC_RCS
|
||||
AINC= -I${.CURDIR}/${MACHINE}
|
||||
CLEANFILES+=tags
|
||||
|
@ -8,7 +8,7 @@ SRCS+= gethostbydns.c gethostbyht.c gethostbynis.c gethostnamadr.c \
|
||||
getproto.c getprotoent.c getprotoname.c getservbyname.c \
|
||||
getservbyport.c getservent.c herror.c inet_addr.c inet_lnaof.c \
|
||||
inet_makeaddr.c inet_netof.c inet_network.c inet_ntoa.c \
|
||||
iso_addr.c linkaddr.c ns_addr.c ns_ntoa.c rcmd.c recv.c res_comp.c \
|
||||
linkaddr.c ns_addr.c ns_ntoa.c rcmd.c recv.c res_comp.c \
|
||||
res_data.c res_debug.c res_init.c res_mkquery.c res_query.c \
|
||||
res_send.c send.c ether_addr.c
|
||||
|
||||
|
@ -53,12 +53,15 @@
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93";
|
||||
static char rcsid[] = "$Id: res_debug.c,v 1.5 1995/08/21 09:15:34 bde Exp $";
|
||||
static char rcsid[] = "$Id: res_debug.c,v 1.6 1996/01/07 09:14:55 peter Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <netinet/in.h>
|
||||
#ifdef ISO
|
||||
#include <netiso/iso.h>
|
||||
#endif
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <arpa/nameser.h>
|
||||
|
||||
@ -415,7 +418,9 @@ __p_rr(cp, msg, file)
|
||||
{
|
||||
int type, class, dlen, n, c;
|
||||
struct in_addr inaddr;
|
||||
#ifdef ISO
|
||||
struct iso_addr isoa;
|
||||
#endif
|
||||
const u_char *cp1, *cp2;
|
||||
u_int32_t tmpttl, t;
|
||||
int lcnt;
|
||||
@ -556,6 +561,7 @@ __p_rr(cp, msg, file)
|
||||
putc('"', file);
|
||||
break;
|
||||
|
||||
#ifdef ISO
|
||||
case T_NSAP:
|
||||
isoa.isoa_len = dlen;
|
||||
if (isoa.isoa_len > sizeof(isoa.isoa_genaddr))
|
||||
@ -564,6 +570,7 @@ __p_rr(cp, msg, file)
|
||||
(void) fprintf(file, "\t%s", iso_ntoa(&isoa));
|
||||
cp += dlen;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case T_MINFO:
|
||||
case T_RP:
|
||||
|
@ -29,9 +29,10 @@
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)ifconfig.8 8.3 (Berkeley) 1/5/94
|
||||
.\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94
|
||||
.\" $Id$
|
||||
.\"
|
||||
.Dd January 5, 1994
|
||||
.Dd February 6, 1996
|
||||
.Dt IFCONFIG 8
|
||||
.Os BSD 4.2
|
||||
.Sh NAME
|
||||
@ -93,12 +94,12 @@ are specified in hexadecimal.
|
||||
The host number may be omitted on 10Mb/s Ethernet interfaces,
|
||||
which use the hardware physical address,
|
||||
and on interfaces other than the first.
|
||||
For the
|
||||
.Tn ISO
|
||||
family, addresses are specified as a long hexadecimal string,
|
||||
as in the Xerox family. However, two consecutive dots imply a zero
|
||||
byte, and the dots are optional, if the user wishes to (carefully)
|
||||
count out long strings of digits in network byte order.
|
||||
.\" For the
|
||||
.\" .Tn ISO
|
||||
.\" family, addresses are specified as a long hexadecimal string,
|
||||
.\" as in the Xerox family. However, two consecutive dots imply a zero
|
||||
.\" byte, and the dots are optional, if the user wishes to (carefully)
|
||||
.\" count out long strings of digits in network byte order.
|
||||
.It Ar address_family
|
||||
Specifies the
|
||||
.Ar address family
|
||||
@ -108,7 +109,8 @@ with different naming schemes, specifying the address family is recommended.
|
||||
The address or protocol families currently
|
||||
supported are
|
||||
.Dq inet ,
|
||||
.Dq iso ,
|
||||
.\" .Dq iso ,
|
||||
.Dq ipx ,
|
||||
and
|
||||
.Dq ns .
|
||||
.It Ar Interface
|
||||
@ -189,7 +191,8 @@ interface.
|
||||
Not all interfaces support setting the mtu, and some interfaces have
|
||||
range restrictions.
|
||||
.It Cm netmask Ar mask
|
||||
(Inet and ISO)
|
||||
.\" (Inet and ISO)
|
||||
(Inet only)
|
||||
Specify how much of the address to reserve for subdividing
|
||||
networks into sub-networks.
|
||||
The mask includes the network part of the local address
|
||||
@ -206,54 +209,36 @@ and the subnet field should be contiguous with the network
|
||||
portion.
|
||||
.\" see
|
||||
.\" Xr eon 5 .
|
||||
.It Cm nsellength Ar n
|
||||
.Pf ( Tn ISO
|
||||
only)
|
||||
This specifies a trailing number of bytes for a received
|
||||
.Tn NSAP
|
||||
used for local identification, the remaining leading part of which is
|
||||
taken to be the
|
||||
.Tn NET
|
||||
(Network Entity Title).
|
||||
The default value is 1, which is conformant to US
|
||||
.Tn GOSIP .
|
||||
When an ISO address is set in an ifconfig command,
|
||||
it is really the
|
||||
.Tn NSAP
|
||||
which is being specified.
|
||||
For example, in
|
||||
.Tn US GOSIP ,
|
||||
20 hex digits should be
|
||||
specified in the
|
||||
.Tn ISO NSAP
|
||||
to be assigned to the interface.
|
||||
There is some evidence that a number different from 1 may be useful
|
||||
for
|
||||
.Tn AFI
|
||||
37 type addresses.
|
||||
.It Cm trailers
|
||||
Request the use of a ``trailer'' link level encapsulation when
|
||||
sending (default).
|
||||
If a network interface supports
|
||||
.Cm trailers ,
|
||||
the system will, when possible, encapsulate outgoing
|
||||
messages in a manner which minimizes the number of
|
||||
memory to memory copy operations performed by the receiver.
|
||||
On networks that support the Address Resolution Protocol (see
|
||||
.Xr arp 4 ;
|
||||
currently, only 10 Mb/s Ethernet),
|
||||
this flag indicates that the system should request that other
|
||||
systems use trailers when sending to this host.
|
||||
Similarly, trailer encapsulations will be sent to other
|
||||
hosts that have made such requests.
|
||||
Currently used by Internet protocols only.
|
||||
.It Fl trailers
|
||||
Disable the use of a ``trailer'' link level encapsulation.
|
||||
.\" .It Cm nsellength Ar n
|
||||
.\" .Pf ( Tn ISO
|
||||
.\" only)
|
||||
.\" This specifies a trailing number of bytes for a received
|
||||
.\" .Tn NSAP
|
||||
.\" used for local identification, the remaining leading part of which is
|
||||
.\" taken to be the
|
||||
.\" .Tn NET
|
||||
.\" (Network Entity Title).
|
||||
.\" The default value is 1, which is conformant to US
|
||||
.\" .Tn GOSIP .
|
||||
.\" When an ISO address is set in an ifconfig command,
|
||||
.\" it is really the
|
||||
.\" .Tn NSAP
|
||||
.\" which is being specified.
|
||||
.\" For example, in
|
||||
.\" .Tn US GOSIP ,
|
||||
.\" 20 hex digits should be
|
||||
.\" specified in the
|
||||
.\" .Tn ISO NSAP
|
||||
.\" to be assigned to the interface.
|
||||
.\" There is some evidence that a number different from 1 may be useful
|
||||
.\" for
|
||||
.\" .Tn AFI
|
||||
.\" 37 type addresses.
|
||||
.It Cm link[0-2]
|
||||
Enable special processing of the link level of the interface.
|
||||
These three options are interface specific in actual effect, however,
|
||||
they are in general used to select special modes of operation. An example
|
||||
of this is to enable SLIP compression. Currently, only used by SLIP.
|
||||
of this is to enable SLIP compression.
|
||||
.It Fl link[0-2]
|
||||
Disable special processing at the link level with the specified interface.
|
||||
.It Cm up
|
||||
@ -266,26 +251,29 @@ the hardware will be re-initialized.
|
||||
.Pp
|
||||
.Pp
|
||||
.Nm Ifconfig
|
||||
.Ar -a
|
||||
.Fl a
|
||||
displays information on all interfaces. When followed by a configuration
|
||||
parameter, it will also set the configuration on all interfaces.
|
||||
.Pp
|
||||
.Nm Ifconfig
|
||||
.Ar -au
|
||||
.Fl au
|
||||
is similar to
|
||||
.Nm ifconfig
|
||||
.Ar -a ,
|
||||
.Fl a ,
|
||||
except it only affects interfaces that are currently marked as up.
|
||||
Conversely,
|
||||
Similarly,
|
||||
.Nm ifconfig
|
||||
.Ar -ad
|
||||
.Fl ad
|
||||
affects only interfaces that are marked down.
|
||||
.Pp
|
||||
.Nm Ifconfig
|
||||
The
|
||||
.Nm
|
||||
program
|
||||
displays the current configuration for a network interface
|
||||
when no optional parameters are supplied.
|
||||
If a protocol family is specified,
|
||||
Ifconfig will report only the details specific to that protocol family.
|
||||
.Nm ifconfig
|
||||
will report only the details specific to that protocol family.
|
||||
.Pp
|
||||
Only the super-user may modify the configuration of a network interface.
|
||||
.Sh DIAGNOSTICS
|
||||
|
@ -72,9 +72,11 @@ static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
|
||||
#include <netns/ns.h>
|
||||
#include <netns/ns_if.h>
|
||||
|
||||
#ifdef ISO
|
||||
#define EON
|
||||
#include <netiso/iso.h>
|
||||
#include <netiso/iso_var.h>
|
||||
#endif
|
||||
#include <sys/protosw.h>
|
||||
|
||||
#include <ctype.h>
|
||||
@ -90,8 +92,10 @@ static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94";
|
||||
|
||||
struct ifreq ifr, ridreq;
|
||||
struct ifaliasreq addreq;
|
||||
#ifdef ISO
|
||||
struct iso_ifreq iso_ridreq;
|
||||
struct iso_aliasreq iso_addreq;
|
||||
#endif
|
||||
struct sockaddr_in netmask;
|
||||
|
||||
char name[32];
|
||||
@ -110,7 +114,11 @@ extern int errno;
|
||||
|
||||
int setifflags(), setifaddr(), setifdstaddr(), setifnetmask();
|
||||
int setifmetric(), setifmtu(), setifbroadaddr(), setifipdst();
|
||||
int notealias(), setsnpaoffset(), setnsellength(), notrailers();
|
||||
int notealias();
|
||||
#ifdef ISO
|
||||
int setsnpaoffset(), setnsellength();
|
||||
#endif
|
||||
int notrailers();
|
||||
|
||||
#define NEXTARG 0xffffff
|
||||
|
||||
@ -139,8 +147,10 @@ struct cmd {
|
||||
{ "metric", NEXTARG, setifmetric },
|
||||
{ "broadcast", NEXTARG, setifbroadaddr },
|
||||
{ "ipdst", NEXTARG, setifipdst },
|
||||
#ifdef ISO
|
||||
{ "snpaoffset", NEXTARG, setsnpaoffset },
|
||||
{ "nsellength", NEXTARG, setnsellength },
|
||||
#endif
|
||||
{ "link0", IFF_LINK0, setifflags },
|
||||
{ "-link0", -IFF_LINK0, setifflags },
|
||||
{ "link1", IFF_LINK1, setifflags },
|
||||
@ -162,7 +172,9 @@ struct cmd {
|
||||
int in_status(), in_getaddr();
|
||||
int ipx_status(), ipx_getaddr();
|
||||
int xns_status(), xns_getaddr();
|
||||
#ifdef ISO
|
||||
int iso_status(), iso_getaddr();
|
||||
#endif
|
||||
int ether_status();
|
||||
|
||||
/* Known address families */
|
||||
@ -183,8 +195,10 @@ struct afswtch {
|
||||
SIOCDIFADDR, SIOCAIFADDR, C(ridreq), C(addreq) },
|
||||
{ "ns", AF_NS, xns_status, xns_getaddr,
|
||||
SIOCDIFADDR, SIOCAIFADDR, C(ridreq), C(addreq) },
|
||||
#ifdef ISO
|
||||
{ "iso", AF_ISO, iso_status, iso_getaddr,
|
||||
SIOCDIFADDR_ISO, SIOCAIFADDR_ISO, C(iso_ridreq), C(iso_addreq) },
|
||||
#endif
|
||||
{ "ether", AF_INET, ether_status, NULL }, /* XXX not real!! */
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
@ -408,8 +422,10 @@ ifconfig(argc,argv,af,rafp)
|
||||
}
|
||||
argc--, argv++;
|
||||
}
|
||||
#ifdef ISO
|
||||
if (af == AF_ISO)
|
||||
adjust_nsellength();
|
||||
#endif
|
||||
if (setipdst && af==AF_IPX) {
|
||||
struct ipxip_req rq;
|
||||
int size = sizeof(rq);
|
||||
@ -574,11 +590,13 @@ setifmtu(val)
|
||||
perror("ioctl (set mtu)");
|
||||
}
|
||||
|
||||
#ifdef ISO
|
||||
setsnpaoffset(val)
|
||||
char *val;
|
||||
{
|
||||
iso_addreq.ifra_snpaoffset = atoi(val);
|
||||
}
|
||||
#endif
|
||||
|
||||
#define IFFBITS \
|
||||
"\020\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5POINTOPOINT\6NOTRAILERS\7RUNNING\10NOARP\
|
||||
@ -764,6 +782,7 @@ xns_status(force)
|
||||
putchar('\n');
|
||||
}
|
||||
|
||||
#ifdef ISO
|
||||
iso_status(force)
|
||||
int force;
|
||||
{
|
||||
@ -803,7 +822,7 @@ iso_status(force)
|
||||
|
||||
putchar('\n');
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
ether_status()
|
||||
{
|
||||
@ -940,6 +959,7 @@ char *addr;
|
||||
printf("Attempt to set XNS netmask will be ineffectual\n");
|
||||
}
|
||||
|
||||
#ifdef ISO
|
||||
#define SISO(x) ((struct sockaddr_iso *) &(x))
|
||||
struct sockaddr_iso *sisotab[] = {
|
||||
SISO(iso_ridreq.ifr_Addr), SISO(iso_addreq.ifra_addr),
|
||||
@ -985,3 +1005,4 @@ adjust_nsellength()
|
||||
fixnsel(sisotab[ADDR]);
|
||||
fixnsel(sisotab[DSTADDR]);
|
||||
}
|
||||
#endif
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
PROG= route
|
||||
MAN8= route.8
|
||||
SRCS= route.c ccitt_addr.c keywords.h
|
||||
SRCS= route.c keywords.h # ccitt_addr.h
|
||||
CFLAGS+=-I.
|
||||
CLEANFILES+=keywords.h
|
||||
BINOWN= root
|
||||
|
@ -43,7 +43,7 @@ static const char copyright[] =
|
||||
static char sccsid[] = "@(#)route.c 8.3 (Berkeley) 3/19/94";
|
||||
*/
|
||||
static const char rcsid[] =
|
||||
"$Id: route.c,v 1.3 1996/01/02 20:09:22 wollman Exp $";
|
||||
"$Id: route.c,v 1.4 1996/01/20 12:56:57 mpp Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -58,8 +58,12 @@ static const char rcsid[] =
|
||||
#include <net/if_dl.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netns/ns.h>
|
||||
#ifdef ISO
|
||||
#include <netiso/iso.h>
|
||||
#endif
|
||||
#ifdef CCITT
|
||||
#include <netccitt/x25.h>
|
||||
#endif
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
|
||||
@ -86,9 +90,13 @@ union sockunion {
|
||||
struct sockaddr sa;
|
||||
struct sockaddr_in sin;
|
||||
struct sockaddr_ns sns;
|
||||
#ifdef ISO
|
||||
struct sockaddr_iso siso;
|
||||
#endif
|
||||
struct sockaddr_dl sdl;
|
||||
#ifdef CCITT
|
||||
struct sockaddr_x25 sx25;
|
||||
#endif
|
||||
} so_dst, so_gate, so_mask, so_genmask, so_ifa, so_ifp;
|
||||
|
||||
typedef union sockunion *sup;
|
||||
@ -105,7 +113,9 @@ void flushroutes(), newroute(), monitor(), sockaddr(), sodump(), bprintf();
|
||||
void print_getmsg(), print_rtmsg(), pmsg_common(), pmsg_addrs(), mask_addr();
|
||||
int getaddr(), rtmsg(), x25_makemask();
|
||||
extern char *inet_ntoa(), *iso_ntoa(), *link_ntoa();
|
||||
#ifdef CCITT
|
||||
extern int ccitt_addr __P((char *, struct sockaddr_x25 *));
|
||||
#endif
|
||||
|
||||
__dead void usage __P((const char *)) __dead2;
|
||||
|
||||
@ -225,12 +235,16 @@ flushroutes(argc, argv)
|
||||
case K_LINK:
|
||||
af = AF_LINK;
|
||||
break;
|
||||
#ifdef ISO
|
||||
case K_ISO:
|
||||
case K_OSI:
|
||||
af = AF_ISO;
|
||||
break;
|
||||
#endif
|
||||
#ifdef CCITT
|
||||
case K_X25:
|
||||
af = AF_CCITT;
|
||||
#endif
|
||||
default:
|
||||
goto bad;
|
||||
} else
|
||||
@ -349,11 +363,12 @@ routename(sa)
|
||||
case AF_LINK:
|
||||
return (link_ntoa((struct sockaddr_dl *)sa));
|
||||
|
||||
#ifdef ISO
|
||||
case AF_ISO:
|
||||
(void) sprintf(line, "iso %s",
|
||||
iso_ntoa(&((struct sockaddr_iso *)sa)->siso_addr));
|
||||
break;
|
||||
|
||||
#endif
|
||||
default:
|
||||
{ u_short *s = (u_short *)sa;
|
||||
u_short *slim = s + ((sa->sa_len + 1) >> 1);
|
||||
@ -442,10 +457,12 @@ netname(sa)
|
||||
case AF_LINK:
|
||||
return (link_ntoa((struct sockaddr_dl *)sa));
|
||||
|
||||
#ifdef ISO
|
||||
case AF_ISO:
|
||||
(void) sprintf(line, "iso %s",
|
||||
iso_ntoa(&((struct sockaddr_iso *)sa)->siso_addr));
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
{ u_short *s = (u_short *)sa->sa_data;
|
||||
@ -510,19 +527,23 @@ newroute(argc, argv)
|
||||
af = AF_LINK;
|
||||
aflen = sizeof(struct sockaddr_dl);
|
||||
break;
|
||||
#ifdef ISO
|
||||
case K_OSI:
|
||||
case K_ISO:
|
||||
af = AF_ISO;
|
||||
aflen = sizeof(struct sockaddr_iso);
|
||||
break;
|
||||
#endif
|
||||
case K_INET:
|
||||
af = AF_INET;
|
||||
aflen = sizeof(struct sockaddr_in);
|
||||
break;
|
||||
#ifdef CCITT
|
||||
case K_X25:
|
||||
af = AF_CCITT;
|
||||
aflen = sizeof(struct sockaddr_x25);
|
||||
break;
|
||||
#endif
|
||||
case K_SA:
|
||||
af = PF_ROUTE;
|
||||
aflen = sizeof(union sockunion);
|
||||
@ -748,7 +769,9 @@ getaddr(which, s, hpp)
|
||||
{
|
||||
register sup su;
|
||||
struct ns_addr ns_addr();
|
||||
#ifdef ISO
|
||||
struct iso_addr *iso_addr();
|
||||
#endif
|
||||
struct hostent *hp;
|
||||
struct netent *np;
|
||||
u_long val;
|
||||
@ -812,6 +835,7 @@ getaddr(which, s, hpp)
|
||||
su->sns.sns_addr = ns_addr(s);
|
||||
return (!ns_nullhost(su->sns.sns_addr));
|
||||
|
||||
#ifdef ISO
|
||||
case AF_OSI:
|
||||
su->siso.siso_addr = *iso_addr(s);
|
||||
if (which == RTA_NETMASK || which == RTA_GENMASK) {
|
||||
@ -821,14 +845,17 @@ getaddr(which, s, hpp)
|
||||
su->siso.siso_len = 1 + cp - (char *)su;
|
||||
}
|
||||
return (1);
|
||||
#endif
|
||||
|
||||
case AF_LINK:
|
||||
link_addr(s, &su->sdl);
|
||||
return (1);
|
||||
|
||||
#ifdef ISO
|
||||
case AF_CCITT:
|
||||
ccitt_addr(s, &su->sx25);
|
||||
return (which == RTA_DST ? x25_makemask() : 1);
|
||||
#endif
|
||||
|
||||
case PF_ROUTE:
|
||||
su->sa.sa_len = sizeof(*su);
|
||||
@ -870,6 +897,7 @@ getaddr(which, s, hpp)
|
||||
errx(EX_NOHOST, "bad address: %s", s);
|
||||
}
|
||||
|
||||
#ifdef CCITT
|
||||
int
|
||||
x25_makemask()
|
||||
{
|
||||
@ -884,6 +912,7 @@ x25_makemask()
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
short ns_nullh[] = {0,0,0};
|
||||
short ns_bh[] = {-1,-1,-1};
|
||||
@ -1068,13 +1097,17 @@ mask_addr()
|
||||
switch (so_dst.sa.sa_family) {
|
||||
case AF_NS:
|
||||
case AF_INET:
|
||||
#ifdef CCITT
|
||||
case AF_CCITT:
|
||||
#endif
|
||||
case 0:
|
||||
return;
|
||||
#ifdef ISO
|
||||
case AF_ISO:
|
||||
olen = MIN(so_dst.siso.siso_nlen,
|
||||
MAX(so_mask.sa.sa_len - 6, 0));
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
cp1 = so_mask.sa.sa_len + 1 + (char *)&so_dst;
|
||||
cp2 = so_dst.sa.sa_len + 1 + (char *)&so_dst;
|
||||
@ -1083,11 +1116,13 @@ mask_addr()
|
||||
cp2 = so_mask.sa.sa_len + 1 + (char *)&so_mask;
|
||||
while (cp1 > so_dst.sa.sa_data)
|
||||
*--cp1 &= *--cp2;
|
||||
#ifdef ISO
|
||||
switch (so_dst.sa.sa_family) {
|
||||
case AF_ISO:
|
||||
so_dst.siso.siso_nlen = olen;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
char *msgtypes[] = {
|
||||
@ -1336,10 +1371,12 @@ sodump(su, which)
|
||||
(void) printf("%s: link %s; ",
|
||||
which, link_ntoa(&su->sdl));
|
||||
break;
|
||||
#ifdef ISO
|
||||
case AF_ISO:
|
||||
(void) printf("%s: iso %s; ",
|
||||
which, iso_ntoa(&su->siso.siso_addr));
|
||||
break;
|
||||
#endif
|
||||
case AF_INET:
|
||||
(void) printf("%s: inet %s; ",
|
||||
which, inet_ntoa(su->sin.sin_addr));
|
||||
|
@ -1,10 +1,10 @@
|
||||
# @(#)Makefile 8.1 (Berkeley) 6/12/93
|
||||
|
||||
PROG= netstat
|
||||
SRCS= if.c inet.c iso.c main.c mbuf.c mroute.c ipx.c ns.c route.c \
|
||||
tp_astring.c unix.c
|
||||
SRCS= if.c inet.c main.c mbuf.c mroute.c ipx.c ns.c route.c \
|
||||
unix.c # iso.c tp_astring.c
|
||||
CFLAGS+=-I/sys # -g
|
||||
.PATH: ${.CURDIR}/../../sys/netiso
|
||||
#.PATH: ${.CURDIR}/../../sys/netiso
|
||||
BINGRP= kmem
|
||||
BINMODE=2555
|
||||
LDADD= -lkvm -lipx
|
||||
|
@ -47,8 +47,10 @@ static char sccsid[] = "@(#)if.c 8.3 (Berkeley) 4/28/95";
|
||||
#include <netipx/ipx_if.h>
|
||||
#include <netns/ns.h>
|
||||
#include <netns/ns_if.h>
|
||||
#ifdef ISO
|
||||
#include <netiso/iso.h>
|
||||
#include <netiso/iso_var.h>
|
||||
#endif
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <signal.h>
|
||||
@ -78,7 +80,9 @@ intpr(interval, ifnetaddr)
|
||||
struct in_ifaddr in;
|
||||
struct ipx_ifaddr ipx;
|
||||
struct ns_ifaddr ns;
|
||||
#ifdef ISO
|
||||
struct iso_ifaddr iso;
|
||||
#endif
|
||||
} ifaddr;
|
||||
u_long ifaddraddr;
|
||||
struct sockaddr *sa;
|
||||
|
@ -180,6 +180,7 @@ struct protox nsprotox[] = {
|
||||
0, 0 }
|
||||
};
|
||||
|
||||
#ifdef ISO
|
||||
struct protox isoprotox[] = {
|
||||
{ ISO_TP, N_TPSTAT, 1, iso_protopr,
|
||||
tp_stats, "tp" },
|
||||
@ -192,8 +193,13 @@ struct protox isoprotox[] = {
|
||||
{ -1, -1, 0, 0,
|
||||
0, 0 }
|
||||
};
|
||||
#endif
|
||||
|
||||
struct protox *protoprotox[] = { protox, ipxprotox, nsprotox, isoprotox, NULL };
|
||||
struct protox *protoprotox[] = { protox, ipxprotox, nsprotox,
|
||||
#ifdef ISO
|
||||
isoprotox,
|
||||
#endif
|
||||
NULL };
|
||||
|
||||
static void printproto __P((struct protox *, char *));
|
||||
static void usage __P((void));
|
||||
@ -246,8 +252,10 @@ main(argc, argv)
|
||||
af = AF_INET;
|
||||
else if (strcmp(optarg, "unix") == 0)
|
||||
af = AF_UNIX;
|
||||
#ifdef ISO
|
||||
else if (strcmp(optarg, "iso") == 0)
|
||||
af = AF_ISO;
|
||||
#endif
|
||||
else {
|
||||
errx(1, "%s: unknown address family", optarg);
|
||||
}
|
||||
@ -419,9 +427,11 @@ main(argc, argv)
|
||||
if (af == AF_NS || af == AF_UNSPEC)
|
||||
for (tp = nsprotox; tp->pr_name; tp++)
|
||||
printproto(tp, tp->pr_name);
|
||||
#ifdef ISO
|
||||
if (af == AF_ISO || af == AF_UNSPEC)
|
||||
for (tp = isoprotox; tp->pr_name; tp++)
|
||||
printproto(tp, tp->pr_name);
|
||||
#endif
|
||||
if ((af == AF_UNIX || af == AF_UNSPEC) && !sflag)
|
||||
unixpr(nl[N_UNIXSW].n_value);
|
||||
exit(0);
|
||||
|
@ -1,6 +1,6 @@
|
||||
#if !defined(lint) && !defined(SABER)
|
||||
static char sccsid[] = "@(#)db_dump.c 4.33 (Berkeley) 3/3/91";
|
||||
static char rcsid[] = "$Id: db_dump.c,v 1.4 1995/08/20 21:18:14 peter Exp $";
|
||||
static char rcsid[] = "$Id: db_dump.c,v 1.5 1996/01/07 05:48:21 peter Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -61,7 +61,9 @@ static char rcsid[] = "$Id: db_dump.c,v 1.4 1995/08/20 21:18:14 peter Exp $";
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <netinet/in.h>
|
||||
#ifdef ISO
|
||||
#include <netiso/iso.h>
|
||||
#endif
|
||||
#include <arpa/nameser.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
@ -360,7 +362,9 @@ db_dump(htp, fp, zone, origin)
|
||||
u_int32_t n;
|
||||
u_int32_t addr;
|
||||
int j, i;
|
||||
#ifdef ISO
|
||||
struct iso_addr isoa;
|
||||
#endif
|
||||
register u_char *cp;
|
||||
u_char *end;
|
||||
char *proto, *sep;
|
||||
@ -556,6 +560,7 @@ db_dump(htp, fp, zone, origin)
|
||||
(void) fputs("\"", fp);
|
||||
break;
|
||||
|
||||
#ifdef ISO
|
||||
case T_NSAP:
|
||||
isoa.isoa_len = dp->d_size;
|
||||
if (isoa.isoa_len > sizeof(isoa.isoa_genaddr))
|
||||
@ -564,6 +569,7 @@ db_dump(htp, fp, zone, origin)
|
||||
isoa.isoa_len);
|
||||
(void) fputs(iso_ntoa(&isoa), fp);
|
||||
break;
|
||||
#endif
|
||||
#ifdef LOC_RR
|
||||
case T_LOC:
|
||||
(void) fputs(loc_ntoa(dp->d_data, NULL), fp);
|
||||
|
@ -1,6 +1,6 @@
|
||||
#if !defined(lint) && !defined(SABER)
|
||||
static char sccsid[] = "@(#)db_load.c 4.38 (Berkeley) 3/2/91";
|
||||
static char rcsid[] = "$Id: db_load.c,v 1.4 1995/08/20 21:18:22 peter Exp $";
|
||||
static char rcsid[] = "$Id: db_load.c,v 1.5 1996/01/07 05:48:25 peter Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -65,7 +65,9 @@ static char rcsid[] = "$Id: db_load.c,v 1.4 1995/08/20 21:18:22 peter Exp $";
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#include <netinet/in.h>
|
||||
#ifdef ISO
|
||||
#include <netiso/iso.h>
|
||||
#endif
|
||||
#include <arpa/nameser.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <stdio.h>
|
||||
@ -182,7 +184,9 @@ db_load(filename, in_origin, zp, def_domain)
|
||||
int c, class, type, dbflags, dataflags, multiline;
|
||||
u_int32_t ttl;
|
||||
struct databuf *dp;
|
||||
#ifdef ISO
|
||||
struct iso_addr *isoa;
|
||||
#endif
|
||||
FILE *fp;
|
||||
int slineno, i, errs, didinclude;
|
||||
register u_int32_t n;
|
||||
@ -681,6 +685,7 @@ db_load(filename, in_origin, zp, def_domain)
|
||||
endline(fp);
|
||||
break;
|
||||
|
||||
#ifdef ISO
|
||||
case T_NSAP:
|
||||
isoa = iso_addr(buf);
|
||||
if (!isoa)
|
||||
@ -689,6 +694,7 @@ db_load(filename, in_origin, zp, def_domain)
|
||||
bcopy(isoa->isoa_genaddr, data, n);
|
||||
endline(fp);
|
||||
break;
|
||||
#endif
|
||||
#ifdef LOC_RR
|
||||
case T_LOC:
|
||||
cp = buf + (n = strlen(buf));
|
||||
|
@ -70,7 +70,7 @@ char copyright[] =
|
||||
|
||||
#if !defined(lint) && !defined(SABER)
|
||||
static char sccsid[] = "@(#)named-xfer.c 4.18 (Berkeley) 3/7/91";
|
||||
static char rcsid[] = "$Id: named-xfer.c,v 1.4 1995/08/20 21:49:40 peter Exp $";
|
||||
static char rcsid[] = "$Id: named-xfer.c,v 1.5 1996/01/07 05:48:49 peter Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -79,7 +79,9 @@ static char rcsid[] = "$Id: named-xfer.c,v 1.4 1995/08/20 21:49:40 peter Exp $";
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
#ifdef ISO
|
||||
#include <netiso/iso.h>
|
||||
#endif
|
||||
#if defined(__osf__)
|
||||
# include <sys/mbuf.h>
|
||||
# include <net/route.h>
|
||||
@ -1155,7 +1157,9 @@ print_output(msg, msglen, rrp)
|
||||
register HEADER *hp = (HEADER *) msg;
|
||||
u_int32_t addr, ttl;
|
||||
int i, j, tab, result, class, type, dlen, n1, n;
|
||||
#ifdef ISO
|
||||
struct iso_addr isoa;
|
||||
#endif
|
||||
char data[BUFSIZ];
|
||||
u_char *cp1, *cp2, *temp_ptr;
|
||||
char *cdata, *origin, *proto, dname[MAXDNAME];
|
||||
@ -1538,6 +1542,7 @@ print_output(msg, msglen, rrp)
|
||||
(void) fputs("\"\n", dbfp);
|
||||
break;
|
||||
|
||||
#ifdef ISO
|
||||
case T_NSAP:
|
||||
isoa.isoa_len = n;
|
||||
if (isoa.isoa_len > sizeof(isoa.isoa_genaddr))
|
||||
@ -1545,6 +1550,7 @@ print_output(msg, msglen, rrp)
|
||||
bcopy(cp, isoa.isoa_genaddr, isoa.isoa_len);
|
||||
fprintf(dbfp, "%s\n", iso_ntoa(&isoa));
|
||||
break;
|
||||
#endif
|
||||
|
||||
case T_UINFO:
|
||||
(void) fprintf(dbfp, "\"%s\"\n", cp);
|
||||
|
@ -55,7 +55,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)debug.c 5.26 (Berkeley) 3/21/91";
|
||||
static char rcsid[] = "$Id: debug.c,v 1.3 1995/05/30 03:49:13 rgrimes Exp $";
|
||||
static char rcsid[] = "$Id: debug.c,v 1.4 1995/08/20 22:32:46 peter Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -72,7 +72,9 @@ static char rcsid[] = "$Id: debug.c,v 1.3 1995/05/30 03:49:13 rgrimes Exp $";
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <netinet/in.h>
|
||||
#ifdef ISO
|
||||
#include <netiso/iso.h>
|
||||
#endif
|
||||
#include <arpa/nameser.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <resolv.h>
|
||||
@ -254,7 +256,9 @@ Print_rr(cp, msg, eom, file)
|
||||
int type, class, dlen, n, c;
|
||||
u_int32_t rrttl, ttl;
|
||||
struct in_addr inaddr;
|
||||
#ifdef ISO
|
||||
struct iso_addr isoa;
|
||||
#endif
|
||||
u_char *cp1, *cp2;
|
||||
int debug;
|
||||
|
||||
@ -462,6 +466,7 @@ Print_rr(cp, msg, eom, file)
|
||||
(void) fputs("\"\n", file);
|
||||
break;
|
||||
|
||||
#ifdef ISO
|
||||
case T_NSAP:
|
||||
isoa.isoa_len = dlen;
|
||||
if (isoa.isoa_len > sizeof(isoa.isoa_genaddr))
|
||||
@ -470,6 +475,7 @@ Print_rr(cp, msg, eom, file)
|
||||
fprintf(file, "\tnsap = %s\n", iso_ntoa(&isoa));
|
||||
cp += dlen;
|
||||
break;
|
||||
#endif
|
||||
|
||||
case T_UINFO:
|
||||
fprintf(file,"\tuser info = %s\n", cp);
|
||||
|
@ -55,7 +55,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char sccsid[] = "@(#)list.c 5.23 (Berkeley) 3/21/91";
|
||||
static char rcsid[] = "$Id: list.c,v 1.3 1995/05/30 03:49:15 rgrimes Exp $";
|
||||
static char rcsid[] = "$Id: list.c,v 1.4 1995/08/20 22:32:47 peter Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
@ -73,7 +73,9 @@ static char rcsid[] = "$Id: list.c,v 1.3 1995/05/30 03:49:15 rgrimes Exp $";
|
||||
#include <sys/param.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#ifdef ISO
|
||||
#include <netiso/iso.h>
|
||||
#endif
|
||||
#include <arpa/nameser.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <resolv.h>
|
||||
@ -595,7 +597,9 @@ PrintListInfo(file, msg, eom, qtype, domain)
|
||||
u_int32_t ttl;
|
||||
int n, pref;
|
||||
struct in_addr inaddr;
|
||||
#ifdef ISO
|
||||
struct iso_addr isoa;
|
||||
#endif
|
||||
char name[NAME_LEN];
|
||||
char name2[NAME_LEN];
|
||||
Boolean stripped;
|
||||
@ -802,6 +806,7 @@ PrintListInfo(file, msg, eom, qtype, domain)
|
||||
}
|
||||
break;
|
||||
|
||||
#ifdef ISO
|
||||
case T_NSAP:
|
||||
isoa.isoa_len = dlen;
|
||||
if (isoa.isoa_len > sizeof(isoa.isoa_genaddr))
|
||||
@ -809,6 +814,7 @@ PrintListInfo(file, msg, eom, qtype, domain)
|
||||
bcopy(cp, isoa.isoa_genaddr, isoa.isoa_len);
|
||||
fprintf(file, " %s", iso_ntoa(&isoa));
|
||||
break;
|
||||
#endif
|
||||
|
||||
case T_MINFO:
|
||||
case T_RP:
|
||||
|
@ -17,7 +17,7 @@ PROG= sendmail
|
||||
# spiral snail, but it will work.
|
||||
DBMDEF= -DNEWDB
|
||||
|
||||
CFLAGS+=-I${.CURDIR} ${DBMDEF} -DNETISO
|
||||
CFLAGS+=-I${.CURDIR} ${DBMDEF} #-DNETISO
|
||||
|
||||
SRCS= alias.c arpadate.c clock.c collect.c conf.c convtime.c daemon.c \
|
||||
deliver.c domain.c envelope.c err.c headers.c macro.c main.c map.c \
|
||||
|
Loading…
Reference in New Issue
Block a user