Debian Codegraph @

packets/dhcp6_layer.go

raw symbols SCIP
1 package packets
2
3 import (
4 "github.com/google/gopacket"
5 "github.com/google/gopacket/layers"
6 )
7
8 type DHCPv6Layer struct {
9 Raw []byte
10 }
11
12 func (l *DHCPv6Layer) LayerType() gopacket.LayerType { return layers.LayerTypeDHCPv6 }
13
14 func (l DHCPv6Layer) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
15 bytes, err := b.PrependBytes(len(l.Raw))
16 if err != nil {
17 return err
18 }
19
20 copy(bytes, l.Raw)
21 return nil
22 }