summaryrefslogtreecommitdiff
path: root/trafgen_proto.h
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2016-12-18 11:52:46 +0200
committerTobias Klauser <tklauser@distanz.ch>2016-12-21 16:55:19 +0100
commitd552107f5ce59a69b43517e4327ed6a4903bf529 (patch)
tree9029444e423b2a4d3954de9ae23c1042cb4c9145 /trafgen_proto.h
parentd084e7ab35438619bfd414ab9a605c64e6e83817 (diff)
trafgen: proto: Rename proto_field_xxx -> proto_hdr_field_xxx
Rename all proto_field_xxx(...) functions to proto_hdr_field(...). It is good for 2 reasons: 1) proto_hdr_field_xxx naming is more consistent as it is related to proto_hdr API. 2) It makes possible to introduce proto_field_xxx API which will operate only with struct proto_field. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'trafgen_proto.h')
-rw-r--r--trafgen_proto.h52
1 files changed, 26 insertions, 26 deletions
diff --git a/trafgen_proto.h b/trafgen_proto.h
index ec152b4..927fcb1 100644
--- a/trafgen_proto.h
+++ b/trafgen_proto.h
@@ -104,47 +104,47 @@ extern void proto_header_fields_add(struct proto_hdr *hdr,
const struct proto_field *fields,
size_t count);
-extern bool proto_field_is_set(struct proto_hdr *hdr, uint32_t fid);
-extern void proto_field_set_bytes(struct proto_hdr *hdr, uint32_t fid,
+extern bool proto_hdr_field_is_set(struct proto_hdr *hdr, uint32_t fid);
+extern void proto_hdr_field_set_bytes(struct proto_hdr *hdr, uint32_t fid,
const uint8_t *bytes);
-extern void proto_field_set_u8(struct proto_hdr *hdr, uint32_t fid, uint8_t val);
-extern uint8_t proto_field_get_u8(struct proto_hdr *hdr, uint32_t fid);
-extern void proto_field_set_u16(struct proto_hdr *hdr, uint32_t fid, uint16_t val);
-extern uint16_t proto_field_get_u16(struct proto_hdr *hdr, uint32_t fid);
-extern void proto_field_set_u32(struct proto_hdr *hdr, uint32_t fid, uint32_t val);
-extern uint32_t proto_field_get_u32(struct proto_hdr *hdr, uint32_t fid);
-
-extern void proto_field_set_default_bytes(struct proto_hdr *hdr, uint32_t fid,
+extern void proto_hdr_field_set_u8(struct proto_hdr *hdr, uint32_t fid, uint8_t val);
+extern uint8_t proto_hdr_field_get_u8(struct proto_hdr *hdr, uint32_t fid);
+extern void proto_hdr_field_set_u16(struct proto_hdr *hdr, uint32_t fid, uint16_t val);
+extern uint16_t proto_hdr_field_get_u16(struct proto_hdr *hdr, uint32_t fid);
+extern void proto_hdr_field_set_u32(struct proto_hdr *hdr, uint32_t fid, uint32_t val);
+extern uint32_t proto_hdr_field_get_u32(struct proto_hdr *hdr, uint32_t fid);
+
+extern void proto_hdr_field_set_default_bytes(struct proto_hdr *hdr, uint32_t fid,
const uint8_t *bytes);
-extern void proto_field_set_default_u8(struct proto_hdr *hdr, uint32_t fid,
+extern void proto_hdr_field_set_default_u8(struct proto_hdr *hdr, uint32_t fid,
uint8_t val);
-extern void proto_field_set_default_u16(struct proto_hdr *hdr, uint32_t fid,
+extern void proto_hdr_field_set_default_u16(struct proto_hdr *hdr, uint32_t fid,
uint16_t val);
-extern void proto_field_set_default_u32(struct proto_hdr *hdr, uint32_t fid,
+extern void proto_hdr_field_set_default_u32(struct proto_hdr *hdr, uint32_t fid,
uint32_t val);
-extern void proto_field_set_be16(struct proto_hdr *hdr, uint32_t fid, uint16_t val);
-extern void proto_field_set_be32(struct proto_hdr *hdr, uint32_t fid, uint32_t val);
+extern void proto_hdr_field_set_be16(struct proto_hdr *hdr, uint32_t fid, uint16_t val);
+extern void proto_hdr_field_set_be32(struct proto_hdr *hdr, uint32_t fid, uint32_t val);
-extern void proto_field_set_default_be16(struct proto_hdr *hdr, uint32_t fid,
+extern void proto_hdr_field_set_default_be16(struct proto_hdr *hdr, uint32_t fid,
uint16_t val);
-extern void proto_field_set_default_be32(struct proto_hdr *hdr, uint32_t fid,
+extern void proto_hdr_field_set_default_be32(struct proto_hdr *hdr, uint32_t fid,
uint32_t val);
-extern void proto_field_set_dev_mac(struct proto_hdr *hdr, uint32_t fid);
-extern void proto_field_set_default_dev_mac(struct proto_hdr *hdr, uint32_t fid);
+extern void proto_hdr_field_set_dev_mac(struct proto_hdr *hdr, uint32_t fid);
+extern void proto_hdr_field_set_default_dev_mac(struct proto_hdr *hdr, uint32_t fid);
-extern void proto_field_set_dev_ipv4(struct proto_hdr *hdr, uint32_t fid);
-extern void proto_field_set_default_dev_ipv4(struct proto_hdr *hdr, uint32_t fid);
+extern void proto_hdr_field_set_dev_ipv4(struct proto_hdr *hdr, uint32_t fid);
+extern void proto_hdr_field_set_default_dev_ipv4(struct proto_hdr *hdr, uint32_t fid);
-extern void proto_field_set_dev_ipv6(struct proto_hdr *hdr, uint32_t fid);
-extern void proto_field_set_default_dev_ipv6(struct proto_hdr *hdr, uint32_t fid);
+extern void proto_hdr_field_set_dev_ipv6(struct proto_hdr *hdr, uint32_t fid);
+extern void proto_hdr_field_set_default_dev_ipv6(struct proto_hdr *hdr, uint32_t fid);
extern void proto_field_dyn_apply(struct proto_field *field);
-extern void proto_field_func_add(struct proto_hdr *hdr, uint32_t fid,
- struct proto_field_func *func);
+extern void proto_hdr_field_func_add(struct proto_hdr *hdr, uint32_t fid,
+ struct proto_field_func *func);
-extern struct proto_field *proto_field_by_id(struct proto_hdr *hdr, uint32_t fid);
+extern struct proto_field *proto_hdr_field_by_id(struct proto_hdr *hdr, uint32_t fid);
#endif /* TRAFGEN_PROTO_H */