xref: /freebsd/contrib/ntp/include/ntp_keyacc.h (revision 8ddb146abcdf061be9f2c0db7e391697dafad85c)
1 /*
2  *  ntp_keyacc.h - key access stuff
3  */
4 #ifndef NTP_KEYACC_H
5 #define NTP_KEYACC_H
6 
7 typedef struct keyaccess KeyAccT;
8 struct keyaccess {
9 	KeyAccT *	next;
10 	sockaddr_u	addr;
11 	unsigned int	subnetbits;
12 };
13 
14 extern KeyAccT* keyacc_new_push(KeyAccT *head, const sockaddr_u *addr,
15 				unsigned int subnetbits);
16 extern KeyAccT* keyacc_pop_free(KeyAccT *head);
17 extern KeyAccT* keyacc_all_free(KeyAccT *head);
18 extern int      keyacc_contains(const KeyAccT *head, const sockaddr_u *addr,
19 				int res_on_empty_list);
20 /* public for testability: */
21 extern int	keyacc_amatch(const sockaddr_u *,const sockaddr_u *,
22 			      unsigned int mbits);
23 
24 
25 #endif	/* NTP_KEYACC_H */
26