5 This document is a work in progress.
7 This document describes a potential interface between a master process and one or more working children.
8 The goal is to have along-running epan process without the troubles of epan reinit (leaks, mis-reinits, ...).
9 Working children are spawn to capture or read files, then terminated.
10 The long running parent process initializes epan and forks children that require no further initialization to run.
12 epan_child.h in the root directory describes the C interface.
16 ECHLD PROTOCOL INTERACTION DIAGRAMS
23 new_child() ---------->|
52 |<-----ERROR------| (fatal_err,"reason")
63 A.4. getting current dir
66 |<------CWD-------| (dirname)
70 A.5. changing current dir
73 |------CHDIR----->| (dirname)
74 |<------CWD-------| (dirname)
78 |------CHDIR----->| (dirname)
79 |<-----ERROR------| (cannot_cd, "reason")
82 A.6. listing current directory
85 |----LIST_FILES-->| ("*.*"")
86 |<---FILE_INFO----| (filename, format, encap, num_pkts, ...);
87 |<---FILE_INFO----| (filename, format, encap, num_pkts, ...);
89 |<---FILE_INFO----| (filename, format, encap, num_pkts, ...);
93 |----LIST_FILES-->| ("*.*"")
94 |<-----ERROR------| (no_files, "reason")
101 |----OPEN_FILE---->| (filename, ...)
102 |<---FILE_OPENED---| (dirname)
106 |----OPEN_FILE---->| (filename, ...)
107 |<-----ERROR-------| (cannot_open, "reason")
113 READING/CAPTURING/DONE
114 |-----SAVE_FILE---->| ("new_filename",opts,...)
115 |<----FILE_SAVED----| (24, tree)
119 READING/CAPTURING/DONE
120 |-----SAVE_FILE---->| ("new_filename",opts,...)
121 |<------ERROR-------| (cannot_save, "reason")
125 A.9. listing interfaces
128 |--LIST_INTERFACES-->| ("*.*"")
129 | |-------????------>|
130 | |<------????-------|
131 |<--INTERFACE_INFO---| (name, param1=val1, ...)
132 |<--INTERFACE_INFO---| (name, param1=val1, ...)
134 |<--INTERFACE_INFO---| (name, param1=val1, ...)
137 |--LIST_INTERFACES-->| ("*.*"")
138 | |-------????------>|
139 | |<------????-------|
140 |<------ERROR-------| (list_intf, "reason")
143 A.10. opening an interface
144 A.10.1 interface opened ok
146 |---OPEN_INTERFACE-->|
147 | |-------????------>|
148 | |<------????-------|
149 |<--INTERFACE_OPENED-|
152 A.10.2 interface open failure
154 |--OPEN_INTERFACE--->|
155 | |-------????------>|
156 | |<------????-------|
157 |<-------ERROR-------| (intf, "reason")
161 A.11. starting capture
162 A.11.1 started capture ok
164 |---START_CAPTURE--->|
165 | |-------????------>|
166 | |<------????-------|
167 |<-CAPTURE_STARTED---|
169 A.11.2 capture start failure
171 |----START_CAPTURE-->|
172 | |-------????------>|
173 | |<------????-------|
174 |<-------ERROR-------| (cannot_start, "reason")
177 A.12. capturing or reading
179 | |<------????-------|
180 |<----PACKET_SUM-----| (framenum, columns)
183 A.13 getting packet details
186 |----GET_PACKETS--->| (framelist)
187 |<-----PACKET-------| (1, tree)
188 |<-----BUFFER-------| ("1", tvb)
189 |<-----PACKET-------| (2, tree)
190 |<-----BUFFER-------| ("2", tvb)
193 A.13.2 frame with reassembled buffer
194 IN_CAPTURE/READING/DONE
195 |----GET_PACKETS--->| (framelist)
196 |<-----PACKET-------| (framenum, tree)
197 |<-----BUFFER-------| ("framenum", tvb)
198 |<-----BUFFER-------| ("reas_num", tvb)
202 A.13.3 frame with known reassembled buffer
203 IN_CAPTURE/READING/DONE
204 |<-----PACKET-------| (framenum+N, tree)
205 |<-----BUFFER-------| ("framenum+N", tvb)
206 |<-----BUFFER-------| ("reas_num", NULL)
209 A.13.4 buffer request (e.g. un-cached buffer)
210 IN_CAPTURE/READING/DONE
211 |------GET_BUF----->| (bufname)
212 |<-----BUFFER-------| (bufname, NULL)
217 |---STOP_CAPTURE--->|
218 |<-CAPTURE_STOPPED--|
225 |<--------EOF--------|
230 IN_CAPTURE/READING/DONE
231 |----ADD_NOTE------>| (framenum,note)
232 |<----NOTE_ADDED----|
234 A.16.2 note set failure
235 IN_CAPTURE/READING/DONE
236 |----ADD_NOTE------>| (framenum,note)
237 |<----NOTE_ADDED----|
240 A.17 applying a filter
241 IN_CAPTURE/READING/DONE
242 |---APPLY_FILTER--->| (dfilter_str)
243 |<---PACKET_LIST----| (Packet-Range)
244 |<---PACKET_LIST----| (Packet-Range)
248 A.18 setting a filter
250 |-----SET_FILTER---->| (dfilter_str)
251 |<---FILTER_SET------|