xref: /titanic_44/usr/src/cmd/ssh/include/misc.h (revision 941880d67612f78a4bf94f75f083b521da6bd316)
1 /*	$OpenBSD: misc.h,v 1.12 2002/03/19 10:49:35 markus Exp $	*/
2 
3 #ifndef	_MISC_H
4 #define	_MISC_H
5 
6 #pragma ident	"%Z%%M%	%I%	%E% SMI"
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 
13 /*
14  * Author: Tatu Ylonen <ylo@cs.hut.fi>
15  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
16  *                    All rights reserved
17  *
18  * As far as I am concerned, the code I have written for this software
19  * can be used freely for any purpose.  Any derived versions of this
20  * software must be clearly marked as such, and if the derived work is
21  * incompatible with the protocol description in the RFC file, it must be
22  * called by a name other than "ssh" or "Secure Shell".
23  */
24 /*
25  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
26  * Use is subject to license terms.
27  */
28 
29 char	*chop(char *);
30 char	*strdelim(char **);
31 void	 set_nonblock(int);
32 void	 unset_nonblock(int);
33 void	 set_nodelay(int);
34 int	 a2port(const char *);
35 char	*cleanhostname(char *);
36 char	*colon(char *);
37 long	 convtime(const char *);
38 
39 struct passwd	*pwcopy(struct passwd *);
40 void		 pwfree(struct passwd **);
41 
42 typedef struct arglist arglist;
43 struct arglist {
44 	char    **list;
45 	int     num;
46 	int     nalloc;
47 };
48 void	 addargs(arglist *, char *, ...) __attribute__((format(printf, 2, 3)));
49 void	 freeargs(arglist *);
50 
51 /* wrapper for signal interface */
52 typedef void (*mysig_t)(int);
53 mysig_t mysignal(int sig, mysig_t act);
54 
55 #ifdef __cplusplus
56 }
57 #endif
58 
59 #endif /* _MISC_H */
60