Paul Jakma | 457eb9a | 2006-07-27 19:59:58 +0000 | [diff] [blame] | 1 | #include <zebra.h> |
| 2 | |
| 3 | #include "zebra/rib.h" |
| 4 | #include "zebra/rt.h" |
| 5 | #include "zebra/ioctl.h" |
| 6 | |
| 7 | void ifreq_set_name (struct ifreq *a, struct interface *b) { return; } |
| 8 | |
Paul Jakma | d9d00a6 | 2007-04-10 19:28:04 +0000 | [diff] [blame] | 9 | int if_set_prefix (struct interface *a, struct connected *b) |
| 10 | { |
| 11 | kernel_address_add_ipv4 (a, b); |
| 12 | return 0; |
| 13 | } |
| 14 | |
| 15 | int if_unset_prefix (struct interface *a, struct connected *b) |
| 16 | { |
| 17 | kernel_address_delete_ipv4 (a, b); |
| 18 | return 0; |
| 19 | } |
| 20 | |
| 21 | int if_prefix_add_ipv6 (struct interface *a, struct connected *b) { return 0; } |
Doug VanLeuven | 327c4cd | 2012-12-14 14:58:30 +0200 | [diff] [blame] | 22 | #ifdef HAVE_SYS_WEAK_ALIAS_PRAGMA |
Paul Jakma | d9d00a6 | 2007-04-10 19:28:04 +0000 | [diff] [blame] | 23 | #pragma weak if_prefix_delete_ipv6 = if_prefix_add_ipv6 |
Doug VanLeuven | 327c4cd | 2012-12-14 14:58:30 +0200 | [diff] [blame] | 24 | #else |
| 25 | int if_prefix_delete_ipv6 (struct interface *a, struct connected *b) { return 0; } |
| 26 | #endif |
Paul Jakma | 457eb9a | 2006-07-27 19:59:58 +0000 | [diff] [blame] | 27 | |
| 28 | int if_ioctl (u_long a, caddr_t b) { return 0; } |
| 29 | |
| 30 | int if_set_flags (struct interface *a, uint64_t b) { return 0; } |
Doug VanLeuven | 327c4cd | 2012-12-14 14:58:30 +0200 | [diff] [blame] | 31 | #ifdef HAVE_SYS_WEAK_ALIAS_PRAGMA |
Paul Jakma | 457eb9a | 2006-07-27 19:59:58 +0000 | [diff] [blame] | 32 | #pragma weak if_unset_flags = if_set_flags |
Doug VanLeuven | 327c4cd | 2012-12-14 14:58:30 +0200 | [diff] [blame] | 33 | #else |
| 34 | int if_unset_flags (struct interface *a, uint64_t b) { return 0; } |
| 35 | #endif |
Paul Jakma | 457eb9a | 2006-07-27 19:59:58 +0000 | [diff] [blame] | 36 | |
| 37 | void if_get_flags (struct interface *a) { return; } |
Doug VanLeuven | 327c4cd | 2012-12-14 14:58:30 +0200 | [diff] [blame] | 38 | #ifdef HAVE_SYS_WEAK_ALIAS_PRAGMA |
Paul Jakma | 457eb9a | 2006-07-27 19:59:58 +0000 | [diff] [blame] | 39 | #pragma weak if_get_metric = if_get_flags |
| 40 | #pragma weak if_get_mtu = if_get_flags |
Doug VanLeuven | 327c4cd | 2012-12-14 14:58:30 +0200 | [diff] [blame] | 41 | #else |
| 42 | /* void if_get_metric (struct interface *a) { return; } */ |
| 43 | /* void if_get_mtu (struct interface *a) { return; } */ |
| 44 | #endif |
Paul Jakma | 457eb9a | 2006-07-27 19:59:58 +0000 | [diff] [blame] | 45 | |
| 46 | #ifdef SOLARIS_IPV6 |
| 47 | #pragma weak if_ioctl_ipv6 = if_ioctl |
| 48 | struct 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 */ |