SolarCapture C Bindings
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
node.h
Go to the documentation of this file.
1 
8 #ifndef __SOLAR_CAPTURE_NODE_H__
9 #define __SOLAR_CAPTURE_NODE_H__
10 
11 
12 struct sc_node;
13 struct sc_attr;
14 struct sc_thread;
15 struct sc_session;
16 struct sc_node_factory;
17 struct sc_arg;
18 
19 
40 extern int sc_node_alloc(struct sc_node** node_out, const struct sc_attr* attr,
41  struct sc_thread* thread,
42  const struct sc_node_factory* factory,
43  const struct sc_arg* args, int n_args);
44 
45 #if SC_API_VER >= 1
46 
66 extern int sc_node_alloc_named(struct sc_node** node_out,
67  const struct sc_attr* attr,
68  struct sc_thread* thread,
69  const char* factory_name,
70  const char* lib_name,
71  const struct sc_arg* args, int n_args);
72 #endif
73 
96 extern int sc_node_add_link(struct sc_node* from_node, const char* link_name,
97  struct sc_node* to_node, const char* to_name_opt);
98 
104 extern struct sc_thread* sc_node_get_thread(const struct sc_node* node);
105 
106 
157 extern int sc_node_factory_lookup(const struct sc_node_factory** factory_out,
158  struct sc_session* session,
159  const char* factory_name,
160  const char* lib_name);
161 
162 
163 #if SC_API_VER >= 2
164 
177 extern void sc_node_add_info_str(struct sc_node* node,
178  const char* field_name, const char* field_val);
179 #endif
180 
181 
182 #if SC_API_VER >= 2
183 
196 extern void sc_node_add_info_int(struct sc_node* node,
197  const char* field_name, int64_t field_val);
198 #endif
199 
200 
201 #endif /* __SOLAR_CAPTURE_NODE_H__ */
202 
Attribute object.
void sc_node_add_info_str(struct sc_node *node, const char *field_name, const char *field_val)
Export information to solar_capture_monitor.
void sc_node_add_info_int(struct sc_node *node, const char *field_name, int64_t field_val)
Export information to solar_capture_monitor.
Struct to hold information about how to create an instance of this node.
Definition: ext_node.h:69
struct sc_thread * sc_node_get_thread(const struct sc_node *node)
Return the thread associated with a node.
int sc_node_alloc(struct sc_node **node_out, const struct sc_attr *attr, struct sc_thread *thread, const struct sc_node_factory *factory, const struct sc_arg *args, int n_args)
Allocate a packet processing node.
Description of a node.
Definition: ext_node.h:17
int sc_node_alloc_named(struct sc_node **node_out, const struct sc_attr *attr, struct sc_thread *thread, const char *factory_name, const char *lib_name, const struct sc_arg *args, int n_args)
Allocate a packet processing node by name.
Representation of an argument. Used by node init functions.
Definition: args.h:27
int sc_node_add_link(struct sc_node *from_node, const char *link_name, struct sc_node *to_node, const char *to_name_opt)
Add a link from one node to another.
int sc_node_factory_lookup(const struct sc_node_factory **factory_out, struct sc_session *session, const char *factory_name, const char *lib_name)
Find a node factory.