Lines Matching refs:htons
279 ah->ar_hrd = htons(ME->sll_hatype); in send_pack()
280 if (ah->ar_hrd == htons(ARPHRD_FDDI)) in send_pack()
281 ah->ar_hrd = htons(ARPHRD_ETHER); in send_pack()
282 ah->ar_pro = htons(ETH_P_IP); in send_pack()
285 ah->ar_op = advert ? htons(ARPOP_REPLY) : htons(ARPOP_REQUEST); in send_pack()
392 if (ah->ar_op != htons(ARPOP_REQUEST) && in recv_pack()
393 ah->ar_op != htons(ARPOP_REPLY)) in recv_pack()
397 if (ah->ar_hrd != htons(FROM->sll_hatype) && in recv_pack()
398 (FROM->sll_hatype != ARPHRD_FDDI || ah->ar_hrd != htons(ARPHRD_ETHER))) in recv_pack()
402 if (ah->ar_pro != htons(ETH_P_IP)) in recv_pack()
443 printf("%s from ", ah->ar_op == htons(ARPOP_REPLY) ? "reply" : "request"); in recv_pack()
472 if (ah->ar_op == htons(ARPOP_REQUEST)) in recv_pack()
1150 saddr.sin_port = htons(1025); in main()
1170 ((struct sockaddr_ll *)&me)->sll_protocol = htons(ETH_P_ARP); in main()