renamed capwap directory to cw.

FossilOrigin-Name: 8a43dd9d05a4cb73210243ddd8df2a26f16c7ef2c4d4e36ab446de1f65d88223
This commit is contained in:
7u83@mail.ru
2016-03-03 19:46:20 +00:00
parent 4d242d1b44
commit f4ebe841a5
309 changed files with 116 additions and 116 deletions

View File

@ -0,0 +1,25 @@
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
int sock_set_dontfrag(int sock,int val)
{
#if defined IP_MTU_DISCOVER && defined IP_PMTUDISC_DONT
int mtu_type;
if (val)
mtu_type = IP_PMTUDISC_DO;
else
mtu_type = IP_PMTUDISC_WANT;
return setsockopt(sock, SOL_IP, IP_MTU_DISCOVER, &mtu_type, sizeof (mtu_type));
#elif defined IP_DONTFRAG
const int opt = val;
return setsockopt(sock, IPPROTO_IP, IP_DONTFRAG, &opt, sizeof (opt));
#endif
}