diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2006-11-10 13:29:14 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:22:04 -0500 |
commit | d83ca5accb256de1b44835cd222bfdc3207bd7dc (patch) | |
tree | c7be8b1f61d4403fe15bd279ecf9d52619134592 /net/dccp/input.c | |
parent | cf557926f6955b4c3fa55e81fdb3675e752e8eed (diff) |
[DCCP]: Update code comments for Step 2/3
Sorts out the comments for processing steps 2,3 in section 8.5 of RFC 4340.
All comments have been updated against this document, and the reference to step
2 has been made consistent throughout the files.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/dccp/input.c')
-rw-r--r-- | net/dccp/input.c | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/net/dccp/input.c b/net/dccp/input.c index 1d24881ac0ab..97ccdc30fd89 100644 --- a/net/dccp/input.c +++ b/net/dccp/input.c | |||
@@ -431,29 +431,25 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb, | |||
431 | 431 | ||
432 | /* | 432 | /* |
433 | * Step 3: Process LISTEN state | 433 | * Step 3: Process LISTEN state |
434 | * (Continuing from dccp_v4_do_rcv and dccp_v6_do_rcv) | ||
435 | * | 434 | * |
436 | * If S.state == LISTEN, | 435 | * If S.state == LISTEN, |
437 | * If P.type == Request or P contains a valid Init Cookie | 436 | * If P.type == Request or P contains a valid Init Cookie option, |
438 | * option, | 437 | * (* Must scan the packet's options to check for Init |
439 | * * Must scan the packet's options to check for an Init | 438 | * Cookies. Only Init Cookies are processed here, |
440 | * Cookie. Only the Init Cookie is processed here, | 439 | * however; other options are processed in Step 8. This |
441 | * however; other options are processed in Step 8. This | 440 | * scan need only be performed if the endpoint uses Init |
442 | * scan need only be performed if the endpoint uses Init | 441 | * Cookies *) |
443 | * Cookies * | 442 | * (* Generate a new socket and switch to that socket *) |
444 | * * Generate a new socket and switch to that socket * | 443 | * Set S := new socket for this port pair |
445 | * Set S := new socket for this port pair | 444 | * S.state = RESPOND |
446 | * S.state = RESPOND | 445 | * Choose S.ISS (initial seqno) or set from Init Cookies |
447 | * Choose S.ISS (initial seqno) or set from Init Cookie | 446 | * Initialize S.GAR := S.ISS |
448 | * Set S.ISR, S.GSR, S.SWL, S.SWH from packet or Init Cookie | 447 | * Set S.ISR, S.GSR, S.SWL, S.SWH from packet or Init |
449 | * Continue with S.state == RESPOND | 448 | * Cookies Continue with S.state == RESPOND |
450 | * * A Response packet will be generated in Step 11 * | 449 | * (* A Response packet will be generated in Step 11 *) |
451 | * Otherwise, | 450 | * Otherwise, |
452 | * Generate Reset(No Connection) unless P.type == Reset | 451 | * Generate Reset(No Connection) unless P.type == Reset |
453 | * Drop packet and return | 452 | * Drop packet and return |
454 | * | ||
455 | * NOTE: the check for the packet types is done in | ||
456 | * dccp_rcv_state_process | ||
457 | */ | 453 | */ |
458 | if (sk->sk_state == DCCP_LISTEN) { | 454 | if (sk->sk_state == DCCP_LISTEN) { |
459 | if (dh->dccph_type == DCCP_PKT_REQUEST) { | 455 | if (dh->dccph_type == DCCP_PKT_REQUEST) { |