usbmodeswitch: Updated to v.1.2.6 from shibby's branch.
[tomato.git] / release / src / router / iproute2 / tc / p_icmp.c
blobf9ddbe337aeaac5be4a140b84408fdf415447cd1
1 /*
2 * m_pedit_icmp.c packet editor: ICMP header
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)
13 #include <stdio.h>
14 #include <stdlib.h>
15 #include <unistd.h>
16 #include <syslog.h>
17 #include <fcntl.h>
18 #include <sys/socket.h>
19 #include <netinet/in.h>
20 #include <arpa/inet.h>
21 #include <string.h>
22 #include "utils.h"
23 #include "tc_util.h"
24 #include "m_pedit.h"
27 static int
28 parse_icmp(int *argc_p, char ***argv_p,struct tc_pedit_sel *sel,struct tc_pedit_key *tkey)
30 int res = -1;
31 #if 0
32 int argc = *argc_p;
33 char **argv = *argv_p;
35 if (argc < 2)
36 return -1;
38 if (strcmp(*argv, "type") == 0) {
39 NEXT_ARG();
40 res = parse_u8(&argc, &argv, 0);
41 goto done;
43 if (strcmp(*argv, "code") == 0) {
44 NEXT_ARG();
45 res = parse_u8(&argc, &argv, 1);
46 goto done;
48 return -1;
50 done:
51 *argc_p = argc;
52 *argv_p = argv;
53 #endif
54 return res;
57 struct m_pedit_util p_pedit_icmp = {
58 NULL,
59 "icmp",
60 parse_icmp,