diff options
author | Gary Houston <ghouston@arglist.com> | 1996-12-21 04:13:54 +0000 |
---|---|---|
committer | Gary Houston <ghouston@arglist.com> | 1996-12-21 04:13:54 +0000 |
commit | 370312ae6e74756a825f3eeed0e227c568142f16 (patch) | |
tree | ddb2b3a1ebc2890aa25237d7b52b7517508e4f0c /libguile/net_db.h | |
parent | 80df313695809d4a8fcd96ad6b2e2269b016db26 (diff) | |
download | guile-370312ae6e74756a825f3eeed0e227c568142f16.tar.gz |
* filesys.c (scm_input_waiting_p): use select in preference to
FIONREAD, since the latter doesn't detect EOF.
Throw error if neither select nor FIONREAD available.
* socket.c (scm_connect): take a port, not a fd object.
(scm_fill_sockaddr): throw an error if fam is not recognised.
(scm_bind): use scm_fill_sockaddr.
(scm_listen): take a port, not a fd object.
(scm_accept): take and return a port. return CDR in the car if
address can't be got
(scm_sock_fd_to_port): new procedure.
(scm_socket): use scm_sock_fd_to_port.
(scm_addr_vector): throw error if unrecognised address type.
take an extra argument with the calling procedure name.
(scm_getsockname): take a port. return #f if address can't be got.
(scm_getpeername): take a port. return #f if address can't be got.
(scm_recvfrom): take a port. return #f for address component if can't
be got.
(scm_sendto, scm_socketpair, scm_getsockopt scm_shutdown,
scm_setsockopt, scm_recv, scm_send): take a port not a fd object.
* socket.h (SCM_P): update bind prototype.
* socket.c (scm_init_socket): intern PF_UNSPEC, PF_UNIX, PF_INET.
include "feature.h".
(scm_socket): return a port, not a file descriptor object.
include "fports.h" and <unistd.h>
(scm_bind): take a port, not a file descriptor object.
take an extra argument for address args.
* net_db.c (scm_init_net_db): intern INADDR_ANY, INADDR_BROADCAST,
INADDR_NONE, INADDR_LOOPBACK.
* init.c: include net_db.h and not fdsocket.h.
(scm_boot_guile_1): call scm_init_net_db and not scm_init_fdsocket.
* Makefile.am: corresponding changes.
* socket.h: renamed from fdsocket.h, fix names.
* net_db.h: renamed from socket.h, fix names.
* socket.c: renamed from fdsocket.c.
remove _sys from procedure names.
(scm_init_socket): rename from scm_init_fdsocket. include socket.x.
add "socket" to features list.
* net_db.c: renamed from socket.c.
remove _sys from procedure names.
(scm_init_net_db): rename from scm_init_socket. include net_db.x.
add "net-db" to features list.
include "net_db.h". don't include <sys/socket.h> or
<sys/un.h>.
Diffstat (limited to 'libguile/net_db.h')
-rw-r--r-- | libguile/net_db.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/libguile/net_db.h b/libguile/net_db.h new file mode 100644 index 000000000..cbef2a711 --- /dev/null +++ b/libguile/net_db.h @@ -0,0 +1,69 @@ +/* classes: h_files */ + +#ifndef NETDBH +#define NETDBH +/* Copyright (C) 1995 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * + * As a special exception, the Free Software Foundation gives permission + * for additional uses of the text contained in its release of GUILE. + * + * The exception is that, if you link the GUILE library with other files + * to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the GUILE library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the + * Free Software Foundation under the name GUILE. If you copy + * code from other Free Software Foundation releases into a copy of + * GUILE, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for GUILE, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + */ + + +#include "libguile/__scm.h" + + + + + + +extern SCM scm_gethost SCM_P ((SCM name)); +extern SCM scm_inet_aton SCM_P ((SCM address)); +extern SCM scm_inet_ntoa SCM_P ((SCM inetid)); +extern SCM scm_inet_netof SCM_P ((SCM address)); +extern SCM scm_lnaof SCM_P ((SCM address)); +extern SCM scm_inet_makeaddr SCM_P ((SCM net, SCM lna)); +extern SCM scm_getnet SCM_P ((SCM name)); +extern SCM scm_getproto SCM_P ((SCM name)); +extern SCM scm_getserv SCM_P ((SCM name, SCM proto)); +extern SCM scm_sethost SCM_P ((SCM arg)); +extern SCM scm_setnet SCM_P ((SCM arg)); +extern SCM scm_setproto SCM_P ((SCM arg)); +extern SCM scm_setserv SCM_P ((SCM arg)); +extern void scm_init_netdb SCM_P ((void)); + +#endif /* NETDBH */ |