80 likes | 239 Views
CHAPTER 3 소켓 주소 구조체 다루기. Lab 2. Question 1. Try to convert Host Byte <-> Network Byte using hton*() & ntoh*() Try to use Winsock API (refer text book page 72) WSAHton*() WSANtoh*(). u_short i = 0x1357 u_long j = 0x12345678;. Sample Output Question 1. Question 2.
E N D
CHAPTER 3소켓 주소 구조체 다루기 u-Network Design Lab 2
Question 1 • Try to convert Host Byte <-> Network Byte using hton*() & ntoh*() • Try to use Winsock API (refer text book page 72) • WSAHton*() • WSANtoh*() u_short i = 0x1357 u_long j = 0x12345678; u-Network Design
Sample Output Question 1 u-Network Design
Question 2 • Given a Domain Name, return ALL IP Addresses and aliases of the domain name. • Try Domain Name: • www.google.com • www.microsoft.com u-Network Design
Sample Output Question 2 u-Network Design
Question 3 • Converts an IP address in ASCII dotted-decimal format to 32-bit binary format • Converts 32-bit binary format (network byte ordering) back to IP address in ASCII dotted-decimal format IP Address: 218.94.56.119 u-Network Design
Sample Output Question 3 u-Network Design
Thank you u-Network Design