summaryrefslogtreecommitdiff
path: root/pkt_buff.h
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 /pkt_buff.h
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 'pkt_buff.h')
-rw-r--r--pkt_buff.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/pkt_buff.h b/pkt_buff.h
index e044f66..28872ef 100644
--- a/pkt_buff.h
+++ b/pkt_buff.h
@@ -19,7 +19,7 @@ struct pkt_buff {
uint8_t *tail;
unsigned int size;
- struct protocol *handler;
+ struct protocol *dissector;
uint32_t link_type;
uint16_t proto;
};
@@ -32,7 +32,7 @@ static inline struct pkt_buff *pkt_alloc(uint8_t *packet, unsigned int len)
pkt->data = packet;
pkt->tail = packet + len;
pkt->size = len;
- pkt->handler = NULL;
+ pkt->dissector = NULL;
return pkt;
}
@@ -101,14 +101,14 @@ static inline uint8_t *pkt_pull_tail(struct pkt_buff *pkt, unsigned int len)
return tail;
}
-static inline void pkt_set_proto(struct pkt_buff *pkt, struct hash_table *table,
- unsigned int key)
+static inline void pkt_set_dissector(struct pkt_buff *pkt, struct hash_table *table,
+ unsigned int key)
{
bug_on(!pkt || !table);
- pkt->handler = lookup_hash(key, table);
- while (pkt->handler && key != pkt->handler->key)
- pkt->handler = pkt->handler->next;
+ pkt->dissector = lookup_hash(key, table);
+ while (pkt->dissector && key != pkt->dissector->key)
+ pkt->dissector = pkt->dissector->next;
}
#endif /* PKT_BUFF_H */