2 * m_pedit.h generic packet editor actions module
4 * This program is free software; you can distribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
9 * Authors: J Hadi Salim (hadi@cyberus.ca)
14 #define _ACT_PEDIT_H_ 1
21 #include <sys/socket.h>
22 #include <netinet/in.h>
23 #include <arpa/inet.h>
27 #include <linux/tc_act/tc_pedit.h>
36 #define RU32 0xFFFFFFFF
40 #define PEDITKINDSIZ 16
44 struct m_pedit_util *next;
45 char id[PEDITKINDSIZ];
46 int (*parse_peopt)(int *argc_p, char ***argv_p,struct tc_pedit_sel *sel,struct tc_pedit_key *tkey);
50 extern int parse_cmd(int *argc_p, char ***argv_p, __u32 len, int type,__u32 retain,struct tc_pedit_sel *sel,struct tc_pedit_key *tkey);
51 extern int pack_key(struct tc_pedit_sel *sel,struct tc_pedit_key *tkey);
52 extern int pack_key32(__u32 retain,struct tc_pedit_sel *sel,struct tc_pedit_key *tkey);
53 extern int pack_key16(__u32 retain,struct tc_pedit_sel *sel,struct tc_pedit_key *tkey);
54 extern int pack_key8(__u32 retain,struct tc_pedit_sel *sel,struct tc_pedit_key *tkey);
55 extern int parse_val(int *argc_p, char ***argv_p, __u32 * val, int type);
56 extern int parse_cmd(int *argc_p, char ***argv_p, __u32 len, int type,__u32 retain,struct tc_pedit_sel *sel,struct tc_pedit_key *tkey);
57 extern int parse_offset(int *argc_p, char ***argv_p,struct tc_pedit_sel *sel,struct tc_pedit_key *tkey);
58 int parse_pedit(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, struct nlmsghdr *n);
59 extern int print_pedit(struct action_util *au,FILE * f, struct rtattr *arg);
60 extern int pedit_print_xstats(struct action_util *au, FILE *f, struct rtattr *xstats);