diff options
author | mouring <mouring> | 2001-04-12 23:39:26 +0000 |
---|---|---|
committer | mouring <mouring> | 2001-04-12 23:39:26 +0000 |
commit | 1da736867dc34fd8b041253da3faae1b44df2a0f (patch) | |
tree | babe02195579d43387fd1062ec0e3afcbbe8b082 /misc.h | |
parent | ef75f11febb3144e1d3750f9e1c9ebbc461ca402 (diff) | |
download | openssh-1da736867dc34fd8b041253da3faae1b44df2a0f.tar.gz |
- stevesk@cvs.openbsd.org 2001/04/12 20:09:38
[misc.c misc.h readconf.c servconf.c ssh.c sshd.c]
robust port validation; ok markus@ jakob@
Diffstat (limited to 'misc.h')
-rw-r--r-- | misc.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: misc.h,v 1.3 2001/02/22 21:59:44 markus Exp $ */ +/* $OpenBSD: misc.h,v 1.4 2001/04/12 20:09:36 stevesk Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -22,6 +22,13 @@ void set_nonblock(int fd); struct passwd * pwcopy(struct passwd *pw); +/* + * Convert ASCII string to TCP/IP port number. + * Port must be >0 and <=65535. + * Return 0 if invalid. + */ +int a2port(const char *s); + /* wrapper for signal interface */ typedef void (*mysig_t)(int); mysig_t mysignal(int sig, mysig_t act); |