Move the new files to the same places as in automake.
[obnox/wireshark/wip.git] / wiretap / eyesdn.c
index 27a2753..897e32e 100644 (file)
@@ -209,7 +209,7 @@ eyesdn_seek_read (wtap *wth, gint64 seek_off,
 
        if (pkt_len != len) {
                if (pkt_len != -1) {
-                       *err = WTAP_ERR_BAD_RECORD;
+                       *err = WTAP_ERR_BAD_FILE;
                        *err_info = g_strdup_printf("eyesdn: requested length %d doesn't match length %d",
                            len, pkt_len);
                }
@@ -296,7 +296,7 @@ parse_eyesdn_rec_hdr(wtap *wth, FILE_T fh,
                gint64 cur_off;
 
                if(pkt_len != CELL_LEN) {
-                       *err = WTAP_ERR_BAD_RECORD;
+                       *err = WTAP_ERR_BAD_FILE;
                        *err_info = g_strdup_printf(
                            "eyesdn: ATM cell has a length != 53 (%u)",
                            pkt_len);
@@ -360,13 +360,14 @@ parse_eyesdn_rec_hdr(wtap *wth, FILE_T fh,
        }
 
        if(pkt_len > EYESDN_MAX_PACKET_LEN) {
-               *err = WTAP_ERR_BAD_RECORD;
+               *err = WTAP_ERR_BAD_FILE;
                *err_info = g_strdup_printf("eyesdn: File has %u-byte packet, bigger than maximum of %u",
                pkt_len, EYESDN_MAX_PACKET_LEN);
                return -1;
        }
 
        if (wth) {
+               wth->phdr.presence_flags = WTAP_HAS_TS;
                wth->phdr.ts.secs = secs;
                wth->phdr.ts.nsecs = usecs * 1000;
                wth->phdr.caplen = pkt_len;
@@ -391,7 +392,7 @@ parse_eyesdn_packet_data(FILE_T fh, int pkt_len, guint8* buf, int *err,
                        if (*err == 0)
                                *err = WTAP_ERR_SHORT_READ;
                } else if (bytes_read == -1) {
-                       *err = WTAP_ERR_BAD_RECORD;
+                       *err = WTAP_ERR_BAD_FILE;
                        *err_info = g_strdup("eyesdn: No flag character seen in frame");
                } else
                        *err = WTAP_ERR_SHORT_READ;
@@ -427,7 +428,7 @@ esc_write(wtap_dumper *wdh, const guint8 *buf, int len, int *err)
 static gboolean eyesdn_dump(wtap_dumper *wdh,
                            const struct wtap_pkthdr *phdr,
                            const union wtap_pseudo_header *pseudo_header _U_,
-                           const guchar *pd, int *err);
+                           const guint8 *pd, int *err);
 
 gboolean eyesdn_dump_open(wtap_dumper *wdh, int *err)
 {
@@ -465,7 +466,7 @@ int eyesdn_dump_can_write_encap(int encap)
 static gboolean eyesdn_dump(wtap_dumper *wdh,
                            const struct wtap_pkthdr *phdr,
                            const union wtap_pseudo_header *pseudo_header _U_,
-                           const guchar *pd, int *err)
+                           const guint8 *pd, int *err)
 {
        static const guint8 start_flag = 0xff;
        guint8 buf[EYESDN_HDR_LENGTH];