mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-26 09:31:38 +00:00
Update comments
This commit is contained in:
parent
d3f67ad017
commit
62d4d62a77
@ -557,10 +557,12 @@ func (sinfo *sessionInfo) doSend(bs []byte) {
|
|||||||
// Work out the flowkey - this is used to determine which switch queue
|
// Work out the flowkey - this is used to determine which switch queue
|
||||||
// traffic will be pushed to in the event of congestion
|
// traffic will be pushed to in the event of congestion
|
||||||
var flowkey uint64
|
var flowkey uint64
|
||||||
|
// Get the IP protocol version from the packet
|
||||||
switch bs[0] & 0xf0 {
|
switch bs[0] & 0xf0 {
|
||||||
case 0x40: // IPv4 packet
|
case 0x40: // IPv4 packet
|
||||||
// Check the packet meets minimum UDP packet length
|
// Check the packet meets minimum UDP packet length
|
||||||
if len(bs) >= 24 {
|
if len(bs) >= 24 {
|
||||||
|
// Is the protocol TCP, UDP or SCTP?
|
||||||
if bs[9] == 0x06 || bs[9] == 0x11 || bs[9] == 0x84 {
|
if bs[9] == 0x06 || bs[9] == 0x11 || bs[9] == 0x84 {
|
||||||
ihl := bs[0] & 0x0f * 4 // Header length
|
ihl := bs[0] & 0x0f * 4 // Header length
|
||||||
flowkey = uint64(bs[9])<<32 /* proto */ |
|
flowkey = uint64(bs[9])<<32 /* proto */ |
|
||||||
|
Loading…
Reference in New Issue
Block a user