mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-27 14:20:27 +08:00
init
This commit is contained in:
@@ -1,19 +1,22 @@
|
||||
package head
|
||||
|
||||
type Packet struct {
|
||||
DataSZ uint32
|
||||
Proto uint8
|
||||
TTL uint8
|
||||
SrcPort uint16
|
||||
DstPort uint16
|
||||
TTL uint8
|
||||
Src string
|
||||
Dst string
|
||||
Data []byte
|
||||
}
|
||||
|
||||
func NewPacket(proto uint8, srcPort uint16, dstPort uint16, data []byte) *Packet {
|
||||
return &Packet{
|
||||
Proto: proto,
|
||||
TTL: 255,
|
||||
SrcPort: srcPort,
|
||||
DstPort: dstPort,
|
||||
TTL: 255,
|
||||
Data: data,
|
||||
}
|
||||
}
|
||||
@@ -22,6 +25,6 @@ func (p *Packet) UnMashal(data []byte) {
|
||||
|
||||
}
|
||||
|
||||
func (p *Packet) Mashal() []byte {
|
||||
func (p *Packet) Mashal(src string, dst string) []byte {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user