home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilss / sockets / include / netns / h / ns_if next >
Encoding:
Text File  |  1995-01-11  |  1.8 KB  |  70 lines

  1. /* -*-C-*-
  2.  *
  3.  * $Header: /ax/networking:include/netns/ns_if.h:networking  1.1  $
  4.  * $Source: /ax/networking:include/netns/ns_if.h: $
  5.  *
  6.  * Copyright (c) 1995 Acorn Computers Ltd., Cambridge, England
  7.  *
  8.  * $Log:    ns_if.h,v $
  9.  * Revision 1.1  95/01/11  10:17:23  kwelton
  10.  * Initial revision
  11.  * 
  12.  */
  13.  
  14. /* @(#)ns_if.h    1.1 87/07/01 3.2/4.3NFSSRC */
  15. /*
  16.  * Copyright (c) 1985, 1986 Regents of the University of California.
  17.  * All rights reserved.  The Berkeley software License Agreement
  18.  * specifies the terms and conditions for redistribution.
  19.  *
  20.  *    @(#)ns_if.h    7.1 (Berkeley) 6/5/86
  21.  */
  22.  
  23. /*
  24.  * Interface address, xerox version.  One of these structures
  25.  * is allocated for each interface with an internet address.
  26.  * The ifaddr structure contains the protocol-independent part
  27.  * of the structure and is assumed to be first.
  28.  */
  29.  
  30. struct ns_ifaddr {
  31.     struct    ifaddr ia_ifa;        /* protocol-independent info */
  32. #define    ia_addr    ia_ifa.ifa_addr
  33. #define    ia_broadaddr    ia_ifa.ifa_broadaddr
  34. #define    ia_dstaddr    ia_ifa.ifa_dstaddr
  35. #define    ia_ifp        ia_ifa.ifa_ifp
  36.     union    ns_net    ia_net;        /* network number of interface */
  37.     int    ia_flags;
  38.     struct    ns_ifaddr *ia_next;    /* next in list of internet addresses */
  39. };
  40.  
  41. /*
  42.  * Given a pointer to an ns_ifaddr (ifaddr),
  43.  * return a pointer to the addr as a sockadd_ns.
  44.  */
  45.  
  46. #define    IA_SNS(ia) ((struct sockaddr_ns *)(&((struct ns_ifaddr *)ia)->ia_addr))
  47. /*
  48.  * ia_flags
  49.  */
  50. #define    IFA_ROUTE    0x01        /* routing entry installed */
  51.  
  52. /* This is not the right place for this but where is? */
  53. #define    ETHERTYPE_NS    0x0600
  54.  
  55. #ifdef    NSIP
  56. struct nsip_req {
  57.     struct sockaddr rq_ns;    /* must be ns format destination */
  58.     struct sockaddr rq_ip;    /* must be ip format gateway */
  59.     short rq_flags;
  60. };
  61. #endif
  62.  
  63. #ifdef    KERNEL
  64. struct    ns_ifaddr *ns_ifaddr;
  65. struct    ns_ifaddr *ns_iaonnetof();
  66. struct    ifqueue    nsintrq;    /* XNS input packet queue */
  67. #endif
  68.  
  69. /* EOF ns_if.h */
  70.