summaryrefslogtreecommitdiff
path: root/dissector.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2015-05-04 09:51:57 +0200
committerTobias Klauser <tklauser@distanz.ch>2015-05-04 09:51:57 +0200
commitf2828acdd708eea5ac95542c2258c894ef1cda9b (patch)
treef1054a29de62f52307c2dc0060484d964e743568 /dissector.c
parent47fb4f6219e6936fd99d28a1e43135544d10b4ff (diff)
netsniff-ng: Rename protocol dissector member of struct pkt_buff
In commit d312a25879d5 ("netsniff-ng nlmsg: Print netlink protocol name"), the struct protocol member of struct pkt_buff was renamed to handler to account for the newly added proto field. However, the corresponding function pkt_set_proto wasn't renamed which is a bit counter-intuitive. Fix this by renaming the member again, this time to dissector (as I don't consider handler a particulary meaningful name) and adjust the set function's name accordingly. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'dissector.c')
-rw-r--r--dissector.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/dissector.c b/dissector.c
index ca98386..4cad588 100644
--- a/dissector.c
+++ b/dissector.c
@@ -42,18 +42,18 @@ int dissector_set_print_type(void *ptr, int type)
static void dissector_main(struct pkt_buff *pkt, struct protocol *start,
struct protocol *end)
{
- struct protocol *handler;
+ struct protocol *dissector;
if (!start)
return;
- for (pkt->handler = start; pkt->handler; ) {
- if (unlikely(!pkt->handler->process))
+ for (pkt->dissector = start; pkt->dissector; ) {
+ if (unlikely(!pkt->dissector->process))
break;
- handler = pkt->handler;
- pkt->handler = NULL;
- handler->process(pkt);
+ dissector = pkt->dissector;
+ pkt->dissector = NULL;
+ dissector->process(pkt);
}
if (end && likely(end->process))