[pso] eroare enunt tema 5: network byte order

foxX alex.mihaiuc at gmail.com
Mon Aug 18 14:31:40 EEST 2008


enunt: Valorile numerice sunt exprimate in network byte-order.

checker: run: build
       ./test inside $(OUTSIDE_IP) 55555

test.c:
static int do_connect (int type, const char *hostname, unsigned short port)
...
       /* fill the address */
       name.sin_family = AF_INET;
       name.sin_port = htons (port);


pana la urma cum fac sa compar 2 porturi venite la ioctl?

ntohs(a) <=> ntohs(b) sau direct a <=> b ?

--
kthxbai


More information about the pso mailing list