diff options
Diffstat (limited to 'inet')
34 files changed, 933 insertions, 448 deletions
diff --git a/inet/Makefile b/inet/Makefile index 9389a22338..da300c7376 100644 --- a/inet/Makefile +++ b/inet/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. +# Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -25,9 +25,16 @@ headers := netinet/in.h $(wildcard arpa/*.h protocols/*.h) routines := ntohl ntohs htonl htons \ inet_lnaof inet_mkadr \ - inet_netof inet_ntoa inet_net \ - getproto getprtent getprtname \ - getsrvbynm getsrvbypt getservent \ + inet_netof inet_ntoa inet_net herrno \ + gethstbyad gethstbyad_r gethstbynm gethstbynm2 gethstbynm2_r \ + gethstbynm_r gethstent gethstent_r \ + getnetbypt getnetbypt_r getnetbynm getnetent getnetent_r \ + getnetbynm_r \ + getproto getproto_r getprtent getprtent_r getprtname getprtname_r \ + getsrvbynm getsrvbynm_r getsrvbypt getsrvbypt_r getservent \ + getservent_r \ + getrpcent getrpcbyname getrpcbynumber \ + getrpcent_r getrpcbyname_r getrpcbynumber_r \ rcmd rexec ruserpass # No warnings about losing BSD code. diff --git a/inet/gethstbyad.c b/inet/gethstbyad.c new file mode 100644 index 0000000000..abc2eab06d --- /dev/null +++ b/inet/gethstbyad.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include <netdb.h> + + +#define LOOKUP_TYPE struct hostent +#define FUNCTION_NAME gethostbyaddr +#define DATABASE_NAME hosts +#define ADD_PARAMS const char *addr, int len, int type +#define ADD_VARIABLES addr, len, type +#define BUFLEN 1024 +#define NEED_H_ERRNO 1 + +#include "../nss/getXXbyYY.c" diff --git a/inet/gethstbyad_r.c b/inet/gethstbyad_r.c new file mode 100644 index 0000000000..7dce4403d7 --- /dev/null +++ b/inet/gethstbyad_r.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include <netdb.h> + + +#define LOOKUP_TYPE struct hostent +#define FUNCTION_NAME gethostbyaddr +#define DATABASE_NAME hosts +#define ADD_PARAMS const char *addr, int len, int type +#define ADD_VARIABLES addr, len, type +#define NEED_H_ERRNO 1 +#define NEED__RES 1 + +#include "../nss/getXXbyYY_r.c" diff --git a/inet/gethstbynm.c b/inet/gethstbynm.c new file mode 100644 index 0000000000..07178108cf --- /dev/null +++ b/inet/gethstbynm.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include <netdb.h> + + +#define LOOKUP_TYPE struct hostent +#define FUNCTION_NAME gethostbyname +#define DATABASE_NAME hosts +#define ADD_PARAMS const char *name +#define ADD_VARIABLES name +#define BUFLEN 1024 +#define NEED_H_ERRNO 1 + +#include "../nss/getXXbyYY.c" diff --git a/inet/gethstbynm2.c b/inet/gethstbynm2.c new file mode 100644 index 0000000000..42a01d4141 --- /dev/null +++ b/inet/gethstbynm2.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include <netdb.h> + + +#define LOOKUP_TYPE struct hostent +#define FUNCTION_NAME gethostbyname2 +#define DATABASE_NAME hosts +#define ADD_PARAMS const char *name, int af +#define ADD_VARIABLES name, af +#define BUFLEN 1024 +#define NEED_H_ERRNO 1 + +#include "../nss/getXXbyYY.c" diff --git a/inet/gethstbynm2_r.c b/inet/gethstbynm2_r.c new file mode 100644 index 0000000000..a2aee54559 --- /dev/null +++ b/inet/gethstbynm2_r.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include <netdb.h> + + +#define LOOKUP_TYPE struct hostent +#define FUNCTION_NAME gethostbyname2 +#define DATABASE_NAME hosts +#define ADD_PARAMS const char *name, int af +#define ADD_VARIABLES name, af +#define NEED_H_ERRNO 1 + +#include "../nss/getXXbyYY_r.c" diff --git a/inet/gethstbynm_r.c b/inet/gethstbynm_r.c new file mode 100644 index 0000000000..6bd2920e74 --- /dev/null +++ b/inet/gethstbynm_r.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include <netdb.h> + + +#define LOOKUP_TYPE struct hostent +#define FUNCTION_NAME gethostbyname +#define DATABASE_NAME hosts +#define ADD_PARAMS const char *name +#define ADD_VARIABLES name +#define NEED_H_ERRNO 1 +#define NEED__RES 1 + +#include "../nss/getXXbyYY_r.c" diff --git a/inet/gethstent.c b/inet/gethstent.c new file mode 100644 index 0000000000..5c7293683f --- /dev/null +++ b/inet/gethstent.c @@ -0,0 +1,27 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include <netdb.h> + + +#define LOOKUP_TYPE struct hostent +#define GETFUNC_NAME gethostent +#define BUFLEN 1024 +#define NEED_H_ERRNO 1 + +#include "../nss/getXXent.c" diff --git a/inet/gethstent_r.c b/inet/gethstent_r.c new file mode 100644 index 0000000000..f07601dfad --- /dev/null +++ b/inet/gethstent_r.c @@ -0,0 +1,32 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include <netdb.h> + + +#define LOOKUP_TYPE struct hostent +#define SETFUNC_NAME sethostent +#define GETFUNC_NAME gethostent +#define ENDFUNC_NAME endhostent +#define DATABASE_NAME hosts +#define STAYOPEN int stayopen +#define STAYOPEN_VAR stayopen +#define NEED_H_ERRNO 1 +#define NEED__RES 1 + +#include "../nss/getXXent_r.c" diff --git a/inet/getnetbynm.c b/inet/getnetbynm.c new file mode 100644 index 0000000000..db1c7b0cf6 --- /dev/null +++ b/inet/getnetbynm.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include <netdb.h> + + +#define LOOKUP_TYPE struct netent +#define FUNCTION_NAME getnetbyname +#define DATABASE_NAME networks +#define ADD_PARAMS const char *name +#define ADD_VARIABLES name +#define BUFLEN 1024 + +#include "../nss/getXXbyYY.c" diff --git a/inet/getnetbynm_r.c b/inet/getnetbynm_r.c new file mode 100644 index 0000000000..ba395d63ac --- /dev/null +++ b/inet/getnetbynm_r.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include <netdb.h> + + +#define LOOKUP_TYPE struct netent +#define FUNCTION_NAME getnetbyname +#define DATABASE_NAME networks +#define ADD_PARAMS const char *name +#define ADD_VARIABLES name +#define NEED__RES 1 + +#include "../nss/getXXbyYY_r.c" diff --git a/inet/getnetbypt.c b/inet/getnetbypt.c new file mode 100644 index 0000000000..960ac0a064 --- /dev/null +++ b/inet/getnetbypt.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include <netdb.h> + + +#define LOOKUP_TYPE struct netent +#define FUNCTION_NAME getnetbyport +#define DATABASE_NAME networks +#define ADD_PARAMS unsigned long int net, int type +#define ADD_VARIABLES net, type +#define BUFLEN 1024 + +#include "../nss/getXXbyYY.c" diff --git a/inet/getnetbypt_r.c b/inet/getnetbypt_r.c new file mode 100644 index 0000000000..a39f26f797 --- /dev/null +++ b/inet/getnetbypt_r.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1996 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#include <netdb.h> + + +#define LOOKUP_T |
