{"id":142,"date":"2010-04-17T23:15:14","date_gmt":"2010-04-18T08:15:14","guid":{"rendered":"\/blog\/?p=142"},"modified":"2023-09-21T09:39:19","modified_gmt":"2023-09-21T00:39:19","slug":"%eb%84%a4%ed%8a%b8%ec%9b%8c%ed%81%ac-%eb%b0%94%ec%9d%b4%ed%8a%b8-%ec%88%9c%ec%84%9c","status":"publish","type":"post","link":"https:\/\/hasu0707.duckdns.org\/blog\/?p=142","title":{"rendered":"\ub124\ud2b8\uc6cc\ud06c \ubc14\uc774\ud2b8 \uc21c\uc11c"},"content":{"rendered":"<span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\ub124\ud2b8\uc6cc\ud06c \uc2a4\ud0dd\uacfc \ud1b5\uc2e0 \ud504\ub85c\ud1a0\ucf5c \uc5ed\uc2dc \uc5d4\ub514\uc548 \ubc29\uc2dd\uc744 \uc815\uc758\ud574\uc57c \ud55c\ub2e4. \ub450 \ub178\ub4dc\uac00 \uc5d4\ub514\uc548 \ubc29\uc2dd\uc774 \ub2e4\ub974\uba74 \uc11c\ub85c \ud1b5\uc2e0\ud558\uc9c0 \ubabb\ud558\uae30 \ub54c\ubb38\uc774\ub2e4. \uadf8\ub798\uc11c \uc784\ubca0\ub514\ub4dc \ud504\ub85c\uadf8\ub798\uba38\ub294 \ud2b9\ud788 \uc5d4\ub514\uc548 \ubc29\uc2dd\uc5d0 \uc2e0\uacbd \uc368\uc57c \ud55c\ub2e4. TCP\/IP(Transmission Control Protocol and the Internet Protocol) \ub0b4 \ubaa8\ub4e0 \ud504\ub85c\ud1a0\ucf5c \uacc4\uce35\uc740 \ube45 \uc5d4\ub514\uc548 \ubc29\uc2dd\uc744 \ub530\ub978\ub2e4. \uc989 (IP \uc8fc\uc18c, \ud328\ud0b7 \uae38\uc774, \uccb4\ud06c\uc12c \ub4f1) \uacc4\uce35 \ud5e4\ub354\uc5d0 \ub4e4\uc5b4 \uc788\ub294 16\ube44\ud2b8 \uac12\uc774\ub098 32\ube44\ud2b8 \uac12\uc740 \ud56d\uc0c1 \ucd5c\uc0c1\uc704 \ubc14\uc774\ud2b8\ubd80\ud130 \uc804\uc1a1\ud558\uace0 \ubc1b\ub294\ub2e4. \r\n<\/span><p><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">TCP\/IP \ud504\ub85c\ud1a0\ucf5c\uc774 \ub530\ub974\ub294 \ub2e4\uc911\ubc14\uc774\ud2b8 \uc815\uc218 \ud45c\ud604 \ubc29\uc2dd\uc744 \ub124\ud2b8\uc6cc\ud06c \ubc14\uc774\ud2b8 \uc21c\uc11c(network byte order)\ub77c\uace0\ub3c4 \ud55c\ub2e4. \uc591\ub2e8\uc5d0 \uc788\ub294 \ucef4\ud4e8\ud130\uac00 \ub9ac\ud2c0-\uc5d4\ub514\uc548 \ubc29\uc2dd\uc744 \ub530\ub974\ub354\ub77c\ub3c4, \uc804\uc1a1\ud558\ub294 \ucabd \ucef4\ud4e8\ud130\ub294 \ub2e4\uc911\ubc14\uc774\ud2b8 \uc815\uc218\ub97c \ub124\ud2b8\uc6cc\ud06c \ubc14\uc774\ud2b8 \uc21c\uc11c\ub85c \ubcc0\ud658\ud55c \ud6c4 \uc804\uc1a1\ud55c\ub2e4. \uadf8\ub7ec\uba74 \uc218\uc2e0\ud558\ub294 \ucabd \ucef4\ud4e8\ud130\ub294 \ub124\ud2b8\uc6cc\ud06c \ubc14\uc774\ud2b8 \uc21c\uc11c\uc778 \uc815\uc218\ub97c \ubc1b\uc544\uc11c \ub9ac\ud2c0-\uc5d4\ub514\uc548\uc73c\ub85c \ubcc0\ud658\ud55c\ub2e4.<\/span><\/p>\r\n<span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><p><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\uc608\ub97c \ub4e4\uc5b4, IP \uc8fc\uc18c\uac00 192.0.1.2\uc778 \ucef4\ud4e8\ud130\uc640 TCP \uc18c\ucf13\uc73c\ub85c \uc5f0\uacb0\ud558\ub824\uace0 \ud55c\ub2e4. IPv4(Internet Protocol version 4)\ub294 32\ube44\ud2b8 \uc815\uc218\ub97c \uc0ac\uc6a9\ud558\uc5ec \ub124\ud2b8\uc6cc\ud06c \ud638\uc2a4\ud2b8\ub97c \uc2dd\ubcc4\ud558\ubbc0\ub85c IP \uc8fc\uc18c\uac00 192.0.1.2\uc778 \ucef4\ud4e8\ud130\ub97c \ucc3e\uc73c\ub824\uba74 \uc774 IP \uc8fc\uc18c\ub97c 32\ube44\ud2b8 \uc815\uc218\ub85c \ubcc0\ud658\ud574\uc57c \ud55c\ub2e4.<\/span><\/p>\r\n<span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><p><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\uc5ec\uae30\uc11c 80x86 \uae30\ubc18 PC\uac00 \uc2a4\ud30d \uae30\ubc18 \uc11c\ubc84\uc640 \uc778\ud130\ub137\uc73c\ub85c \ud1b5\uc2e0\ud55c\ub2e4\uace0 \uac00\uc815\ud558\uc790. \uc5d4\ub514\uc548 \ubc29\uc2dd\uc744 \uace0\ub824\ud558\uc9c0 \uc54a\ub294\ub2e4\uba74, 80x86 \ud504\ub85c\uc138\uc11c\ub294 192.0.1.2\ub97c \ub9ac\ud2c0 \uc5d4\ub514\uc548 \uc815\uc218 0x020100C0\ub85c \ubcc0\ud658\ud558\uc5ec 02 01 00 C0 \uc21c\uc11c\ub85c \uc804\uc1a1\ud55c\ub2e4. \uadf8\ub7ec\uba74 \uc2a4\ud30d CPU\ub294 02 01 00 C0 \uc21c\uc11c\ub85c \ub4e4\uc5b4\uc624\ub294 \ubc14\uc774\ud2b8\ub97c \ube45 \uc5d4\ub514\uc548 \uc815\uc218 0x020100c0\ub85c \uc778\uc2dd\ud558\uc5ec 2.1.0.192\ub77c\ub294 \uc5c9\ub6b1\ud55c \uc8fc\uc18c\ub97c \uc5bb\ub294\ub2e4.<\/span><\/p>\r\n<span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><p><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">TCP\/IP \uc2a4\ud0dd\uc774 \ub9ac\ud2c0 \uc5d4\ub514\uc548 \ud504\ub85c\uc138\uc11c\uc5d0\uc11c \ub3cc\uc544\uac04\ub2e4\uba74 \uacc4\uce35 \ud5e4\ub354 \ub0b4 \ubaa8\ub4e0 \ub2e4\uc911\ubc14\uc774\ud2b8 \uac12\uc744 \uc2e4\ud589 \uc911\uc5d0 \uc7ac\uc815\ub82c\ud574\uc57c \ud55c\ub2e4. TCP\/IP \uc2a4\ud0dd\uc774 \ube45 \uc5d4\ub514\uc548 \ud504\ub85c\uc138\uc11c\uc5d0\uc11c \ub3cc\uc544\uac04\ub2e4\uba74 \uac71\uc815\ud560 \ud544\uc694\uac00 \uc5c6\ub2e4. \uc5d4\ub514\uc548 \ubc29\uc2dd\uc5d0 \uc0c1\uad00 \uc5c6\uc774 \uc2a4\ud0dd\uc744 \ub3cc\ub9ac\ub824\uba74 \uc7ac\uc815\ub82c \uc5ec\ubd80\ub97c (\ubcf4\ud1b5 \ucef4\ud30c\uc77c \uc2dc\uc5d0) \uacb0\uc815\ud574\uc57c \ud55c\ub2e4.<\/span><\/p>\r\n<span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><p><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\uc774\ub7ec\ud55c \ubcc0\ud658\uc744 \ub3d5\uace0\uc790 \uc18c\ucf13\uc740 \uc790\ub8cc\ub97c \ud638\uc2a4\ud2b8 \uc21c\uc11c\uc5d0\uc11c \ub124\ud2b8\uc6cc\ud06c \ubc14\uc774\ud2b8 \uc21c\uc11c\ub85c \ud639\uc740 \ub124\ud2b8\uc6cc\ud06c \ubc14\uc774\ud2b8 \uc21c\uc11c\uc5d0\uc11c \ud638\uc2a4\ud2b8 \uc21c\uc11c\ub85c \ubcc0\ud658\ud558\ub294 \ub9e4\ud06c\ub85c\ub97c \uc81c\uacf5\ud55c\ub2e4.<\/span><\/p>\r\n<span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><dl><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><dt><strong><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">htons() <\/span><\/strong><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><\/dt><dd><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">16\ube44\ud2b8 unsigned \uac12\uc744 \ud504\ub85c\uc138\uc11c \uc21c\uc11c\uc5d0\uc11c \ub124\ud2b8\uc6cc\ud06c \uc21c\uc11c\ub85c \ubcc0\ud658\ud55c\ub2e4. \ub9e4\ud06c\ub85c \uc774\ub984\uc740 \"host to network short\"\ub97c \uc904\uc778 \ub9d0\uc774\ub2e4. \r\n<\/span><\/dd><dt><strong><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">htonl() <\/span><\/strong><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><\/dt><dd><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">32\ube44\ud2b8 unsigned \uac12\uc744 \ud504\ub85c\uc138\uc11c \uc21c\uc11c\uc5d0\uc11c \ub124\ud2b8\uc6cc\ud06c \uc21c\uc11c\ub85c \ubcc0\ud658\ud55c\ub2e4. \ub9e4\ud06c\ub85c \uc774\ub984\uc740 \"host to network long\"\uc744 \uc904\uc778 \ub9d0\uc774\ub2e4. \r\n<\/span><\/dd><dt><strong><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">ntohs() <\/span><\/strong><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><\/dt><dd><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">16\ube44\ud2b8 unsigned \uac12\uc744 \ub124\ud2b8\uc6cc\ud06c \uc21c\uc11c\uc5d0\uc11c \ud504\ub85c\uc138\uc11c \uc21c\uc11c\ub85c \ubcc0\ud658\ud55c\ub2e4. \ub9e4\ud06c\ub85c \uc774\ub984\uc740 \"network to host short\"\ub97c \uc904\uc778 \ub9d0\uc774\ub2e4. \r\n<\/span><\/dd><dt><strong><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">ntohl() <\/span><\/strong><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><\/dt><dd><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">32\ube44\ud2b8 unsigned \uac12\uc744 \ub124\ud2b8\uc6cc\ud06c \uc21c\uc11c\uc5d0\uc11c \ud504\ub85c\uc138\uc11c \uc21c\uc11c\ub85c \ubcc0\ud658\ud55c\ub2e4. \ub9e4\ud06c\ub85c \uc774\ub984\uc740 \"network to host long\"\uc744 \uc904\uc778 \ub9d0\uc774\ub2e4. <\/span><\/dd><\/dl><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><p><a class=\"con_link\" href=\"http:\/\/www.ibm.com\/developerworks\/kr\/library\/au-endianc\/#list7\" target=\"_blank\" rel=\"noopener\"><font color=\"#5c81a7\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">Listing 7<\/span><\/font><\/a><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\uc5d0 \uc788\ub294 C \ud504\ub85c\uadf8\ub7a8\uc744 \uc0b4\ud3b4\ubcf4\uc790.<\/span><\/p>\r\n<br \/><strong><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">Listing 7. \uc608\uc81c C \ud504\ub85c\uadf8\ub7a8<\/span><\/strong><br \/><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"572\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><tbody><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><tr><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><td class=\"code-outline\"><pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">                 #include &lt;stdio.h&gt;<\/span><\/pre>\n\n<!-- \/wp:post-content -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">main() {<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">    int i;<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">    long x = 0x112A380; \/* \ud14c\uc2a4\ud2b8 \ub300\uc0c1 \uac12 *\/<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">    unsigned char *ptr = (char *) &amp;x; \/* \ubc14\uc774\ud2b8 \ud3ec\uc778\ud130 *\/<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">    \/* \ud638\uc2a4\ud2b8 \ubc14\uc774\ud2b8 \uc21c\uc11c\ub85c \uac12\uc744 \ucd9c\ub825 *\/<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">    printf(\"x in hex: %x\\n\", x);<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">    printf(\"x by bytes: \");<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">    for (i=0; i &lt; sizeof(long); i++)<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">        printf(\"%x\\t\", ptr[i]);<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">   printf(\"\\n\");      \/* \ub124\ud2b8\uc6cc\ud06c \ubc14\uc774\ud2b8 \uc21c\uc11c\ub85c \uac12\uc744 \ucd9c\ub825 *\/     x = htonl(x);<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">    printf(\"\\nAfter htonl()\\n\");<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">    printf(\"x in hex: %x\\n\", x);<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">    printf(\"x by bytes: \");<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">    for (i=0; i &lt; sizeof(long); i++)<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">        printf(\"%x\\t\", ptr[i]);<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">    printf(\"\\n\");<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">}<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<\/td><\/tr><\/tbody><\/table><br \/><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><p><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\uc774 \ud504\ub85c\uadf8\ub7a8\uc740 \uac12\uc774 16\uc9c4\uc218 112A380\uc778 long \ubcc0\uc218 x\uac00 \uc800\uc7a5\ub41c \ubc29\uc2dd\uc744 \uc0b4\ud3b4\ubcf8\ub2e4.<\/span><\/p>\r\n<span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><p><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\uc704 \ud504\ub85c\uadf8\ub7a8\uc744 \ub9ac\ud2c0 \uc5d4\ub514\uc548 \ud504\ub85c\uc138\uc11c\uc5d0\uc11c \uc2e4\ud589\ud558\uba74 <\/span><a class=\"con_link\" href=\"http:\/\/www.ibm.com\/developerworks\/kr\/library\/au-endianc\/#list8\" target=\"_blank\" rel=\"noopener\"><font color=\"#5c81a7\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">Listing 8<\/span><\/font><\/a><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\uacfc \uac19\uc740 \uacb0\uacfc\ub97c \uc5bb\ub294\ub2e4.<\/span><\/p>\r\n<br \/><strong><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">Listing 8. \ub9ac\ud2c0 \uc5d4\ub514\uc548 \ud504\ub85c\uc138\uc11c\uc5d0\uc11c \uc2e4\ud589\ud55c \uacb0\uacfc<\/span><\/strong><br \/><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"572\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><tbody><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><tr><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><td class=\"code-outline\"><pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">                 x in hex: 112a380<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">x by bytes: 80 a3 12 1<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">After htonl()<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">x in hex: 80a31201<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">x by bytes: 1 12 a3 80 <\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<\/td><\/tr><\/tbody><\/table><br \/><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><p><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\ubcc0 \uc218 x\uc5d0\uc11c \uac1c\ubcc4 \ubc14\uc774\ud2b8\ub97c \uc0b4\ud3b4\ubcf4\uba74 \ucd5c\ud558\uc704 \ubc14\uc774\ud2b8 0x80\uc774 \ucd5c\ud558\uc704 \uc8fc\uc18c\uc5d0 \ub193\uc778\ub2e4. \uadf8\ub7ec\ub098 htonl( )\uc744 \ud638\ucd9c\ud558\uc5ec \ub124\ud2b8\uc6cc\ud06c \ubc14\uc774\ud2b8 \uc21c\uc11c\ub85c \ubcc0\ud658\ud558\uba74 \ucd5c\uc0c1\uc704 \ubc14\uc774\ud2b8 0x1\uc774 \ucd5c\ud558\uc704 \uc8fc\uc18c\uc5d0 \ub193\uc778\ub2e4. \ubb3c\ub860 \ubc14\uc774\ud2b8 \uc21c\uc11c\ub97c \ubcc0\ud658\ud55c \ud6c4 x \uac12\uc744 \ucd9c\ub825\ud558\uba74 \uc804\ud600 \uc758\ubbf8 \uc5c6\ub294 \uc22b\uc790\ub97c \uc5bb\ub294\ub2e4.<\/span><\/p>\r\n<span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><p><a class=\"con_link\" href=\"http:\/\/www.ibm.com\/developerworks\/kr\/library\/au-endianc\/#list9\" target=\"_blank\" rel=\"noopener\"><font color=\"#5c81a7\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">Listing 9<\/span><\/font><\/a><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\ub294 \uac19\uc740 \ud504\ub85c\uadf8\ub7a8\uc744 \ube45 \uc5d4\ub514\uc548 \ud504\ub85c\uc138\uc11c\uc5d0\uc11c \uc2e4\ud589\ud55c \uacb0\uacfc\ub2e4.<\/span><\/p>\r\n<br \/><strong><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">Listing 9. \ube45 \uc5d4\ub514\uc548 \ud504\ub85c\uc138\uc11c\uc5d0\uc11c \uc2e4\ud589\ud55c \uacb0\uacfc<\/span><\/strong><br \/><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"572\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><tbody><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><tr><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><td class=\"code-outline\"><pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">                 x in hex: 112a380<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">x by bytes: 1 12 a3 80<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">After htonl()<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">x in hex: 112a380<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<pre class=\"displaycode\"><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">x by bytes: 1 12 a3 80<\/span><\/pre>\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<!-- \/wp:syntaxhighlighter\/code -->\n<\/td><\/tr><\/tbody><\/table><br \/><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><p><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\uc5ec\uae30\uc11c\ub294 \ucd5c\uc0c1\uc704 \ubc14\uc774\ud2b8 0x1\uc774 \ucd5c\ud558\uc704 \uc8fc\uc18c\uc5d0 \ub193\uc778\ub2e4. htonl( )\uc744 \ud638\ucd9c\ud558\uc5ec \ub124\ud2b8\uc6cc\ud06c \ubc14\uc774\ud2b8 \uc21c\uc11c\ub85c \ubcc0\ud658\ud574\ub3c4 x \uac12\uc740 \ubcc0\ud558\uc9c0 \uc54a\ub294\ub2e4. \ub124\ud2b8\uc6cc\ud06c \ubc14\uc774\ud2b8 \uc21c\uc11c\uac00 \uc774\ubbf8 \ube45 \uc5d4\ub514\uc548 \ubc29\uc2dd\uc774\uae30 \ub54c\ubb38\uc774\ub2e4.<\/span><\/p>\r\n<span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><p><br \/><\/p>\r\n<span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\r\n<\/span><p><span style=\"font-family: \uad74\ub9bc\uccb4, &quot;Courier New&quot;, &quot;Lucida Console&quot;;\">\ucd9c\ucc98 : http:\/\/www.cyworld.com\/pimpthesun\/1262789<\/span><br \/><\/p><!-- \/wp:freeform -->","protected":false},"excerpt":{"rendered":"<p>\ub124\ud2b8\uc6cc\ud06c \uc2a4\ud0dd\uacfc \ud1b5\uc2e0 \ud504\ub85c\ud1a0\ucf5c \uc5ed\uc2dc \uc5d4\ub514\uc548 \ubc29\uc2dd\uc744 \uc815\uc758\ud574\uc57c \ud55c\ub2e4. \ub450 \ub178\ub4dc\uac00 \uc5d4\ub514\uc548 \ubc29\uc2dd\uc774 \ub2e4\ub974\uba74 \uc11c\ub85c \ud1b5\uc2e0\ud558\uc9c0 \ubabb\ud558\uae30 \ub54c\ubb38\uc774\ub2e4. \uadf8\ub798\uc11c \uc784\ubca0\ub514\ub4dc \ud504\ub85c\uadf8\ub798\uba38\ub294 \ud2b9\ud788 \uc5d4\ub514\uc548 \ubc29\uc2dd\uc5d0 \uc2e0\uacbd \uc368\uc57c \ud55c\ub2e4. TCP\/IP(Transmission Control Protocol and the Internet Protocol) \ub0b4 \ubaa8\ub4e0 \ud504\ub85c\ud1a0\ucf5c \uacc4\uce35\uc740 \ube45 \uc5d4\ub514\uc548 \ubc29\uc2dd\uc744 \ub530\ub978\ub2e4. \uc989 (IP \uc8fc\uc18c, \ud328\ud0b7 \uae38\uc774, \uccb4\ud06c\uc12c \ub4f1) \uacc4\uce35 \ud5e4\ub354\uc5d0 \ub4e4\uc5b4 \uc788\ub294 16\ube44\ud2b8 \uac12\uc774\ub098 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[20],"tags":[],"class_list":["post-142","post","type-post","status-publish","format-standard","hentry","category-development_network"],"_links":{"self":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=142"}],"version-history":[{"count":0,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/142\/revisions"}],"wp:attachment":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}