mirror of
https://github.com/slackhq/nebula.git
synced 2026-05-16 04:47:38 +02:00
batched tun interface
This commit is contained in:
12
overlay/tio/segment.go
Normal file
12
overlay/tio/segment.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package tio
|
||||
|
||||
import "fmt"
|
||||
|
||||
// SegmentSuperpacket invokes fn once per segment of pkt.
|
||||
// This is a stub implementation that does not actually support segmentation
|
||||
func SegmentSuperpacket(pkt Packet, fn func(seg []byte) error) error {
|
||||
if pkt.GSO.IsSuperpacket() {
|
||||
return fmt.Errorf("tio: GSO superpacket on platform without segmentation support")
|
||||
}
|
||||
return fn(pkt.Bytes)
|
||||
}
|
||||
Reference in New Issue
Block a user