mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Add a Stringer implementation to PacketDispatchMode
PiperOrigin-RevId: 272083936
This commit is contained in:
committed by
gVisor bot
parent
c06cca6678
commit
bcbb3ef317
@@ -82,7 +82,19 @@ const (
|
||||
PacketMMap
|
||||
)
|
||||
|
||||
// An endpoint implements the link-layer using a message-oriented file descriptor.
|
||||
func (p PacketDispatchMode) String() string {
|
||||
switch p {
|
||||
case Readv:
|
||||
return "Readv"
|
||||
case RecvMMsg:
|
||||
return "RecvMMsg"
|
||||
case PacketMMap:
|
||||
return "PacketMMap"
|
||||
default:
|
||||
return fmt.Sprintf("unknown packet dispatch mode %v", p)
|
||||
}
|
||||
}
|
||||
|
||||
type endpoint struct {
|
||||
// fds is the set of file descriptors each identifying one inbound/outbound
|
||||
// channel. The endpoint will dispatch from all inbound channels as well as
|
||||
|
||||
Reference in New Issue
Block a user