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