ia64/xen-unstable

view tools/vnet/libxutil/socket_stream.h @ 19848:5839491bbf20

[IA64] replace MAX_VCPUS with d->max_vcpus where necessary.

don't use MAX_VCPUS, and use vcpu::max_vcpus.
The changeset of 2f9e1348aa98 introduced max_vcpus to allow more vcpus
per guest. This patch is ia64 counter part.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Jun 29 11:26:05 2009 +0900 (2009-06-29)
parents 9f22db685802
children
line source
1 /*
2 * Copyright (C) 2004 Mike Wray <mike.wray@hp.com>
3 *
4 * This library is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
19 #ifndef _XEN_LIB_SOCKET_STREAM_H_
20 #define _XEN_LIB_SOCKET_STREAM_H_
22 #ifndef __KERNEL__
23 #include "iostream.h"
24 #include <stdio.h>
26 #include <sys/socket.h>
27 #include <netinet/in.h>
28 #include <arpa/inet.h>
30 /** Data associated with a socket stream. */
31 typedef struct SocketData {
32 /** The socket file descriptor. */
33 int fd;
34 /** Source address from last read (recvfrom). */
35 struct sockaddr_in saddr;
36 /** Destination address for writes (sendto). */
37 struct sockaddr_in daddr;
38 /** Write flags (sendto). */
39 int flags;
40 /** Buffer size. */
41 int buf_n;
42 /** Buffer for formatted printing. */
43 char buf[1024];
44 } SocketData;
46 extern IOStream *socket_stream_new(int fd);
47 extern int socket_stream_data(IOStream *io, SocketData **data);
48 extern int socket_stream_check(IOStream *io);
49 extern int socket_stream_set_addr(IOStream *io, struct sockaddr_in *addr);
50 extern int socket_stream_set_flags(IOStream *io, int flags);
52 #endif
53 #endif /* !_XEN_LIB_SOCKET_STREAM_H_ */