ioctl_null.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #include <zebra.h>
  2. #include "zebra/rib.h"
  3. #include "zebra/rt.h"
  4. #include "zebra/ioctl.h"
  5. void ifreq_set_name (struct ifreq *a, struct interface *b) { return; }
  6. int if_set_prefix (struct interface *a, struct connected *b)
  7. {
  8. kernel_address_add_ipv4 (a, b);
  9. return 0;
  10. }
  11. int if_unset_prefix (struct interface *a, struct connected *b)
  12. {
  13. kernel_address_delete_ipv4 (a, b);
  14. return 0;
  15. }
  16. int if_prefix_add_ipv6 (struct interface *a, struct connected *b) { return 0; }
  17. #ifdef HAVE_SYS_WEAK_ALIAS_PRAGMA
  18. #pragma weak if_prefix_delete_ipv6 = if_prefix_add_ipv6
  19. #else
  20. int if_prefix_delete_ipv6 (struct interface *a, struct connected *b) { return 0; }
  21. #endif
  22. int if_ioctl (u_long a, caddr_t b) { return 0; }
  23. int if_set_flags (struct interface *a, uint64_t b) { return 0; }
  24. #ifdef HAVE_SYS_WEAK_ALIAS_PRAGMA
  25. #pragma weak if_unset_flags = if_set_flags
  26. #else
  27. int if_unset_flags (struct interface *a, uint64_t b) { return 0; }
  28. #endif
  29. void if_get_flags (struct interface *a) { return; }
  30. #ifdef HAVE_SYS_WEAK_ALIAS_PRAGMA
  31. #pragma weak if_get_metric = if_get_flags
  32. #pragma weak if_get_mtu = if_get_flags
  33. #else
  34. /* void if_get_metric (struct interface *a) { return; } */
  35. /* void if_get_mtu (struct interface *a) { return; } */
  36. #endif
  37. #ifdef SOLARIS_IPV6
  38. #pragma weak if_ioctl_ipv6 = if_ioctl
  39. struct connected *if_lookup_linklocal(struct interface *a) { return 0; }
  40. #define AF_IOCTL(af, request, buffer) \
  41. ((af) == AF_INET? if_ioctl(request, buffer) : \
  42. if_ioctl_ipv6(request, buffer))
  43. #else /* SOLARIS_IPV6 */
  44. #define AF_IOCTL(af, request, buffer) if_ioctl(request, buffer)
  45. #endif /* SOLARIS_IPV6 */