source: roaraudio/include/libroar/socket.h @ 528:d42830e32ea1

Last change on this file since 528:d42830e32ea1 was 528:d42830e32ea1, checked in by phi, 16 years ago

adding dummy IPX implementation: are there no docs? Can't even find correct socket() values!

File size: 1.9 KB
Line 
1//libroar.h:
2
3#ifndef _LIBROARSOCKET_H_
4#define _LIBROARSOCKET_H_
5
6#include "libroar.h"
7
8#define ROAR_SOCKET_MODE_LISTEN  1
9#define ROAR_SOCKET_MODE_CONNECT 2
10
11#define ROAR_SOCKET_TYPE_NONE    0
12#define ROAR_SOCKET_TYPE_UNKNOWN ROAR_SOCKET_TYPE_NONE
13#define ROAR_SOCKET_TYPE_INET    1
14#define ROAR_SOCKET_TYPE_TCP     ROAR_SOCKET_TYPE_INET
15#define ROAR_SOCKET_TYPE_UNIX    2
16#define ROAR_SOCKET_TYPE_FORK    3
17#define ROAR_SOCKET_TYPE_PIPE    ROAR_SOCKET_TYPE_FORK
18#define ROAR_SOCKET_TYPE_FILE    4
19#define ROAR_SOCKET_TYPE_UDP     5
20#define ROAR_SOCKET_TYPE_GENSTR  6 /* generic stream: TCP or UNIX */
21#define ROAR_SOCKET_TYPE_DECNET  7 /* DECnet */
22#define ROAR_SOCKET_TYPE_TCP6    8
23#define ROAR_SOCKET_TYPE_UDP6    9
24#define ROAR_SOCKET_TYPE_INET6   ROAR_SOCKET_TYPE_TCP6
25#define ROAR_SOCKET_TYPE_IPXSPX  10
26
27#define ROAR_SOCKET_TYPE_MAX  10
28
29#define ROAR_SOCKET_QUEUE_LEN 8
30
31#define ROAR_SOCKET_BLOCK     1
32#define ROAR_SOCKET_NONBLOCK  2
33
34#define ROAR_SOCKET_MAX_HOSTNAMELEN 64
35
36int roar_socket_listen  (int type, char * host, int port);
37int roar_socket_connect (char * host, int port);
38
39int roar_socket_new_tcp    (void);
40int roar_socket_new_udp    (void);
41int roar_socket_new_tcp6   (void);
42int roar_socket_new_udp6   (void);
43int roar_socket_new_unix   (void);
44int roar_socket_new_decnet_seqpacket (void);
45int roar_socket_new_decnet_stream (void);
46int roar_socket_new_ipxspx (void);
47
48int roar_socket_open       (int mode, int type, char * host, int port);
49int roar_socket_open_fork  (int mode, char * host, int port);
50int roar_socket_open_file  (int mode, char * host, int port);
51int roar_socket_open_proxy (int mode, int type, char * host, int port, char * proxy_type);
52
53int roar_socket_listen_decnet (char * object, int num);
54
55char * roar_socket_get_local_nodename(void);
56
57int roar_socket_nonblock(int fh, int state);
58
59int roar_socket_dup_udp_local_end (int fh);
60
61int roar_socket_open_socks4a(int mode, int fh, char * host, int port);
62
63#endif
64
65//ll
Note: See TracBrowser for help on using the repository browser.