mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-23 00:29:20 +02:00
Added comments about tunnel magic numbers
This commit is contained in:
parent
45af515f19
commit
f2f163adbd
|
@ -97,9 +97,9 @@ tunnel(int tun_fd, int dns_fd)
|
||||||
|
|
||||||
frame->flags = htons(0x0000);
|
frame->flags = htons(0x0000);
|
||||||
#ifdef LINUX
|
#ifdef LINUX
|
||||||
frame->proto = htons(0x0800);
|
frame->proto = htons(0x0800); // Linux wants ETH_P_IP
|
||||||
#else
|
#else
|
||||||
frame->proto = htons(0x0002);
|
frame->proto = htons(0x0002); // BSD wants AF_INET as long word
|
||||||
#endif
|
#endif
|
||||||
write_tun(tun_fd, frame, buflen + 4);
|
write_tun(tun_fd, frame, buflen + 4);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue