Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / ntp / include / ntif.h
blobebe1631388a9e4a688865bdce7703f04d9136123
1 /* $NetBSD$ */
3 /* this is a hacked version of if.h from unix to contain the stuff we need only to build named (bind) with
4 the minimal amount of changes... by l. kahn */
6 /*
7 * Copyright (c) 1982, 1986 Regents of the University of California.
8 * All rights reserved. The Berkeley software License Agreement
9 * specifies the terms and conditions for redistribution.
12 #ifndef _NET_IF_H
13 #define _NET_IF_H
16 /* #pragma ident "@(#)if.h 1.3 93/06/30 SMI"
17 /* if.h 1.26 90/05/29 SMI; from UCB 7.1 6/4/86 */
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
24 * Structures defining a network interface, providing a packet
25 * transport mechanism (ala level 0 of the PUP protocols).
27 * Each interface accepts output datagrams of a specified maximum
28 * length, and provides higher level routines with input datagrams
29 * received from its medium.
31 * Output occurs when the routine if_output is called, with three parameters:
32 * (*ifp->if_output)(ifp, m, dst)
33 * Here m is the mbuf chain to be sent and dst is the destination address.
34 * The output routine encapsulates the supplied datagram if necessary,
35 * and then transmits it on its medium.
37 * On input, each interface unwraps the data received by it, and either
38 * places it on the input queue of a internetwork datagram routine
39 * and posts the associated software interrupt, or passes the datagram to a raw
40 * packet input routine.
42 * Routines exist for locating interfaces by their addresses
43 * or for locating a interface on a certain network, as well as more general
44 * routing and gateway routines maintaining information used to locate
45 * interfaces. These routines live in the files if.c and route.c
49 * Structure defining a queue for a network interface.
51 * (Would like to call this struct ``if'', but C isn't PL/1.)
54 * Interface request structure used for socket
55 * ioctl's. All interface ioctl's must have parameter
56 * definitions which begin with ifr_name. The
57 * remainder may be interface specific.
59 #ifdef FD_SETSIZE
60 #undef FD_SETSIZE
61 #endif
62 #define FD_SETSIZE 512
63 #include <winsock.h>
64 typedef char *caddr_t;
66 int get_winnt_interfaces();
68 struct ifreq {
69 #define IFNAMSIZ 16
70 char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
71 struct sockaddr ifru_addr;
72 char nt_mask[IFNAMSIZ]; /* new field to store mask returned from nt lookup l. kahn */
74 #define ifr_addr ifru_addr /* address */
75 #define ifr_mask nt_mask /* nt mask in character form */
80 * Structure used in SIOCGIFCONF request.
81 * Used to retrieve interface configuration
82 * for machine (useful for programs which
83 * must know all networks accessible).
85 struct ifconf {
86 int ifc_len; /* size of associated buffer */
87 union {
88 caddr_t ifcu_buf;
89 struct ifreq *ifcu_req;
90 } ifc_ifcu;
91 #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */
92 #define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */
95 #ifdef __cplusplus
97 #endif
99 #endif /* _NET_IF_H */