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

  1. #if    CMU
  2. /* 
  3.  **********************************************************************
  4.  * Mach Operating System
  5.  * Copyright (c) 1986 Carnegie-Mellon University
  6.  *  
  7.  * This software was developed by the Mach operating system
  8.  * project at Carnegie-Mellon University's Department of Computer
  9.  * Science. Software contributors as of May 1986 include Mike Accetta, 
  10.  * Robert Baron, William Bolosky, Jonathan Chew, David Golub, 
  11.  * Glenn Marcy, Richard Rashid, Avie Tevanian and Michael Young. 
  12.  * 
  13.  * Some software in these files are derived from sources other
  14.  * than CMU.  Previous copyright and other source notices are
  15.  * preserved below and permission to use such software is
  16.  * dependent on licenses from those institutions.
  17.  * 
  18.  * Permission to use the CMU portion of this software for 
  19.  * any non-commercial research and development purpose is
  20.  * granted with the understanding that appropriate credit
  21.  * will be given to CMU, the Mach project and its authors.
  22.  * The Mach project would appreciate being notified of any
  23.  * modifications and of redistribution of this software so that
  24.  * bug fixes and enhancements may be distributed to users.
  25.  *
  26.  * All other rights are reserved to Carnegie-Mellon University.
  27.  **********************************************************************
  28.  */ 
  29.  
  30. #endif    CMU
  31. /*
  32.  * Copyright (c) 1980, 1986 Regents of the University of California.
  33.  * All rights reserved.  The Berkeley software License Agreement
  34.  * specifies the terms and conditions for redistribution.
  35.  *
  36.  *    @(#)af.h    7.1 (Berkeley) 6/4/86
  37.  */
  38.  
  39. /*
  40.  * Address family routines,
  41.  * used in handling generic sockaddr structures.
  42.  *
  43.  * Hash routine is called
  44.  *    af_hash(addr, h);
  45.  *    struct sockaddr *addr; struct afhash *h;
  46.  * producing an afhash structure for addr.
  47.  *
  48.  * Netmatch routine is called
  49.  *    af_netmatch(addr1, addr2);
  50.  * where addr1 and addr2 are sockaddr *.  Returns 1 if network
  51.  * values match, 0 otherwise.
  52.  */
  53. struct afswitch {
  54.     int    (*af_hash)();
  55.     int    (*af_netmatch)();
  56. };
  57.  
  58. struct afhash {
  59.     u_int    afh_hosthash;
  60.     u_int    afh_nethash;
  61. };
  62.  
  63. #ifdef KERNEL
  64. struct    afswitch afswitch[];
  65. #endif
  66.