1 /* $Id$ */ 2 3 /* 4 * Copyright (c) 2001-2010 Aaron Turner <aturner at synfin dot net> 5 * Copyright (c) 2013-2018 Fred Klassen <tcpreplay at appneta dot com> - AppNeta 6 * 7 * The Tcpreplay Suite of tools is free software: you can redistribute it 8 * and/or modify it under the terms of the GNU General Public License as 9 * published by the Free Software Foundation, either version 3 of the 10 * License, or with the authors permission any later version. 11 * 12 * The Tcpreplay Suite is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with the Tcpreplay Suite. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 21 #ifndef __xX_H__ 22 #define __xX_H__ 23 24 /* 25 * Functions for processing args/data generated by -x and -X 26 */ 27 28 int parse_xX_str(tcpr_xX_t *xX, char *str, tcpr_bpf_t *bpf); 29 int process_xX_by_cidr_ipv4(int, tcpr_cidr_t *, ipv4_hdr_t *); 30 int process_xX_by_cidr_ipv6(int, tcpr_cidr_t *, ipv6_hdr_t *); 31 32 /* 33 * Include/Exclude (xXmode) values 34 */ 35 #define xXError 0 36 #define xXSource 1 37 #define xXDest 2 38 #define xXBoth 4 39 #define xXEither 8 40 #define xXPacket 16 41 #define xXBPF 32 42 #define xXExclude 128 /* if exclude mode, add 128 to above value */ 43 44 45 #endif 46