actube/src/cw/sock_addrinit.c
7u83@mail.ru f4ebe841a5 renamed capwap directory to cw.
FossilOrigin-Name: 8a43dd9d05a4cb73210243ddd8df2a26f16c7ef2c4d4e36ab446de1f65d88223
2016-03-03 19:46:20 +00:00

23 lines
362 B
C

#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
void sock_addrinit(struct sockaddr *addr,int type)
{
switch (type){
case AF_INET:
memset(addr,0,sizeof(struct sockaddr_in));
addr->sa_family=type;
#ifdef HAVE_SIN_LEN
addr_sa_len=sizeof(struct sockaddr_in);
#endif
return;
}
}