Lines Matching refs:hook

82 void ng_unref_hook(hook_p hook); /* don't move this */
83 #define NG_HOOK_REF(hook) atomic_add_int(&(hook)->refs, 1) argument
84 #define NG_HOOK_NAME(hook) ((hook)->name) argument
85 #define NG_HOOK_UNREF(hook) ng_unref_hook(hook) argument
86 #define NG_HOOK_SET_PRIVATE(hook, val) do {(hook)->private = val;} while (0) argument
87 #define NG_HOOK_SET_RCVMSG(hook, val) do {(hook)->rcvmsg = val;} while (0) argument
88 #define NG_HOOK_SET_RCVDATA(hook, val) do {(hook)->rcvdata = val;} while (0) argument
89 #define NG_HOOK_PRIVATE(hook) ((hook)->private) argument
90 #define NG_HOOK_NOT_VALID(hook) ((hook)->flags & HK_INVALID) argument
91 #define NG_HOOK_IS_VALID(hook) (!((hook)->flags & HK_INVALID)) argument
92 #define NG_HOOK_NODE(hook) ((hook)->node) /* only rvalue! */ argument
93 #define NG_HOOK_PEER(hook) ((hook)->peer) /* only rvalue! */ argument
96 #define NG_PEER_NODE(hook) NG_HOOK_NODE(NG_HOOK_PEER(hook)) argument
97 #define NG_PEER_HOOK_NAME(hook) NG_HOOK_NAME(NG_HOOK_PEER(hook)) argument
98 #define NG_PEER_NODE_NAME(hook) NG_NODE_NAME(NG_PEER_NODE(hook)) argument
178 typedef int ng_newhook_t(node_p node, hook_p hook, const char *name);
180 typedef int ng_connect_t(hook_p hook);
181 typedef int ng_rcvdata_t(hook_p hook, struct mbuf *m, meta_p meta);
182 typedef int ng_disconnect_t(hook_p hook);
224 #define NG_SEND_DATA(error, hook, m, a) \ argument
226 (error) = ng_send_data((hook), (m), (a)); \
231 #define NG_SEND_DATA_ONLY(error, hook, m) \ argument
233 (error) = ng_send_data((hook), (m), NULL); \
238 #define NG_SEND_DATAQ(error, hook, m, a) \ argument
240 (error) = ng_send_dataq((hook), (m), (a)); \
331 void ng_destroy_hook(hook_p hook);
343 int ng_path_parse(char *addr, char **node, char **path, char **hook);
344 int ng_queue_data(hook_p hook, struct mbuf *m, meta_p meta);
348 int ng_send_data(hook_p hook, struct mbuf *m, meta_p meta);
349 int ng_send_dataq(hook_p hook, struct mbuf *m, meta_p meta);