summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2012-10-16 21:50:57 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2012-10-16 21:50:57 +0000
commit78631020b83c7aab12934f0cff72dbb5e3f0ba4a (patch)
tree826f6248fcdb37ec849abebc3bdcc650e0df6c61 /epan
parentd7ae273d7a2373ab6fcc1c58d235b4a7dc4df0e9 (diff)
downloadwireshark-78631020b83c7aab12934f0cff72dbb5e3f0ba4a.tar.gz
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 'epan')
-rw-r--r--epan/epan.c4
-rw-r--r--epan/epan.h2
-rw-r--r--epan/frame_data.h4
-rw-r--r--epan/packet.c5
-rw-r--r--epan/packet.h2
-rw-r--r--epan/packet_info.h1
6 files changed, 10 insertions, 8 deletions
diff --git a/epan/epan.c b/epan/epan.c
index 6437bad237..8a11d6c47a 100644
--- a/epan/epan.c
+++ b/epan/epan.c
@@ -189,13 +189,13 @@ epan_dissect_fake_protocols(epan_dissect_t *edt, const gboolean fake_protocols)
}
void
-epan_dissect_run(epan_dissect_t *edt, void* pseudo_header,
+epan_dissect_run(epan_dissect_t *edt, struct wtap_pkthdr *phdr,
const guint8* data, frame_data *fd, column_info *cinfo)
{
/* free all memory allocated during previous packet */
ep_free_all();
- dissect_packet(edt, pseudo_header, data, fd, cinfo);
+ dissect_packet(edt, phdr, data, fd, cinfo);
}
void
diff --git a/epan/epan.h b/epan/epan.h
index 00ec257208..24d751e3d1 100644
--- a/epan/epan.h
+++ b/epan/epan.h
@@ -151,7 +151,7 @@ epan_dissect_fake_protocols(epan_dissect_t *edt, const gboolean fake_protocols);
/** run a single packet dissection */
void
-epan_dissect_run(epan_dissect_t *edt, void* pseudo_header,
+epan_dissect_run(epan_dissect_t *edt, struct wtap_pkthdr *phdr,
const guint8* data, frame_data *fd, column_info *cinfo);
/** Prime a proto_tree using the fields/protocols used in a dfilter. */
diff --git a/epan/frame_data.h b/epan/frame_data.h
index 87994cabf1..252a683be7 100644
--- a/epan/frame_data.h
+++ b/epan/frame_data.h
@@ -74,8 +74,8 @@ typedef struct _frame_data {
#ifdef WANT_PACKET_EDITOR
/* XXX, where this struct should go? */
typedef struct {
- union wtap_pseudo_header ph; /**< Modified pseudo header */
- char *pd; /**< Modified packet data */
+ struct wtap_pkthdr phdr; /**< Modified packet header */
+ char *pd; /**< Modified packet data */
} modified_frame_data;
#endif
diff --git a/epan/packet.c b/epan/packet.c
index cd0f6f1b49..a1287e112e 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -294,7 +294,7 @@ final_registration_all_protocols(void)
/* Creates the top-most tvbuff and calls dissect_frame() */
void
-dissect_packet(epan_dissect_t *edt, union wtap_pseudo_header *pseudo_header,
+dissect_packet(epan_dissect_t *edt, struct wtap_pkthdr *phdr,
const guchar *pd, frame_data *fd, column_info *cinfo)
{
if (cinfo != NULL)
@@ -303,7 +303,8 @@ dissect_packet(epan_dissect_t *edt, union wtap_pseudo_header *pseudo_header,
edt->pi.current_proto = "<Missing Protocol Name>";
edt->pi.cinfo = cinfo;
edt->pi.fd = fd;
- edt->pi.pseudo_header = pseudo_header;
+ edt->pi.phdr = phdr;
+ edt->pi.pseudo_header = &phdr->pseudo_header;
edt->pi.dl_src.type = AT_NONE;
edt->pi.dl_dst.type = AT_NONE;
edt->pi.net_src.type = AT_NONE;
diff --git a/epan/packet.h b/epan/packet.h
index 06be789082..588a1f9e6a 100644
--- a/epan/packet.h
+++ b/epan/packet.h
@@ -436,7 +436,7 @@ extern void mark_frame_as_depended_upon(packet_info *pinfo, guint32 frame_num);
* Dissectors should never modify the packet data.
*/
extern void dissect_packet(epan_dissect_t *edt,
- union wtap_pseudo_header *pseudo_header, const guchar *pd,
+ struct wtap_pkthdr *phdr, const guchar *pd,
frame_data *fd, column_info *cinfo);
/* These functions are in packet-ethertype.c */
diff --git a/epan/packet_info.h b/epan/packet_info.h
index 470452b259..369a09939d 100644
--- a/epan/packet_info.h
+++ b/epan/packet_info.h
@@ -50,6 +50,7 @@ typedef struct _packet_info {
column_info *cinfo; /**< Column formatting information */
frame_data *fd;
union wtap_pseudo_header *pseudo_header;
+ struct wtap_pkthdr *phdr;
GSList *data_src; /**< Frame data sources */
address dl_src; /**< link-layer source address */
address dl_dst; /**< link-layer destination address */