1 /* this is a hacked version of if.h from unix to contain the stuff we need only to build named (bind) with
2 the minimal amount of changes... by l. kahn */
5 * Copyright (c) 1982, 1986 Regents of the University of California.
6 * All rights reserved. The Berkeley software License Agreement
7 * specifies the terms and conditions for redistribution.
14 /* #pragma ident "@(#)if.h 1.3 93/06/30 SMI"
15 /* if.h 1.26 90/05/29 SMI; from UCB 7.1 6/4/86 */
22 * Structures defining a network interface, providing a packet
23 * transport mechanism (ala level 0 of the PUP protocols).
25 * Each interface accepts output datagrams of a specified maximum
26 * length, and provides higher level routines with input datagrams
27 * received from its medium.
29 * Output occurs when the routine if_output is called, with three parameters:
30 * (*ifp->if_output)(ifp, m, dst)
31 * Here m is the mbuf chain to be sent and dst is the destination address.
32 * The output routine encapsulates the supplied datagram if necessary,
33 * and then transmits it on its medium.
35 * On input, each interface unwraps the data received by it, and either
36 * places it on the input queue of a internetwork datagram routine
37 * and posts the associated software interrupt, or passes the datagram to a raw
38 * packet input routine.
40 * Routines exist for locating interfaces by their addresses
41 * or for locating a interface on a certain network, as well as more general
42 * routing and gateway routines maintaining information used to locate
43 * interfaces. These routines live in the files if.c and route.c
47 * Structure defining a queue for a network interface.
49 * (Would like to call this struct ``if'', but C isn't PL/1.)
52 * Interface request structure used for socket
53 * ioctl's. All interface ioctl's must have parameter
54 * definitions which begin with ifr_name. The
55 * remainder may be interface specific.
60 #define FD_SETSIZE 512
62 typedef char *caddr_t;
64 int get_winnt_interfaces();
68 char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
69 struct sockaddr ifru_addr;
70 char nt_mask[IFNAMSIZ]; /* new field to store mask returned from nt lookup l. kahn */
72 #define ifr_addr ifru_addr /* address */
73 #define ifr_mask nt_mask /* nt mask in character form */
78 * Structure used in SIOCGIFCONF request.
79 * Used to retrieve interface configuration
80 * for machine (useful for programs which
81 * must know all networks accessible).
84 int ifc_len; /* size of associated buffer */
87 struct ifreq *ifcu_req;
89 #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
90 #define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */
97 #endif /* _NET_IF_H */