golang.org/x/net@v0.25.1-0.20240516223405-c87a5b62e243/ipv4/defs_linux.go (about) 1 // Copyright 2014 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 // +godefs map struct_in_addr [4]byte /* in_addr */ 8 9 package ipv4 10 11 /* 12 #include <time.h> 13 14 #include <linux/errqueue.h> 15 #include <linux/icmp.h> 16 #include <linux/in.h> 17 #include <linux/filter.h> 18 #include <sys/socket.h> 19 */ 20 import "C" 21 22 const ( 23 sizeofKernelSockaddrStorage = C.sizeof_struct___kernel_sockaddr_storage 24 sizeofSockaddrInet = C.sizeof_struct_sockaddr_in 25 sizeofInetPktinfo = C.sizeof_struct_in_pktinfo 26 sizeofSockExtendedErr = C.sizeof_struct_sock_extended_err 27 28 sizeofIPMreq = C.sizeof_struct_ip_mreq 29 sizeofIPMreqSource = C.sizeof_struct_ip_mreq_source 30 sizeofGroupReq = C.sizeof_struct_group_req 31 sizeofGroupSourceReq = C.sizeof_struct_group_source_req 32 33 sizeofICMPFilter = C.sizeof_struct_icmp_filter 34 ) 35 36 type kernelSockaddrStorage C.struct___kernel_sockaddr_storage 37 38 type sockaddrInet C.struct_sockaddr_in 39 40 type inetPktinfo C.struct_in_pktinfo 41 42 type sockExtendedErr C.struct_sock_extended_err 43 44 type ipMreq C.struct_ip_mreq 45 46 type ipMreqSource C.struct_ip_mreq_source 47 48 type groupReq C.struct_group_req 49 50 type groupSourceReq C.struct_group_source_req 51 52 type icmpFilter C.struct_icmp_filter