File tree 1 file changed +13
-0
lines changed
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -474,6 +474,13 @@ if sys.version_info >= (3, 12):
474
474
ETHERTYPE_VLAN as ETHERTYPE_VLAN ,
475
475
)
476
476
477
+ if sys .platform == "linux" :
478
+ from _socket import ETH_P_ALL as ETH_P_ALL
479
+
480
+ if sys .platform != "linux" and sys .platform != "win32" and sys .platform != "darwin" :
481
+ # FreeBSD >= 14.0
482
+ from _socket import PF_DIVERT as PF_DIVERT
483
+
477
484
# Re-exported from errno
478
485
EBADF : int
479
486
EAGAIN : int
@@ -525,6 +532,9 @@ class AddressFamily(IntEnum):
525
532
AF_BLUETOOTH = 32
526
533
if sys .platform == "win32" and sys .version_info >= (3 , 12 ):
527
534
AF_HYPERV = 34
535
+ if sys .platform != "linux" and sys .platform != "win32" and sys .platform != "darwin" and sys .version_info >= (3 , 12 ):
536
+ # FreeBSD >= 14.0
537
+ AF_DIVERT = 44
528
538
529
539
AF_INET = AddressFamily .AF_INET
530
540
AF_INET6 = AddressFamily .AF_INET6
@@ -577,6 +587,9 @@ if sys.platform != "win32" or sys.version_info >= (3, 9):
577
587
578
588
if sys .platform == "win32" and sys .version_info >= (3 , 12 ):
579
589
AF_HYPERV = AddressFamily .AF_HYPERV
590
+ if sys .platform != "linux" and sys .platform != "win32" and sys .platform != "darwin" and sys .version_info >= (3 , 12 ):
591
+ # FreeBSD >= 14.0
592
+ AF_DIVERT = AddressFamily .AF_DIVERT
580
593
581
594
class SocketKind (IntEnum ):
582
595
SOCK_STREAM = 1
You can’t perform that action at this time.
0 commit comments