/* * Copyright (c) 1980, 1986 Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms are permitted * provided that this notice is preserved and that due credit is given * to the University of California at Berkeley. The name of the University * may not be used to endorse or promote products derived from this * software without specific prior written permission. This software * is provided ``as is'' without express or implied warranty. * * @(#)af.h 7.2 (Berkeley) 12/30/87 */ /* * Address family routines, * used in handling generic sockaddr structures. * * Hash routine is called * af_hash(addr, h); * struct sockaddr *addr; struct afhash *h; * producing an afhash structure for addr. * * Netmatch routine is called * af_netmatch(addr1, addr2); * where addr1 and addr2 are sockaddr *. Returns 1 if network * values match, 0 otherwise. */ struct afswitch { int (*af_hash)(); int (*af_netmatch)(); }; struct afhash { u_int afh_hosthash; u_int afh_nethash; }; #ifdef SUPERVISOR struct afswitch afswitch[]; #endif