0

I have a software which uses a TUN device to read datapackets, process something on them and send them out. Now I am asking myself, if it is possible, to send the "tun packets" without touching them. Over the TUN device I get IP Packets but over a RAW socket I just can send self defined transport layer packets... Is there a possibility to just take this packet from the TUN device and send it over a network card out?

JUehV
  • 53
  • 7

2 Answers2

1

If anybody is interested in that topic, I wrote a witepaper to wrap up all needed information to use RAW-sockets: http://tuprints.ulb.tu-darmstadt.de/6243/1/TR-18.pdf

JUehV
  • 53
  • 7
0

You didn't enable IP_HDRINCL socket option on the RAW socket? If IP_HDRINCL option is enabled, you can send self defined network layer packets.

Yu Lu
  • 1
  • 1