plugins: Add backward compatibility for personal lua scripts
[metze/wireshark/wip.git] / file.h
1 /* file.h
2  * Definitions for file structures and routines
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 1998 Gerald Combs
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22
23 #ifndef __FILE_H__
24 #define __FILE_H__
25
26 #include "wiretap/wtap.h"
27 #include <errno.h>
28 #include <epan/epan.h>
29
30 #include <epan/print.h>
31 #include <ui/packet_range.h>
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif /* __cplusplus */
36
37 /** Return values from functions that only can succeed or fail. */
38 typedef enum {
39     CF_OK,      /**< operation succeeded */
40     CF_ERROR    /**< operation got an error (function may provide err with details) */
41 } cf_status_t;
42
43 /** Return values from functions that read capture files. */
44 typedef enum {
45     CF_READ_OK,      /**< operation succeeded */
46     CF_READ_ERROR,   /**< operation got an error (function may provide err with details) */
47     CF_READ_ABORTED  /**< operation aborted by user */
48 } cf_read_status_t;
49
50 /** Return values from functions that write out packets. */
51 typedef enum {
52     CF_WRITE_OK,      /**< operation succeeded */
53     CF_WRITE_ERROR,   /**< operation got an error (function may provide err with details) */
54     CF_WRITE_ABORTED  /**< operation aborted by user */
55 } cf_write_status_t;
56
57 /** Return values from functions that print sets of packets. */
58 typedef enum {
59     CF_PRINT_OK,            /**< print operation succeeded */
60     CF_PRINT_OPEN_ERROR,    /**< print operation failed while opening printer */
61     CF_PRINT_WRITE_ERROR    /**< print operation failed while writing to the printer */
62 } cf_print_status_t;
63
64 typedef enum {
65     cf_cb_file_opened,
66     cf_cb_file_closing,
67     cf_cb_file_closed,
68     cf_cb_file_read_started,
69     cf_cb_file_read_finished,
70     cf_cb_file_reload_started,
71     cf_cb_file_reload_finished,
72     cf_cb_file_rescan_started,
73     cf_cb_file_rescan_finished,
74     cf_cb_file_retap_started,
75     cf_cb_file_retap_finished,
76     cf_cb_file_merge_started, /* Qt only */
77     cf_cb_file_merge_finished, /* Qt only */
78     cf_cb_file_fast_save_finished, /* GTK+ only? */
79     cf_cb_packet_selected, /* GTK+ only. */
80     cf_cb_packet_unselected, /* GTK+ only. */
81     cf_cb_field_unselected, /* GTK+ only. */
82     cf_cb_file_save_started,
83     cf_cb_file_save_finished,
84     cf_cb_file_save_failed,
85     cf_cb_file_save_stopped,
86     cf_cb_file_export_specified_packets_started, /* GTK+ only. */
87     cf_cb_file_export_specified_packets_finished, /* GTK+ only. */
88     cf_cb_file_export_specified_packets_failed, /* GTK+ only. */
89     cf_cb_file_export_specified_packets_stopped /* GTK+ only. */
90 } cf_cbs;
91
92 typedef void (*cf_callback_t) (gint event, gpointer data, gpointer user_data);
93
94 typedef struct {
95     const char    *string;
96     size_t         string_len;
97     capture_file  *cf;
98     gboolean       frame_matched;
99     field_info    *finfo;
100 } match_data;
101
102 /**
103  * Add a capture file event callback.
104  *
105  * @param func The function to be called for each event.
106  *             The function will be passed three parameters: The event type (event),
107  *             event-dependent data (data), and user-supplied data (user_data).
108  *             Event-dependent data may be a capture_file pointer, character pointer,
109  *             or NULL.
110  * @param user_data User-supplied data to pass to the callback. May be NULL.
111  */
112
113 extern void
114 cf_callback_add(cf_callback_t func, gpointer user_data);
115
116 /**
117  * Remove a capture file event callback.
118  *
119  * @param func The function to be removed.
120  * @param user_data User-supplied data. Must be the same value supplied to cf_callback_add.
121  */
122
123 extern void
124 cf_callback_remove(cf_callback_t func, gpointer user_data);
125
126 /**
127  * Open a capture file.
128  *
129  * @param cf the capture file to be opened
130  * @param fname the filename to be opened
131  * @param type WTAP_TYPE_AUTO for automatic or index to direct open routine
132  * @param is_tempfile is this a temporary file?
133  * @param err error code
134  * @return one of cf_status_t
135  */
136 cf_status_t cf_open(capture_file *cf, const char *fname, unsigned int type, gboolean is_tempfile, int *err);
137
138 /**
139  * Close a capture file.
140  *
141  * @param cf the capture file to be closed
142  */
143 void cf_close(capture_file *cf);
144
145 /**
146  * Reload a capture file.
147  *
148  * @param cf the capture file to be reloaded
149  */
150 void cf_reload(capture_file *cf);
151
152 /**
153  * Read all packets of a capture file into the internal structures.
154  *
155  * @param cf the capture file to be read
156  * @param from_save reread asked from cf_save_records
157  * @return one of cf_read_status_t
158  */
159 cf_read_status_t cf_read(capture_file *cf, gboolean from_save);
160
161 /**
162  * Read the metadata and raw data for a record.  It will pop
163  * up an alert box if there's an error.
164  *
165  * @param cf the capture file from which to read the record
166  * @param fdata the frame_data structure for the record in question
167  * @param phdr pointer to a wtap_pkthdr structure to contain the
168  * record's metadata
169  * @param buf a Buffer into which to read the record's raw data
170  * @return TRUE if the read succeeded, FALSE if there was an error
171  */
172 gboolean cf_read_record_r(capture_file *cf, const frame_data *fdata,
173                           struct wtap_pkthdr *phdr, Buffer *buf);
174
175 /**
176  * Read the metadata and raw data for a record into a
177  * capture_file structure's phdr and buf members.
178  * It will pop up an alert box if there's an error.
179  *
180  * @param cf the capture file from which to read the record
181  * @param fdata the frame_data structure for the record in question
182  * @return TRUE if the read succeeded, FALSE if there was an error
183  */
184 gboolean cf_read_record(capture_file *cf, frame_data *fdata);
185
186 /**
187  * Read packets from the "end" of a capture file.
188  *
189  * @param cf the capture file to be read from
190  * @param to_read the number of packets to read
191  * @param err the error code, if an error had occurred
192  * @return one of cf_read_status_t
193  */
194 cf_read_status_t cf_continue_tail(capture_file *cf, volatile int to_read, int *err);
195
196 /**
197  * Fake reading packets from the "end" of a capture file.
198  *
199  * @param cf the capture file to be read from
200  */
201 void cf_fake_continue_tail(capture_file *cf);
202
203 /**
204  * Finish reading from "end" of a capture file.
205  *
206  * @param cf the capture file to be read from
207  * @param err the error code, if an error had occurred
208  * @return one of cf_read_status_t
209  */
210 cf_read_status_t cf_finish_tail(capture_file *cf, int *err);
211
212 /**
213  * Determine whether this capture file (or a range of it) can be written
214  * in any format using Wiretap rather than by copying the raw data.
215  *
216  * @param cf the capture file to check
217  * @return TRUE if it can be written, FALSE if it can't
218  */
219 gboolean cf_can_write_with_wiretap(capture_file *cf);
220
221 /**
222  * Determine whether this capture file can be saved with a "save" operation;
223  * if there's nothing unsaved, it can't.
224  *
225  * @param cf the capture file to check
226  * @return TRUE if it can be saved, FALSE if it can't
227  */
228 gboolean cf_can_save(capture_file *cf);
229
230 /**
231  * Determine whether this capture file can be saved with a "save as" operation.
232  *
233  * @param cf the capture file to check
234  * @return TRUE if it can be saved, FALSE if it can't
235  */
236 gboolean cf_can_save_as(capture_file *cf);
237
238 /**
239  * Determine whether this capture file has unsaved data.
240  *
241  * @param cf the capture file to check
242  * @return TRUE if it has unsaved data, FALSE if it doesn't
243  */
244 gboolean cf_has_unsaved_data(capture_file *cf);
245
246 /**
247  * Save all packets in a capture file to a new file, and, if that succeeds,
248  * make that file the current capture file.  If there's already a file with
249  * that name, do a "safe save", writing to a temporary file in the same
250  * directory and, if the write succeeds, renaming the new file on top of the
251  * old file, so that if the write fails, the old file is still intact.
252  *
253  * @param cf the capture file to save to
254  * @param fname the filename to save to
255  * @param save_format the format of the file to save (libpcap, ...)
256  * @param compressed whether to gzip compress the file
257  * @param discard_comments TRUE if we should discard comments if the save
258  * succeeds (because we saved in a format that doesn't support
259  * comments)
260  * @param dont_reopen TRUE if it shouldn't reopen and make that file the
261  * current capture file
262  * @return one of cf_write_status_t
263  */
264 cf_write_status_t cf_save_records(capture_file * cf, const char *fname,
265                                   guint save_format, gboolean compressed,
266                                   gboolean discard_comments,
267                                   gboolean dont_reopen);
268
269 /**
270  * Export some or all packets from a capture file to a new file.  If there's
271  * already a file with that name, do a "safe save", writing to a temporary
272  * file in the same directory and, if the write succeeds, renaming the new
273  * file on top of the old file, so that if the write fails, the old file is
274  * still intact.
275  *
276  * @param cf the capture file to write to
277  * @param fname the filename to write to
278  * @param range the range of packets to write
279  * @param save_format the format of the file to write (libpcap, ...)
280  * @param compressed whether to gzip compress the file
281  * @return one of cf_write_status_t
282  */
283 cf_write_status_t cf_export_specified_packets(capture_file *cf,
284                                               const char *fname,
285                                               packet_range_t *range,
286                                               guint save_format,
287                                               gboolean compressed);
288
289 /**
290  * Get a displayable name of the capture file.
291  *
292  * @param cf the capture file
293  * @return the displayable name (must be g_free'd)
294  */
295 gchar *cf_get_display_name(capture_file *cf);
296
297 /**
298  * Set the source of the capture data for temporary files, e.g.
299  * "Interface eth0" or "Pipe from Pong"
300  *
301  * @param cf the capture file
302  * @param source the source description. this will be copied internally.
303  */
304 void cf_set_tempfile_source(capture_file *cf, gchar *source);
305
306 /**
307  * Get the source of the capture data for temporary files. Guaranteed to
308  * return a non-null value. The returned value should not be freed.
309  *
310  * @param cf the capture file
311  */
312 const gchar *cf_get_tempfile_source(capture_file *cf);
313
314 /**
315  * Get the number of packets in the capture file.
316  *
317  * @param cf the capture file
318  * @return the number of packets in the capture file
319  */
320 int cf_get_packet_count(capture_file *cf);
321
322 /**
323  * Is this capture file a temporary file?
324  *
325  * @param cf the capture file
326  * @return TRUE if it's a temporary file, FALSE otherwise
327  */
328 gboolean cf_is_tempfile(capture_file *cf);
329
330 /**
331  * Set flag, that this file is a tempfile.
332  */
333 void cf_set_tempfile(capture_file *cf, gboolean is_tempfile);
334
335 /**
336  * Set flag, if the number of packet drops while capturing are known or not.
337  *
338  * @param cf the capture file
339  * @param drops_known TRUE if the number of packet drops are known, FALSE otherwise
340  */
341 void cf_set_drops_known(capture_file *cf, gboolean drops_known);
342
343 /**
344  * Set the number of packet drops while capturing.
345  *
346  * @param cf the capture file
347  * @param drops the number of packet drops occurred while capturing
348  */
349 void cf_set_drops(capture_file *cf, guint32 drops);
350
351 /**
352  * Get flag state, if the number of packet drops while capturing are known or not.
353  *
354  * @param cf the capture file
355  * @return TRUE if the number of packet drops are known, FALSE otherwise
356  */
357 gboolean cf_get_drops_known(capture_file *cf);
358
359 /**
360  * Get the number of packet drops while capturing.
361  *
362  * @param cf the capture file
363  * @return the number of packet drops occurred while capturing
364  */
365 guint32 cf_get_drops(capture_file *cf);
366
367 /**
368  * Set the read filter.
369  * @todo this shouldn't be required, remove it somehow
370  *
371  * @param cf the capture file
372  * @param rfcode the readfilter
373  */
374 void cf_set_rfcode(capture_file *cf, dfilter_t *rfcode);
375
376 /**
377  * "Display Filter" packets in the capture file.
378  *
379  * @param cf the capture file
380  * @param dfilter the display filter
381  * @param force TRUE if do in any case, FALSE only if dfilter changed
382  * @return one of cf_status_t
383  */
384 cf_status_t cf_filter_packets(capture_file *cf, gchar *dfilter, gboolean force);
385
386 /**
387  * At least one "Refence Time" flag has changed, rescan all packets.
388  *
389  * @param cf the capture file
390  */
391 void cf_reftime_packets(capture_file *cf);
392
393 /**
394  * Return the time it took to load the file (in msec).
395  */
396 gulong cf_get_computed_elapsed(capture_file *cf);
397
398 /**
399  * "Something" has changed, rescan all packets.
400  *
401  * @param cf the capture file
402  */
403 void cf_redissect_packets(capture_file *cf);
404
405 /**
406  * Rescan all packets and just run taps - don't reconstruct the display.
407  *
408  * @param cf the capture file
409  * @return one of cf_read_status_t
410  */
411 cf_read_status_t cf_retap_packets(capture_file *cf);
412
413 /**
414  * Adjust timestamp precision if auto is selected.
415  *
416  * @param cf the capture file
417  */
418 void cf_timestamp_auto_precision(capture_file *cf);
419
420 /* print_range, enum which frames should be printed */
421 typedef enum {
422     print_range_selected_only,    /* selected frame(s) only (currently only one) */
423     print_range_marked_only,      /* marked frames only */
424     print_range_all_displayed,    /* all frames currently displayed */
425     print_range_all_captured      /* all frames in capture */
426 } print_range_e;
427
428 typedef struct {
429     print_stream_t *stream;       /* the stream to which we're printing */
430     print_format_e format;        /* plain text or PostScript */
431     gboolean to_file;             /* TRUE if we're printing to a file */
432     char *file;                   /* file output pathname */
433     char *cmd;                    /* print command string (not win32) */
434     packet_range_t range;
435
436     gboolean print_summary;       /* TRUE if we should print summary line. */
437     gboolean print_col_headings;  /* TRUE if we should print column headings */
438     print_dissections_e print_dissections;
439     gboolean print_hex;           /* TRUE if we should print hex data;
440                                    * FALSE if we should print only if not dissected. */
441     gboolean print_formfeed;      /* TRUE if a formfeed should be printed before
442                                    * each new packet */
443 } print_args_t;
444
445 /**
446  * Print the capture file.
447  *
448  * @param cf the capture file
449  * @param print_args the arguments what and how to print
450  * @param show_progress_bar TRUE if a progress bar is to be shown
451  * @return one of cf_print_status_t
452  */
453 cf_print_status_t cf_print_packets(capture_file *cf, print_args_t *print_args,
454                                    gboolean show_progress_bar);
455
456 /**
457  * Print (export) the capture file into PDML format.
458  *
459  * @param cf the capture file
460  * @param print_args the arguments what and how to export
461  * @return one of cf_print_status_t
462  */
463 cf_print_status_t cf_write_pdml_packets(capture_file *cf, print_args_t *print_args);
464
465 /**
466  * Print (export) the capture file into PSML format.
467  *
468  * @param cf the capture file
469  * @param print_args the arguments what and how to export
470  * @return one of cf_print_status_t
471  */
472 cf_print_status_t cf_write_psml_packets(capture_file *cf, print_args_t *print_args);
473
474 /**
475  * Print (export) the capture file into CSV format.
476  *
477  * @param cf the capture file
478  * @param print_args the arguments what and how to export
479  * @return one of cf_print_status_t
480  */
481 cf_print_status_t cf_write_csv_packets(capture_file *cf, print_args_t *print_args);
482
483 /**
484  * Print (export) the capture file into C Arrays format.
485  *
486  * @param cf the capture file
487  * @param print_args the arguments what and how to export
488  * @return one of cf_print_status_t
489  */
490 cf_print_status_t cf_write_carrays_packets(capture_file *cf, print_args_t *print_args);
491
492 /**
493  * Print (export) the capture file into JSON format.
494  *
495  * @param cf the capture file
496  * @param print_args the arguments what and how to export
497  * @return one of cf_print_status_t
498  */
499 cf_print_status_t cf_write_json_packets(capture_file *cf, print_args_t *print_args);
500
501 /**
502  * Find packet with a protocol tree item that contains a specified text string.
503  *
504  * @param cf the capture file
505  * @param string the string to find
506  * @param dir direction in which to search
507  * @return TRUE if a packet was found, FALSE otherwise
508  */
509 gboolean cf_find_packet_protocol_tree(capture_file *cf, const char *string,
510                                       search_direction dir);
511
512 /**
513  * Find field with a label that contains text string cfile->sfilter.
514  *
515  * @param cf the capture file
516  * @param tree the protocol tree
517  * @param mdata the first field (mdata->finfo) that matched the string
518  * @return TRUE if a packet was found, FALSE otherwise
519  */
520 extern gboolean cf_find_string_protocol_tree(capture_file *cf, proto_tree *tree,
521                                              match_data *mdata);
522
523 /**
524  * Find packet whose summary line contains a specified text string.
525  *
526  * @param cf the capture file
527  * @param string the string to find
528  * @param dir direction in which to search
529  * @return TRUE if a packet was found, FALSE otherwise
530  */
531 gboolean cf_find_packet_summary_line(capture_file *cf, const char *string,
532                                      search_direction dir);
533
534 /**
535  * Find packet whose data contains a specified byte string.
536  *
537  * @param cf the capture file
538  * @param string the string to find
539  * @param string_size the size of the string to find
540  * @param dir direction in which to search
541  * @return TRUE if a packet was found, FALSE otherwise
542  */
543 gboolean cf_find_packet_data(capture_file *cf, const guint8 *string,
544                              size_t string_size, search_direction dir);
545
546 /**
547  * Find packet that matches a compiled display filter.
548  *
549  * @param cf the capture file
550  * @param sfcode the display filter to match
551  * @param dir direction in which to search
552  * @return TRUE if a packet was found, FALSE otherwise
553  */
554 gboolean cf_find_packet_dfilter(capture_file *cf, dfilter_t *sfcode,
555                                 search_direction dir);
556
557 /**
558  * Find packet that matches a display filter given as a text string.
559  *
560  * @param cf the capture file
561  * @param filter the display filter to match
562  * @param dir direction in which to search
563  * @return TRUE if a packet was found, FALSE otherwise
564  */
565 gboolean
566 cf_find_packet_dfilter_string(capture_file *cf, const char *filter,
567                               search_direction dir);
568
569 /**
570  * Find marked packet.
571  *
572  * @param cf the capture file
573  * @param dir direction in which to search
574  * @return TRUE if a packet was found, FALSE otherwise
575  */
576 gboolean cf_find_packet_marked(capture_file *cf, search_direction dir);
577
578 /**
579  * Find time-reference packet.
580  *
581  * @param cf the capture file
582  * @param dir direction in which to search
583  * @return TRUE if a packet was found, FALSE otherwise
584  */
585 gboolean cf_find_packet_time_reference(capture_file *cf, search_direction dir);
586
587 /**
588  * GoTo Packet with the given row.
589  *
590  * @param cf the capture file
591  * @param row the row to go to
592  * @return TRUE if this row exists, FALSE otherwise
593  */
594 gboolean cf_goto_frame(capture_file *cf, guint row);
595
596 /**
597  * Go to frame specified by currently selected protocol tree field.
598  * (Go To Corresponding Packet)
599  * @todo this is ugly and should be improved!
600  *
601  * @param cf the capture file
602  * @return TRUE if this packet exists, FALSE otherwise
603  */
604 gboolean cf_goto_framenum(capture_file *cf);
605
606 /**
607  * Select the packet in the given row.
608  *
609  * @param cf the capture file
610  * @param row the row to select
611  */
612 void cf_select_packet(capture_file *cf, int row);
613
614 /**
615  * Unselect all packets, if any.
616  *
617  * @param cf the capture file
618  */
619 void cf_unselect_packet(capture_file *cf);
620
621 /**
622  * Unselect all protocol tree fields, if any.
623  *
624  * @param cf the capture file
625  */
626 void cf_unselect_field(capture_file *cf);
627
628 /**
629  * Mark a particular frame in a particular capture.
630  *
631  * @param cf the capture file
632  * @param frame the frame to be marked
633  */
634 void cf_mark_frame(capture_file *cf, frame_data *frame);
635
636 /**
637  * Unmark a particular frame in a particular capture.
638  *
639  * @param cf the capture file
640  * @param frame the frame to be unmarked
641  */
642 void cf_unmark_frame(capture_file *cf, frame_data *frame);
643
644 /**
645  * Ignore a particular frame in a particular capture.
646  *
647  * @param cf the capture file
648  * @param frame the frame to be ignored
649  */
650 void cf_ignore_frame(capture_file *cf, frame_data *frame);
651
652 /**
653  * Unignore a particular frame in a particular capture.
654  *
655  * @param cf the capture file
656  * @param frame the frame to be unignored
657  */
658 void cf_unignore_frame(capture_file *cf, frame_data *frame);
659
660 /**
661  * Merge two or more capture files into a temporary file.
662  * @todo is this the right place for this function? It doesn't have to do a lot with capture_file.
663  *
664  * @param pd_window Window pointer suitable for use by delayed_create_progress_dlg.
665  * @param out_filenamep Points to a pointer that's set to point to the
666  *        pathname of the temporary file; it's allocated with g_malloc()
667  * @param in_file_count the number of input files to merge
668  * @param in_filenames array of input filenames
669  * @param file_type the output filetype
670  * @param do_append FALSE to merge chronologically, TRUE simply append
671  * @return one of cf_status_t
672  */
673 cf_status_t
674 cf_merge_files_to_tempfile(gpointer pd_window, char **out_filenamep,
675                            int in_file_count, char *const *in_filenames,
676                            int file_type, gboolean do_append);
677
678
679 /**
680  * Get the comment on a capture from the SHB data block
681  * XXX - should support multiple sections.
682  *
683  * @param cf the capture file
684  */
685 const gchar* cf_read_section_comment(capture_file *cf);
686
687 /**
688  * Update(replace) the comment on a capture from the SHB data block
689  * XXX - should support multiple sections.
690  *
691  * @param cf the capture file
692  * @param comment the string replacing the old comment
693  */
694 void cf_update_section_comment(capture_file *cf, gchar *comment);
695
696 /*
697  * Get the comment on a packet (record).
698  * If the comment has been edited, it returns the result of the edit,
699  * otherwise it returns the comment from the file.
700  *
701  * @param cf the capture file
702  * @param fd the frame_data structure for the frame
703  */
704 char *cf_get_packet_comment(capture_file *cf, const frame_data *fd);
705
706 /**
707  * Update(replace) the comment on a capture from a frame
708  *
709  * @param cf the capture file
710  * @param fd the frame_data structure for the frame
711  * @param new_comment the string replacing the old comment
712  */
713 gboolean cf_set_user_packet_comment(capture_file *cf, frame_data *fd, const gchar *new_comment);
714
715 /**
716  * What types of comments does this file have?
717  *
718  * @param cf the capture file
719  * @return bitset of WTAP_COMMENT_ values
720  */
721 guint32 cf_comment_types(capture_file *cf);
722
723 /**
724  * Add a resolved address to this file's list of resolved addresses.
725  *
726  * @param cf the capture file
727  * @param addr a string representing an IPv4 or IPv6 address
728  * @param name a string containing a name corresponding to that address
729  * @return TRUE if it succeeds, FALSE if not
730  */
731 gboolean cf_add_ip_name_from_string(capture_file *cf, const char *addr, const char *name);
732
733 #ifdef WANT_PACKET_EDITOR
734 /**
735  * Give a frame new, edited data.
736  *
737  * @param cf the capture file
738  * @param fd frame_data structure for the frame
739  * @param phdr the struct wtap_pkthdr for the frame
740  * @param pd the raw packet data for the frame
741  */
742 void cf_set_frame_edited(capture_file *cf, frame_data *fd, struct wtap_pkthdr *phdr, guint8 *pd);
743 #endif
744
745 #ifdef __cplusplus
746 }
747 #endif /* __cplusplus */
748
749 #endif /* file.h */
750
751 /*
752  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
753  *
754  * Local variables:
755  * c-basic-offset: 4
756  * tab-width: 8
757  * indent-tabs-mode: nil
758  * End:
759  *
760  * vi: set shiftwidth=4 tabstop=8 expandtab:
761  * :indentSize=4:tabSize=8:noTabs=true:
762  */