1 /*        $NetBSD: ntp_keyacc.h,v 1.3 2020/05/25 20:47:19 christos Exp $        */
2 
3 /*
4  *  ntp_keyacc.h - key access stuff
5  */
6 #ifndef NTP_KEYACC_H
7 #define NTP_KEYACC_H
8 
9 typedef struct keyaccess KeyAccT;
10 struct keyaccess {
11           KeyAccT * next;
12           sockaddr_u          addr;
13           unsigned int        subnetbits;
14 };
15 
16 extern KeyAccT* keyacc_new_push(KeyAccT *head, const sockaddr_u *addr,
17                                         unsigned int subnetbits);
18 extern KeyAccT* keyacc_pop_free(KeyAccT *head);
19 extern KeyAccT* keyacc_all_free(KeyAccT *head);
20 extern int      keyacc_contains(const KeyAccT *head, const sockaddr_u *addr,
21                                         int res_on_empty_list);
22 /* public for testability: */
23 extern int          keyacc_amatch(const sockaddr_u *,const sockaddr_u *,
24                                     unsigned int mbits);
25 
26 
27 #endif    /* NTP_KEYACC_H */
28