if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { fprintf(stderr, "error opening socket\n");
if((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) { msg(MSG_FATAL, "IPFIX: error opening socket, %s", strerror(errno));
static int init_send_udp_socket(char *serv_ip4_addr, int serv_port){	int s;	struct sockaddr_in serv_addr;	memset(&serv_addr, 0, sizeof(serv_addr));	serv_addr.sin_family = AF_INET;	serv_addr.sin_port = htons (serv_port);	serv_addr.sin_addr.s_addr = inet_addr(serv_ip4_addr);	// create socket	if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) {		fprintf(stderr, "error opening socket\n");		return -1;	}	// connect to server	if(connect(s, (struct sockaddr*)&serv_addr, sizeof(serv_addr) ) < 0) {		perror ("connect failed");		return -1;	}	return s;}