(b []byte)
| 44 | } |
| 45 | |
| 46 | func (v *virtioNetHdr) encode(b []byte) error { |
| 47 | if len(b) < virtioNetHdrLen { |
| 48 | return io.ErrShortBuffer |
| 49 | } |
| 50 | copy(b[:virtioNetHdrLen], unsafe.Slice((*byte)(unsafe.Pointer(v)), virtioNetHdrLen)) |
| 51 | return nil |
| 52 | } |
| 53 | |
| 54 | const ( |
| 55 | // virtioNetHdrLen is the length in bytes of virtioNetHdr. This matches the |
no outgoing calls