Created
September 13, 2018 20:03
-
-
Save Sean-Der/361cea87fe707a3c634beb7dcab2c395 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/internal/network/port-receive.go b/internal/network/port-receive.go | |
| index 4216a7e..12fdd49 100644 | |
| --- a/internal/network/port-receive.go | |
| +++ b/internal/network/port-receive.go | |
| @@ -100,6 +100,7 @@ func (p *port) handleDTLS(raw []byte, srcAddr string) { | |
| } | |
| if len(decrypted) > 0 { | |
| + fmt.Printf("decrypted %v ", decrypted) | |
| p.handleSCTP(decrypted, p.m.sctpAssociation) | |
| } | |
| @@ -147,6 +148,8 @@ func (p *port) networkLoop() { | |
| continue | |
| } | |
| + fmt.Printf("recv %v ", in.buffer) | |
| + | |
| // https://tools.ietf.org/html/rfc5764#page-14 | |
| if 127 < in.buffer[0] && in.buffer[0] < 192 { | |
| p.handleSRTP(in.buffer) | |
| diff --git a/internal/sctp/association.go b/internal/sctp/association.go | |
| index 21be995..4acae71 100644 | |
| --- a/internal/sctp/association.go | |
| +++ b/internal/sctp/association.go | |
| @@ -311,6 +311,7 @@ func (a *Association) handleInit(p *packet, i *chunkInit) *packet { | |
| func (a *Association) handleData(d *chunkPayloadData) *packet { | |
| + fmt.Printf("payloadQueue.push %v %v \n", d, a.peerLastTSN) | |
| a.payloadQueue.push(d, a.peerLastTSN) | |
| pd, popOk := a.payloadQueue.pop(a.peerLastTSN + 1) | |
| @@ -349,6 +350,7 @@ func (a *Association) handleData(d *chunkPayloadData) *packet { | |
| sack.gapAckBlocks = a.payloadQueue.getGapAckBlocks(a.peerLastTSN) | |
| outbound.chunks = []chunk{sack} | |
| + fmt.Printf("handleData outbound %v \n", outbound) | |
| return outbound | |
| } | |
| @@ -422,6 +424,8 @@ func (a *Association) handleChunk(p *packet, c chunk) error { | |
| // TODO: Create ABORT | |
| } | |
| + fmt.Printf("handleChunk %v %v \n", p, c) | |
| + | |
| switch c := c.(type) { | |
| case *chunkInit: | |
| switch a.state { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment