| 1 |
/* |
| 2 |
Copyright (C) 2006-2026 Free Software Foundation, Inc. |
| 3 |
|
| 4 |
This file is part of GNU Inetutils. |
| 5 |
|
| 6 |
GNU Inetutils is free software: you can redistribute it and/or modify |
| 7 |
it under the terms of the GNU General Public License as published by |
| 8 |
the Free Software Foundation, either version 3 of the License, or (at |
| 9 |
your option) any later version. |
| 10 |
|
| 11 |
GNU Inetutils is distributed in the hope that it will be useful, but |
| 12 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 |
General Public License for more details. |
| 15 |
|
| 16 |
You should have received a copy of the GNU General Public License |
| 17 |
along with this program. If not, see `http://www.gnu.org/licenses/'. */ |
| 18 |
|
| 19 |
#include "argp-version-etc.h" |
| 20 |
#include <signal.h> |
| 21 |
#include <sys/uio.h> |
| 22 |
|
| 23 |
sighandler_t setsig (int sig, sighandler_t handler); |
| 24 |
void utmp_init (char *line, char *user, char *id, char *host); |
| 25 |
char *utmp_ptsid (char *line, char *tag); |
| 26 |
void utmp_logout (char *line); |
| 27 |
char *localhost (void); |
| 28 |
void logwtmp (const char *, const char *, const char *); |
| 29 |
void cleanup_session (char *tty, int pty_fd); |
| 30 |
void logwtmp_keep_open (char *line, char *name, char *host); |
| 31 |
char *inetutils_ttymsg (struct iovec *, int, char *, int); |
| 32 |
|
| 33 |
#ifndef HAVE_STRUCT_IF_NAMEINDEX |
| 34 |
struct if_nameindex |
| 35 |
{ |
| 36 |
char *if_name; |
| 37 |
int if_index; |
| 38 |
}; |
| 39 |
|
| 40 |
unsigned int if_nametoindex (const char *ifname); |
| 41 |
struct if_nameindex *if_nameindex (void); |
| 42 |
void if_freenameindex (struct if_nameindex *ptr); |
| 43 |
#endif |
| 44 |
|
| 45 |
extern const char *default_program_authors[]; |
| 46 |
|
| 47 |
#define iu_argp_init(name, authors) \ |
| 48 |
argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; \ |
| 49 |
argp_version_setup (name, authors); |
| 50 |
|
| 51 |
#ifdef HAVE_FORK |
| 52 |
# define fork_exit(s) exit(s) |
| 53 |
#else |
| 54 |
# define fork() vfork() |
| 55 |
# define fork_exit(s) _exit(s) |
| 56 |
#endif |