5 * based on IPv4 Local Link library with GLib integration,
6 * Copyright (C) 2009-2010 Aldebaran Robotics. All rights reserved.
8 * Copyright (C) 2018 Commend International. All rights reserved.
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
26 /* IPv4 Link-Local (RFC 3927), IPv4 Address Conflict Detection (RFC 5227) */
31 #define ANNOUNCE_WAIT 2
32 #define ANNOUNCE_NUM 2
33 #define ANNOUNCE_INTERVAL 2
34 #define MAX_CONFLICTS 10
35 #define RATE_LIMIT_INTERVAL 60
36 #define DEFEND_INTERVAL 10
39 #define LINKLOCAL_ADDR 0xa9fe0000
41 int arp_send_packet(uint8_t* source_eth, uint32_t source_ip,
42 uint32_t target_ip, int ifindex);
43 int arp_socket(int ifindex);
45 uint32_t arp_random_ip(void);