Tweak AppleTalk loop
This commit is contained in:
parent
ce3aa5faf5
commit
0d92cd7ba6
1 changed files with 5 additions and 5 deletions
10
main.go
10
main.go
|
@ -214,8 +214,8 @@ func main() {
|
||||||
|
|
||||||
case ethertalk.AppleTalkProto:
|
case ethertalk.AppleTalkProto:
|
||||||
// log.Print("Got an AppleTalk frame")
|
// log.Print("Got an AppleTalk frame")
|
||||||
var ddpkt ddp.ExtPacket
|
ddpkt := new(ddp.ExtPacket)
|
||||||
if err := ddp.ExtUnmarshal(ethFrame.Payload, &ddpkt); err != nil {
|
if err := ddp.ExtUnmarshal(ethFrame.Payload, ddpkt); err != nil {
|
||||||
log.Printf("Couldn't unmarshal DDP packet: %v", err)
|
log.Printf("Couldn't unmarshal DDP packet: %v", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -253,13 +253,13 @@ func main() {
|
||||||
|
|
||||||
switch ddpkt.DstSocket {
|
switch ddpkt.DstSocket {
|
||||||
case 1: // The RTMP socket
|
case 1: // The RTMP socket
|
||||||
rtmpCh <- &ddpkt
|
rtmpCh <- ddpkt
|
||||||
|
|
||||||
case 2: // The NIS (NBP socket)
|
case 2: // The NIS (NBP socket)
|
||||||
nbpCh <- &ddpkt
|
nbpCh <- ddpkt
|
||||||
|
|
||||||
case 4: // The AEP socket
|
case 4: // The AEP socket
|
||||||
if err := handleAEP(pcapHandle, myHWAddr, ethFrame.Src, &ddpkt); err != nil {
|
if err := handleAEP(pcapHandle, myHWAddr, ethFrame.Src, ddpkt); err != nil {
|
||||||
log.Printf("AEP: Couldn't handle: %v", err)
|
log.Printf("AEP: Couldn't handle: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue