aboutsummaryrefslogtreecommitdiffstats
path: root/pcapio.h
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@fh-muenster.de>2012-02-14 17:07:52 +0000
committerMichael Tüxen <tuexen@fh-muenster.de>2012-02-14 17:07:52 +0000
commit68204c94a42d0b4e63a511b8c0abc0419404b81b (patch)
tree2e73719795aed5a7c97d3ef5924e5ef30e91918c /pcapio.h
parent7e51e80fe089d6772cc616cc9d28f9ca8935c393 (diff)
From Anders: Add support for options in the SHB.
From me: Some whitespace changes. svn path=/trunk/; revision=41026
Diffstat (limited to 'pcapio.h')
-rw-r--r--pcapio.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/pcapio.h b/pcapio.h
index 80d28da8bc..e7f28f76dd 100644
--- a/pcapio.h
+++ b/pcapio.h
@@ -25,25 +25,40 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/* Returns a FILE * to write to on success, NULL on failure */
+/** Returns a FILE * to write to on success, NULL on failure */
extern FILE *
libpcap_fdopen(int fd, int *err);
-/* Write the file header to a dump file.
+/** Write the file header to a dump file.
Returns TRUE on success, FALSE on failure.
Sets "*err" to an error code, or 0 for a short write, on failure*/
extern gboolean
libpcap_write_file_header(FILE *fp, int linktype, int snaplen, long *bytes_written, int *err);
-/* Write a record for a packet to a dump file.
+/** Write a record for a packet to a dump file.
Returns TRUE on success, FALSE on failure. */
extern gboolean
libpcap_write_packet(FILE *fp, const struct pcap_pkthdr *phdr, const u_char *pd,
long *bytes_written, int *err);
+/** Write a section header block (SHB)
+ *
+ */
extern gboolean
-libpcap_write_session_header_block(FILE *fp,
- const char *appname,
+libpcap_write_session_header_block(FILE *fp, /**< File pointer */
+ const char *comment, /**< Comment on the section, Optinon 1 opt_comment
+ * A UTF-8 string containing a comment that is associated to the current block.
+ */
+ const char *hw, /**< HW, Optinon 2 shb_hardware
+ * An UTF-8 string containing the description of the hardware used to create this section.
+ */
+ const char *os, /**< Operating system name, Optinon 3 shb_os
+ * An UTF-8 string containing the name of the operating system used to create this section.
+ */
+ const char *appname, /**< Application name, Optinon 4 shb_userappl
+ * An UTF-8 string containing the name of the application used to create this section.
+ */
+ guint64 section_length,
long *bytes_written,
int *err);