{"blog_url":"https://boscono.hatenablog.com/","blog_title":"\u3066\u304d\u3068\u3046\u306a\u30e1\u30e2","url":"https://boscono.hatenablog.com/entry/2016/01/31/160926","provider_name":"Hatena Blog","author_url":"https://blog.hatena.ne.jp/boscono/","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fboscono.hatenablog.com%2Fentry%2F2016%2F01%2F31%2F160926\" title=\"gethostbyname\u306e\u5f15\u6570\u306bip\u30a2\u30c9\u30ec\u30b9\u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u306e\u52d5\u4f5c - \u3066\u304d\u3068\u3046\u306a\u30e1\u30e2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2016-01-31 16:09:26","type":"rich","author_name":"boscono","provider_url":"https://hatena.blog","title":"gethostbyname\u306e\u5f15\u6570\u306bip\u30a2\u30c9\u30ec\u30b9\u3092\u6307\u5b9a\u3057\u305f\u5834\u5408\u306e\u52d5\u4f5c","version":"1.0","image_url":null,"width":"100%","description":"#include <stdio.h> #include <netdb.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> int main(int argc, char **argv) { struct hostent *host = gethostbyname(argv[1]); printf(\"h_name = %s\\n\", host->h_name); printf(\"ip = \"); for (char **addrp = host->h_addr_list; *addrp != NULL;\u2026","categories":["C","Network"]}