aboutsummaryrefslogtreecommitdiff
path: root/src/inet.h
blob: 60be9e46746687a0fcb885c609c34b0d0477b950 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*=========================================================================*\
* Internet domain functions
*
* RCS ID: $Id$
\*=========================================================================*/
#ifndef INET_H
#define INET_H 

#include <lua.h>
#include "socket.h"

/*-------------------------------------------------------------------------*\
* Exported functions
\*-------------------------------------------------------------------------*/
void inet_open(lua_State *L);

const char *inet_tryconnect(p_sock ps, const char *address, 
        unsigned short port);
const char *inet_trybind(p_sock ps, const char *address, 
        unsigned short port, int backlog);
const char *inet_trycreate(p_sock ps, int type);

int inet_meth_getpeername(lua_State *L, p_sock ps);
int inet_meth_getsockname(lua_State *L, p_sock ps);

#ifdef INET_ATON
int inet_aton(const char *cp, struct in_addr *inp);
#endif

#endif /* INET_H_ */