/* * The file `socket.h' is made automatically, do not modify it. * * Copyright (c) 1995, 1996 Gunther Schadow. All rights reserved. * * 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 of the License, 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 program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef SOCKET_H #define SOCKET_H #include "pg_config.h" #include #include #include #ifndef AF_PIPE # define AF_PIPE -1 #endif #ifndef AF_FILE # define AF_FILE -2 #endif #ifndef AF_PTY # define AF_PTY -3 #endif #ifndef AF_TTY # define AF_TTY -4 #endif #define PEERNAME_SIZE 128 typedef char peername_t[PEERNAME_SIZE]; /* This is the errno that is set when a pty master is opened twice. It * is configured automatically for each platform with a test program * that is being run during remake. */ #define EPTYREOPEN #EPTYREOPEN# __BEGIN_DECLS int connect_file(const char *address); int connect_inet(const char *address); int connect_pipe(const char *address); int connect_tty(const char *address); int connect_unix(const char *address); int bind_inet(const char *address); int bind_pty(const char *address); int bind_tty(const char *address); int bind_unix(const char *address); int accept_inet(int sock); int accept_pty(int sock); int accept_tty(int sock); int accept_unix(int sock); result peername_inet(int sock, peername_t peer); result peername_pty(int sock, peername_t peer); result peername_tty(int sock, peername_t peer); result peername_unix(int sock, peername_t peer); result shutdown_file(int fd); result shutdown_inet(int fd); result shutdown_pipe(int fd); result shutdown_pty(int fd); result shutdown_tty(int fd); result shutdown_unix(int fd); int reset_pty(int fd); int reset_tty(int fd); #ifdef NOT_YET int bind_file(const char *address); int bind_pipe(const char *address); int accept_file(int fd); int accept_pipe(int pd); int connect_pty(const char *address); #endif void logioctl(int pri, const char *msg, u_long cmd); bool istermios(u_long cmd); void logtermios(int pri, const char *msg, struct termios *tio); #ifdef hpux int tioctty(int fd, int state); #endif __END_DECLS extern bool accept_tty_immediately; #endif /* ! SOCKET_H */