MCPcopy Index your code
hub / github.com/google/gopacket / decodeOSPF

Function decodeOSPF

layers/ospf.go:699–715  ·  view source on GitHub ↗
(data []byte, p gopacket.PacketBuilder)

Source from the content-addressed store, hash-verified

697}
698
699func decodeOSPF(data []byte, p gopacket.PacketBuilder) error {
700 if len(data) < 14 {
701 return fmt.Errorf("Packet too smal for OSPF")
702 }
703
704 switch uint8(data[0]) {
705 case 2:
706 ospf := &OSPFv2{}
707 return decodingLayerDecoder(ospf, data, p)
708 case 3:
709 ospf := &OSPFv3{}
710 return decodingLayerDecoder(ospf, data, p)
711 default:
712 }
713
714 return fmt.Errorf("Unable to determine OSPF type.")
715}

Callers

nothing calls this directly

Calls 1

decodingLayerDecoderFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…