Changeset View
Changeset View
Standalone View
Standalone View
sys/netgraph/netgraph.h
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | |||||
* define the typedefs and use them in the structures themselves. | * define the typedefs and use them in the structures themselves. | ||||
*/ | */ | ||||
struct ng_hook ; | struct ng_hook ; | ||||
struct ng_node ; | struct ng_node ; | ||||
struct ng_item ; | struct ng_item ; | ||||
typedef struct ng_item *item_p; | typedef struct ng_item *item_p; | ||||
typedef struct ng_node *node_p; | typedef struct ng_node *node_p; | ||||
typedef struct ng_hook *hook_p; | typedef struct ng_hook *hook_p; | ||||
typedef struct ng_item const *item_cp; | |||||
typedef struct ng_node const *node_cp; | |||||
typedef struct ng_hook const *hook_cp; | |||||
/* node method definitions */ | /* node method definitions */ | ||||
typedef int ng_constructor_t(node_p node); | typedef int ng_constructor_t(node_p node); | ||||
typedef int ng_close_t(node_p node); | typedef int ng_close_t(node_p node); | ||||
typedef int ng_shutdown_t(node_p node); | typedef int ng_shutdown_t(node_p node); | ||||
typedef int ng_newhook_t(node_p node, hook_p hook, const char *name); | typedef int ng_newhook_t(node_p node, hook_p hook, const char *name); | ||||
typedef hook_p ng_findhook_t(node_p node, const char *name); | typedef hook_p ng_findhook_t(node_p node, const char *name); | ||||
typedef int ng_connect_t(hook_p hook); | typedef int ng_connect_t(hook_p hook); | ||||
▲ Show 20 Lines • Show All 1,036 Lines • ▼ Show 20 Lines | |||||
int ng_address_path(node_p here, item_p item, const char *address, ng_ID_t raddr); | int ng_address_path(node_p here, item_p item, const char *address, ng_ID_t raddr); | ||||
int ng_bypass(hook_p hook1, hook_p hook2); | int ng_bypass(hook_p hook1, hook_p hook2); | ||||
hook_p ng_findhook(node_p node, const char *name); | hook_p ng_findhook(node_p node, const char *name); | ||||
struct ng_type *ng_findtype(const char *type); | struct ng_type *ng_findtype(const char *type); | ||||
int ng_make_node_common(struct ng_type *typep, node_p *nodep); | int ng_make_node_common(struct ng_type *typep, node_p *nodep); | ||||
int ng_name_node(node_p node, const char *name); | int ng_name_node(node_p node, const char *name); | ||||
node_p ng_name2noderef(node_p node, const char *name); | node_p ng_name2noderef(node_p node, const char *name); | ||||
int ng_newtype(struct ng_type *tp); | int ng_newtype(struct ng_type *tp); | ||||
ng_ID_t ng_node2ID(node_p node); | ng_ID_t ng_node2ID(node_cp node); | ||||
item_p ng_package_data(struct mbuf *m, int flags); | item_p ng_package_data(struct mbuf *m, int flags); | ||||
item_p ng_package_msg(struct ng_mesg *msg, int flags); | item_p ng_package_msg(struct ng_mesg *msg, int flags); | ||||
item_p ng_package_msg_self(node_p here, hook_p hook, struct ng_mesg *msg); | item_p ng_package_msg_self(node_p here, hook_p hook, struct ng_mesg *msg); | ||||
void ng_replace_retaddr(node_p here, item_p item, ng_ID_t retaddr); | void ng_replace_retaddr(node_p here, item_p item, ng_ID_t retaddr); | ||||
int ng_rmhook_self(hook_p hook); /* if a node wants to kill a hook */ | int ng_rmhook_self(hook_p hook); /* if a node wants to kill a hook */ | ||||
int ng_rmnode_self(node_p here); /* if a node wants to suicide */ | int ng_rmnode_self(node_p here); /* if a node wants to suicide */ | ||||
int ng_rmtype(struct ng_type *tp); | int ng_rmtype(struct ng_type *tp); | ||||
int ng_snd_item(item_p item, int queue); | int ng_snd_item(item_p item, int queue); | ||||
▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines |