2 * Copyright (C) 1995, 1997-1999, 2002 Jeffrey A. Uphoff
3 * Major rewrite by Olaf Kirch, Dec. 1996.
8 #include <netinet/in.h>
11 * Primary information structure.
14 mon mon; /* Big honkin' NSM structure. */
15 struct in_addr addr; /* IP address for callback. */
16 unsigned short port; /* port number for callback */
17 short int times; /* Counter used for various things. */
18 int state; /* For storing notified state for callbacks. */
19 char *dns_name; /* used for matching incoming
21 struct notify_list *next; /* Linked list forward pointer. */
22 struct notify_list *prev; /* Linked list backward pointer. */
23 u_int32_t xid; /* XID of MS_NOTIFY RPC call */
24 time_t when; /* notify: timeout for re-xmit */
27 typedef struct notify_list notify_list;
32 extern notify_list * rtnl; /* Run-time notify list */
33 extern notify_list * notify; /* Pending RPC calls */
36 * List-handling functions
38 extern notify_list * nlist_new(char *, char *, int);
39 extern void nlist_insert(notify_list **, notify_list *);
40 extern void nlist_remove(notify_list **, notify_list *);
41 extern void nlist_insert_timer(notify_list **, notify_list *);
42 extern notify_list * nlist_clone(notify_list *);
43 extern void nlist_free(notify_list **, notify_list *);
44 extern void nlist_kill(notify_list **);
45 extern notify_list * nlist_gethost(notify_list *, char *, int);
48 * List-handling macros.
49 * THESE INHERIT INFORMATION FROM PREVIOUSLY-DEFINED MACROS.
50 * (So don't change their order unless you study them first!)
52 #define NL_NEXT(L) ((L)->next)
53 #define NL_FIRST NL_NEXT
54 #define NL_PREV(L) ((L)->prev)
55 #define NL_DATA(L) ((L)->mon)
56 #define NL_ADDR(L) ((L)->addr)
57 #define NL_STATE(L) ((L)->state)
58 #define NL_TIMES(L) ((L)->times)
59 #define NL_MON_ID(L) (NL_DATA((L)).mon_id)
60 #define NL_PRIV(L) (NL_DATA((L)).priv)
61 #define NL_MON_NAME(L) (NL_MON_ID((L)).mon_name)
62 #define NL_MY_ID(L) (NL_MON_ID((L)).my_id)
63 #define NL_MY_NAME(L) (NL_MY_ID((L)).my_name)
64 #define NL_MY_PROC(L) (NL_MY_ID((L)).my_proc)
65 #define NL_MY_PROG(L) (NL_MY_ID((L)).my_prog)
66 #define NL_MY_VERS(L) (NL_MY_ID((L)).my_vers)
67 #define NL_WHEN(L) ((L)->when)