diff options
author | Damien Miller <djm@mindrot.org> | 2000-01-14 15:45:46 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-01-14 15:45:46 +1100 |
commit | 34132e54cbd221d17d373fc54f4e3f7b85727f7f (patch) | |
tree | 7c73917b1082ff91786f9e02d25b853bedd1d472 /fake-socket.h | |
parent | 25e4256ad4f453d8a7c1866243ec1984f859b1de (diff) |
- Merged OpenBSD IPv6 patch:
- [sshd.c sshd.8 sshconnect.c ssh.h ssh.c servconf.h servconf.c scp.1]
[scp.c packet.h packet.c login.c log.c canohost.c channels.c]
[hostfile.c sshd_config]
ipv6 support: mostly gethostbyname->getaddrinfo/getnameinfo, new
features: sshd allows multiple ListenAddress and Port options. note
that libwrap is not IPv6-ready. (based on patches from
fujiwara@rcac.tdi.co.jp)
- [ssh.c canohost.c]
more hints (hints.ai_socktype=SOCK_STREAM) for getaddrinfo,
from itojun@
- [channels.c]
listen on _all_ interfaces for X11-Fwd (hints.ai_flags = AI_PASSIVE)
- [packet.h]
allow auth-kerberos for IPv4 only
- [scp.1 sshd.8 servconf.h scp.c]
document -4, -6, and 'ssh -L 2022/::1/22'
- [ssh.c]
'ssh @host' is illegal (null user name), from
karsten@gedankenpolizei.de
- [sshconnect.c]
better error message
- [sshd.c]
allow auth-kerberos for IPv4 only
- Big IPv6 merge:
- Cleanup overrun in sockaddr copying on RHL 6.1
- Replacements for getaddrinfo, getnameinfo, etc based on versions
from patch from KIKUCHI Takahiro <kick@kyoto.wide.ad.jp>
- Replacement for missing structures on systems that lack IPv6
- record_login needed to know about AF_INET6 addresses
- Borrowed more code from OpenBSD: rresvport_af and requisites
Diffstat (limited to 'fake-socket.h')
-rw-r--r-- | fake-socket.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/fake-socket.h b/fake-socket.h new file mode 100644 index 000000000..e11ad44e0 --- /dev/null +++ b/fake-socket.h | |||
@@ -0,0 +1,49 @@ | |||
1 | #ifndef _FAKE_SOCKET_H | ||
2 | #define _FAKE_SOCKET_H | ||
3 | |||
4 | #include "config.h" | ||
5 | #include "sys/types.h" | ||
6 | |||
7 | #ifndef HAVE_STRUCT_SOCKADDR_STORAGE | ||
8 | #define _SS_MAXSIZE 128 /* Implementation specific max size */ | ||
9 | #define _SS_ALIGNSIZE (sizeof(int)) | ||
10 | #define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(u_short)) | ||
11 | #define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof(u_short) + \ | ||
12 | _SS_PAD1SIZE + _SS_ALIGNSIZE)) | ||
13 | |||
14 | struct sockaddr_storage { | ||
15 | u_short ss_family; | ||
16 | char __ss_pad1[_SS_PAD1SIZE]; | ||
17 | int __ss_align; | ||
18 | char __ss_pad2[_SS_PAD2SIZE]; | ||
19 | }; | ||
20 | #endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */ | ||
21 | |||
22 | #ifndef IN6_IS_ADDR_LOOPBACK | ||
23 | #define IN6_IS_ADDR_LOOPBACK(a) \ | ||
24 | (((u_int32_t *) (a))[0] == 0 && ((u_int32_t *) (a))[1] == 0 && \ | ||
25 | ((u_int32_t *) (a))[2] == 0 && ((u_int32_t *) (a))[3] == htonl (1)) | ||
26 | #endif /* !IN6_IS_ADDR_LOOPBACK */ | ||
27 | |||
28 | #ifndef HAVE_STRUCT_IN6_ADDR | ||
29 | struct in6_addr { | ||
30 | u_int8_t s6_addr[16]; | ||
31 | }; | ||
32 | #endif /* !HAVE_STRUCT_IN6_ADDR */ | ||
33 | |||
34 | #ifndef HAVE_STRUCT_SOCKADDR_IN6 | ||
35 | struct sockaddr_in6 { | ||
36 | unsigned short sin6_family; | ||
37 | u_int16_t sin6_port; | ||
38 | u_int32_t sin6_flowinfo; | ||
39 | struct in6_addr sin6_addr; | ||
40 | }; | ||
41 | #endif /* !HAVE_STRUCT_SOCKADDR_IN6 */ | ||
42 | |||
43 | #ifndef AF_INET6 | ||
44 | /* Define it to something that should never appear */ | ||
45 | #define AF_INET6 AF_MAX | ||
46 | #endif | ||
47 | |||
48 | #endif /* !_FAKE_SOCKET_H */ | ||
49 | |||