Getting IPv6 packages when setting a newly created TAP device up
0
votes
1
answer
330
views
I'm trying to learn how to TCP works by creating a TCP/IP stack, and as the title says, I'm programmatically creating a TAP device in Rust as follows
```rs
pub struct Tap {
fd: i32,
}
#[repr(C)]
struct IFreq {
name: [c_char; IFNAMSIZ],
flags: c_short,
}
impl Tap {
pub fn new(name: &CStr) -> Result {
let fd = unsafe {
let fd = libc::open(b"/dev/net/tun\0".as_ptr() as *const _, libc::O_RDWR);
if fd up` and started reading ethernet frames I seem to only be getting IPv6 frames (ethertype is 0x86DD). Is this normal? How do I stop this from happening? I'm currently only working on implementing IPv4 and don't want to deal with IPv6 traffic.
Asked by nee
(103 rep)
May 22, 2023, 03:51 PM
Last activity: May 23, 2023, 06:09 AM
Last activity: May 23, 2023, 06:09 AM