mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-06 06:30:19 +00:00
55e2264671
The ANet library was created on Linux and the unfortunate result is that it is highly Linux-specific. Luckily it has an implementation testsuite, so patches to make it work on BSD can be reasonably tested. The current status is annoted in pkg-message: ========================================================================= Beware of the IPv6 multicast functions. Sending does work, but the default interface effectively is invalid on *BSD. A specific interface needs to be provided rather than leaving interface blank (zero). Multicast receiving may not currently work. The test for IPv6 multicast fails. The test chunk is sent (verified with separate monitoring tool) but never detected. Hopefully the cause will be understood and fixed soon. AF_NETLINK and AF_PACKET protocols are not supported by *BSD, so the associated tests have been removed. Every test other than IPv6 Multicast passes. You may want to replace "em0" with this system's interface in the test suite is to be run (see files/patch-tests_socket__tests.adb).
29 lines
1.4 KiB
Ada
29 lines
1.4 KiB
Ada
--- src/anet-constants.ads.orig 2013-12-04 09:55:07.000000000 +0000
|
|
+++ src/anet-constants.ads
|
|
@@ -70,17 +70,19 @@ package Anet.Constants is
|
|
|
|
SO_BINDTODEVICE : constant := 25; -- Bind to interface device
|
|
SO_ATTACH_FILTER : constant := 26; -- Socket filtering
|
|
- IPV6_ADD_MEMBERSHIP : constant := 20; -- Join multicast group (IPv6)
|
|
+ IPV6_ADD_MEMBERSHIP : constant := 12; -- Join multicast group (IPv6)
|
|
+ IPV6_MULTICAST_IF : constant := 9; -- Multicast sending (IPv6)
|
|
+ IP_MULTICAST_IF : constant := 9; -- Multicast sending on IF
|
|
|
|
-----------------------------------
|
|
-- Socket configuration controls --
|
|
-----------------------------------
|
|
|
|
- SIOCGIFADDR : constant := 16#8915#; -- Get address
|
|
- SIOCGIFFLAGS : constant := 16#8913#; -- Get flags
|
|
- SIOCSIFFLAGS : constant := 16#8914#; -- Set flags
|
|
- SIOCGIFHWADDR : constant := 16#8927#; -- Get hardware address
|
|
- SIOCGIFINDEX : constant := 16#8933#; -- Name -> if_index mapping
|
|
+ SIOCGIFADDR : constant := 16#C0206921#; -- Get address
|
|
+ SIOCGIFFLAGS : constant := 16#C0206911#; -- Get flags
|
|
+ SIOCSIFFLAGS : constant := 16#80206910#; -- Set flags
|
|
+ SIOCGIFHWADDR : constant := 16#FFFFFFFF#; -- Get hardware address
|
|
+ SIOCGIFINDEX : constant := 16#C0206920#; -- Name -> if_index mapping
|
|
|
|
---------------------
|
|
-- Interface flags --
|