search for: in_addr

Displaying 20 results from an estimated 114 matches for "in_addr".

Did you mean: sin_addr
2005 Feb 22
0
TR: 3.8.1p1 option "permitopennet" added
...@ u_short listen_port; /* Remote side should listen port number. */ } ForwardPermission; +/* That structure _only_ stocks authorized permitopennet demands + * A ForwardPermission entry is added at each incoming connexion + * in "permitted_opens" array + */ +typedef struct { + struct in_addr * netblock_to_connect; + struct in_addr * netmask_to_connect; + u_short porta_to_connect; + u_short portb_to_connect; +} ForwardNetPermission; + /* List of all permitted host/port pairs to connect. */ static ForwardPermission permitted_opens[SSH_MAX_FORWARDS_PER_DIRECTION]; +/* List of all perm...
2002 Aug 25
2
Trouble building Samba 2.2.5 of Solaris 9
Looks like inet_aton has cropped up again, in libsmbclient.c: if (!inet_aton(server, &rem_ip)) { DEBUG(4, ("Could not convert IP address %s to struct in_addr\n", server)); errno = ENOENT; return NULL; } This function doesn't exist in Solaris, and causes this shared library to fail to link, when called by other programs (notably KDE 3): Undefined first referenced symbol in file inet_aton...
2004 Aug 06
3
src/net/resolver.c patches for better IPv6 resolution
...it appears to work on my FreeBSD machine... Did I say I have no clue what I'm doing yet? <p>--- resolver.c-ORIG Mon Aug 5 16:48:03 2002 +++ resolver.c Sun Sep 29 19:43:54 2002 @@ -42,6 +42,13 @@ static mutex_t _resolver_mutex; static int _initialized = 0; +/* ugly hacks */ +struct in_addr inp; +union { + struct in_addr v4addr; + struct in6_addr v6addr; +} addr_u; + char *resolver_getname(const char *ip, char *buff, int len) { if (!_isip(ip)) { @@ -65,18 +72,11 @@ static int _isip(const char *what) { #ifdef HAVE_IPV6 - union { - struct in_addr v4addr; - struct in6_add...
2000 Jan 27
0
more NetBSD patches, for OpenSSH V1.2.2
...me))) != NULL) return 0; else return EAI_MEMORY; + } if ((hp = gethostbyname(hostname)) && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) { for (i = 0; hp->h_addr_list[i]; i++) - if (cur = malloc_ai(port, - ((struct in_addr *)hp->h_addr_list[i])->s_addr)) { + if ((cur = malloc_ai(port, + ((struct in_addr *)hp->h_addr_list[i])->s_addr)) != NULL) { if (prev) prev->ai_next = cur; else $NetBSD: patch-ad,v 1.1 2000/01/17 05:34:34 christos Exp $ --- fake-getnameinfo.c.orig Sun Jan 16 23:45:4...
2000 Jan 18
0
More NetBSD patches
...me))) != NULL) return 0; else return EAI_MEMORY; + } if ((hp = gethostbyname(hostname)) && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) { for (i = 0; hp->h_addr_list[i]; i++) - if (cur = malloc_ai(port, - ((struct in_addr *)hp->h_addr_list[i])->s_addr)) { + if ((cur = malloc_ai(port, + ((struct in_addr *)hp->h_addr_list[i])->s_addr)) != NULL) { if (prev) prev->ai_next = cur; else Index: fake-getnameinfo.c =================================================================== RCS file: /u...
2006 Jul 25
3
problem in Route add using netlink
...SIZE]; }; void fillRoute (struct route_info *rinfo, const char* dstAddr, const char* srcAddr, const char* gateway, const char* ifName) { /* Convert from the standrad numbers and dots notation to binary data */ inet_aton("192.168.51.0", (struct in_addr *)&rinfo->dstAddr); inet_aton("192.168.51.90", (struct in_addr *)&rinfo->gateWay); } int addAttr (struct nlmsghdr *nlhdr, int maxlen, int type, void *data, int alen) { struct rtattr *rta; int len = RTA_LENGTH(alen); if (NLMSG...
2009 Jun 01
2
[PATCH viewer] few minor bugfixes
...t(PF_INET, SOCK_STREAM, 0); @@ -917,14 +918,9 @@ viewer_open_vnc_socket(const char* vnchost, int vncport) return -1; } - serv = gethostbyname(vnchost); - if(serv == NULL){ - return -1; - } - serv_addr.sin_family = PF_INET; serv_addr.sin_port = htons(vncport); - serv_addr.sin_addr.s_addr = ((struct in_addr *)(serv->h_addr))->s_addr; + serv_addr.sin_addr.s_addr = inet_addr(vnchost); if (connect(socketfd,(struct sockaddr *)&serv_addr,sizeof(serv_addr)) < 0){ return -1; @@ -933,7 +929,7 @@ viewer_open_vnc_socket(const char* vnchost, int vncport) re...
2012 Oct 22
1
[PATCH] Implement remote dynamic TCP forwarding
...H_CHANNEL_CONNECTING: case SSH_CHANNEL_DYNAMIC: + case SSH_CHANNEL_RDYNAMIC: case SSH_CHANNEL_OPEN: case SSH_CHANNEL_X11_OPEN: case SSH_CHANNEL_INPUT_DRAINING: @@ -1033,14 +1038,23 @@ channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset) u_int16_t dest_port; struct in_addr dest_addr; } s4_req, s4_rsp; + Buffer *input, *output; + + if (c->type == SSH_CHANNEL_RDYNAMIC) { + input = &c->output; + output = &c->input; + } else { + input = &c->input; + output = &c->output; + } debug2("channel %d: decode socks4", c->self)...
2009 Jun 08
2
[PATCH] few minor bugfixes
...t, "%d", vncport); - serv = gethostbyname(vnchost); - if(serv == NULL){ + result = getaddrinfo(vnchost, port, NULL, &vnc_addr); + if(result != 0 || vnc_addr == NULL) return -1; - } - serv_addr.sin_family = PF_INET; - serv_addr.sin_port = htons(vncport); - serv_addr.sin_addr.s_addr = ((struct in_addr *)(serv->h_addr))->s_addr; + // just use first found, ignoring rest + socketfd = socket(vnc_addr->ai_family, + vnc_addr->ai_socktype, + vnc_addr->ai_protocol); - if (connect(socketfd,(struct sockaddr *)&serv_ad...
2001 Dec 05
1
DISPLAY=localhost
...DISPLAY variable and tries - * to set up a shared memory connection to the server, which it - * incorrectly supposes to be local. - * - * The workaround - as used in later $$H and other programs - is - * is to set display to the host's IP address. - */ - { - struct hostent *he; - struct in_addr my_addr; - - he = gethostbyname(hostname); - if (he == NULL) { - error("[X11-broken-fwd-hostname-workaround] Could not get " - "IP address for hostname %s.", hostname); - - packet_send_debug("[X11-broken-fwd-hostname-workaround]" - "Could not get IP ad...
2001 Sep 28
0
openssh-2.9.9p2 subscript violation problems with ctype macros
...e: openbsd-compat/inet_aton.c,v retrieving revision 2.9.9.2 retrieving revision 2.9.9.2.0.1 diff -pu -r2.9.9.2 -r2.9.9.2.0.1 --- openbsd-compat/inet_aton.c 2001/01/31 21:52:03 2.9.9.2 +++ openbsd-compat/inet_aton.c 2001/09/28 18:48:11 2.9.9.2.0.1 @@ -114,7 +114,7 @@ inet_aton(const char *cp, struct in_addr * Values are specified as for C: * 0x=hex, 0=octal, isdigit=decimal. */ - if (!isdigit(c)) + if (! ('0' <= c && c <= '9')) return (0); val = 0; base = 10; if (c == '0') { @@ -125,12 +125,14 @@ inet_aton(const char *cp, struct in_addr...
2012 Oct 23
1
Compiling samba4 hangs at [1815/3978] Compiling librpc/ndr/ndr_basic.c
...2019 was here In file included from ../librpc/ndr/ndr_basic.c:23: ../lib/replace/system/network.h:98: error: conflicting types for \u2018socklen_t\u2019 /usr/include/unistd.h:275: note: previous declaration of \u2018socklen_t\u2019 was here ../lib/replace/system/network.h:103: warning: \u2018struct in_addr\u2019 declared inside parameter list ../lib/replace/system/network.h:103: warning: its scope is only this definition or declaration, which is probably not what you want ../lib/replace/system/network.h:118: warning: \u2018struct in_addr\u2019 declared inside parameter list In file included from ../l...
2007 Jan 12
0
[PATCH] xc_ptrace PAE awareness
...= --- 2007-01-11.orig/tools/libxc/xc_ptrace.c 2006-12-14 22:49:56.000000000 +0100 +++ 2007-01-11/tools/libxc/xc_ptrace.c 2007-01-12 14:10:45.000000000 +0100 @@ -166,14 +166,11 @@ static unsigned long *page_arr * tables. * */ -static unsigned long -to_ma(int cpu, - unsigned long in_addr) +static uint64_t +to_ma(int cpu, uint64_t maddr) { - unsigned long maddr = in_addr; - if ( current_is_hvm && paging_enabled(&ctxt[cpu]) ) - maddr = page_array[maddr >> PAGE_SHIFT] << PAGE_SHIFT; + maddr = (uint64_t)page_array[maddr >> PAGE_SHIFT...
2004 Nov 06
2
dovecot 1.0-test52 compile notes
Compile issues on an older BSD/OS 4.2 system: src/lib/byteorder.h needs #include <netinet/in.h> to pick up in_addr struct src/lib/byteorder.c no "libgen" here (no basename()). Added it inline, no big deal, but you might want to have configure test for this and provide one if it's missing. Also, on this system there are no types like "uint8_t" and "uint64_t" -- instead...
2000 Nov 21
1
Openssh-2.2.0pl1 for UnixWare 7.1
...n 8-bit length and an 8-bit familiy memember: (from in.h): struct sockaddr_in { #ifdef __NEW_SOCKADDR__ sa_len_t sin_len; /* 8-bit structure length */ #endif sa_family_t sin_family; /* 8/16-bit address family (AF_INET) */ in_port_t sin_port; /* 16-bit port number */ struct in_addr sin_addr; /* 32-bit internet address */ unsigned char sin_zero[8]; /* optional with TLI */ }; This causes problems with the getaddrinfo() call in canohost.c, since the family it uses is incorrect. I'm not sure what the best way to support this in fake-socket.h is, but I thought I'...
2001 Jan 22
0
Patches for failing build & bus error on SPARC/Linux
...KEN_REQD #else # define PAM_STRERROR(a,b) pam_strerror((a),(b)) #endif *** fake-getnameinfo.c.orig Fri Sep 29 00:59:14 2000 --- fake-getnameinfo.c Mon Jan 22 16:19:39 2001 *************** *** 30,39 **** if (host) { if (flags & NI_NUMERICHOST) { ! if (strlen(inet_ntoa(sin->sin_addr)) >= hostlen) return EAI_MEMORY; ! strcpy(host, inet_ntoa(sin->sin_addr)); return 0; } else { hp = gethostbyaddr((char *)&sin->sin_addr, --- 30,43 ---- if (host) { if (flags & NI_NUMERICHOST) { ! /* inet_ntoa wants aligned data on SPARC */ !...
2007 Apr 10
1
[PATCH] Add support for DHCP-Options
...ring.h> +#include <console.h> +#include <netinet/in.h> +#include <syslinux/boot.h> +#include <syslinux/pxe.h> + +typedef struct { + uint8_t opcode; + uint8_t hardware; + uint8_t hardware_len; + uint8_t gatehops; + uint32_t ident; + uint16_t seconds; + uint16_t flags; + + in_addr_t cip; + in_addr_t yip; + in_addr_t sip; + in_addr_t gip; + uint8_t caddr[16]; + uint8_t sname[64]; + uint8_t bootfile[128]; + uint8_t options[]; +} __packed bootp_t; + +bootp_t *dhcpack; +size_t dhcpack_len; + +int find_dhcp_option(uint8_t search, const uint8_t **str, int *len) +{ + uint8_t *p; +...
2002 Jan 21
1
help for tftp-hpa with libc5
...type recvfrom.c:109: warning: unsigned value >= 0 is always 1 recvfrom.c:72: warning: unused variable `on' make: *** [recvfrom.o] Error 1 === === recvfrom.c line 62 onwards struct cmsghdr *cmptr; union { struct cmsghdr cm; #ifdef IP_PKTINFO char control[CMSG_SPACE(sizeof(struct in_addr)) + CMSG_SPACE(sizeof(struct in_pktinfo))]; #else char control[CMSG_SPACE(sizeof(struct in_addr))]; #endif } control_un; int on = 1; #ifdef IP_PKTINFO struct in_pktinfo pktinfo; #endif === 105 if ( msg.msg_controllen < sizeof(struct cmsghdr) || === 109 for ( cmptr...
2002 Apr 06
1
Compilation problem and solution on Solaris 2.7
...s missing on the system, so I had to write a replacement. Here is the (very simple) replacement code for inet_addr : #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netinet/in.h> unsigned long int inet_addr(const char *cp) { struct in_addr inp; if (inet_aton(cp,&inp) == 0) { return -1; } else { return ntohl((unsigned long int)inp.s_addr); } } Copy this code in a new file named 'inet_addr.c' in the 'lib' directory, add 'lib/inet_ntop.o lib/inet_pton.o li...
2005 Sep 26
2
Hostname passed to PAM as rhost
...nted to put with authentication, I am wondering - when Dovecot authenticates a user using PAM, now that (in 1.0) it passes the rhost item to PAM, it passes a hostname, not an IP address. Does it double-verify the DNS record before it trusts this to be the hostname (first checking the IP address in in_addr.arpa and then checking that the hostname indeed maps back to the same IP address)? That is necessary in order to trust the client address when determining authentication strength in the PAM module based on the client location (specifically we want stronger authentication when the client comes out...