?? mcast_set_ttl.c
字號(hào):
#include "unp.h"intmcast_set_ttl(int sockfd, int val){ switch (sockfd_to_family(sockfd)) { case AF_INET: { u_char ttl; ttl = val; return(setsockopt(sockfd, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl))); }#ifdef IPV6 case AF_INET6: { int hop; hop = val; return(setsockopt(sockfd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &hop, sizeof(hop))); }#endif default: errno = EPROTONOSUPPORT; return(-1); }}voidMcast_set_ttl(int sockfd, int val){ if (mcast_set_ttl(sockfd, val) < 0) err_sys("mcast_set_ttl error");}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -