golang.org/x/net@v0.25.1-0.20240516223405-c87a5b62e243/route/defs_dragonfly.go (about) 1 // Copyright 2016 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 //go:build ignore 6 7 package route 8 9 /* 10 #include <sys/socket.h> 11 #include <sys/sysctl.h> 12 13 #include <net/if.h> 14 #include <net/if_dl.h> 15 #include <net/route.h> 16 17 #include <netinet/in.h> 18 19 struct ifa_msghdr_dfly4 { 20 u_short ifam_msglen; 21 u_char ifam_version; 22 u_char ifam_type; 23 int ifam_addrs; 24 int ifam_flags; 25 u_short ifam_index; 26 int ifam_metric; 27 }; 28 29 struct ifa_msghdr_dfly58 { 30 u_short ifam_msglen; 31 u_char ifam_version; 32 u_char ifam_type; 33 u_short ifam_index; 34 int ifam_flags; 35 int ifam_addrs; 36 int ifam_addrflags; 37 int ifam_metric; 38 }; 39 */ 40 import "C" 41 42 const ( 43 sizeofIfMsghdrDragonFlyBSD4 = C.sizeof_struct_if_msghdr 44 sizeofIfaMsghdrDragonFlyBSD4 = C.sizeof_struct_ifa_msghdr_dfly4 45 sizeofIfmaMsghdrDragonFlyBSD4 = C.sizeof_struct_ifma_msghdr 46 sizeofIfAnnouncemsghdrDragonFlyBSD4 = C.sizeof_struct_if_announcemsghdr 47 48 sizeofIfaMsghdrDragonFlyBSD58 = C.sizeof_struct_ifa_msghdr_dfly58 49 50 sizeofRtMsghdrDragonFlyBSD4 = C.sizeof_struct_rt_msghdr 51 sizeofRtMetricsDragonFlyBSD4 = C.sizeof_struct_rt_metrics 52 53 sizeofSockaddrStorage = C.sizeof_struct_sockaddr_storage 54 sizeofSockaddrInet = C.sizeof_struct_sockaddr_in 55 sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 56 )