#define PF_DECnet AF_DECnet #define PF_NETBEUI AF_NETBEUI #define PF_SECURITY AF_SECURITY #define PF_KEY AF_KEY #define PF_NETLINK AF_NETLINK #define PF_ROUTE AF_ROUTE #define PF_PACKET AF_PACKET #define PF_ASH AF_ASH #define PF_ECONET AF_ECONET #define PF_ATMSVC AF_ATMSVC #def...
sockfd = socket(int socket_family, int socket_type, int protocol); // fd: file descriptor socket_family可以是AF_INET, AF_UNIX, AF_IPX, and AF_PACKET等。打个不太恰当的比方:同一个地址192.168.0.100上可以有HTTP和FTP等多个协议。 https://www.ibm.com/docs/en/ztpf/1.1.0.15?topic=considerat...
This patch set switches the "networking" functionality of Ski from usingPF_INETto usingAF_PACKETinstead. Running a Ski instance with this patch set applied will no longer cause the host kernel to printbski uses obsolete (PF_INET,SOCK_PACKET)to the system console. The change also solves the ...
http://blog.csdn.net/xiongmaojiayou/article/details/7584211 在写网络程序的时候,建立TCP socket: sock = socket(PF_INET, SOCK_STREAM, 0);然后在绑定本地地址或连接远程地址时需要初始化sockaddr_in结构,其中指定address fami PF_INET AF_INET linu ...
问AF_INET和PF_INET常量之间有什么区别?EN随着时间的推移,云计算技术对于组织来说变得越来越重要。在...
It also happens with: xdp_prog_kern_03.c:215:9: error: 'AF_INET6' macro redefined [-Werror,-Wmacro-redefined] #define AF_INET6 10 ^ /usr/include/bits/socket.h:104:9: note: previous definition is here #define AF_INET6 PF_INET6 ...
prot = &packet_prot; sk->reuse = 1; sk->no_check = 0; /* Doesn't matter no checksum is * performed anyway. */ sk->num = protocol; break; default://不符合以上任何类型,则返回 kfree_s((void *)sk, sizeof(*sk)); return(-ESOCKTNOSUPPORT); ...
PF_INET, protocol); goto lookup_protocol; } else goto out_rcu_unlock; } err = -EPERM; if (sock->type == SOCK_RAW && !kern && !ns_capable(net->user_ns, CAP_NET_RAW)) goto out_rcu_unlock; sock->ops = answer->ops; answer_prot = answer->prot; ...
request_module("net-pf-%d-proto-%d", PF_INET6, protocol); goto lookup_protocol; } else goto out_rcu_unlock; } err = -EPERM; if (sock->type == SOCK_RAW && !kern && !ns_capable(net->user_ns, CAP_NET_RAW)) goto out_rcu_unlock; sock->ops = answer->ops; an...
family = PF_INET, .create = inet_create, .owner = THIS_MODULE, }; /* Upon startup we insert all the elements in inetsw_array[] into * the linked list inetsw. */ static struct inet_protosw inetsw_array[] = { { .type = SOCK_STREAM, .protocol = IPPROTO_TCP, .prot = &tcp_...