blob: 5d046d36d504e379d3fccf83de42cc4448c80604 [file] [log] [blame]
Paul Jakma457eb9a2006-07-27 19:59:58 +00001#include <zebra.h>
2
3#include "zebra/rib.h"
4#include "zebra/rt.h"
5#include "zebra/ioctl.h"
6
7void ifreq_set_name (struct ifreq *a, struct interface *b) { return; }
8
Paul Jakmad9d00a62007-04-10 19:28:04 +00009int if_set_prefix (struct interface *a, struct connected *b)
10{
11 kernel_address_add_ipv4 (a, b);
12 return 0;
13}
14
15int if_unset_prefix (struct interface *a, struct connected *b)
16{
17 kernel_address_delete_ipv4 (a, b);
18 return 0;
19}
20
21int if_prefix_add_ipv6 (struct interface *a, struct connected *b) { return 0; }
Doug VanLeuven327c4cd2012-12-14 14:58:30 +020022#ifdef HAVE_SYS_WEAK_ALIAS_PRAGMA
Paul Jakmad9d00a62007-04-10 19:28:04 +000023#pragma weak if_prefix_delete_ipv6 = if_prefix_add_ipv6
Doug VanLeuven327c4cd2012-12-14 14:58:30 +020024#else
25int if_prefix_delete_ipv6 (struct interface *a, struct connected *b) { return 0; }
26#endif
Paul Jakma457eb9a2006-07-27 19:59:58 +000027
28int if_ioctl (u_long a, caddr_t b) { return 0; }
29
30int if_set_flags (struct interface *a, uint64_t b) { return 0; }
Doug VanLeuven327c4cd2012-12-14 14:58:30 +020031#ifdef HAVE_SYS_WEAK_ALIAS_PRAGMA
Paul Jakma457eb9a2006-07-27 19:59:58 +000032#pragma weak if_unset_flags = if_set_flags
Doug VanLeuven327c4cd2012-12-14 14:58:30 +020033#else
34int if_unset_flags (struct interface *a, uint64_t b) { return 0; }
35#endif
Paul Jakma457eb9a2006-07-27 19:59:58 +000036
37void if_get_flags (struct interface *a) { return; }
Doug VanLeuven327c4cd2012-12-14 14:58:30 +020038#ifdef HAVE_SYS_WEAK_ALIAS_PRAGMA
Paul Jakma457eb9a2006-07-27 19:59:58 +000039#pragma weak if_get_metric = if_get_flags
40#pragma weak if_get_mtu = if_get_flags
Doug VanLeuven327c4cd2012-12-14 14:58:30 +020041#else
42/* void if_get_metric (struct interface *a) { return; } */
43/* void if_get_mtu (struct interface *a) { return; } */
44#endif
Paul Jakma457eb9a2006-07-27 19:59:58 +000045
46#ifdef SOLARIS_IPV6
47#pragma weak if_ioctl_ipv6 = if_ioctl
48struct connected *if_lookup_linklocal(struct interface *a) { return 0; }
49
50#define AF_IOCTL(af, request, buffer) \
51 ((af) == AF_INET? if_ioctl(request, buffer) : \
52 if_ioctl_ipv6(request, buffer))
53#else /* SOLARIS_IPV6 */
54
55#define AF_IOCTL(af, request, buffer) if_ioctl(request, buffer)
56
57#endif /* SOLARIS_IPV6 */