mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 13:33:21 -07:00
refact: some refactoring to the ipv6 stuff
This commit is contained in:
parent
b5e7b254e4
commit
185950561a
4 changed files with 96 additions and 48 deletions
19
packets/dhcp6_layer.go
Normal file
19
packets/dhcp6_layer.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package packets
|
||||
|
||||
import (
|
||||
"github.com/google/gopacket"
|
||||
)
|
||||
|
||||
type DHCPv6Layer struct {
|
||||
Raw []byte
|
||||
}
|
||||
|
||||
func (l DHCPv6Layer) SerializeTo(b gopacket.SerializeBuffer, opts gopacket.SerializeOptions) error {
|
||||
bytes, err := b.PrependBytes(len(l.Raw))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
copy(bytes, l.Raw)
|
||||
return nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue