9512fe850e98fdd448c638ca63fdd92a8a510255ahl/*
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Copyright (c) 1997-1998 by Sun Microsystems, Inc.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * All rights reserved.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl */
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl/*
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Copyright (c) 1980, 1986 Regents of the University of California.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * All rights reserved. The Berkeley software License Agreement
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * specifies the terms and conditions for redistribution.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl */
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#ifndef _NET_AF_H
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#define _NET_AF_H
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#pragma ident "%Z%%M% %I% %E% SMI"
9512fe850e98fdd448c638ca63fdd92a8a510255ahl/* af.h 1.10 88/08/19 SMI; from UCB 7.1 */
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#ifdef __cplusplus
9512fe850e98fdd448c638ca63fdd92a8a510255ahlextern "C" {
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#endif
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl/*
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Address family routines,
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * used in handling generic sockaddr structures.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Hash routine is called
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * af_hash(addr, h);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * struct sockaddr *addr; struct afhash *h;
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * producing an afhash structure for addr.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl *
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Netmatch routine is called
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * af_netmatch(addr1, addr2);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * where addr1 and addr2 are sockaddr *. Returns 1 if network
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * values match, 0 otherwise.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl */
9512fe850e98fdd448c638ca63fdd92a8a510255ahlstruct afswitch {
9512fe850e98fdd448c638ca63fdd92a8a510255ahl int (*af_hash)();
9512fe850e98fdd448c638ca63fdd92a8a510255ahl int (*af_netmatch)();
9512fe850e98fdd448c638ca63fdd92a8a510255ahl};
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahlstruct afhash {
9512fe850e98fdd448c638ca63fdd92a8a510255ahl uint_t afh_hosthash;
9512fe850e98fdd448c638ca63fdd92a8a510255ahl uint_t afh_nethash;
9512fe850e98fdd448c638ca63fdd92a8a510255ahl};
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#ifdef __cplusplus
9512fe850e98fdd448c638ca63fdd92a8a510255ahl}
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#endif
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#endif /* _NET_AF_H */
9512fe850e98fdd448c638ca63fdd92a8a510255ahl