blob: ec47a611d485c65c6d440152fdd60cb8a6fda4f2 [file] [log] [blame]
Darren Tuckerc7a6fc42004-08-13 21:18:00 +10001/* $OpenBSD: misc.h,v 1.17 2004/08/11 21:43:05 avsm Exp $ */
Ben Lindstrom36579d32001-01-29 07:39:26 +00002
Ben Lindstrom226cfa02001-01-22 05:34:40 +00003/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
5 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
6 * All rights reserved
7 *
8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
13 */
Ben Lindstrom226cfa02001-01-22 05:34:40 +000014
Darren Tuckere608ca22004-05-13 16:15:47 +100015/* misc.c */
16
Kevin Stevesd009ae32001-07-04 17:25:54 +000017char *chop(char *);
18char *strdelim(char **);
Damien Miller232711f2004-06-15 10:35:30 +100019int set_nonblock(int);
20int unset_nonblock(int);
Damien Miller398e1cf2002-02-05 11:52:13 +110021void set_nodelay(int);
Kevin Stevesd009ae32001-07-04 17:25:54 +000022int a2port(const char *);
23char *cleanhostname(char *);
24char *colon(char *);
25long convtime(const char *);
26
27struct passwd *pwcopy(struct passwd *);
Ben Lindstrom226cfa02001-01-22 05:34:40 +000028
Ben Lindstrom387c4722001-05-08 20:27:25 +000029typedef struct arglist arglist;
30struct arglist {
Ben Lindstrom6328ab32002-03-22 02:54:23 +000031 char **list;
Darren Tuckerc7a6fc42004-08-13 21:18:00 +100032 u_int num;
33 u_int nalloc;
Ben Lindstrom387c4722001-05-08 20:27:25 +000034};
Kevin Stevesd009ae32001-07-04 17:25:54 +000035void addargs(arglist *, char *, ...) __attribute__((format(printf, 2, 3)));
Darren Tucker06f2bd82004-05-13 16:06:46 +100036
Darren Tuckere608ca22004-05-13 16:15:47 +100037/* tildexpand.c */
38
Darren Tucker06f2bd82004-05-13 16:06:46 +100039char *tilde_expand_filename(const char *, uid_t);
Darren Tuckere608ca22004-05-13 16:15:47 +100040
41/* readpass.c */
42
43#define RP_ECHO 0x0001
44#define RP_ALLOW_STDIN 0x0002
45#define RP_ALLOW_EOF 0x0004
Damien Miller23f07702004-06-18 01:19:03 +100046#define RP_USE_ASKPASS 0x0008
Darren Tuckere608ca22004-05-13 16:15:47 +100047
48char *read_passphrase(const char *, int);