Lines Matching full:fdt
90 int fdt; in setup_tx() local
92 fdt = socket(PF_PACKET, SOCK_RAW, 0); in setup_tx()
93 if (fdt == -1) in setup_tx()
102 if (bind(fdt, (void *)&laddr, sizeof(laddr))) in setup_tx()
103 error(1, errno, "bind fdt"); in setup_tx()
110 if (setsockopt(fdt, SOL_PACKET, PACKET_TX_RING, in setup_tx()
115 PROT_READ | PROT_WRITE, MAP_SHARED, fdt, 0); in setup_tx()
119 return fdt; in setup_tx()
122 static void send_pkt(int fdt, void *slot, char payload_char) in send_pkt() argument
135 ret = sendto(fdt, NULL, 0, 0, NULL, 0); in send_pkt()
162 int fdr, fdt, ret = 0; in main() local
165 fdt = setup_tx(&ring); in main()
167 send_pkt(fdt, ring, payload_patterns[0]); in main()
168 send_pkt(fdt, ring, payload_patterns[1]); in main()
173 if (close(fdt)) in main()