Debian Codegraph @

src/arping.h

raw symbols SCIP
1 /* arping/src/arping.h
2 *
3 * Copyright (C) 2000-2015 Thomas Habets <[email protected]>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #if HAVE_STDINT_H
21 #include <stdint.h>
22 #endif
23
24 #if HAVE_STDDEF_H
25 #include <stddef.h>
26 #endif
27
28 #if HAVE_INTTYPES_H
29 #include <inttypes.h>
30 #endif
31
32 #if defined(HAVE_SECCOMP_H) && defined(HAVE_LIBSECCOMP)
33 #define USE_SECCOMP 1
34 #else
35 #define USE_SECCOMP 0
36 #endif
37
38 /* Forward declarations */
39 struct pcap_pkthdr;
40
41 extern int verbose;
42 extern uint32_t srcip;
43 extern uint32_t dstip;
44 extern unsigned int numrecvd;
45 extern unsigned int numsent;
46
47 void xsnprintf(char *buf, size_t size, const char* fmt, ...) __attribute__ ((format (printf, 3, 4)));
48 void drop_seccomp(int libnet_fd);
49 const char *
50 arping_lookupdev(uint32_t srcip, uint32_t dstip, char *ebuf);
51 void do_signal_init(void);
52 void do_libnet_init(const char *ifname, int recursive);
53 void sigint(int);
54 const char *arping_lookupdev_default(uint32_t srcip, uint32_t dstip,
55 char *ebuf);
56 int arping_main(int argc, char **argv);
57 int is_mac_addr(const char *p);
58 int get_mac_addr(const char *in, uint8_t *out);
59
60
61 void pingip_recv(unsigned char *unused, const struct pcap_pkthdr *h, const unsigned char* const packet);
62 void pingmac_recv(unsigned char *unused, const struct pcap_pkthdr *h, const uint8_t *packet);