From Tyson Key:
[obnox/wireshark/wip.git] / pcapio.h
index c69a8340b2ff70999da620c7e05fd8b101bd23e3..449593a226dc9cc684fc0331648c35c3ce888b02 100644 (file)
--- a/pcapio.h
+++ b/pcapio.h
  * 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,
-                                   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);
 
 extern gboolean
 libpcap_write_interface_description_block(FILE *fp,
-                                          char *name,
-                                          char *filter,
+                                          const char *comment,  /* OPT_COMMENT           1 */
+                                          const char *name,     /* IDB_NAME                         2 */
+                                          const char *descr,    /* IDB_DESCRIPTION       3 */
+                                          const char *filter,   /* IDB_FILTER           11 */
+                                          const char *os,       /* IDB_OS               12 */
                                           int link_type,
                                           int snap_len,
                                           long *bytes_written,
+                                          guint64 if_speed,     /* IDB_IF_SPEED          8 */
+                                          guint8 tsresol,       /* IDB_TSRESOL           9 */
                                           int *err);
 
 extern gboolean
@@ -61,13 +81,16 @@ libpcap_write_interface_statistics_block(FILE *fp,
                                          guint32 interface_id,
                                          pcap_t *pd,
                                          long *bytes_written,
+                                         const char *comment,   /* OPT_COMMENT           1 */
+                                         guint64 isb_starttime, /* ISB_STARTTIME         2 */
+                                         guint64 isb_endtime,   /* ISB_ENDTIME           3 */
                                          int *err);
 
 extern gboolean
 libpcap_write_enhanced_packet_block(FILE *fp,
-                                    struct pcap_pkthdr *phdr,
+                                    const struct pcap_pkthdr *phdr,
                                     guint32 interface_id,
-                                    u_char *pd,
+                                    const u_char *pd,
                                     long *bytes_written,
                                     int *err);