如果我需要创建这样的数据包:
field 1: SOCKS protocol version, 1 byte
field 2: status, 1 byte:
field 3: reserved, must be 0x00
field 4: address type, 1 byte:
field 5: destination address of
1 byte of name length followed by the name for Domain name
field 6: network byte order port number, 2 bytes
char packet[6];
packet[0] = 5;
packet[1] = 0;
packet[2] = 0;
packet[3] = 1;
packet[4] = /* ... ???? ... */;
packet[5] = 80;`
我该如何写packet[4]
(字段 5)www.google.com
?提前致谢。