Subversion Repositories SvarDOS

Rev

Rev 616 | Rev 1133 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 616 Rev 885
Line 7... Line 7...
7
#ifndef libtcp_hdr
7
#ifndef libtcp_hdr
8
#define libtcp_hdr
8
#define libtcp_hdr
9
 
9
 
10
struct net_tcpsocket; /* opaque struct, exact implementation in net.c */
10
struct net_tcpsocket; /* opaque struct, exact implementation in net.c */
11
 
11
 
12
/* resolves name and fills resovled addr into ip. returns 0 on success. */
12
/* resolves name and fills resovled addr into ip. on failure it retries r times
-
 
13
 * (r=0 means "try only once"). returns 0 on success. */
13
int net_dnsresolve(char *ip, const char *name);
14
int net_dnsresolve(char *ip, const char *name, int r);
14
 
15
 
15
/* must be called before using libtcp. returns 0 on success, or non-zero if network subsystem is not available. */
16
/* must be called before using libtcp. returns 0 on success, or non-zero if network subsystem is not available. */
16
int net_init(void);
17
int net_init(void);
17
 
18
 
18
/* initiates a connection to an IP host and returns a socket pointer (or NULL
19
/* initiates a connection to an IP host and returns a socket pointer (or NULL