diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2012-10-16 21:50:57 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2012-10-16 21:50:57 +0000 |
commit | 78631020b83c7aab12934f0cff72dbb5e3f0ba4a (patch) | |
tree | 826f6248fcdb37ec849abebc3bdcc650e0df6c61 /wiretap/peekclassic.c | |
parent | d7ae273d7a2373ab6fcc1c58d235b4a7dc4df0e9 (diff) |
Add wtap_pseudo_header union to wtap_pkthdr structure.
Use pkthdr instead of pseudo_header as argument for dissecting.
svn path=/trunk/; revision=45601
Diffstat (limited to 'wiretap/peekclassic.c')
-rw-r--r-- | wiretap/peekclassic.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/wiretap/peekclassic.c b/wiretap/peekclassic.c index 5dfbd5ac2c..028947af73 100644 --- a/wiretap/peekclassic.c +++ b/wiretap/peekclassic.c @@ -143,12 +143,12 @@ typedef struct { static gboolean peekclassic_read_v7(wtap *wth, int *err, gchar **err_info, gint64 *data_offset); static gboolean peekclassic_seek_read_v7(wtap *wth, gint64 seek_off, - union wtap_pseudo_header *pseudo_header, guint8 *pd, int length, + struct wtap_pkthdr *phdr, guint8 *pd, int length, int *err, gchar **err_info); static gboolean peekclassic_read_v56(wtap *wth, int *err, gchar **err_info, gint64 *data_offset); static gboolean peekclassic_seek_read_v56(wtap *wth, gint64 seek_off, - union wtap_pseudo_header *pseudo_header, guint8 *pd, int length, + struct wtap_pkthdr *phdr, guint8 *pd, int length, int *err, gchar **err_info); int @@ -399,15 +399,15 @@ peekclassic_read_v7(wtap *wth, int *err, gchar **err_info, gint64 *data_offset) switch (wth->file_encap) { case WTAP_ENCAP_IEEE_802_11_AIROPEEK: - wth->pseudo_header.ieee_802_11.fcs_len = 0; /* no FCS */ - wth->pseudo_header.ieee_802_11.decrypted = FALSE; + wth->phdr.pseudo_header.ieee_802_11.fcs_len = 0; /* no FCS */ + wth->phdr.pseudo_header.ieee_802_11.decrypted = FALSE; break; case WTAP_ENCAP_ETHERNET: /* XXX - it appears that if the low-order bit of "status" is 0, there's an FCS in this frame, and if it's 1, there's 4 bytes of 0. */ - wth->pseudo_header.eth.fcs_len = (status & 0x01) ? 0 : 4; + wth->phdr.pseudo_header.eth.fcs_len = (status & 0x01) ? 0 : 4; break; } @@ -440,9 +440,10 @@ peekclassic_read_v7(wtap *wth, int *err, gchar **err_info, gint64 *data_offset) static gboolean peekclassic_seek_read_v7(wtap *wth, gint64 seek_off, - union wtap_pseudo_header *pseudo_header, guint8 *pd, int length, + struct wtap_pkthdr *phdr, guint8 *pd, int length, int *err, gchar **err_info) { + union wtap_pseudo_header *pseudo_header = &phdr->pseudo_header; guint8 ep_pkt[PEEKCLASSIC_V7_PKT_SIZE]; guint8 status; @@ -563,7 +564,7 @@ peekclassic_read_v56(wtap *wth, int *err, gchar **err_info, gint64 *data_offset) case WTAP_ENCAP_ETHERNET: /* We assume there's no FCS in this frame. */ - wth->pseudo_header.eth.fcs_len = 0; + wth->phdr.pseudo_header.eth.fcs_len = 0; break; } return TRUE; @@ -571,9 +572,10 @@ peekclassic_read_v56(wtap *wth, int *err, gchar **err_info, gint64 *data_offset) static gboolean peekclassic_seek_read_v56(wtap *wth, gint64 seek_off, - union wtap_pseudo_header *pseudo_header, guint8 *pd, int length, + struct wtap_pkthdr *phdr, guint8 *pd, int length, int *err, gchar **err_info) { + union wtap_pseudo_header *pseudo_header = &phdr->pseudo_header; guint8 ep_pkt[PEEKCLASSIC_V56_PKT_SIZE]; int pkt_encap; guint16 protoNum; |