search for: h_addr

Displaying 20 results from an estimated 20 matches for "h_addr".

Did you mean: __addr
2009 Jun 01
2
[PATCH viewer] few minor bugfixes
...@@ 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) return socketfd; } -#endif /* defined(HAVE_S...
2009 Jun 08
2
[PATCH] few minor bugfixes
...stbyname(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_addr,sizeof(serv_addr)) < 0){ - return...
2004 Apr 30
6
app_dbodbc segfault
Is anyone out there using app_dbodbc (http://www.bkw.org/~brian/app_dbodbc.c)? Any problems with it? I was able to get it all working, but it causes * to segfault every now and then. It does not appear to be related to any specific function (ODBCget,ODBCput,ODBCdel,ODBCdelltree). It is 100% repeatable. If I noload the module, everything works fine, but when its running, after calls to any of the
2024 Dec 17
0
[ANNOUNCE] xorg-server 21.1.15
Alan Coopersmith (1): dix-config.h: add HAVE_SOCKLEN_T definition Eric Curtin (1): config: add a quirk for Apple Silicon appledrm Joaquim Monteiro (2): os: Fix assignment with incompatible pointer type os: Fix siHostnameAddrMatch in the case where h_addr isn't defined Matt Turner (3): hw/xfree86: Fix -Wmissing-prototypes warnings hw/xfree86: Fix -Wincompatible-pointer-types sbus compile failure xserver 21.1.15 git tag: xorg-server-21.1.15 https://xorg.freedesktop.org/archive/individual/xserver/xorg-server-21.1.15.tar.gz SHA...
2009 Jun 10
1
[PATCH] add cmd line option for server vnc port
...te thread functions */ static gpointer tunnel_thread(gpointer data); static gpointer client_server_thread(gpointer data); @@ -164,7 +161,7 @@ tunnel_thread (gpointer _data) } ovirt_server_address.sin_family = PF_INET; ovirt_server_address.sin_addr.s_addr = ((struct in_addr*)(dns_serv->h_addr))->s_addr; //inet_addr(hostname); - ovirt_server_address.sin_port = htons(OVIRT_SERVER_PORT); + ovirt_server_address.sin_port = htons(ovirt_server_vnc_port); ovirt_server_len = sizeof(ovirt_server_address); // create local net socket @@ -212,7 +209,7 @@ tunnel_thread (gpointer _data)...
2006 Aug 25
0
Session request packet
...; else { cout << "Get host name failed." << endl; return -1; } //Connect port of host what want to connect struct sockaddr_in sockaddr; sockaddr.sin_family = AF_INET; sockaddr.sin_port = htons(iPort); sockaddr.sin_addr = *((struct in_addr*)host->h_addr); if(connect(socketid, (struct sockaddr*)&sockaddr, sizeof(struct sockaddr)) == -1) { cout << "Connect failed." << endl; return -1; } else cout << "Connect succeed." << endl; return socketid; } int sendNBT(void* data, size_t c...
2004 Jul 14
3
Using a DNS name for externip in sip.conf
Does anyone know if the 'externip=' in sip.conf is resolved just once at startup or on an on going basis? I would like to use a DNS name through one of the dynamic DNS providers, but if the DNS updates, and asterisk continues using the old resolved value, this could get tricky. Thanks, Dennis
1998 Nov 24
1
Missing inet.h and netdb.h for SCO
I tried to compile Samba 2.0 beta with cc under SCO 3.2. I seem to be missing the inet.h and netdb.h include files. Does anyone know if they are publicly available? Steve Grose Sgrose@cmps.com Continental Managed Pharmacy Services - www.preferrx.com Voice - 216-459-2025 Ext. 208 Fax - 216-485-8615 Any opinions expressed are my own and not necessarily those of my employers.
2009 Apr 09
0
Processed: Update submitter address for my bugs
...r 521985 ! Bug#521985: libtrace3: FTBFS: 'NULL' undeclared Changed Bug submitter from Daniel Schepler <schepler at math.berkeley.edu> to Daniel Schepler <dschepler at gmail.com>. > submitter 522007 ! Bug#522007: mpich: FTBFS: 'struct hostent' has no member named 'h_addr' Changed Bug submitter from Daniel Schepler <schepler at math.berkeley.edu> to Daniel Schepler <dschepler at gmail.com>. > submitter 521989 ! Bug#521989: libwww-mechanize-formfiller-perl: FTBFS: Test failure Changed Bug submitter from Daniel Schepler <schepler at math.berkele...
1997 Nov 14
0
Linux IP fragment overlap bug (fwd)
...(packet); exit(1); } free(packet); } u_long name_resolve(u_char *host_name) { struct in_addr addr; struct hostent *host_ent; if ((addr.s_addr = inet_addr(host_name)) == -1) { if (!(host_ent = gethostbyname(host_name))) return (0); bcopy(host_ent->h_addr, (char *)&addr.s_addr, host_ent->h_length); } return (addr.s_addr); } void usage(u_char *name) { fprintf(stderr, "%s src_ip dst_ip [ -s src_prt ] [ -t dst_prt ] [ -n how_many ]\n", name); exit(0); } /* EOF */ ------[End] -- Guby Linux ----...
1999 Mar 25
0
(Fwd) DoS for Linux 2.1.89 - 2.2.3: 0 length fragment bug
...(value>>16); return(~value); } unsigned long resolve( char *hostname) { long result; struct hostent *hp; if ((result=inet_addr(hostname))==-1) { if ((hp=gethostbyname(hostname))==0) { fprintf(stderr,"Can't resolve target.\n"); exit(1); } bcopy(hp->h_addr,&result,4); } return result; } void usage(void) { fprintf(stderr,"usage: ./sqpd [-s sport] [-d dport] [-n count] [-u delay] source target\n"); exit(0); } void sendem(int s, unsigned long source, unsigned long dest, unsigned short sport, unsigned short dport) { static char bu...
1997 Sep 26
3
Forwarded mail....
...t num_rr; unsigned short int num_rrsup; unsigned char namelen; }; struct typez{ u_int type; u_int type2; }; unsigned int host2ip(char *serv) { struct sockaddr_in sin; struct hostent *hent; hent=gethostbyname(serv); if(hent == NULL) return 0; bzero((char *)&sin, sizeof(sin)); bcopy(hent->h_addr, (char *)&sin.sin_addr, hent->h_length); return sin.sin_addr.s_addr; } main( int argc, char **argv) { struct sockaddr_in sin_me , sin_dst; struct nmbhdr *nmb,*nmb2; struct iphdr *ipz; struct typez *typz; struct hostent *hent; int socket_client,sr,num,i=1,bha,timeout=0,try=0,GO=0; int l...
2005 Sep 30
4
C Manager Interface Client
List: This is my first manager client that I've written so please bear with me: I am trying to write a C manager interface client to interface with our CRM software. I am having an issue while reading the data from the manager interface. I am writing this in C and I have the following code: while(1) { bzero(buffer,sizeof(buffer)); readCode = read(socketHandle,buffer,sizeof(buffer));
2007 Jan 23
2
Re: [nut-commits] svn commit r731
...ket(AF_INET, SOCK_STREAM, 0)) < 0) { > + if ((ups->fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) > + { > ups->upserror = UPSCLI_ERR_SOCKFAILURE; > ups->syserrno = errno; > return -1; > @@ -477,140 +485,123 @@ > > memcpy(&server.sin_addr, serv->h_addr, serv->h_length); > > - if (bind(ups->fd, (struct sockaddr *) &local, > - sizeof(struct sockaddr_in)) == -1) { > + if (bind(ups->fd, (struct sockaddr *) &local, sizeof(struct sockaddr_in)) == -1) > + { > ups->upserror = UPSCLI_ERR_BINDFAILURE; > up...
2007 Jan 06
1
Re: [nut-commits] svn commit r710 - in trunk: . clients server
...uct sockaddr_in)); > + local.sin_family = AF_INET; > + local.sin_port = htons(INADDR_ANY); > + > + memset(&server, '\0', sizeof(struct sockaddr_in)); > + server.sin_family = AF_INET; > + server.sin_port = htons(port); > + > + memcpy(&server.sin_addr, serv->h_addr, serv->h_length); > + > + if (bind(ups->fd, (struct sockaddr *) &local, > + sizeof(struct sockaddr_in)) == -1) { > + ups->upserror = UPSCLI_ERR_BINDFAILURE; > + ups->syserrno = errno; > + close(ups->fd); > + ups->fd = -1; > + > + return -1; &g...
2009 Aug 14
2
Bestfortress driver, network serial patch for nut-2.0
...uct sockaddr_in saddr; + struct hostent *blob = 0; + *p++ = 0; + netport = atoi(p); + fd = socket(AF_INET, SOCK_STREAM, 0); + if (fd < 0) + ser_open_error("socket"); + blob = gethostbyname(path); + if (blob == 0) + ser_open_error(path); + memcpy(&saddr.sin_addr,blob->h_addr,sizeof saddr.sin_addr); + saddr.sin_port = htons(netport); + saddr.sin_family = AF_INET; + if (connect(fd,(struct sockaddr *)&saddr,sizeof saddr) + || fcntl(fd,F_SETFL,O_NONBLOCK)) { + close(fd); + fd = -1; + } + } + else + fd = open(port, O_RDWR | O_NOCTTY | O_EXCL | O...
2006 Feb 03
0
rquotad (NFS) quota plugin
...stat cstat; + CLIENT *clnt = NULL; + int sock = RPC_ANYSOCK; + + hent = gethostbyname(host); + if (!hent) + return -1; + if (hent->h_length > (int)sizeof(rhost.sin_addr)) + return -1; + + tout.tv_sec = 6; + tout.tv_usec = 0; + + *(long *)&rhost.sin_addr = *(long *)hent->h_addr; + rhost.sin_family = AF_INET; + rhost.sin_port = 0; + + clnt = clntudp_create(&rhost, RQUOTAPROG, RQUOTAVERS, tout, &sock); + if (!clnt) + return rpc_createerr.cf_stat; + + clnt->cl_auth = authunix_create_default(); + tout.tv_sec = 25; + tout.tv_usec = 0; + cstat = clnt_cal...
2007 Jun 11
24
multiple routing tables for internal router programs
Maybe a strange request, I''ll try to explain this as clearer as I can (forgive my bad english, please :-) ). I''m setting a linux box as a router. My router uses multiple routing tables, so I can address the traffic from specific ip addresses of my lan to distinct ISPs providers (specifying a different default gateway fo r each table), marking packets with iptables
2007 Jan 06
3
Re: [nut-commits] svn commit r708 - in trunk: . clients server
...uct sockaddr_in)); > - local.sin_family = AF_INET; > - local.sin_port = htons(INADDR_ANY); > - > - memset(&server, '\0', sizeof(struct sockaddr_in)); > - server.sin_family = AF_INET; > - server.sin_port = htons(port); > - > - memcpy(&server.sin_addr, serv->h_addr, serv->h_length); > - > - if (bind(ups->fd, (struct sockaddr *) &local, > - sizeof(struct sockaddr_in)) == -1) { > - ups->upserror = UPSCLI_ERR_BINDFAILURE; > - ups->syserrno = errno; > - close(ups->fd); > - ups->fd = -1; > + memset (&hints, 0...
2004 May 12
8
How do fix a good solution against spam..
Heya folks First of all, sorry if this isn't the correct list, but yet, I think spam is a kind of network attack and should be treated as a security issue.. I run a working mail server using Postfix, MySQL, Courier-IMAP, SpamAssassin and ClamAV (amavisd-new) .. I've checked the configuration file for SpamAssassin, but yet I havn't find any good solution for spam.. Sure, spam will