SolarCapture C Bindings
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
vi.h
Go to the documentation of this file.
1 
8 #ifndef __SOLAR_CAPTURE_VI_H__
9 #define __SOLAR_CAPTURE_VI_H__
10 
11 
12 struct sc_attr;
13 struct sc_thread;
14 struct sc_session;
15 struct sc_vi_group;
16 struct sc_node;
21 struct sc_vi;
22 struct sc_stream;
23 
36 extern int sc_vi_alloc(struct sc_vi** vi_out, const struct sc_attr* attr,
37  struct sc_thread* thread, const char* interface);
38 
50 extern int sc_vi_set_recv_node(struct sc_vi* vi, struct sc_node* node,
51  const char* name_opt);
52 
62 extern int sc_vi_add_stream(struct sc_vi* vi, struct sc_stream* stream);
63 
69 extern struct sc_thread* sc_vi_get_thread(const struct sc_vi* vi);
70 
71 
72 #if SC_API_VER >= 3
73 
85 extern const char* sc_vi_get_interface_name(const struct sc_vi* vi);
86 #endif
87 
88 
109 extern int sc_vi_group_alloc(struct sc_vi_group** vi_out,
110  const struct sc_attr* attr,
111  struct sc_session* session,
112  const char* interface, int num_vis);
113 
119 extern struct sc_session*
120  sc_vi_group_get_session(const struct sc_vi_group* vi_group);
121 
132 extern int sc_vi_alloc_from_group(struct sc_vi** vi_out,
133  const struct sc_attr* attr,
134  struct sc_thread* thread,
135  struct sc_vi_group* vi_group);
136 
156 extern int sc_vi_group_add_stream(struct sc_vi_group* vi_group, struct sc_stream* stream);
157 
158 
159 #endif /* __SOLAR_CAPTURE_VI_H__ */
160 
int sc_vi_group_alloc(struct sc_vi_group **vi_out, const struct sc_attr *attr, struct sc_session *session, const char *interface, int num_vis)
Allocate a VI group.
Attribute object.
int sc_vi_alloc(struct sc_vi **vi_out, const struct sc_attr *attr, struct sc_thread *thread, const char *interface)
Allocate a VI instance.
int sc_vi_add_stream(struct sc_vi *vi, struct sc_stream *stream)
Direct a packet stream to a VI.
struct sc_session * sc_vi_group_get_session(const struct sc_vi_group *vi_group)
Return the session associated with a VI group.
int sc_vi_group_add_stream(struct sc_vi_group *vi_group, struct sc_stream *stream)
Direct a packet stream to a group of VIs.
int sc_vi_set_recv_node(struct sc_vi *vi, struct sc_node *node, const char *name_opt)
Set the node a VI should deliver its received packets to.
const char * sc_vi_get_interface_name(const struct sc_vi *vi)
Return the name of the network interface associated with a VI.
int sc_vi_alloc_from_group(struct sc_vi **vi_out, const struct sc_attr *attr, struct sc_thread *thread, struct sc_vi_group *vi_group)
Allocate a VI instance from a VI group.
A VI object.
Definition: vi.h:16
Description of a node.
Definition: ext_node.h:17
struct sc_thread * sc_vi_get_thread(const struct sc_vi *vi)
Return the thread associated with a VI.