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/iptrace.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/iptrace.c')
-rw-r--r-- | wiretap/iptrace.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/wiretap/iptrace.c b/wiretap/iptrace.c index ee343aa3e6..a2b8ec5feb 100644 --- a/wiretap/iptrace.c +++ b/wiretap/iptrace.c @@ -33,13 +33,13 @@ static gboolean iptrace_read_1_0(wtap *wth, int *err, gchar **err_info, gint64 *data_offset); static gboolean iptrace_seek_read_1_0(wtap *wth, gint64 seek_off, - union wtap_pseudo_header *pseudo_header, guint8 *pd, int packet_size, + struct wtap_pkthdr *phdr, guint8 *pd, int packet_size, int *err, gchar **err_info); static gboolean iptrace_read_2_0(wtap *wth, int *err, gchar **err_info, gint64 *data_offset); static gboolean iptrace_seek_read_2_0(wtap *wth, gint64 seek_off, - union wtap_pseudo_header *pseudo_header, guint8 *pd, int packet_size, + struct wtap_pkthdr *phdr, guint8 *pd, int packet_size, int *err, gchar **err_info); static int iptrace_read_rec_header(FILE_T fh, guint8 *header, int header_len, @@ -221,7 +221,7 @@ static gboolean iptrace_read_1_0(wtap *wth, int *err, gchar **err_info, /* Fill in the pseudo-header. */ fill_in_pseudo_header(wth->phdr.pkt_encap, data_ptr, wth->phdr.caplen, - &wth->pseudo_header, header); + &wth->phdr.pseudo_header, header); /* If the per-file encapsulation isn't known, set it to this packet's encapsulation. @@ -240,9 +240,10 @@ static gboolean iptrace_read_1_0(wtap *wth, int *err, gchar **err_info, } static gboolean iptrace_seek_read_1_0(wtap *wth, gint64 seek_off, - union wtap_pseudo_header *pseudo_header, guint8 *pd, int packet_size, + struct wtap_pkthdr *phdr, guint8 *pd, int packet_size, int *err, gchar **err_info) { + union wtap_pseudo_header *pseudo_header = &phdr->pseudo_header; int ret; guint8 header[IPTRACE_1_0_PHDR_SIZE]; int pkt_encap; @@ -433,7 +434,7 @@ static gboolean iptrace_read_2_0(wtap *wth, int *err, gchar **err_info, /* Fill in the pseudo-header. */ fill_in_pseudo_header(wth->phdr.pkt_encap, data_ptr, wth->phdr.caplen, - &wth->pseudo_header, header); + &wth->phdr.pseudo_header, header); /* If the per-file encapsulation isn't known, set it to this packet's encapsulation. @@ -452,9 +453,10 @@ static gboolean iptrace_read_2_0(wtap *wth, int *err, gchar **err_info, } static gboolean iptrace_seek_read_2_0(wtap *wth, gint64 seek_off, - union wtap_pseudo_header *pseudo_header, guint8 *pd, int packet_size, + struct wtap_pkthdr *phdr, guint8 *pd, int packet_size, int *err, gchar **err_info) { + union wtap_pseudo_header *pseudo_header = &phdr->pseudo_header; int ret; guint8 header[IPTRACE_2_0_PHDR_SIZE]; int pkt_encap; |