home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Headers / bsd / netinet / in_var.h < prev    next >
C/C++ Source or Header  |  1993-10-19  |  2KB  |  52 lines

  1. /*
  2.  * Copyright (c) 1985, 1986 Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution and use in source and binary forms are permitted
  6.  * provided that this notice is preserved and that due credit is given
  7.  * to the University of California at Berkeley. The name of the University
  8.  * may not be used to endorse or promote products derived from this
  9.  * software without specific prior written permission. This software
  10.  * is provided ``as is'' without express or implied warranty.
  11.  *
  12.  *    @(#)in_var.h    7.2 (Berkeley) 12/7/87
  13.  */
  14.  
  15. /*
  16.  * Interface address, Internet version.  One of these structures
  17.  * is allocated for each interface with an Internet address.
  18.  * The ifaddr structure contains the protocol-independent part
  19.  * of the structure and is assumed to be first.
  20.  */
  21. struct in_ifaddr {
  22.     struct    ifaddr ia_ifa;        /* protocol-independent info */
  23. #define    ia_addr    ia_ifa.ifa_addr
  24. #define    ia_broadaddr    ia_ifa.ifa_broadaddr
  25. #define    ia_dstaddr    ia_ifa.ifa_dstaddr
  26. #define    ia_ifp        ia_ifa.ifa_ifp
  27.     u_long    ia_net;            /* network number of interface */
  28.     u_long    ia_netmask;        /* mask of net part */
  29.     u_long    ia_subnet;        /* subnet number, including net */
  30.     u_long    ia_subnetmask;        /* mask of net + subnet */
  31.     struct    in_addr ia_netbroadcast; /* broadcast addr for (logical) net */
  32.     int    ia_flags;
  33.     struct    in_ifaddr *ia_next;    /* next in list of internet addresses */
  34. };
  35. /*
  36.  * Given a pointer to an in_ifaddr (ifaddr),
  37.  * return a pointer to the addr as a sockadd_in.
  38.  */
  39. #define    IA_SIN(ia) ((struct sockaddr_in *)(&((struct in_ifaddr *)ia)->ia_addr))
  40. /*
  41.  * ia_flags - Note these flags move into *ia_ifa in net2 (and 4.4) release
  42.  */
  43. #define    IFA_ROUTE        0x01        /* routing entry installed */
  44. #define    IFA_NETMASK_AUTH    0x02        /* authoritative ICMP netmask server */
  45. #define    IFA_AWAITING_MASK    0x04        /* ready to accept netmask reply */
  46.  
  47. #ifdef    KERNEL
  48. struct    in_ifaddr *in_ifaddr;
  49. struct    in_ifaddr *in_iaonnetof();
  50. struct    ifqueue    ipintrq;        /* ip packet input queue */
  51. #endif
  52.