📄 uip.lst
字号:
560 .LM73:
561 0312 7091 0000 lds r23,uip_buf+47
562 0316 7230 cpi r23,lo8(2)
563 0318 61F5 brne .L82
513:uip.c **** goto reset;
514:uip.c ****
515:uip.c **** tmpport = BUF->destport;
564 .stabn 68,0,515,.LM74-uip_process
565 .LM74:
566 031a A091 0000 lds r26,uip_buf+36
567 031e B091 0000 lds r27,(uip_buf+36)+1
568 0322 B093 0000 sts (tmpport)+1,r27
GAS LISTING C:\DOCUME~1\pstang\LOCALS~1\Temp/ccSyaaaa.s page 20
569 0326 A093 0000 sts tmpport,r26
516:uip.c **** /* Next, check listening connections. */
517:uip.c **** for(c = 0; c < UIP_LISTENPORTS && uip_listenports[c] != 0; ++c) {
570 .stabn 68,0,517,.LM75-uip_process
571 .LM75:
572 032a 1092 0000 sts c,__zero_reg__
573 032e 4091 0000 lds r20,uip_listenports
574 0332 5091 0000 lds r21,(uip_listenports)+1
575 0336 4115 cp r20,__zero_reg__
576 0338 5105 cpc r21,__zero_reg__
577 033a D9F0 breq .L82
578 .L90:
518:uip.c **** if(tmpport == uip_listenports[c])
579 .stabn 68,0,518,.LM76-uip_process
580 .LM76:
581 033c 6091 0000 lds r22,c
582 0340 E62F mov r30,r22
583 0342 FF27 clr r31
584 0344 EE0F add r30,r30
585 0346 FF1F adc r31,r31
586 0348 E050 subi r30,lo8(-(uip_listenports))
587 034a F040 sbci r31,hi8(-(uip_listenports))
588 034c 2091 0000 lds r18,tmpport
589 0350 3091 0000 lds r19,(tmpport)+1
590 0354 8081 ld r24,Z
591 0356 9181 ldd r25,Z+1
592 0358 2817 cp r18,r24
593 035a 3907 cpc r19,r25
594 035c 09F4 brne .+2
595 035e 7DC0 rjmp .L89
596 .stabn 68,0,517,.LM77-uip_process
597 .LM77:
598 0360 862F mov r24,r22
599 0362 8F5F subi r24,lo8(-(1))
600 0364 8093 0000 sts c,r24
601 0368 8823 tst r24
602 036a 19F4 brne .L82
603 036c 4115 cp r20,__zero_reg__
604 036e 5105 cpc r21,__zero_reg__
605 0370 29F7 brne .L90
606 .L82:
519:uip.c **** goto found_listen;
520:uip.c **** }
521:uip.c ****
522:uip.c **** /* No matching connection found, so we send a RST packet. */
523:uip.c **** UIP_STAT(++uip_stat.tcp.synrst);
524:uip.c **** reset:
525:uip.c ****
526:uip.c **** /* We do not send resets in response to resets. */
527:uip.c **** if(BUF->flags & TCP_RST)
607 .stabn 68,0,527,.LM78-uip_process
608 .LM78:
609 0372 72FD sbrc r23,2
610 0374 7EC3 rjmp .L58
528:uip.c **** goto drop;
529:uip.c ****
530:uip.c **** UIP_STAT(++uip_stat.tcp.rst);
GAS LISTING C:\DOCUME~1\pstang\LOCALS~1\Temp/ccSyaaaa.s page 21
531:uip.c ****
532:uip.c **** BUF->flags = TCP_RST | TCP_ACK;
611 .stabn 68,0,532,.LM79-uip_process
612 .LM79:
613 0376 84E1 ldi r24,lo8(20)
614 0378 8093 0000 sts uip_buf+47,r24
533:uip.c **** uip_len = 40;
615 .stabn 68,0,533,.LM80-uip_process
616 .LM80:
617 037c 88E2 ldi r24,lo8(40)
618 037e 8093 0000 sts uip_len,r24
534:uip.c **** BUF->tcpoffset = 5 << 4;
619 .stabn 68,0,534,.LM81-uip_process
620 .LM81:
621 0382 80E5 ldi r24,lo8(80)
622 0384 8093 0000 sts uip_buf+46,r24
535:uip.c ****
536:uip.c **** /* Flip the seqno and ackno fields in the TCP header. */
537:uip.c **** c = BUF->seqno[3];
623 .stabn 68,0,537,.LM82-uip_process
624 .LM82:
625 0388 9091 0000 lds r25,uip_buf+41
538:uip.c **** BUF->seqno[3] = BUF->ackno[3];
626 .stabn 68,0,538,.LM83-uip_process
627 .LM83:
628 038c 8091 0000 lds r24,uip_buf+45
629 0390 8093 0000 sts uip_buf+41,r24
539:uip.c **** BUF->ackno[3] = c;
540:uip.c ****
541:uip.c **** c = BUF->seqno[2];
630 .stabn 68,0,541,.LM84-uip_process
631 .LM84:
632 0394 3091 0000 lds r19,uip_buf+40
542:uip.c **** BUF->seqno[2] = BUF->ackno[2];
633 .stabn 68,0,542,.LM85-uip_process
634 .LM85:
635 0398 8091 0000 lds r24,uip_buf+44
636 039c 8093 0000 sts uip_buf+40,r24
543:uip.c **** BUF->ackno[2] = c;
637 .stabn 68,0,543,.LM86-uip_process
638 .LM86:
639 03a0 3093 0000 sts uip_buf+44,r19
544:uip.c ****
545:uip.c **** c = BUF->seqno[1];
640 .stabn 68,0,545,.LM87-uip_process
641 .LM87:
642 03a4 4091 0000 lds r20,uip_buf+39
546:uip.c **** BUF->seqno[1] = BUF->ackno[1];
643 .stabn 68,0,546,.LM88-uip_process
644 .LM88:
645 03a8 8091 0000 lds r24,uip_buf+43
646 03ac 8093 0000 sts uip_buf+39,r24
547:uip.c **** BUF->ackno[1] = c;
647 .stabn 68,0,547,.LM89-uip_process
648 .LM89:
649 03b0 4093 0000 sts uip_buf+43,r20
548:uip.c ****
GAS LISTING C:\DOCUME~1\pstang\LOCALS~1\Temp/ccSyaaaa.s page 22
549:uip.c **** c = BUF->seqno[0];
650 .stabn 68,0,549,.LM90-uip_process
651 .LM90:
652 03b4 2091 0000 lds r18,uip_buf+38
653 03b8 2093 0000 sts c,r18
550:uip.c **** BUF->seqno[0] = BUF->ackno[0];
654 .stabn 68,0,550,.LM91-uip_process
655 .LM91:
656 03bc 8091 0000 lds r24,uip_buf+42
657 03c0 8093 0000 sts uip_buf+38,r24
551:uip.c **** BUF->ackno[0] = c;
658 .stabn 68,0,551,.LM92-uip_process
659 .LM92:
660 03c4 2093 0000 sts uip_buf+42,r18
552:uip.c ****
553:uip.c **** /* We also have to increase the sequence number we are
554:uip.c **** acknowledging. If the least significant byte overflowed, we need
555:uip.c **** to propagate the carry to the other bytes as well. */
556:uip.c **** if(++BUF->ackno[3] == 0) {
661 .stabn 68,0,556,.LM93-uip_process
662 .LM93:
663 03c8 9F5F subi r25,lo8(-(1))
664 03ca 9093 0000 sts uip_buf+45,r25
665 03ce 9923 tst r25
666 03d0 79F4 brne .L92
557:uip.c **** if(++BUF->ackno[2] == 0) {
667 .stabn 68,0,557,.LM94-uip_process
668 .LM94:
669 03d2 832F mov r24,r19
670 03d4 8F5F subi r24,lo8(-(1))
671 03d6 8093 0000 sts uip_buf+44,r24
672 03da 8823 tst r24
673 03dc 49F4 brne .L92
558:uip.c **** if(++BUF->ackno[1] == 0) {
674 .stabn 68,0,558,.LM95-uip_process
675 .LM95:
676 03de 842F mov r24,r20
677 03e0 8F5F subi r24,lo8(-(1))
678 03e2 8093 0000 sts uip_buf+43,r24
679 03e6 8823 tst r24
680 03e8 19F4 brne .L92
559:uip.c **** ++BUF->ackno[0];
681 .stabn 68,0,559,.LM96-uip_process
682 .LM96:
683 03ea 2F5F subi r18,lo8(-(1))
684 03ec 2093 0000 sts uip_buf+42,r18
685 .L92:
560:uip.c **** }
561:uip.c **** }
562:uip.c **** }
563:uip.c ****
564:uip.c **** /* Swap port numbers. */
565:uip.c **** tmpport = BUF->srcport;
686 .stabn 68,0,565,.LM97-uip_process
687 .LM97:
688 03f0 2091 0000 lds r18,uip_buf+34
689 03f4 3091 0000 lds r19,(uip_buf+34)+1
GAS LISTING C:\DOCUME~1\pstang\LOCALS~1\Temp/ccSyaaaa.s page 23
566:uip.c **** BUF->srcport = BUF->destport;
690 .stabn 68,0,566,.LM98-uip_process
691 .LM98:
692 03f8 8091 0000 lds r24,uip_buf+36
693 03fc 9091 0000 lds r25,(uip_buf+36)+1
694 0400 9093 0000 sts (uip_buf+34)+1,r25
695 0404 8093 0000 sts uip_buf+34,r24
567:uip.c **** BUF->destport = tmpport;
696 .stabn 68,0,567,.LM99-uip_process
697 .LM99:
698 0408 3093 0000 sts (uip_buf+36)+1,r19
699 040c 2093 0000 sts uip_buf+36,r18
568:uip.c ****
569:uip.c **** /* Swap IP addresses. */
570:uip.c **** tmpport = BUF->destipaddr[0];
700 .stabn 68,0,570,.LM100-uip_process
701 .LM100:
702 0410 2091 0000 lds r18,uip_buf+30
703 0414 3091 0000 lds r19,(uip_buf+30)+1
571:uip.c **** BUF->destipaddr[0] = BUF->srcipaddr[0];
704 .stabn 68,0,571,.LM101-uip_process
705 .LM101:
706 0418 8091 0000 lds r24,uip_buf+26
707 041c 9091 0000 lds r25,(uip_buf+26)+1
708 0420 9093 0000 sts (uip_buf+30)+1,r25
709 0424 8093 0000 sts uip_buf+30,r24
572:uip.c **** BUF->srcipaddr[0] = tmpport;
710 .stabn 68,0,572,.LM102-uip_process
711 .LM102:
712 0428 3093 0000 sts (uip_buf+26)+1,r19
713 042c 2093 0000 sts uip_buf+26,r18
573:uip.c **** tmpport = BUF->destipaddr[1];
714 .stabn 68,0,573,.LM103-uip_process
715 .LM103:
716 0430 2091 0000 lds r18,uip_buf+32
717 0434 3091 0000 lds r19,(uip_buf+32)+1
718 0438 3093 0000 sts (tmpport)+1,r19
719 043c 2093 0000 sts tmpport,r18
574:uip.c **** BUF->destipaddr[1] = BUF->srcipaddr[1];
720 .stabn 68,0,574,.LM104-uip_process
721 .LM104:
722 0440 8091 0000 lds r24,uip_buf+28
723 0444 9091 0000 lds r25,(uip_buf+28)+1
724 0448 9093 0000 sts (uip_buf+32)+1,r25
725 044c 8093 0000 sts uip_buf+32,r24
575:uip.c **** BUF->srcipaddr[1] = tmpport;
726 .stabn 68,0,575,.LM105-uip_process
727 .LM105:
728 0450 3093 0000 sts (uip_buf+28)+1,r19
729 0454 2093 0000 sts uip_buf+28,r18
576:uip.c ****
577:uip.c **** /* And send out the RST packet! */
578:uip.c **** goto tcp_send_noconn;
730 .stabn 68,0,578,.LM106-uip_process
731 .LM106:
732 0458 CDC2 rjmp .L95
733 .L89:
GAS LISTING C:\DOCUME~1\pstang\LOCALS~1\Temp/ccSyaaaa.s page 24
579:uip.c ****
580:uip.c **** /* This label will be jumped to if we matched the incoming packet
581:uip.c **** with a connection in LISTEN. In that case, we should create a new
582:uip.c **** connection and send a SYNACK in return. */
583:uip.c **** found_listen:
584:uip.c **** /* First we check if there are any connections avaliable. Unused
585:uip.c **** connections are kept in the same table as used connections, but
586:uip.c **** unused ones have the tcpstate set to CLOSED. */
587:uip.c **** for(c = 0; c < UIP_CONNS; ++c) {
734 .stabn 68,0,587,.LM107-uip_process
735 .LM107:
736 045a 1092 0000 sts c,__zero_reg__
737 .L102:
588:uip.c **** if(uip_conns[c].tcpstateflags == CLOSED)
738 .stabn 68,0,588,.LM108-uip_process
739 .LM108:
740 045e 4091 0000 lds r20,c
741 0462 242F mov r18,r20
742 0464 3327 clr r19
743 0466 89E1 ldi r24,lo8(25)
744 0468 90E0 ldi r25,hi8(25)
745 046a 289F mul r18,r24
746 046c F001
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -