diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2015-11-02 17:09:36 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2015-11-02 17:09:36 +0100 |
commit | 91da5993cd0adb698002afb674246ae36d629055 (patch) | |
tree | be044ec3b655563027567acceefbdaac532afd14 | |
parent | b5d757ae6de3b28f326644c63f7e2b9df4109764 (diff) |
trafgen: Add missing inline function
Add the inline function packet_dyn_has_only_csums() which is used in the
previous commit but accidentially wasn't added there.
Fixes: b5d757a ("trafgen: Pre-calculate checksums if possible")
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r-- | trafgen_conf.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/trafgen_conf.h b/trafgen_conf.h index d2df1f4..dddee8c 100644 --- a/trafgen_conf.h +++ b/trafgen_conf.h @@ -47,7 +47,12 @@ struct packet_dyn { static inline bool packet_dyn_has_elems(struct packet_dyn *p) { - return (p->rlen || p->slen || p->clen); + return (p->clen || p->rlen || p->slen); +} + +static inline bool packet_dyn_has_only_csums(struct packet_dyn *p) +{ + return (p->clen == 0 && p->rlen == 0 && p->slen); } extern void compile_packets(char *file, bool verbose, unsigned int cpu, bool invoke_cpp); |