link_tuntap_linux.go 282 B

123456789101112131415
  1. package netlink
  2. // ideally golang.org/x/sys/unix would define IfReq but it only has
  3. // IFNAMSIZ, hence this minimalistic implementation
  4. const (
  5. SizeOfIfReq = 40
  6. IFNAMSIZ = 16
  7. )
  8. type ifReq struct {
  9. Name [IFNAMSIZ]byte
  10. Flags uint16
  11. pad [SizeOfIfReq - IFNAMSIZ - 2]byte
  12. }