search for: inet_makeaddr

Displaying 2 results from an estimated 2 matches for "inet_makeaddr".

2001 Jan 22
0
Patches for failing build & bus error on SPARC/Linux
...t,str); + return 0; + } + + main(argc,argv) + int argc; + char *argv[]; + { + struct sockaddr_in sin; + char host[1025]; + + char *ptr = malloc(sizeof(struct sockaddr_in)+8); + + char *unaligned = ptr+1; + + sin.sin_family = 2; + sin.sin_port = 22; + sin.sin_addr = inet_makeaddr(137<<24 | 222<<16 | 20<<8 , 17); + + bcopy((char *)&sin, unaligned, sizeof(struct sockaddr_in)); + + (void)sub((struct sockaddr *)unaligned,host,(size_t)sizeof(host)); + + printf("%s\n",host); + return 0; + }
1997 Apr 22
1
SNI-12: BIND Vulnerabilities and Solutions (fwd)
...LT; - - /* - - * This one used to initialize implicitly to zero, so unless the app - - * has set it to something in particular, we can randomize it now. - - */ - - if (!_res.id) - - _res.id = res_randomid(); - - #ifdef USELOOPBACK _res.nsaddr.sin_addr = inet_makeaddr(IN_LOOPBACKNET, 1); #else - --- 197,202 ---- *************** *** 644,655 **** return(0); /* if not using DNS configuration from NetInfo */ } #endif /* NeXT */ - - - - u_int - - res_randomid() - - { - - struct timeval now; - - - - gettimeofday(&now, NULL); - -...