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)
17 #include <sys/socket.h>
18 #include <netinet/in.h>
19 #include <arpa/inet.h>
27 parse_icmp(int *argc_p, char ***argv_p,
28 struct m_pedit_sel *sel, struct m_pedit_key *tkey)
33 char **argv = *argv_p;
38 if (strcmp(*argv, "type") == 0) {
40 res = parse_u8(&argc, &argv, 0);
43 if (strcmp(*argv, "code") == 0) {
45 res = parse_u8(&argc, &argv, 1);
57 struct m_pedit_util p_pedit_icmp = {
59 .parse_peopt = parse_icmp,