lan.c (deb9a4ed5d852c4e01c3811f30a521f52bbb2817) | lan.c (ce02ffaf2ad163b6837395f8379d6adf57a6bc3b) |
---|---|
1/* 2 * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * Redistribution of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING 25 * OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL 26 * SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, 27 * OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR 28 * PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF 29 * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, 30 * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 31 */ | 1/* 2 * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * Redistribution of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING 25 * OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL 26 * SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, 27 * OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR 28 * PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF 29 * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, 30 * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 31 */ |
32#define _POSIX_SOURCE |
|
32 33#include <stdlib.h> 34#include <stdio.h> 35#include <inttypes.h> 36#include <string.h> | 33 34#include <stdlib.h> 35#include <stdio.h> 36#include <inttypes.h> 37#include <string.h> |
38#include <sys/time.h> |
|
37#include <sys/types.h> | 39#include <sys/types.h> |
40#include <sys/select.h> |
|
38#include <sys/socket.h> 39#include <netinet/in.h> 40#include <arpa/inet.h> 41#include <errno.h> 42#include <unistd.h> 43#include <netdb.h> 44#include <fcntl.h> 45 --- 197 unchanged lines hidden (view full) --- 243 244 return send(intf->fd, data, data_len, 0); 245} 246 247static struct ipmi_rs * 248ipmi_lan_recv_packet(struct ipmi_intf * intf) 249{ 250 static struct ipmi_rs rsp; | 41#include <sys/socket.h> 42#include <netinet/in.h> 43#include <arpa/inet.h> 44#include <errno.h> 45#include <unistd.h> 46#include <netdb.h> 47#include <fcntl.h> 48 --- 197 unchanged lines hidden (view full) --- 246 247 return send(intf->fd, data, data_len, 0); 248} 249 250static struct ipmi_rs * 251ipmi_lan_recv_packet(struct ipmi_intf * intf) 252{ 253 static struct ipmi_rs rsp; |
251 fd_set read_set, err_set; | 254 fd_set read_set; 255 fd_set err_set; |
252 struct timeval tmout; 253 int ret; 254 255 FD_ZERO(&read_set); 256 FD_SET(intf->fd, &read_set); 257 258 FD_ZERO(&err_set); 259 FD_SET(intf->fd, &err_set); --- 1848 unchanged lines hidden --- | 256 struct timeval tmout; 257 int ret; 258 259 FD_ZERO(&read_set); 260 FD_SET(intf->fd, &read_set); 261 262 FD_ZERO(&err_set); 263 FD_SET(intf->fd, &err_set); --- 1848 unchanged lines hidden --- |