netvfy / go-netvfy-agent

golang netvfy agent
5 stars 1 forks source link

WIP: tuntap creation and reading #2

Closed si74 closed 3 years ago

si74 commented 3 years ago

NOTE: The runCmd, interface creation, etc will be merged into forked tuntap package at a later point. The remainder of this PR (ARP-related code, has been merged into main).

TODOs:

si74 commented 3 years ago

Note: Right now we're shelling out an iproute2 command for route-setting. But discovered that we can use rtnetlink and the netlink sockets to perhaps achieve some of this work.

Take a look at this: https://man7.org/linux/man-pages/man7/netlink.7.html

And at this: https://github.com/vishvananda/netlink

si74 commented 3 years ago

@nicboul as per our chat:

Brainstorming doc here: https://docs.google.com/drawings/d/1roLmnkihKfqFOXS_ZxdSqFfvWaGotA8RPmPBtRcBsck/edit

  1. I'll create an arp.go with general functions in it
  2. will finish back functionality relating to sending arp, waiting for response, etc
  3. reconstitute code from this WIP branch into main PR
  4. then we work together on ARP table cleanup
si74 commented 3 years ago

this code has been integrated into main go client so closing this