3 This document is a work in progress.
5 This document describes a potential interface between a master process and one or more working children.
6 The goal is to have along-running epan process without the troubles of epan reinit (leaks, mis-reinits, ...).
7 Working children are spawn to capture or read files, then terminated.
8 The long running parent process initializes epan and forks children that require no further initialization to run.
10 epan_child.h in the root directory describes the C interface.
14 ECHLD PROTOCOL INTERACTION DIAGRAMS
21 new_child() ---------->|
50 |<-----ERROR------| (fatal_err,"reason")
61 A.4. getting current dir
64 |<------CWD-------| (dirname)
68 A.5. changing current dir
71 |------CHDIR----->| (dirname)
72 |<------CWD-------| (dirname)
76 |------CHDIR----->| (dirname)
77 |<-----ERROR------| (cannot_cd, "reason")
80 A.6. listing current directory
83 |----LIST_FILES-->| ("*.*"")
84 |<---FILE_INFO----| (filename, format, encap, num_pkts, ...);
85 |<---FILE_INFO----| (filename, format, encap, num_pkts, ...);
87 |<---FILE_INFO----| (filename, format, encap, num_pkts, ...);
91 |----LIST_FILES-->| ("*.*"")
92 |<-----ERROR------| (no_files, "reason")
99 |----OPEN_FILE---->| (filename, ...)
100 |<---FILE_OPENED---| (dirname)
104 |----OPEN_FILE---->| (filename, ...)
105 |<-----ERROR-------| (cannot_open, "reason")
111 READING/CAPTURING/DONE
112 |-----SAVE_FILE---->| ("new_filename",opts,...)
113 |<----FILE_SAVED----| (24, tree)
117 READING/CAPTURING/DONE
118 |-----SAVE_FILE---->| ("new_filename",opts,...)
119 |<------ERROR-------| (cannot_save, "reason")
123 A.9. listing interfaces
126 |--LIST_INTERFACES-->| ("*.*"")
127 | |-------????------>|
128 | |<------????-------|
129 |<--INTERFACE_INFO---| (name, param1=val1, ...)
130 |<--INTERFACE_INFO---| (name, param1=val1, ...)
132 |<--INTERFACE_INFO---| (name, param1=val1, ...)
135 |--LIST_INTERFACES-->| ("*.*"")
136 | |-------????------>|
137 | |<------????-------|
138 |<------ERROR-------| (list_intf, "reason")
141 A.10. opening an interface
142 A.10.1 interface opened ok
144 |---OPEN_INTERFACE-->|
145 | |-------????------>|
146 | |<------????-------|
147 |<--INTERFACE_OPENED-|
150 A.10.2 interface open failure
152 |--OPEN_INTERFACE--->|
153 | |-------????------>|
154 | |<------????-------|
155 |<-------ERROR-------| (intf, "reason")
159 A.11. starting capture
160 A.11.1 started capture ok
162 |---START_CAPTURE--->|
163 | |-------????------>|
164 | |<------????-------|
165 |<-CAPTURE_STARTED---|
167 A.11.2 capture start failure
169 |----START_CAPTURE-->|
170 | |-------????------>|
171 | |<------????-------|
172 |<-------ERROR-------| (cannot_start, "reason")
175 A.12. capturing or reading
177 | |<------????-------|
178 |<----PACKET_SUM-----| (framenum, columns)
181 A.13 getting packet details
184 |----GET_PACKETS--->| (framelist)
185 |<-----PACKET-------| (1, tree)
186 |<-----BUFFER-------| ("1", tvb)
187 |<-----PACKET-------| (2, tree)
188 |<-----BUFFER-------| ("2", tvb)
191 A.13.2 frame with reassembled buffer
192 IN_CAPTURE/READING/DONE
193 |----GET_PACKETS--->| (framelist)
194 |<-----PACKET-------| (framenum, tree)
195 |<-----BUFFER-------| ("framenum", tvb)
196 |<-----BUFFER-------| ("reas_num", tvb)
200 A.13.3 frame with known reassembled buffer
201 IN_CAPTURE/READING/DONE
202 |<-----PACKET-------| (framenum+N, tree)
203 |<-----BUFFER-------| ("framenum+N", tvb)
204 |<-----BUFFER-------| ("reas_num", NULL)
207 A.13.4 buffer request (e.g. un-cached buffer)
208 IN_CAPTURE/READING/DONE
209 |------GET_BUF----->| (bufname)
210 |<-----BUFFER-------| (bufname, NULL)
215 |---STOP_CAPTURE--->|
216 |<-CAPTURE_STOPPED--|
223 |<--------EOF--------|
228 IN_CAPTURE/READING/DONE
229 |----ADD_NOTE------>| (framenum,note)
230 |<----NOTE_ADDED----|
232 A.16.2 note set failure
233 IN_CAPTURE/READING/DONE
234 |----ADD_NOTE------>| (framenum,note)
235 |<----NOTE_ADDED----|
238 A.17 applying a filter
239 IN_CAPTURE/READING/DONE
240 |---APPLY_FILTER--->| (dfilter_str)
241 |<---PACKET_LIST----| (Packet-Range)
242 |<---PACKET_LIST----| (Packet-Range)
246 A.18 setting a filter
248 |-----SET_FILTER---->| (dfilter_str)
249 |<---FILTER_SET------|