gots icon indicating copy to clipboard operation
gots copied to clipboard

packet.PESHeader returns the entire packet payload.

Open mikereedell opened this issue 7 years ago • 0 comments

The function packet.PESHeader is supposed to return just the header for the PES, not the entire packet payload:

Example code:

payload, _ := packet.Payload(pkt)
fmt.Printf("payload start payload: \n%X\n", payload)

pesHeader, _ := packet.PESHeader(pkt)
fmt.Printf("pes header: \n%X\n", pesHeader)

Output:

payload start payload:
000001BD0C32808005210001C55B00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111110101249210124921012492101249210124920000000000000000002EC70B7701CB3F8420281E4083100000000100000003FC6080FE5BB83F3C
pes header:
000001BD0C32808005210001C55B00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111110101249210124921012492101249210124920000000000000000002EC70B7701CB3F8420281E4083100000000100000003FC6080FE5BB83F3C

mikereedell avatar Feb 19 '18 18:02 mikereedell