sockets - how to send/inject packet into local network interface (linux) -


i working on c program on linux (kernel 2.6.18). need send/inject ip packets (e.g., on socket) in linux systems, make same linux "think" these packets incoming host. creat datalink socket , use faked source mac/ip packets sent on socket. destination mac/ip set ones in local linux. however, whether send these packets in user-space program or in kernel module, local linux doesn't think these packets coming outside. example, if create datalink socket send icmp request destined local linux, expect local linux think icmp request coming outside, , respond icmp reply, local linux not so. (however, same program can send faked icmp request host, , host respond icmp reply.)

i did research on topic online, , seems related solution suggest using tap. this virtualbox article says:

... tap no longer necessary on linux bridged networking, ...

i interested know how possible. thanks.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -