Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 296020 Details for
Bug 428067
strange behavior of getnameinfo with multiple PTR record
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
simpler test case
newtest.c (text/plain), 1.12 KB, created by
Tom "spot" Callaway
on 2008-02-27 03:34:55 UTC
(
hide
)
Description:
simpler test case
Filename:
MIME Type:
Creator:
Tom "spot" Callaway
Created:
2008-02-27 03:34:55 UTC
Size:
1.12 KB
patch
obsolete
>#include <stdlib.h> >#include <stdio.h> >#include <string.h> > >#include <sys/types.h> >#include <sys/socket.h> >#include <netdb.h> > >int main (int argc, char **argv) >{ > const char *host = "208.77.188.166"; // www.example.com > const char *port = NULL; > int socktype = SOCK_STREAM; > > struct addrinfo hints; > struct addrinfo* res = NULL; > int error; > > if (argc != 2) { > fprintf(stderr, "usage: %s ipaddress\n", argv[0]); > exit(1); > } > > host = argv[1]; > > memset(&hints, 0, sizeof(hints)); > hints.ai_family = AF_UNSPEC; > hints.ai_socktype = socktype; > hints.ai_flags = 0; > > > > error = getaddrinfo(host, port, &hints, &res); > > if (error) { > fprintf(stderr, "sock_addrinfo: error=%d: %s\n", > error, gai_strerror(error)); > return 4; > } > > if (res) { > char hostbuf[NI_MAXHOST] = "???"; > > error = getnameinfo(res->ai_addr, res->ai_addrlen, > hostbuf, sizeof(hostbuf), NULL, 0, NI_NAMEREQD); > > fprintf(stderr, "sock_nameinfo: error=%d, host=%s\n", error, hostbuf); > > freeaddrinfo(res); > } > > return 0; >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 428067
:
291104
|
291105
| 296020