../build/bt6702/stm32bt6702/stm32bt6702.elf: file format elf32-littlearm Sections: Idx Name Size VMA LMA File off Algn 0 .isr_vector 00000188 08020000 08020000 00008000 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .text 0001844c 08020188 08020188 00008188 2**3 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .ARM 00000008 080385d4 080385d4 000205d4 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .init_array 00000004 080385dc 080385dc 000205dc 2**2 CONTENTS, ALLOC, LOAD, DATA 4 .fini_array 00000004 080385e0 080385e0 000205e0 2**2 CONTENTS, ALLOC, LOAD, DATA 5 .data 0000141c 20000000 080385e4 00028000 2**2 CONTENTS, ALLOC, LOAD, DATA 6 .fill 000865fc 08039a00 08039a00 00029a00 2**0 CONTENTS, ALLOC, LOAD, DATA 7 .crc 00000004 080bfffc 080bfffc 000afffc 2**2 CONTENTS, ALLOC, LOAD, DATA 8 .bss 00013204 2000141c 08039a00 000b141c 2**2 ALLOC 9 ._user_heap_stack 00000200 20014620 0804cc04 000b141c 2**0 ALLOC 10 .memory_b1_text 0000f000 10000000 10000000 000b0000 2**0 ALLOC 11 .ARM.attributes 0000002f 00000000 00000000 000b0000 2**0 CONTENTS, READONLY 12 .debug_info 0003e8ce 00000000 00000000 000b002f 2**0 CONTENTS, READONLY, DEBUGGING 13 .debug_abbrev 0000a863 00000000 00000000 000ee8fd 2**0 CONTENTS, READONLY, DEBUGGING 14 .debug_loc 0001fbab 00000000 00000000 000f9160 2**0 CONTENTS, READONLY, DEBUGGING 15 .debug_aranges 00002948 00000000 00000000 00118d10 2**3 CONTENTS, READONLY, DEBUGGING 16 .debug_ranges 00003110 00000000 00000000 0011b658 2**3 CONTENTS, READONLY, DEBUGGING 17 .debug_macro 0001d792 00000000 00000000 0011e768 2**0 CONTENTS, READONLY, DEBUGGING 18 .debug_line 0001e541 00000000 00000000 0013befa 2**0 CONTENTS, READONLY, DEBUGGING 19 .debug_str 0007d57d 00000000 00000000 0015a43b 2**0 CONTENTS, READONLY, DEBUGGING 20 .comment 00000030 00000000 00000000 001d79b8 2**0 CONTENTS, READONLY 21 .debug_frame 00006920 00000000 00000000 001d79e8 2**2 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: 08020188 : 8020188: b508 push {r3, lr} 802018a: f241 401c movw r0, #5148 ; 0x141c 802018e: 4b07 ldr r3, [pc, #28] ; (80201ac ) 8020190: f2c2 0000 movt r0, #8192 ; 0x2000 8020194: 1a1b subs r3, r3, r0 8020196: 2b06 cmp r3, #6 8020198: d800 bhi.n 802019c 802019a: bd08 pop {r3, pc} 802019c: f240 0300 movw r3, #0 80201a0: f2c0 0300 movt r3, #0 80201a4: 2b00 cmp r3, #0 80201a6: d0f8 beq.n 802019a 80201a8: 4798 blx r3 80201aa: e7f6 b.n 802019a 80201ac: 2000141f .word 0x2000141f 080201b0 : 80201b0: b508 push {r3, lr} 80201b2: f241 401c movw r0, #5148 ; 0x141c 80201b6: f241 431c movw r3, #5148 ; 0x141c 80201ba: f2c2 0000 movt r0, #8192 ; 0x2000 80201be: f2c2 0300 movt r3, #8192 ; 0x2000 80201c2: 1a1b subs r3, r3, r0 80201c4: 109b asrs r3, r3, #2 80201c6: eb03 73d3 add.w r3, r3, r3, lsr #31 80201ca: 1059 asrs r1, r3, #1 80201cc: d100 bne.n 80201d0 80201ce: bd08 pop {r3, pc} 80201d0: f240 0200 movw r2, #0 80201d4: f2c0 0200 movt r2, #0 80201d8: 2a00 cmp r2, #0 80201da: d0f8 beq.n 80201ce 80201dc: 4790 blx r2 80201de: e7f6 b.n 80201ce 080201e0 <__do_global_dtors_aux>: 80201e0: b510 push {r4, lr} 80201e2: f241 441c movw r4, #5148 ; 0x141c 80201e6: f2c2 0400 movt r4, #8192 ; 0x2000 80201ea: 7823 ldrb r3, [r4, #0] 80201ec: b973 cbnz r3, 802020c <__do_global_dtors_aux+0x2c> 80201ee: f7ff ffcb bl 8020188 80201f2: f240 0300 movw r3, #0 80201f6: f2c0 0300 movt r3, #0 80201fa: b12b cbz r3, 8020208 <__do_global_dtors_aux+0x28> 80201fc: f248 50bc movw r0, #34236 ; 0x85bc 8020200: f6c0 0003 movt r0, #2051 ; 0x803 8020204: f3af 8000 nop.w 8020208: 2301 movs r3, #1 802020a: 7023 strb r3, [r4, #0] 802020c: bd10 pop {r4, pc} 802020e: bf00 nop 08020210 : 8020210: b508 push {r3, lr} 8020212: f240 0300 movw r3, #0 8020216: f2c0 0300 movt r3, #0 802021a: b14b cbz r3, 8020230 802021c: f248 50bc movw r0, #34236 ; 0x85bc 8020220: f241 4120 movw r1, #5152 ; 0x1420 8020224: f6c0 0003 movt r0, #2051 ; 0x803 8020228: f2c2 0100 movt r1, #8192 ; 0x2000 802022c: f3af 8000 nop.w 8020230: f241 401c movw r0, #5148 ; 0x141c 8020234: f2c2 0000 movt r0, #8192 ; 0x2000 8020238: 6803 ldr r3, [r0, #0] 802023a: b12b cbz r3, 8020248 802023c: f240 0300 movw r3, #0 8020240: f2c0 0300 movt r3, #0 8020244: b103 cbz r3, 8020248 8020246: 4798 blx r3 8020248: e8bd 4008 ldmia.w sp!, {r3, lr} 802024c: f7ff bfb0 b.w 80201b0 08020250 <__aeabi_drsub>: 8020250: f081 4100 eor.w r1, r1, #2147483648 ; 0x80000000 8020254: e002 b.n 802025c <__adddf3> 8020256: bf00 nop 08020258 <__aeabi_dsub>: 8020258: f083 4300 eor.w r3, r3, #2147483648 ; 0x80000000 0802025c <__adddf3>: 802025c: b530 push {r4, r5, lr} 802025e: ea4f 0441 mov.w r4, r1, lsl #1 8020262: ea4f 0543 mov.w r5, r3, lsl #1 8020266: ea94 0f05 teq r4, r5 802026a: bf08 it eq 802026c: ea90 0f02 teqeq r0, r2 8020270: bf1f itttt ne 8020272: ea54 0c00 orrsne.w ip, r4, r0 8020276: ea55 0c02 orrsne.w ip, r5, r2 802027a: ea7f 5c64 mvnsne.w ip, r4, asr #21 802027e: ea7f 5c65 mvnsne.w ip, r5, asr #21 8020282: f000 80e2 beq.w 802044a <__adddf3+0x1ee> 8020286: ea4f 5454 mov.w r4, r4, lsr #21 802028a: ebd4 5555 rsbs r5, r4, r5, lsr #21 802028e: bfb8 it lt 8020290: 426d neglt r5, r5 8020292: dd0c ble.n 80202ae <__adddf3+0x52> 8020294: 442c add r4, r5 8020296: ea80 0202 eor.w r2, r0, r2 802029a: ea81 0303 eor.w r3, r1, r3 802029e: ea82 0000 eor.w r0, r2, r0 80202a2: ea83 0101 eor.w r1, r3, r1 80202a6: ea80 0202 eor.w r2, r0, r2 80202aa: ea81 0303 eor.w r3, r1, r3 80202ae: 2d36 cmp r5, #54 ; 0x36 80202b0: bf88 it hi 80202b2: bd30 pophi {r4, r5, pc} 80202b4: f011 4f00 tst.w r1, #2147483648 ; 0x80000000 80202b8: ea4f 3101 mov.w r1, r1, lsl #12 80202bc: f44f 1c80 mov.w ip, #1048576 ; 0x100000 80202c0: ea4c 3111 orr.w r1, ip, r1, lsr #12 80202c4: d002 beq.n 80202cc <__adddf3+0x70> 80202c6: 4240 negs r0, r0 80202c8: eb61 0141 sbc.w r1, r1, r1, lsl #1 80202cc: f013 4f00 tst.w r3, #2147483648 ; 0x80000000 80202d0: ea4f 3303 mov.w r3, r3, lsl #12 80202d4: ea4c 3313 orr.w r3, ip, r3, lsr #12 80202d8: d002 beq.n 80202e0 <__adddf3+0x84> 80202da: 4252 negs r2, r2 80202dc: eb63 0343 sbc.w r3, r3, r3, lsl #1 80202e0: ea94 0f05 teq r4, r5 80202e4: f000 80a7 beq.w 8020436 <__adddf3+0x1da> 80202e8: f1a4 0401 sub.w r4, r4, #1 80202ec: f1d5 0e20 rsbs lr, r5, #32 80202f0: db0d blt.n 802030e <__adddf3+0xb2> 80202f2: fa02 fc0e lsl.w ip, r2, lr 80202f6: fa22 f205 lsr.w r2, r2, r5 80202fa: 1880 adds r0, r0, r2 80202fc: f141 0100 adc.w r1, r1, #0 8020300: fa03 f20e lsl.w r2, r3, lr 8020304: 1880 adds r0, r0, r2 8020306: fa43 f305 asr.w r3, r3, r5 802030a: 4159 adcs r1, r3 802030c: e00e b.n 802032c <__adddf3+0xd0> 802030e: f1a5 0520 sub.w r5, r5, #32 8020312: f10e 0e20 add.w lr, lr, #32 8020316: 2a01 cmp r2, #1 8020318: fa03 fc0e lsl.w ip, r3, lr 802031c: bf28 it cs 802031e: f04c 0c02 orrcs.w ip, ip, #2 8020322: fa43 f305 asr.w r3, r3, r5 8020326: 18c0 adds r0, r0, r3 8020328: eb51 71e3 adcs.w r1, r1, r3, asr #31 802032c: f001 4500 and.w r5, r1, #2147483648 ; 0x80000000 8020330: d507 bpl.n 8020342 <__adddf3+0xe6> 8020332: f04f 0e00 mov.w lr, #0 8020336: f1dc 0c00 rsbs ip, ip, #0 802033a: eb7e 0000 sbcs.w r0, lr, r0 802033e: eb6e 0101 sbc.w r1, lr, r1 8020342: f5b1 1f80 cmp.w r1, #1048576 ; 0x100000 8020346: d31b bcc.n 8020380 <__adddf3+0x124> 8020348: f5b1 1f00 cmp.w r1, #2097152 ; 0x200000 802034c: d30c bcc.n 8020368 <__adddf3+0x10c> 802034e: 0849 lsrs r1, r1, #1 8020350: ea5f 0030 movs.w r0, r0, rrx 8020354: ea4f 0c3c mov.w ip, ip, rrx 8020358: f104 0401 add.w r4, r4, #1 802035c: ea4f 5244 mov.w r2, r4, lsl #21 8020360: f512 0f80 cmn.w r2, #4194304 ; 0x400000 8020364: f080 809a bcs.w 802049c <__adddf3+0x240> 8020368: f1bc 4f00 cmp.w ip, #2147483648 ; 0x80000000 802036c: bf08 it eq 802036e: ea5f 0c50 movseq.w ip, r0, lsr #1 8020372: f150 0000 adcs.w r0, r0, #0 8020376: eb41 5104 adc.w r1, r1, r4, lsl #20 802037a: ea41 0105 orr.w r1, r1, r5 802037e: bd30 pop {r4, r5, pc} 8020380: ea5f 0c4c movs.w ip, ip, lsl #1 8020384: 4140 adcs r0, r0 8020386: eb41 0101 adc.w r1, r1, r1 802038a: f411 1f80 tst.w r1, #1048576 ; 0x100000 802038e: f1a4 0401 sub.w r4, r4, #1 8020392: d1e9 bne.n 8020368 <__adddf3+0x10c> 8020394: f091 0f00 teq r1, #0 8020398: bf04 itt eq 802039a: 4601 moveq r1, r0 802039c: 2000 moveq r0, #0 802039e: fab1 f381 clz r3, r1 80203a2: bf08 it eq 80203a4: 3320 addeq r3, #32 80203a6: f1a3 030b sub.w r3, r3, #11 80203aa: f1b3 0220 subs.w r2, r3, #32 80203ae: da0c bge.n 80203ca <__adddf3+0x16e> 80203b0: 320c adds r2, #12 80203b2: dd08 ble.n 80203c6 <__adddf3+0x16a> 80203b4: f102 0c14 add.w ip, r2, #20 80203b8: f1c2 020c rsb r2, r2, #12 80203bc: fa01 f00c lsl.w r0, r1, ip 80203c0: fa21 f102 lsr.w r1, r1, r2 80203c4: e00c b.n 80203e0 <__adddf3+0x184> 80203c6: f102 0214 add.w r2, r2, #20 80203ca: bfd8 it le 80203cc: f1c2 0c20 rsble ip, r2, #32 80203d0: fa01 f102 lsl.w r1, r1, r2 80203d4: fa20 fc0c lsr.w ip, r0, ip 80203d8: bfdc itt le 80203da: ea41 010c orrle.w r1, r1, ip 80203de: 4090 lslle r0, r2 80203e0: 1ae4 subs r4, r4, r3 80203e2: bfa2 ittt ge 80203e4: eb01 5104 addge.w r1, r1, r4, lsl #20 80203e8: 4329 orrge r1, r5 80203ea: bd30 popge {r4, r5, pc} 80203ec: ea6f 0404 mvn.w r4, r4 80203f0: 3c1f subs r4, #31 80203f2: da1c bge.n 802042e <__adddf3+0x1d2> 80203f4: 340c adds r4, #12 80203f6: dc0e bgt.n 8020416 <__adddf3+0x1ba> 80203f8: f104 0414 add.w r4, r4, #20 80203fc: f1c4 0220 rsb r2, r4, #32 8020400: fa20 f004 lsr.w r0, r0, r4 8020404: fa01 f302 lsl.w r3, r1, r2 8020408: ea40 0003 orr.w r0, r0, r3 802040c: fa21 f304 lsr.w r3, r1, r4 8020410: ea45 0103 orr.w r1, r5, r3 8020414: bd30 pop {r4, r5, pc} 8020416: f1c4 040c rsb r4, r4, #12 802041a: f1c4 0220 rsb r2, r4, #32 802041e: fa20 f002 lsr.w r0, r0, r2 8020422: fa01 f304 lsl.w r3, r1, r4 8020426: ea40 0003 orr.w r0, r0, r3 802042a: 4629 mov r1, r5 802042c: bd30 pop {r4, r5, pc} 802042e: fa21 f004 lsr.w r0, r1, r4 8020432: 4629 mov r1, r5 8020434: bd30 pop {r4, r5, pc} 8020436: f094 0f00 teq r4, #0 802043a: f483 1380 eor.w r3, r3, #1048576 ; 0x100000 802043e: bf06 itte eq 8020440: f481 1180 eoreq.w r1, r1, #1048576 ; 0x100000 8020444: 3401 addeq r4, #1 8020446: 3d01 subne r5, #1 8020448: e74e b.n 80202e8 <__adddf3+0x8c> 802044a: ea7f 5c64 mvns.w ip, r4, asr #21 802044e: bf18 it ne 8020450: ea7f 5c65 mvnsne.w ip, r5, asr #21 8020454: d029 beq.n 80204aa <__adddf3+0x24e> 8020456: ea94 0f05 teq r4, r5 802045a: bf08 it eq 802045c: ea90 0f02 teqeq r0, r2 8020460: d005 beq.n 802046e <__adddf3+0x212> 8020462: ea54 0c00 orrs.w ip, r4, r0 8020466: bf04 itt eq 8020468: 4619 moveq r1, r3 802046a: 4610 moveq r0, r2 802046c: bd30 pop {r4, r5, pc} 802046e: ea91 0f03 teq r1, r3 8020472: bf1e ittt ne 8020474: 2100 movne r1, #0 8020476: 2000 movne r0, #0 8020478: bd30 popne {r4, r5, pc} 802047a: ea5f 5c54 movs.w ip, r4, lsr #21 802047e: d105 bne.n 802048c <__adddf3+0x230> 8020480: 0040 lsls r0, r0, #1 8020482: 4149 adcs r1, r1 8020484: bf28 it cs 8020486: f041 4100 orrcs.w r1, r1, #2147483648 ; 0x80000000 802048a: bd30 pop {r4, r5, pc} 802048c: f514 0480 adds.w r4, r4, #4194304 ; 0x400000 8020490: bf3c itt cc 8020492: f501 1180 addcc.w r1, r1, #1048576 ; 0x100000 8020496: bd30 popcc {r4, r5, pc} 8020498: f001 4500 and.w r5, r1, #2147483648 ; 0x80000000 802049c: f045 41fe orr.w r1, r5, #2130706432 ; 0x7f000000 80204a0: f441 0170 orr.w r1, r1, #15728640 ; 0xf00000 80204a4: f04f 0000 mov.w r0, #0 80204a8: bd30 pop {r4, r5, pc} 80204aa: ea7f 5c64 mvns.w ip, r4, asr #21 80204ae: bf1a itte ne 80204b0: 4619 movne r1, r3 80204b2: 4610 movne r0, r2 80204b4: ea7f 5c65 mvnseq.w ip, r5, asr #21 80204b8: bf1c itt ne 80204ba: 460b movne r3, r1 80204bc: 4602 movne r2, r0 80204be: ea50 3401 orrs.w r4, r0, r1, lsl #12 80204c2: bf06 itte eq 80204c4: ea52 3503 orrseq.w r5, r2, r3, lsl #12 80204c8: ea91 0f03 teqeq r1, r3 80204cc: f441 2100 orrne.w r1, r1, #524288 ; 0x80000 80204d0: bd30 pop {r4, r5, pc} 80204d2: bf00 nop 080204d4 <__aeabi_ui2d>: 80204d4: f090 0f00 teq r0, #0 80204d8: bf04 itt eq 80204da: 2100 moveq r1, #0 80204dc: 4770 bxeq lr 80204de: b530 push {r4, r5, lr} 80204e0: f44f 6480 mov.w r4, #1024 ; 0x400 80204e4: f104 0432 add.w r4, r4, #50 ; 0x32 80204e8: f04f 0500 mov.w r5, #0 80204ec: f04f 0100 mov.w r1, #0 80204f0: e750 b.n 8020394 <__adddf3+0x138> 80204f2: bf00 nop 080204f4 <__aeabi_i2d>: 80204f4: f090 0f00 teq r0, #0 80204f8: bf04 itt eq 80204fa: 2100 moveq r1, #0 80204fc: 4770 bxeq lr 80204fe: b530 push {r4, r5, lr} 8020500: f44f 6480 mov.w r4, #1024 ; 0x400 8020504: f104 0432 add.w r4, r4, #50 ; 0x32 8020508: f010 4500 ands.w r5, r0, #2147483648 ; 0x80000000 802050c: bf48 it mi 802050e: 4240 negmi r0, r0 8020510: f04f 0100 mov.w r1, #0 8020514: e73e b.n 8020394 <__adddf3+0x138> 8020516: bf00 nop 08020518 <__aeabi_f2d>: 8020518: 0042 lsls r2, r0, #1 802051a: ea4f 01e2 mov.w r1, r2, asr #3 802051e: ea4f 0131 mov.w r1, r1, rrx 8020522: ea4f 7002 mov.w r0, r2, lsl #28 8020526: bf1f itttt ne 8020528: f012 437f andsne.w r3, r2, #4278190080 ; 0xff000000 802052c: f093 4f7f teqne r3, #4278190080 ; 0xff000000 8020530: f081 5160 eorne.w r1, r1, #939524096 ; 0x38000000 8020534: 4770 bxne lr 8020536: f092 0f00 teq r2, #0 802053a: bf14 ite ne 802053c: f093 4f7f teqne r3, #4278190080 ; 0xff000000 8020540: 4770 bxeq lr 8020542: b530 push {r4, r5, lr} 8020544: f44f 7460 mov.w r4, #896 ; 0x380 8020548: f001 4500 and.w r5, r1, #2147483648 ; 0x80000000 802054c: f021 4100 bic.w r1, r1, #2147483648 ; 0x80000000 8020550: e720 b.n 8020394 <__adddf3+0x138> 8020552: bf00 nop 08020554 <__aeabi_ul2d>: 8020554: ea50 0201 orrs.w r2, r0, r1 8020558: bf08 it eq 802055a: 4770 bxeq lr 802055c: b530 push {r4, r5, lr} 802055e: f04f 0500 mov.w r5, #0 8020562: e00a b.n 802057a <__aeabi_l2d+0x16> 08020564 <__aeabi_l2d>: 8020564: ea50 0201 orrs.w r2, r0, r1 8020568: bf08 it eq 802056a: 4770 bxeq lr 802056c: b530 push {r4, r5, lr} 802056e: f011 4500 ands.w r5, r1, #2147483648 ; 0x80000000 8020572: d502 bpl.n 802057a <__aeabi_l2d+0x16> 8020574: 4240 negs r0, r0 8020576: eb61 0141 sbc.w r1, r1, r1, lsl #1 802057a: f44f 6480 mov.w r4, #1024 ; 0x400 802057e: f104 0432 add.w r4, r4, #50 ; 0x32 8020582: ea5f 5c91 movs.w ip, r1, lsr #22 8020586: f43f aedc beq.w 8020342 <__adddf3+0xe6> 802058a: f04f 0203 mov.w r2, #3 802058e: ea5f 0cdc movs.w ip, ip, lsr #3 8020592: bf18 it ne 8020594: 3203 addne r2, #3 8020596: ea5f 0cdc movs.w ip, ip, lsr #3 802059a: bf18 it ne 802059c: 3203 addne r2, #3 802059e: eb02 02dc add.w r2, r2, ip, lsr #3 80205a2: f1c2 0320 rsb r3, r2, #32 80205a6: fa00 fc03 lsl.w ip, r0, r3 80205aa: fa20 f002 lsr.w r0, r0, r2 80205ae: fa01 fe03 lsl.w lr, r1, r3 80205b2: ea40 000e orr.w r0, r0, lr 80205b6: fa21 f102 lsr.w r1, r1, r2 80205ba: 4414 add r4, r2 80205bc: e6c1 b.n 8020342 <__adddf3+0xe6> 80205be: bf00 nop 080205c0 <__aeabi_dmul>: 80205c0: b570 push {r4, r5, r6, lr} 80205c2: f04f 0cff mov.w ip, #255 ; 0xff 80205c6: f44c 6ce0 orr.w ip, ip, #1792 ; 0x700 80205ca: ea1c 5411 ands.w r4, ip, r1, lsr #20 80205ce: bf1d ittte ne 80205d0: ea1c 5513 andsne.w r5, ip, r3, lsr #20 80205d4: ea94 0f0c teqne r4, ip 80205d8: ea95 0f0c teqne r5, ip 80205dc: f000 f8de bleq 802079c <__aeabi_dmul+0x1dc> 80205e0: 442c add r4, r5 80205e2: ea81 0603 eor.w r6, r1, r3 80205e6: ea21 514c bic.w r1, r1, ip, lsl #21 80205ea: ea23 534c bic.w r3, r3, ip, lsl #21 80205ee: ea50 3501 orrs.w r5, r0, r1, lsl #12 80205f2: bf18 it ne 80205f4: ea52 3503 orrsne.w r5, r2, r3, lsl #12 80205f8: f441 1180 orr.w r1, r1, #1048576 ; 0x100000 80205fc: f443 1380 orr.w r3, r3, #1048576 ; 0x100000 8020600: d038 beq.n 8020674 <__aeabi_dmul+0xb4> 8020602: fba0 ce02 umull ip, lr, r0, r2 8020606: f04f 0500 mov.w r5, #0 802060a: fbe1 e502 umlal lr, r5, r1, r2 802060e: f006 4200 and.w r2, r6, #2147483648 ; 0x80000000 8020612: fbe0 e503 umlal lr, r5, r0, r3 8020616: f04f 0600 mov.w r6, #0 802061a: fbe1 5603 umlal r5, r6, r1, r3 802061e: f09c 0f00 teq ip, #0 8020622: bf18 it ne 8020624: f04e 0e01 orrne.w lr, lr, #1 8020628: f1a4 04ff sub.w r4, r4, #255 ; 0xff 802062c: f5b6 7f00 cmp.w r6, #512 ; 0x200 8020630: f564 7440 sbc.w r4, r4, #768 ; 0x300 8020634: d204 bcs.n 8020640 <__aeabi_dmul+0x80> 8020636: ea5f 0e4e movs.w lr, lr, lsl #1 802063a: 416d adcs r5, r5 802063c: eb46 0606 adc.w r6, r6, r6 8020640: ea42 21c6 orr.w r1, r2, r6, lsl #11 8020644: ea41 5155 orr.w r1, r1, r5, lsr #21 8020648: ea4f 20c5 mov.w r0, r5, lsl #11 802064c: ea40 505e orr.w r0, r0, lr, lsr #21 8020650: ea4f 2ece mov.w lr, lr, lsl #11 8020654: f1b4 0cfd subs.w ip, r4, #253 ; 0xfd 8020658: bf88 it hi 802065a: f5bc 6fe0 cmphi.w ip, #1792 ; 0x700 802065e: d81e bhi.n 802069e <__aeabi_dmul+0xde> 8020660: f1be 4f00 cmp.w lr, #2147483648 ; 0x80000000 8020664: bf08 it eq 8020666: ea5f 0e50 movseq.w lr, r0, lsr #1 802066a: f150 0000 adcs.w r0, r0, #0 802066e: eb41 5104 adc.w r1, r1, r4, lsl #20 8020672: bd70 pop {r4, r5, r6, pc} 8020674: f006 4600 and.w r6, r6, #2147483648 ; 0x80000000 8020678: ea46 0101 orr.w r1, r6, r1 802067c: ea40 0002 orr.w r0, r0, r2 8020680: ea81 0103 eor.w r1, r1, r3 8020684: ebb4 045c subs.w r4, r4, ip, lsr #1 8020688: bfc2 ittt gt 802068a: ebd4 050c rsbsgt r5, r4, ip 802068e: ea41 5104 orrgt.w r1, r1, r4, lsl #20 8020692: bd70 popgt {r4, r5, r6, pc} 8020694: f441 1180 orr.w r1, r1, #1048576 ; 0x100000 8020698: f04f 0e00 mov.w lr, #0 802069c: 3c01 subs r4, #1 802069e: f300 80ab bgt.w 80207f8 <__aeabi_dmul+0x238> 80206a2: f114 0f36 cmn.w r4, #54 ; 0x36 80206a6: bfde ittt le 80206a8: 2000 movle r0, #0 80206aa: f001 4100 andle.w r1, r1, #2147483648 ; 0x80000000 80206ae: bd70 pople {r4, r5, r6, pc} 80206b0: f1c4 0400 rsb r4, r4, #0 80206b4: 3c20 subs r4, #32 80206b6: da35 bge.n 8020724 <__aeabi_dmul+0x164> 80206b8: 340c adds r4, #12 80206ba: dc1b bgt.n 80206f4 <__aeabi_dmul+0x134> 80206bc: f104 0414 add.w r4, r4, #20 80206c0: f1c4 0520 rsb r5, r4, #32 80206c4: fa00 f305 lsl.w r3, r0, r5 80206c8: fa20 f004 lsr.w r0, r0, r4 80206cc: fa01 f205 lsl.w r2, r1, r5 80206d0: ea40 0002 orr.w r0, r0, r2 80206d4: f001 4200 and.w r2, r1, #2147483648 ; 0x80000000 80206d8: f021 4100 bic.w r1, r1, #2147483648 ; 0x80000000 80206dc: eb10 70d3 adds.w r0, r0, r3, lsr #31 80206e0: fa21 f604 lsr.w r6, r1, r4 80206e4: eb42 0106 adc.w r1, r2, r6 80206e8: ea5e 0e43 orrs.w lr, lr, r3, lsl #1 80206ec: bf08 it eq 80206ee: ea20 70d3 biceq.w r0, r0, r3, lsr #31 80206f2: bd70 pop {r4, r5, r6, pc} 80206f4: f1c4 040c rsb r4, r4, #12 80206f8: f1c4 0520 rsb r5, r4, #32 80206fc: fa00 f304 lsl.w r3, r0, r4 8020700: fa20 f005 lsr.w r0, r0, r5 8020704: fa01 f204 lsl.w r2, r1, r4 8020708: ea40 0002 orr.w r0, r0, r2 802070c: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000 8020710: eb10 70d3 adds.w r0, r0, r3, lsr #31 8020714: f141 0100 adc.w r1, r1, #0 8020718: ea5e 0e43 orrs.w lr, lr, r3, lsl #1 802071c: bf08 it eq 802071e: ea20 70d3 biceq.w r0, r0, r3, lsr #31 8020722: bd70 pop {r4, r5, r6, pc} 8020724: f1c4 0520 rsb r5, r4, #32 8020728: fa00 f205 lsl.w r2, r0, r5 802072c: ea4e 0e02 orr.w lr, lr, r2 8020730: fa20 f304 lsr.w r3, r0, r4 8020734: fa01 f205 lsl.w r2, r1, r5 8020738: ea43 0302 orr.w r3, r3, r2 802073c: fa21 f004 lsr.w r0, r1, r4 8020740: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000 8020744: fa21 f204 lsr.w r2, r1, r4 8020748: ea20 0002 bic.w r0, r0, r2 802074c: eb00 70d3 add.w r0, r0, r3, lsr #31 8020750: ea5e 0e43 orrs.w lr, lr, r3, lsl #1 8020754: bf08 it eq 8020756: ea20 70d3 biceq.w r0, r0, r3, lsr #31 802075a: bd70 pop {r4, r5, r6, pc} 802075c: f094 0f00 teq r4, #0 8020760: d10f bne.n 8020782 <__aeabi_dmul+0x1c2> 8020762: f001 4600 and.w r6, r1, #2147483648 ; 0x80000000 8020766: 0040 lsls r0, r0, #1 8020768: eb41 0101 adc.w r1, r1, r1 802076c: f411 1f80 tst.w r1, #1048576 ; 0x100000 8020770: bf08 it eq 8020772: 3c01 subeq r4, #1 8020774: d0f7 beq.n 8020766 <__aeabi_dmul+0x1a6> 8020776: ea41 0106 orr.w r1, r1, r6 802077a: f095 0f00 teq r5, #0 802077e: bf18 it ne 8020780: 4770 bxne lr 8020782: f003 4600 and.w r6, r3, #2147483648 ; 0x80000000 8020786: 0052 lsls r2, r2, #1 8020788: eb43 0303 adc.w r3, r3, r3 802078c: f413 1f80 tst.w r3, #1048576 ; 0x100000 8020790: bf08 it eq 8020792: 3d01 subeq r5, #1 8020794: d0f7 beq.n 8020786 <__aeabi_dmul+0x1c6> 8020796: ea43 0306 orr.w r3, r3, r6 802079a: 4770 bx lr 802079c: ea94 0f0c teq r4, ip 80207a0: ea0c 5513 and.w r5, ip, r3, lsr #20 80207a4: bf18 it ne 80207a6: ea95 0f0c teqne r5, ip 80207aa: d00c beq.n 80207c6 <__aeabi_dmul+0x206> 80207ac: ea50 0641 orrs.w r6, r0, r1, lsl #1 80207b0: bf18 it ne 80207b2: ea52 0643 orrsne.w r6, r2, r3, lsl #1 80207b6: d1d1 bne.n 802075c <__aeabi_dmul+0x19c> 80207b8: ea81 0103 eor.w r1, r1, r3 80207bc: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000 80207c0: f04f 0000 mov.w r0, #0 80207c4: bd70 pop {r4, r5, r6, pc} 80207c6: ea50 0641 orrs.w r6, r0, r1, lsl #1 80207ca: bf06 itte eq 80207cc: 4610 moveq r0, r2 80207ce: 4619 moveq r1, r3 80207d0: ea52 0643 orrsne.w r6, r2, r3, lsl #1 80207d4: d019 beq.n 802080a <__aeabi_dmul+0x24a> 80207d6: ea94 0f0c teq r4, ip 80207da: d102 bne.n 80207e2 <__aeabi_dmul+0x222> 80207dc: ea50 3601 orrs.w r6, r0, r1, lsl #12 80207e0: d113 bne.n 802080a <__aeabi_dmul+0x24a> 80207e2: ea95 0f0c teq r5, ip 80207e6: d105 bne.n 80207f4 <__aeabi_dmul+0x234> 80207e8: ea52 3603 orrs.w r6, r2, r3, lsl #12 80207ec: bf1c itt ne 80207ee: 4610 movne r0, r2 80207f0: 4619 movne r1, r3 80207f2: d10a bne.n 802080a <__aeabi_dmul+0x24a> 80207f4: ea81 0103 eor.w r1, r1, r3 80207f8: f001 4100 and.w r1, r1, #2147483648 ; 0x80000000 80207fc: f041 41fe orr.w r1, r1, #2130706432 ; 0x7f000000 8020800: f441 0170 orr.w r1, r1, #15728640 ; 0xf00000 8020804: f04f 0000 mov.w r0, #0 8020808: bd70 pop {r4, r5, r6, pc} 802080a: f041 41fe orr.w r1, r1, #2130706432 ; 0x7f000000 802080e: f441 0178 orr.w r1, r1, #16252928 ; 0xf80000 8020812: bd70 pop {r4, r5, r6, pc} 08020814 <__aeabi_ddiv>: 8020814: b570 push {r4, r5, r6, lr} 8020816: f04f 0cff mov.w ip, #255 ; 0xff 802081a: f44c 6ce0 orr.w ip, ip, #1792 ; 0x700 802081e: ea1c 5411 ands.w r4, ip, r1, lsr #20 8020822: bf1d ittte ne 8020824: ea1c 5513 andsne.w r5, ip, r3, lsr #20 8020828: ea94 0f0c teqne r4, ip 802082c: ea95 0f0c teqne r5, ip 8020830: f000 f8a7 bleq 8020982 <__aeabi_ddiv+0x16e> 8020834: eba4 0405 sub.w r4, r4, r5 8020838: ea81 0e03 eor.w lr, r1, r3 802083c: ea52 3503 orrs.w r5, r2, r3, lsl #12 8020840: ea4f 3101 mov.w r1, r1, lsl #12 8020844: f000 8088 beq.w 8020958 <__aeabi_ddiv+0x144> 8020848: ea4f 3303 mov.w r3, r3, lsl #12 802084c: f04f 5580 mov.w r5, #268435456 ; 0x10000000 8020850: ea45 1313 orr.w r3, r5, r3, lsr #4 8020854: ea43 6312 orr.w r3, r3, r2, lsr #24 8020858: ea4f 2202 mov.w r2, r2, lsl #8 802085c: ea45 1511 orr.w r5, r5, r1, lsr #4 8020860: ea45 6510 orr.w r5, r5, r0, lsr #24 8020864: ea4f 2600 mov.w r6, r0, lsl #8 8020868: f00e 4100 and.w r1, lr, #2147483648 ; 0x80000000 802086c: 429d cmp r5, r3 802086e: bf08 it eq 8020870: 4296 cmpeq r6, r2 8020872: f144 04fd adc.w r4, r4, #253 ; 0xfd 8020876: f504 7440 add.w r4, r4, #768 ; 0x300 802087a: d202 bcs.n 8020882 <__aeabi_ddiv+0x6e> 802087c: 085b lsrs r3, r3, #1 802087e: ea4f 0232 mov.w r2, r2, rrx 8020882: 1ab6 subs r6, r6, r2 8020884: eb65 0503 sbc.w r5, r5, r3 8020888: 085b lsrs r3, r3, #1 802088a: ea4f 0232 mov.w r2, r2, rrx 802088e: f44f 1080 mov.w r0, #1048576 ; 0x100000 8020892: f44f 2c00 mov.w ip, #524288 ; 0x80000 8020896: ebb6 0e02 subs.w lr, r6, r2 802089a: eb75 0e03 sbcs.w lr, r5, r3 802089e: bf22 ittt cs 80208a0: 1ab6 subcs r6, r6, r2 80208a2: 4675 movcs r5, lr 80208a4: ea40 000c orrcs.w r0, r0, ip 80208a8: 085b lsrs r3, r3, #1 80208aa: ea4f 0232 mov.w r2, r2, rrx 80208ae: ebb6 0e02 subs.w lr, r6, r2 80208b2: eb75 0e03 sbcs.w lr, r5, r3 80208b6: bf22 ittt cs 80208b8: 1ab6 subcs r6, r6, r2 80208ba: 4675 movcs r5, lr 80208bc: ea40 005c orrcs.w r0, r0, ip, lsr #1 80208c0: 085b lsrs r3, r3, #1 80208c2: ea4f 0232 mov.w r2, r2, rrx 80208c6: ebb6 0e02 subs.w lr, r6, r2 80208ca: eb75 0e03 sbcs.w lr, r5, r3 80208ce: bf22 ittt cs 80208d0: 1ab6 subcs r6, r6, r2 80208d2: 4675 movcs r5, lr 80208d4: ea40 009c orrcs.w r0, r0, ip, lsr #2 80208d8: 085b lsrs r3, r3, #1 80208da: ea4f 0232 mov.w r2, r2, rrx 80208de: ebb6 0e02 subs.w lr, r6, r2 80208e2: eb75 0e03 sbcs.w lr, r5, r3 80208e6: bf22 ittt cs 80208e8: 1ab6 subcs r6, r6, r2 80208ea: 4675 movcs r5, lr 80208ec: ea40 00dc orrcs.w r0, r0, ip, lsr #3 80208f0: ea55 0e06 orrs.w lr, r5, r6 80208f4: d018 beq.n 8020928 <__aeabi_ddiv+0x114> 80208f6: ea4f 1505 mov.w r5, r5, lsl #4 80208fa: ea45 7516 orr.w r5, r5, r6, lsr #28 80208fe: ea4f 1606 mov.w r6, r6, lsl #4 8020902: ea4f 03c3 mov.w r3, r3, lsl #3 8020906: ea43 7352 orr.w r3, r3, r2, lsr #29 802090a: ea4f 02c2 mov.w r2, r2, lsl #3 802090e: ea5f 1c1c movs.w ip, ip, lsr #4 8020912: d1c0 bne.n 8020896 <__aeabi_ddiv+0x82> 8020914: f411 1f80 tst.w r1, #1048576 ; 0x100000 8020918: d10b bne.n 8020932 <__aeabi_ddiv+0x11e> 802091a: ea41 0100 orr.w r1, r1, r0 802091e: f04f 0000 mov.w r0, #0 8020922: f04f 4c00 mov.w ip, #2147483648 ; 0x80000000 8020926: e7b6 b.n 8020896 <__aeabi_ddiv+0x82> 8020928: f411 1f80 tst.w r1, #1048576 ; 0x100000 802092c: bf04 itt eq 802092e: 4301 orreq r1, r0 8020930: 2000 moveq r0, #0 8020932: f1b4 0cfd subs.w ip, r4, #253 ; 0xfd 8020936: bf88 it hi 8020938: f5bc 6fe0 cmphi.w ip, #1792 ; 0x700 802093c: f63f aeaf bhi.w 802069e <__aeabi_dmul+0xde> 8020940: ebb5 0c03 subs.w ip, r5, r3 8020944: bf04 itt eq 8020946: ebb6 0c02 subseq.w ip, r6, r2 802094a: ea5f 0c50 movseq.w ip, r0, lsr #1 802094e: f150 0000 adcs.w r0, r0, #0 8020952: eb41 5104 adc.w r1, r1, r4, lsl #20 8020956: bd70 pop {r4, r5, r6, pc} 8020958: f00e 4e00 and.w lr, lr, #2147483648 ; 0x80000000 802095c: ea4e 3111 orr.w r1, lr, r1, lsr #12 8020960: eb14 045c adds.w r4, r4, ip, lsr #1 8020964: bfc2 ittt gt 8020966: ebd4 050c rsbsgt r5, r4, ip 802096a: ea41 5104 orrgt.w r1, r1, r4, lsl #20 802096e: bd70 popgt {r4, r5, r6, pc} 8020970: f441 1180 orr.w r1, r1, #1048576 ; 0x100000 8020974: f04f 0e00 mov.w lr, #0 8020978: 3c01 subs r4, #1 802097a: e690 b.n 802069e <__aeabi_dmul+0xde> 802097c: ea45 0e06 orr.w lr, r5, r6 8020980: e68d b.n 802069e <__aeabi_dmul+0xde> 8020982: ea0c 5513 and.w r5, ip, r3, lsr #20 8020986: ea94 0f0c teq r4, ip 802098a: bf08 it eq 802098c: ea95 0f0c teqeq r5, ip 8020990: f43f af3b beq.w 802080a <__aeabi_dmul+0x24a> 8020994: ea94 0f0c teq r4, ip 8020998: d10a bne.n 80209b0 <__aeabi_ddiv+0x19c> 802099a: ea50 3401 orrs.w r4, r0, r1, lsl #12 802099e: f47f af34 bne.w 802080a <__aeabi_dmul+0x24a> 80209a2: ea95 0f0c teq r5, ip 80209a6: f47f af25 bne.w 80207f4 <__aeabi_dmul+0x234> 80209aa: 4610 mov r0, r2 80209ac: 4619 mov r1, r3 80209ae: e72c b.n 802080a <__aeabi_dmul+0x24a> 80209b0: ea95 0f0c teq r5, ip 80209b4: d106 bne.n 80209c4 <__aeabi_ddiv+0x1b0> 80209b6: ea52 3503 orrs.w r5, r2, r3, lsl #12 80209ba: f43f aefd beq.w 80207b8 <__aeabi_dmul+0x1f8> 80209be: 4610 mov r0, r2 80209c0: 4619 mov r1, r3 80209c2: e722 b.n 802080a <__aeabi_dmul+0x24a> 80209c4: ea50 0641 orrs.w r6, r0, r1, lsl #1 80209c8: bf18 it ne 80209ca: ea52 0643 orrsne.w r6, r2, r3, lsl #1 80209ce: f47f aec5 bne.w 802075c <__aeabi_dmul+0x19c> 80209d2: ea50 0441 orrs.w r4, r0, r1, lsl #1 80209d6: f47f af0d bne.w 80207f4 <__aeabi_dmul+0x234> 80209da: ea52 0543 orrs.w r5, r2, r3, lsl #1 80209de: f47f aeeb bne.w 80207b8 <__aeabi_dmul+0x1f8> 80209e2: e712 b.n 802080a <__aeabi_dmul+0x24a> 080209e4 <__gedf2>: 80209e4: f04f 3cff mov.w ip, #4294967295 80209e8: e006 b.n 80209f8 <__cmpdf2+0x4> 80209ea: bf00 nop 080209ec <__ledf2>: 80209ec: f04f 0c01 mov.w ip, #1 80209f0: e002 b.n 80209f8 <__cmpdf2+0x4> 80209f2: bf00 nop 080209f4 <__cmpdf2>: 80209f4: f04f 0c01 mov.w ip, #1 80209f8: f84d cd04 str.w ip, [sp, #-4]! 80209fc: ea4f 0c41 mov.w ip, r1, lsl #1 8020a00: ea7f 5c6c mvns.w ip, ip, asr #21 8020a04: ea4f 0c43 mov.w ip, r3, lsl #1 8020a08: bf18 it ne 8020a0a: ea7f 5c6c mvnsne.w ip, ip, asr #21 8020a0e: d01b beq.n 8020a48 <__cmpdf2+0x54> 8020a10: b001 add sp, #4 8020a12: ea50 0c41 orrs.w ip, r0, r1, lsl #1 8020a16: bf0c ite eq 8020a18: ea52 0c43 orrseq.w ip, r2, r3, lsl #1 8020a1c: ea91 0f03 teqne r1, r3 8020a20: bf02 ittt eq 8020a22: ea90 0f02 teqeq r0, r2 8020a26: 2000 moveq r0, #0 8020a28: 4770 bxeq lr 8020a2a: f110 0f00 cmn.w r0, #0 8020a2e: ea91 0f03 teq r1, r3 8020a32: bf58 it pl 8020a34: 4299 cmppl r1, r3 8020a36: bf08 it eq 8020a38: 4290 cmpeq r0, r2 8020a3a: bf2c ite cs 8020a3c: 17d8 asrcs r0, r3, #31 8020a3e: ea6f 70e3 mvncc.w r0, r3, asr #31 8020a42: f040 0001 orr.w r0, r0, #1 8020a46: 4770 bx lr 8020a48: ea4f 0c41 mov.w ip, r1, lsl #1 8020a4c: ea7f 5c6c mvns.w ip, ip, asr #21 8020a50: d102 bne.n 8020a58 <__cmpdf2+0x64> 8020a52: ea50 3c01 orrs.w ip, r0, r1, lsl #12 8020a56: d107 bne.n 8020a68 <__cmpdf2+0x74> 8020a58: ea4f 0c43 mov.w ip, r3, lsl #1 8020a5c: ea7f 5c6c mvns.w ip, ip, asr #21 8020a60: d1d6 bne.n 8020a10 <__cmpdf2+0x1c> 8020a62: ea52 3c03 orrs.w ip, r2, r3, lsl #12 8020a66: d0d3 beq.n 8020a10 <__cmpdf2+0x1c> 8020a68: f85d 0b04 ldr.w r0, [sp], #4 8020a6c: 4770 bx lr 8020a6e: bf00 nop 08020a70 <__aeabi_cdrcmple>: 8020a70: 4684 mov ip, r0 8020a72: 4610 mov r0, r2 8020a74: 4662 mov r2, ip 8020a76: 468c mov ip, r1 8020a78: 4619 mov r1, r3 8020a7a: 4663 mov r3, ip 8020a7c: e000 b.n 8020a80 <__aeabi_cdcmpeq> 8020a7e: bf00 nop 08020a80 <__aeabi_cdcmpeq>: 8020a80: b501 push {r0, lr} 8020a82: f7ff ffb7 bl 80209f4 <__cmpdf2> 8020a86: 2800 cmp r0, #0 8020a88: bf48 it mi 8020a8a: f110 0f00 cmnmi.w r0, #0 8020a8e: bd01 pop {r0, pc} 08020a90 <__aeabi_dcmpeq>: 8020a90: f84d ed08 str.w lr, [sp, #-8]! 8020a94: f7ff fff4 bl 8020a80 <__aeabi_cdcmpeq> 8020a98: bf0c ite eq 8020a9a: 2001 moveq r0, #1 8020a9c: 2000 movne r0, #0 8020a9e: f85d fb08 ldr.w pc, [sp], #8 8020aa2: bf00 nop 08020aa4 <__aeabi_dcmplt>: 8020aa4: f84d ed08 str.w lr, [sp, #-8]! 8020aa8: f7ff ffea bl 8020a80 <__aeabi_cdcmpeq> 8020aac: bf34 ite cc 8020aae: 2001 movcc r0, #1 8020ab0: 2000 movcs r0, #0 8020ab2: f85d fb08 ldr.w pc, [sp], #8 8020ab6: bf00 nop 08020ab8 <__aeabi_dcmple>: 8020ab8: f84d ed08 str.w lr, [sp, #-8]! 8020abc: f7ff ffe0 bl 8020a80 <__aeabi_cdcmpeq> 8020ac0: bf94 ite ls 8020ac2: 2001 movls r0, #1 8020ac4: 2000 movhi r0, #0 8020ac6: f85d fb08 ldr.w pc, [sp], #8 8020aca: bf00 nop 08020acc <__aeabi_dcmpge>: 8020acc: f84d ed08 str.w lr, [sp, #-8]! 8020ad0: f7ff ffce bl 8020a70 <__aeabi_cdrcmple> 8020ad4: bf94 ite ls 8020ad6: 2001 movls r0, #1 8020ad8: 2000 movhi r0, #0 8020ada: f85d fb08 ldr.w pc, [sp], #8 8020ade: bf00 nop 08020ae0 <__aeabi_dcmpgt>: 8020ae0: f84d ed08 str.w lr, [sp, #-8]! 8020ae4: f7ff ffc4 bl 8020a70 <__aeabi_cdrcmple> 8020ae8: bf34 ite cc 8020aea: 2001 movcc r0, #1 8020aec: 2000 movcs r0, #0 8020aee: f85d fb08 ldr.w pc, [sp], #8 8020af2: bf00 nop 08020af4 <__aeabi_d2iz>: 8020af4: ea4f 0241 mov.w r2, r1, lsl #1 8020af8: f512 1200 adds.w r2, r2, #2097152 ; 0x200000 8020afc: d215 bcs.n 8020b2a <__aeabi_d2iz+0x36> 8020afe: d511 bpl.n 8020b24 <__aeabi_d2iz+0x30> 8020b00: f46f 7378 mvn.w r3, #992 ; 0x3e0 8020b04: ebb3 5262 subs.w r2, r3, r2, asr #21 8020b08: d912 bls.n 8020b30 <__aeabi_d2iz+0x3c> 8020b0a: ea4f 23c1 mov.w r3, r1, lsl #11 8020b0e: f043 4300 orr.w r3, r3, #2147483648 ; 0x80000000 8020b12: ea43 5350 orr.w r3, r3, r0, lsr #21 8020b16: f011 4f00 tst.w r1, #2147483648 ; 0x80000000 8020b1a: fa23 f002 lsr.w r0, r3, r2 8020b1e: bf18 it ne 8020b20: 4240 negne r0, r0 8020b22: 4770 bx lr 8020b24: f04f 0000 mov.w r0, #0 8020b28: 4770 bx lr 8020b2a: ea50 3001 orrs.w r0, r0, r1, lsl #12 8020b2e: d105 bne.n 8020b3c <__aeabi_d2iz+0x48> 8020b30: f011 4000 ands.w r0, r1, #2147483648 ; 0x80000000 8020b34: bf08 it eq 8020b36: f06f 4000 mvneq.w r0, #2147483648 ; 0x80000000 8020b3a: 4770 bx lr 8020b3c: f04f 0000 mov.w r0, #0 8020b40: 4770 bx lr 8020b42: bf00 nop 08020b44 <__aeabi_uldivmod>: 8020b44: b94b cbnz r3, 8020b5a <__aeabi_uldivmod+0x16> 8020b46: b942 cbnz r2, 8020b5a <__aeabi_uldivmod+0x16> 8020b48: 2900 cmp r1, #0 8020b4a: bf08 it eq 8020b4c: 2800 cmpeq r0, #0 8020b4e: d002 beq.n 8020b56 <__aeabi_uldivmod+0x12> 8020b50: f04f 31ff mov.w r1, #4294967295 8020b54: 4608 mov r0, r1 8020b56: f000 b83b b.w 8020bd0 <__aeabi_idiv0> 8020b5a: b082 sub sp, #8 8020b5c: 46ec mov ip, sp 8020b5e: e92d 5000 stmdb sp!, {ip, lr} 8020b62: f000 f81d bl 8020ba0 <__gnu_uldivmod_helper> 8020b66: f8dd e004 ldr.w lr, [sp, #4] 8020b6a: b002 add sp, #8 8020b6c: bc0c pop {r2, r3} 8020b6e: 4770 bx lr 08020b70 <__gnu_ldivmod_helper>: 8020b70: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8020b74: 4690 mov r8, r2 8020b76: 4699 mov r9, r3 8020b78: 4606 mov r6, r0 8020b7a: 460f mov r7, r1 8020b7c: f000 f82a bl 8020bd4 <__divdi3> 8020b80: 9b08 ldr r3, [sp, #32] 8020b82: fba8 4500 umull r4, r5, r8, r0 8020b86: fb08 f801 mul.w r8, r8, r1 8020b8a: fb00 8209 mla r2, r0, r9, r8 8020b8e: 1955 adds r5, r2, r5 8020b90: 1b34 subs r4, r6, r4 8020b92: eb67 0505 sbc.w r5, r7, r5 8020b96: e9c3 4500 strd r4, r5, [r3] 8020b9a: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8020b9e: bf00 nop 08020ba0 <__gnu_uldivmod_helper>: 8020ba0: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8020ba4: 4690 mov r8, r2 8020ba6: 4606 mov r6, r0 8020ba8: 460f mov r7, r1 8020baa: 461d mov r5, r3 8020bac: f000 f9c8 bl 8020f40 <__udivdi3> 8020bb0: fb00 f305 mul.w r3, r0, r5 8020bb4: fba0 4508 umull r4, r5, r0, r8 8020bb8: fb08 3801 mla r8, r8, r1, r3 8020bbc: 9b06 ldr r3, [sp, #24] 8020bbe: 4445 add r5, r8 8020bc0: 1b34 subs r4, r6, r4 8020bc2: eb67 0505 sbc.w r5, r7, r5 8020bc6: e9c3 4500 strd r4, r5, [r3] 8020bca: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8020bce: bf00 nop 08020bd0 <__aeabi_idiv0>: 8020bd0: 4770 bx lr 8020bd2: bf00 nop 08020bd4 <__divdi3>: 8020bd4: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8020bd8: 2500 movs r5, #0 8020bda: 2900 cmp r1, #0 8020bdc: b085 sub sp, #20 8020bde: 461c mov r4, r3 8020be0: f2c0 8149 blt.w 8020e76 <__divdi3+0x2a2> 8020be4: 2c00 cmp r4, #0 8020be6: f2c0 8141 blt.w 8020e6c <__divdi3+0x298> 8020bea: 468c mov ip, r1 8020bec: 460f mov r7, r1 8020bee: 4682 mov sl, r0 8020bf0: 4691 mov r9, r2 8020bf2: 4614 mov r4, r2 8020bf4: 4606 mov r6, r0 8020bf6: 4619 mov r1, r3 8020bf8: 2b00 cmp r3, #0 8020bfa: d14b bne.n 8020c94 <__divdi3+0xc0> 8020bfc: 4562 cmp r2, ip 8020bfe: d959 bls.n 8020cb4 <__divdi3+0xe0> 8020c00: fab2 f382 clz r3, r2 8020c04: b143 cbz r3, 8020c18 <__divdi3+0x44> 8020c06: f1c3 0220 rsb r2, r3, #32 8020c0a: fa0c f703 lsl.w r7, ip, r3 8020c0e: fa20 f202 lsr.w r2, r0, r2 8020c12: 409c lsls r4, r3 8020c14: 4317 orrs r7, r2 8020c16: 409e lsls r6, r3 8020c18: ea4f 4814 mov.w r8, r4, lsr #16 8020c1c: 4638 mov r0, r7 8020c1e: 4641 mov r1, r8 8020c20: fa1f f984 uxth.w r9, r4 8020c24: f000 fb18 bl 8021258 <__aeabi_uidiv> 8020c28: 4641 mov r1, r8 8020c2a: 4682 mov sl, r0 8020c2c: 4638 mov r0, r7 8020c2e: f000 fc41 bl 80214b4 <__aeabi_uidivmod> 8020c32: 0c33 lsrs r3, r6, #16 8020c34: fb09 f00a mul.w r0, r9, sl 8020c38: ea43 4101 orr.w r1, r3, r1, lsl #16 8020c3c: 4288 cmp r0, r1 8020c3e: d90a bls.n 8020c56 <__divdi3+0x82> 8020c40: 1909 adds r1, r1, r4 8020c42: f10a 32ff add.w r2, sl, #4294967295 8020c46: d205 bcs.n 8020c54 <__divdi3+0x80> 8020c48: 4288 cmp r0, r1 8020c4a: bf84 itt hi 8020c4c: f1aa 0a02 subhi.w sl, sl, #2 8020c50: 1909 addhi r1, r1, r4 8020c52: d800 bhi.n 8020c56 <__divdi3+0x82> 8020c54: 4692 mov sl, r2 8020c56: ebc0 0b01 rsb fp, r0, r1 8020c5a: 4641 mov r1, r8 8020c5c: 4658 mov r0, fp 8020c5e: b2b6 uxth r6, r6 8020c60: f000 fafa bl 8021258 <__aeabi_uidiv> 8020c64: 4641 mov r1, r8 8020c66: 4607 mov r7, r0 8020c68: 4658 mov r0, fp 8020c6a: f000 fc23 bl 80214b4 <__aeabi_uidivmod> 8020c6e: fb09 f907 mul.w r9, r9, r7 8020c72: ea46 4101 orr.w r1, r6, r1, lsl #16 8020c76: 4589 cmp r9, r1 8020c78: d907 bls.n 8020c8a <__divdi3+0xb6> 8020c7a: 1e7b subs r3, r7, #1 8020c7c: 190c adds r4, r1, r4 8020c7e: f080 8157 bcs.w 8020f30 <__divdi3+0x35c> 8020c82: 3f02 subs r7, #2 8020c84: 45a1 cmp r9, r4 8020c86: f240 8153 bls.w 8020f30 <__divdi3+0x35c> 8020c8a: ea47 400a orr.w r0, r7, sl, lsl #16 8020c8e: f04f 0800 mov.w r8, #0 8020c92: e004 b.n 8020c9e <__divdi3+0xca> 8020c94: 4563 cmp r3, ip 8020c96: d958 bls.n 8020d4a <__divdi3+0x176> 8020c98: f04f 0800 mov.w r8, #0 8020c9c: 4640 mov r0, r8 8020c9e: 4602 mov r2, r0 8020ca0: 4643 mov r3, r8 8020ca2: b115 cbz r5, 8020caa <__divdi3+0xd6> 8020ca4: 4252 negs r2, r2 8020ca6: eb63 0343 sbc.w r3, r3, r3, lsl #1 8020caa: 4610 mov r0, r2 8020cac: 4619 mov r1, r3 8020cae: b005 add sp, #20 8020cb0: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8020cb4: b922 cbnz r2, 8020cc0 <__divdi3+0xec> 8020cb6: 2001 movs r0, #1 8020cb8: 4611 mov r1, r2 8020cba: f000 facd bl 8021258 <__aeabi_uidiv> 8020cbe: 4604 mov r4, r0 8020cc0: fab4 f384 clz r3, r4 8020cc4: 2b00 cmp r3, #0 8020cc6: f040 80dc bne.w 8020e82 <__divdi3+0x2ae> 8020cca: 1b3f subs r7, r7, r4 8020ccc: ea4f 4914 mov.w r9, r4, lsr #16 8020cd0: fa1f fa84 uxth.w sl, r4 8020cd4: f04f 0801 mov.w r8, #1 8020cd8: 4649 mov r1, r9 8020cda: 4638 mov r0, r7 8020cdc: f000 fabc bl 8021258 <__aeabi_uidiv> 8020ce0: 4649 mov r1, r9 8020ce2: 4683 mov fp, r0 8020ce4: 4638 mov r0, r7 8020ce6: f000 fbe5 bl 80214b4 <__aeabi_uidivmod> 8020cea: 0c33 lsrs r3, r6, #16 8020cec: fb0a f00b mul.w r0, sl, fp 8020cf0: ea43 4101 orr.w r1, r3, r1, lsl #16 8020cf4: 4288 cmp r0, r1 8020cf6: d90b bls.n 8020d10 <__divdi3+0x13c> 8020cf8: 1909 adds r1, r1, r4 8020cfa: f10b 33ff add.w r3, fp, #4294967295 8020cfe: f080 8115 bcs.w 8020f2c <__divdi3+0x358> 8020d02: 4288 cmp r0, r1 8020d04: bf84 itt hi 8020d06: f1ab 0b02 subhi.w fp, fp, #2 8020d0a: 1909 addhi r1, r1, r4 8020d0c: f240 810e bls.w 8020f2c <__divdi3+0x358> 8020d10: 1a0b subs r3, r1, r0 8020d12: 4649 mov r1, r9 8020d14: 4618 mov r0, r3 8020d16: 9301 str r3, [sp, #4] 8020d18: f000 fa9e bl 8021258 <__aeabi_uidiv> 8020d1c: 9b01 ldr r3, [sp, #4] 8020d1e: 4649 mov r1, r9 8020d20: b2b6 uxth r6, r6 8020d22: 4607 mov r7, r0 8020d24: 4618 mov r0, r3 8020d26: f000 fbc5 bl 80214b4 <__aeabi_uidivmod> 8020d2a: fb0a fa07 mul.w sl, sl, r7 8020d2e: ea46 4101 orr.w r1, r6, r1, lsl #16 8020d32: 458a cmp sl, r1 8020d34: d906 bls.n 8020d44 <__divdi3+0x170> 8020d36: 1e7b subs r3, r7, #1 8020d38: 190c adds r4, r1, r4 8020d3a: d202 bcs.n 8020d42 <__divdi3+0x16e> 8020d3c: 3f02 subs r7, #2 8020d3e: 45a2 cmp sl, r4 8020d40: d800 bhi.n 8020d44 <__divdi3+0x170> 8020d42: 461f mov r7, r3 8020d44: ea47 400b orr.w r0, r7, fp, lsl #16 8020d48: e7a9 b.n 8020c9e <__divdi3+0xca> 8020d4a: fab3 f483 clz r4, r3 8020d4e: 2c00 cmp r4, #0 8020d50: f000 80e4 beq.w 8020f1c <__divdi3+0x348> 8020d54: f1c4 0320 rsb r3, r4, #32 8020d58: fa01 f104 lsl.w r1, r1, r4 8020d5c: fa22 fa03 lsr.w sl, r2, r3 8020d60: fa2c fb03 lsr.w fp, ip, r3 8020d64: ea4a 0a01 orr.w sl, sl, r1 8020d68: fa20 f803 lsr.w r8, r0, r3 8020d6c: fa0c fc04 lsl.w ip, ip, r4 8020d70: 4658 mov r0, fp 8020d72: ea4f 471a mov.w r7, sl, lsr #16 8020d76: ea48 080c orr.w r8, r8, ip 8020d7a: 4639 mov r1, r7 8020d7c: fa02 f904 lsl.w r9, r2, r4 8020d80: f8cd 900c str.w r9, [sp, #12] 8020d84: f000 fa68 bl 8021258 <__aeabi_uidiv> 8020d88: 4639 mov r1, r7 8020d8a: 4681 mov r9, r0 8020d8c: 4658 mov r0, fp 8020d8e: f000 fb91 bl 80214b4 <__aeabi_uidivmod> 8020d92: fa1f fc8a uxth.w ip, sl 8020d96: ea4f 4318 mov.w r3, r8, lsr #16 8020d9a: fb0c f009 mul.w r0, ip, r9 8020d9e: ea43 4301 orr.w r3, r3, r1, lsl #16 8020da2: 4298 cmp r0, r3 8020da4: d90c bls.n 8020dc0 <__divdi3+0x1ec> 8020da6: eb13 030a adds.w r3, r3, sl 8020daa: f109 31ff add.w r1, r9, #4294967295 8020dae: f080 80c3 bcs.w 8020f38 <__divdi3+0x364> 8020db2: 4298 cmp r0, r3 8020db4: bf84 itt hi 8020db6: f1a9 0902 subhi.w r9, r9, #2 8020dba: 4453 addhi r3, sl 8020dbc: f240 80bc bls.w 8020f38 <__divdi3+0x364> 8020dc0: 1a1b subs r3, r3, r0 8020dc2: 4639 mov r1, r7 8020dc4: 4618 mov r0, r3 8020dc6: f8cd c008 str.w ip, [sp, #8] 8020dca: 9301 str r3, [sp, #4] 8020dcc: f000 fa44 bl 8021258 <__aeabi_uidiv> 8020dd0: 9b01 ldr r3, [sp, #4] 8020dd2: 4639 mov r1, r7 8020dd4: fa1f f888 uxth.w r8, r8 8020dd8: 4683 mov fp, r0 8020dda: 4618 mov r0, r3 8020ddc: f000 fb6a bl 80214b4 <__aeabi_uidivmod> 8020de0: f8dd c008 ldr.w ip, [sp, #8] 8020de4: fb0c f30b mul.w r3, ip, fp 8020de8: ea48 4101 orr.w r1, r8, r1, lsl #16 8020dec: 428b cmp r3, r1 8020dee: d90c bls.n 8020e0a <__divdi3+0x236> 8020df0: eb11 010a adds.w r1, r1, sl 8020df4: f10b 30ff add.w r0, fp, #4294967295 8020df8: f080 809c bcs.w 8020f34 <__divdi3+0x360> 8020dfc: 428b cmp r3, r1 8020dfe: bf84 itt hi 8020e00: f1ab 0b02 subhi.w fp, fp, #2 8020e04: 4451 addhi r1, sl 8020e06: f240 8095 bls.w 8020f34 <__divdi3+0x360> 8020e0a: 9f03 ldr r7, [sp, #12] 8020e0c: ea4b 4009 orr.w r0, fp, r9, lsl #16 8020e10: 1ac9 subs r1, r1, r3 8020e12: fa1f fc80 uxth.w ip, r0 8020e16: b2ba uxth r2, r7 8020e18: ea4f 4917 mov.w r9, r7, lsr #16 8020e1c: 0c07 lsrs r7, r0, #16 8020e1e: fb02 f80c mul.w r8, r2, ip 8020e22: fb02 f207 mul.w r2, r2, r7 8020e26: fb09 230c mla r3, r9, ip, r2 8020e2a: fb09 f907 mul.w r9, r9, r7 8020e2e: eb03 4318 add.w r3, r3, r8, lsr #16 8020e32: 429a cmp r2, r3 8020e34: bf88 it hi 8020e36: f509 3980 addhi.w r9, r9, #65536 ; 0x10000 8020e3a: eb09 4913 add.w r9, r9, r3, lsr #16 8020e3e: 4549 cmp r1, r9 8020e40: d310 bcc.n 8020e64 <__divdi3+0x290> 8020e42: fa1f f888 uxth.w r8, r8 8020e46: bf14 ite ne 8020e48: 2200 movne r2, #0 8020e4a: 2201 moveq r2, #1 8020e4c: fa06 f404 lsl.w r4, r6, r4 8020e50: eb08 4303 add.w r3, r8, r3, lsl #16 8020e54: 429c cmp r4, r3 8020e56: bf2c ite cs 8020e58: 2300 movcs r3, #0 8020e5a: f002 0301 andcc.w r3, r2, #1 8020e5e: 2b00 cmp r3, #0 8020e60: f43f af15 beq.w 8020c8e <__divdi3+0xba> 8020e64: 3801 subs r0, #1 8020e66: f04f 0800 mov.w r8, #0 8020e6a: e718 b.n 8020c9e <__divdi3+0xca> 8020e6c: 4252 negs r2, r2 8020e6e: eb63 0343 sbc.w r3, r3, r3, lsl #1 8020e72: 43ed mvns r5, r5 8020e74: e6b9 b.n 8020bea <__divdi3+0x16> 8020e76: 4240 negs r0, r0 8020e78: eb61 0141 sbc.w r1, r1, r1, lsl #1 8020e7c: f04f 35ff mov.w r5, #4294967295 8020e80: e6b0 b.n 8020be4 <__divdi3+0x10> 8020e82: 409c lsls r4, r3 8020e84: f1c3 0b20 rsb fp, r3, #32 8020e88: fa27 f80b lsr.w r8, r7, fp 8020e8c: fa07 f703 lsl.w r7, r7, r3 8020e90: ea4f 4914 mov.w r9, r4, lsr #16 8020e94: 4640 mov r0, r8 8020e96: 4649 mov r1, r9 8020e98: fa26 fb0b lsr.w fp, r6, fp 8020e9c: 409e lsls r6, r3 8020e9e: f000 f9db bl 8021258 <__aeabi_uidiv> 8020ea2: 4649 mov r1, r9 8020ea4: fa1f fa84 uxth.w sl, r4 8020ea8: ea4b 0b07 orr.w fp, fp, r7 8020eac: 4603 mov r3, r0 8020eae: 4640 mov r0, r8 8020eb0: 9301 str r3, [sp, #4] 8020eb2: f000 faff bl 80214b4 <__aeabi_uidivmod> 8020eb6: 9b01 ldr r3, [sp, #4] 8020eb8: ea4f 421b mov.w r2, fp, lsr #16 8020ebc: fb0a f003 mul.w r0, sl, r3 8020ec0: ea42 4101 orr.w r1, r2, r1, lsl #16 8020ec4: 4288 cmp r0, r1 8020ec6: d906 bls.n 8020ed6 <__divdi3+0x302> 8020ec8: 1e5a subs r2, r3, #1 8020eca: 1909 adds r1, r1, r4 8020ecc: d236 bcs.n 8020f3c <__divdi3+0x368> 8020ece: 4288 cmp r0, r1 8020ed0: d934 bls.n 8020f3c <__divdi3+0x368> 8020ed2: 3b02 subs r3, #2 8020ed4: 1909 adds r1, r1, r4 8020ed6: 1a0f subs r7, r1, r0 8020ed8: 4649 mov r1, r9 8020eda: 4638 mov r0, r7 8020edc: 9301 str r3, [sp, #4] 8020ede: f000 f9bb bl 8021258 <__aeabi_uidiv> 8020ee2: 4649 mov r1, r9 8020ee4: fa1f fb8b uxth.w fp, fp 8020ee8: 4680 mov r8, r0 8020eea: 4638 mov r0, r7 8020eec: f000 fae2 bl 80214b4 <__aeabi_uidivmod> 8020ef0: 9b01 ldr r3, [sp, #4] 8020ef2: fb0a f708 mul.w r7, sl, r8 8020ef6: ea4b 4101 orr.w r1, fp, r1, lsl #16 8020efa: 428f cmp r7, r1 8020efc: d90a bls.n 8020f14 <__divdi3+0x340> 8020efe: 1909 adds r1, r1, r4 8020f00: f108 32ff add.w r2, r8, #4294967295 8020f04: d205 bcs.n 8020f12 <__divdi3+0x33e> 8020f06: 428f cmp r7, r1 8020f08: bf84 itt hi 8020f0a: f1a8 0802 subhi.w r8, r8, #2 8020f0e: 1909 addhi r1, r1, r4 8020f10: d800 bhi.n 8020f14 <__divdi3+0x340> 8020f12: 4690 mov r8, r2 8020f14: 1bcf subs r7, r1, r7 8020f16: ea48 4803 orr.w r8, r8, r3, lsl #16 8020f1a: e6dd b.n 8020cd8 <__divdi3+0x104> 8020f1c: 2001 movs r0, #1 8020f1e: 4563 cmp r3, ip 8020f20: bf28 it cs 8020f22: 4552 cmpcs r2, sl 8020f24: 46a0 mov r8, r4 8020f26: f67f aeba bls.w 8020c9e <__divdi3+0xca> 8020f2a: e6b5 b.n 8020c98 <__divdi3+0xc4> 8020f2c: 469b mov fp, r3 8020f2e: e6ef b.n 8020d10 <__divdi3+0x13c> 8020f30: 461f mov r7, r3 8020f32: e6aa b.n 8020c8a <__divdi3+0xb6> 8020f34: 4683 mov fp, r0 8020f36: e768 b.n 8020e0a <__divdi3+0x236> 8020f38: 4689 mov r9, r1 8020f3a: e741 b.n 8020dc0 <__divdi3+0x1ec> 8020f3c: 4613 mov r3, r2 8020f3e: e7ca b.n 8020ed6 <__divdi3+0x302> 08020f40 <__udivdi3>: 8020f40: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8020f44: 4606 mov r6, r0 8020f46: b083 sub sp, #12 8020f48: 460d mov r5, r1 8020f4a: 4614 mov r4, r2 8020f4c: 4607 mov r7, r0 8020f4e: 4688 mov r8, r1 8020f50: 2b00 cmp r3, #0 8020f52: d14a bne.n 8020fea <__udivdi3+0xaa> 8020f54: 428a cmp r2, r1 8020f56: d955 bls.n 8021004 <__udivdi3+0xc4> 8020f58: fab2 f382 clz r3, r2 8020f5c: b14b cbz r3, 8020f72 <__udivdi3+0x32> 8020f5e: f1c3 0220 rsb r2, r3, #32 8020f62: fa01 f803 lsl.w r8, r1, r3 8020f66: fa20 f202 lsr.w r2, r0, r2 8020f6a: 409c lsls r4, r3 8020f6c: ea42 0808 orr.w r8, r2, r8 8020f70: 409f lsls r7, r3 8020f72: 0c25 lsrs r5, r4, #16 8020f74: 4640 mov r0, r8 8020f76: 4629 mov r1, r5 8020f78: fa1f fa84 uxth.w sl, r4 8020f7c: f000 f96c bl 8021258 <__aeabi_uidiv> 8020f80: 4629 mov r1, r5 8020f82: 4681 mov r9, r0 8020f84: 4640 mov r0, r8 8020f86: f000 fa95 bl 80214b4 <__aeabi_uidivmod> 8020f8a: 0c3b lsrs r3, r7, #16 8020f8c: fb0a f009 mul.w r0, sl, r9 8020f90: ea43 4101 orr.w r1, r3, r1, lsl #16 8020f94: 4288 cmp r0, r1 8020f96: d90a bls.n 8020fae <__udivdi3+0x6e> 8020f98: 1909 adds r1, r1, r4 8020f9a: f109 32ff add.w r2, r9, #4294967295 8020f9e: d205 bcs.n 8020fac <__udivdi3+0x6c> 8020fa0: 4288 cmp r0, r1 8020fa2: bf84 itt hi 8020fa4: f1a9 0902 subhi.w r9, r9, #2 8020fa8: 1909 addhi r1, r1, r4 8020faa: d800 bhi.n 8020fae <__udivdi3+0x6e> 8020fac: 4691 mov r9, r2 8020fae: ebc0 0801 rsb r8, r0, r1 8020fb2: 4629 mov r1, r5 8020fb4: 4640 mov r0, r8 8020fb6: b2bf uxth r7, r7 8020fb8: f000 f94e bl 8021258 <__aeabi_uidiv> 8020fbc: 4629 mov r1, r5 8020fbe: 4606 mov r6, r0 8020fc0: 4640 mov r0, r8 8020fc2: f000 fa77 bl 80214b4 <__aeabi_uidivmod> 8020fc6: fb0a fa06 mul.w sl, sl, r6 8020fca: ea47 4101 orr.w r1, r7, r1, lsl #16 8020fce: 458a cmp sl, r1 8020fd0: d907 bls.n 8020fe2 <__udivdi3+0xa2> 8020fd2: 1e73 subs r3, r6, #1 8020fd4: 190c adds r4, r1, r4 8020fd6: f080 8122 bcs.w 802121e <__udivdi3+0x2de> 8020fda: 3e02 subs r6, #2 8020fdc: 45a2 cmp sl, r4 8020fde: f240 811e bls.w 802121e <__udivdi3+0x2de> 8020fe2: ea46 4009 orr.w r0, r6, r9, lsl #16 8020fe6: 2600 movs r6, #0 8020fe8: e058 b.n 802109c <__udivdi3+0x15c> 8020fea: 428b cmp r3, r1 8020fec: d854 bhi.n 8021098 <__udivdi3+0x158> 8020fee: fab3 f483 clz r4, r3 8020ff2: 2c00 cmp r4, #0 8020ff4: d156 bne.n 80210a4 <__udivdi3+0x164> 8020ff6: 428b cmp r3, r1 8020ff8: bf28 it cs 8020ffa: 4282 cmpcs r2, r0 8020ffc: d84c bhi.n 8021098 <__udivdi3+0x158> 8020ffe: 4626 mov r6, r4 8021000: 2001 movs r0, #1 8021002: e04b b.n 802109c <__udivdi3+0x15c> 8021004: b922 cbnz r2, 8021010 <__udivdi3+0xd0> 8021006: 2001 movs r0, #1 8021008: 4611 mov r1, r2 802100a: f000 f925 bl 8021258 <__aeabi_uidiv> 802100e: 4604 mov r4, r0 8021010: fab4 f384 clz r3, r4 8021014: 2b00 cmp r3, #0 8021016: f040 80b9 bne.w 802118c <__udivdi3+0x24c> 802101a: 1b2d subs r5, r5, r4 802101c: ea4f 4814 mov.w r8, r4, lsr #16 8021020: fa1f fa84 uxth.w sl, r4 8021024: 2601 movs r6, #1 8021026: 4641 mov r1, r8 8021028: 4628 mov r0, r5 802102a: f000 f915 bl 8021258 <__aeabi_uidiv> 802102e: 4641 mov r1, r8 8021030: 4681 mov r9, r0 8021032: 4628 mov r0, r5 8021034: f000 fa3e bl 80214b4 <__aeabi_uidivmod> 8021038: 0c3b lsrs r3, r7, #16 802103a: fb0a f009 mul.w r0, sl, r9 802103e: ea43 4101 orr.w r1, r3, r1, lsl #16 8021042: 4288 cmp r0, r1 8021044: d90b bls.n 802105e <__udivdi3+0x11e> 8021046: 1909 adds r1, r1, r4 8021048: f109 33ff add.w r3, r9, #4294967295 802104c: f080 80e9 bcs.w 8021222 <__udivdi3+0x2e2> 8021050: 4288 cmp r0, r1 8021052: bf84 itt hi 8021054: f1a9 0902 subhi.w r9, r9, #2 8021058: 1909 addhi r1, r1, r4 802105a: f240 80e2 bls.w 8021222 <__udivdi3+0x2e2> 802105e: ebc0 0b01 rsb fp, r0, r1 8021062: 4641 mov r1, r8 8021064: 4658 mov r0, fp 8021066: b2bf uxth r7, r7 8021068: f000 f8f6 bl 8021258 <__aeabi_uidiv> 802106c: 4641 mov r1, r8 802106e: 4605 mov r5, r0 8021070: 4658 mov r0, fp 8021072: f000 fa1f bl 80214b4 <__aeabi_uidivmod> 8021076: fb0a fa05 mul.w sl, sl, r5 802107a: ea47 4101 orr.w r1, r7, r1, lsl #16 802107e: 458a cmp sl, r1 8021080: d907 bls.n 8021092 <__udivdi3+0x152> 8021082: 1e6b subs r3, r5, #1 8021084: 190c adds r4, r1, r4 8021086: f080 80ce bcs.w 8021226 <__udivdi3+0x2e6> 802108a: 3d02 subs r5, #2 802108c: 45a2 cmp sl, r4 802108e: f240 80ca bls.w 8021226 <__udivdi3+0x2e6> 8021092: ea45 4009 orr.w r0, r5, r9, lsl #16 8021096: e001 b.n 802109c <__udivdi3+0x15c> 8021098: 2600 movs r6, #0 802109a: 4630 mov r0, r6 802109c: 4631 mov r1, r6 802109e: b003 add sp, #12 80210a0: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80210a4: f1c4 0120 rsb r1, r4, #32 80210a8: fa03 f304 lsl.w r3, r3, r4 80210ac: fa22 f801 lsr.w r8, r2, r1 80210b0: fa25 f701 lsr.w r7, r5, r1 80210b4: ea48 0803 orr.w r8, r8, r3 80210b8: fa20 f101 lsr.w r1, r0, r1 80210bc: fa05 f504 lsl.w r5, r5, r4 80210c0: 4638 mov r0, r7 80210c2: ea4f 4918 mov.w r9, r8, lsr #16 80210c6: 430d orrs r5, r1 80210c8: 4649 mov r1, r9 80210ca: fa02 f204 lsl.w r2, r2, r4 80210ce: 9201 str r2, [sp, #4] 80210d0: f000 f8c2 bl 8021258 <__aeabi_uidiv> 80210d4: 4649 mov r1, r9 80210d6: 4682 mov sl, r0 80210d8: 4638 mov r0, r7 80210da: f000 f9eb bl 80214b4 <__aeabi_uidivmod> 80210de: fa1f f288 uxth.w r2, r8 80210e2: 0c2f lsrs r7, r5, #16 80210e4: fb02 f00a mul.w r0, r2, sl 80210e8: ea47 4701 orr.w r7, r7, r1, lsl #16 80210ec: 42b8 cmp r0, r7 80210ee: d906 bls.n 80210fe <__udivdi3+0x1be> 80210f0: eb17 0708 adds.w r7, r7, r8 80210f4: f10a 31ff add.w r1, sl, #4294967295 80210f8: f0c0 809f bcc.w 802123a <__udivdi3+0x2fa> 80210fc: 468a mov sl, r1 80210fe: 1a3f subs r7, r7, r0 8021100: 4649 mov r1, r9 8021102: 4638 mov r0, r7 8021104: 9200 str r2, [sp, #0] 8021106: f000 f8a7 bl 8021258 <__aeabi_uidiv> 802110a: 4649 mov r1, r9 802110c: b2ad uxth r5, r5 802110e: 4683 mov fp, r0 8021110: 4638 mov r0, r7 8021112: f000 f9cf bl 80214b4 <__aeabi_uidivmod> 8021116: 9a00 ldr r2, [sp, #0] 8021118: fb02 f70b mul.w r7, r2, fp 802111c: ea45 4101 orr.w r1, r5, r1, lsl #16 8021120: 428f cmp r7, r1 8021122: d905 bls.n 8021130 <__udivdi3+0x1f0> 8021124: eb11 0108 adds.w r1, r1, r8 8021128: f10b 32ff add.w r2, fp, #4294967295 802112c: d37d bcc.n 802122a <__udivdi3+0x2ea> 802112e: 4693 mov fp, r2 8021130: 9b01 ldr r3, [sp, #4] 8021132: ea4b 400a orr.w r0, fp, sl, lsl #16 8021136: 1bc9 subs r1, r1, r7 8021138: ea4f 4c10 mov.w ip, r0, lsr #16 802113c: b29d uxth r5, r3 802113e: ea4f 4a13 mov.w sl, r3, lsr #16 8021142: b283 uxth r3, r0 8021144: fb05 f203 mul.w r2, r5, r3 8021148: fb05 f50c mul.w r5, r5, ip 802114c: fb0a 5303 mla r3, sl, r3, r5 8021150: fb0a fa0c mul.w sl, sl, ip 8021154: eb03 4312 add.w r3, r3, r2, lsr #16 8021158: 429d cmp r5, r3 802115a: bf88 it hi 802115c: f50a 3a80 addhi.w sl, sl, #65536 ; 0x10000 8021160: eb0a 4a13 add.w sl, sl, r3, lsr #16 8021164: 4551 cmp r1, sl 8021166: d30e bcc.n 8021186 <__udivdi3+0x246> 8021168: b292 uxth r2, r2 802116a: bf14 ite ne 802116c: 2100 movne r1, #0 802116e: 2101 moveq r1, #1 8021170: fa06 f604 lsl.w r6, r6, r4 8021174: eb02 4303 add.w r3, r2, r3, lsl #16 8021178: 429e cmp r6, r3 802117a: bf2c ite cs 802117c: 2600 movcs r6, #0 802117e: f001 0601 andcc.w r6, r1, #1 8021182: 2e00 cmp r6, #0 8021184: d08a beq.n 802109c <__udivdi3+0x15c> 8021186: 3801 subs r0, #1 8021188: 2600 movs r6, #0 802118a: e787 b.n 802109c <__udivdi3+0x15c> 802118c: 409c lsls r4, r3 802118e: f1c3 0220 rsb r2, r3, #32 8021192: fa25 fa02 lsr.w sl, r5, r2 8021196: fa26 f902 lsr.w r9, r6, r2 802119a: ea4f 4814 mov.w r8, r4, lsr #16 802119e: 4650 mov r0, sl 80211a0: 4641 mov r1, r8 80211a2: fa05 f503 lsl.w r5, r5, r3 80211a6: fa06 f703 lsl.w r7, r6, r3 80211aa: f000 f855 bl 8021258 <__aeabi_uidiv> 80211ae: 4641 mov r1, r8 80211b0: ea49 0905 orr.w r9, r9, r5 80211b4: 4683 mov fp, r0 80211b6: 4650 mov r0, sl 80211b8: f000 f97c bl 80214b4 <__aeabi_uidivmod> 80211bc: fa1f fa84 uxth.w sl, r4 80211c0: ea4f 4319 mov.w r3, r9, lsr #16 80211c4: fb0a f00b mul.w r0, sl, fp 80211c8: ea43 4101 orr.w r1, r3, r1, lsl #16 80211cc: 4288 cmp r0, r1 80211ce: d909 bls.n 80211e4 <__udivdi3+0x2a4> 80211d0: 1909 adds r1, r1, r4 80211d2: f10b 33ff add.w r3, fp, #4294967295 80211d6: d238 bcs.n 802124a <__udivdi3+0x30a> 80211d8: 4288 cmp r0, r1 80211da: bf84 itt hi 80211dc: f1ab 0b02 subhi.w fp, fp, #2 80211e0: 1909 addhi r1, r1, r4 80211e2: d932 bls.n 802124a <__udivdi3+0x30a> 80211e4: 1a0d subs r5, r1, r0 80211e6: 4641 mov r1, r8 80211e8: 4628 mov r0, r5 80211ea: fa1f f989 uxth.w r9, r9 80211ee: f000 f833 bl 8021258 <__aeabi_uidiv> 80211f2: 4641 mov r1, r8 80211f4: 4606 mov r6, r0 80211f6: 4628 mov r0, r5 80211f8: f000 f95c bl 80214b4 <__aeabi_uidivmod> 80211fc: fb0a f506 mul.w r5, sl, r6 8021200: ea49 4101 orr.w r1, r9, r1, lsl #16 8021204: 428d cmp r5, r1 8021206: d906 bls.n 8021216 <__udivdi3+0x2d6> 8021208: 1e73 subs r3, r6, #1 802120a: 1909 adds r1, r1, r4 802120c: d21f bcs.n 802124e <__udivdi3+0x30e> 802120e: 428d cmp r5, r1 8021210: d91d bls.n 802124e <__udivdi3+0x30e> 8021212: 3e02 subs r6, #2 8021214: 1909 adds r1, r1, r4 8021216: 1b4d subs r5, r1, r5 8021218: ea46 460b orr.w r6, r6, fp, lsl #16 802121c: e703 b.n 8021026 <__udivdi3+0xe6> 802121e: 461e mov r6, r3 8021220: e6df b.n 8020fe2 <__udivdi3+0xa2> 8021222: 4699 mov r9, r3 8021224: e71b b.n 802105e <__udivdi3+0x11e> 8021226: 461d mov r5, r3 8021228: e733 b.n 8021092 <__udivdi3+0x152> 802122a: 428f cmp r7, r1 802122c: bf84 itt hi 802122e: f1ab 0b02 subhi.w fp, fp, #2 8021232: 4441 addhi r1, r8 8021234: f63f af7c bhi.w 8021130 <__udivdi3+0x1f0> 8021238: e779 b.n 802112e <__udivdi3+0x1ee> 802123a: 42b8 cmp r0, r7 802123c: bf84 itt hi 802123e: f1aa 0a02 subhi.w sl, sl, #2 8021242: 4447 addhi r7, r8 8021244: f63f af5b bhi.w 80210fe <__udivdi3+0x1be> 8021248: e758 b.n 80210fc <__udivdi3+0x1bc> 802124a: 469b mov fp, r3 802124c: e7ca b.n 80211e4 <__udivdi3+0x2a4> 802124e: 461e mov r6, r3 8021250: e7e1 b.n 8021216 <__udivdi3+0x2d6> 8021252: bf00 nop 8021254: 0000 movs r0, r0 8021256: 0000 movs r0, r0 08021258 <__aeabi_uidiv>: 8021258: 1e4a subs r2, r1, #1 802125a: bf08 it eq 802125c: 4770 bxeq lr 802125e: f0c0 8124 bcc.w 80214aa <__aeabi_uidiv+0x252> 8021262: 4288 cmp r0, r1 8021264: f240 8116 bls.w 8021494 <__aeabi_uidiv+0x23c> 8021268: 4211 tst r1, r2 802126a: f000 8117 beq.w 802149c <__aeabi_uidiv+0x244> 802126e: fab0 f380 clz r3, r0 8021272: fab1 f281 clz r2, r1 8021276: eba2 0303 sub.w r3, r2, r3 802127a: f1c3 031f rsb r3, r3, #31 802127e: a204 add r2, pc, #16 ; (adr r2, 8021290 <__aeabi_uidiv+0x38>) 8021280: eb02 1303 add.w r3, r2, r3, lsl #4 8021284: f04f 0200 mov.w r2, #0 8021288: 469f mov pc, r3 802128a: bf00 nop 802128c: f3af 8000 nop.w 8021290: ebb0 7fc1 cmp.w r0, r1, lsl #31 8021294: bf00 nop 8021296: eb42 0202 adc.w r2, r2, r2 802129a: bf28 it cs 802129c: eba0 70c1 subcs.w r0, r0, r1, lsl #31 80212a0: ebb0 7f81 cmp.w r0, r1, lsl #30 80212a4: bf00 nop 80212a6: eb42 0202 adc.w r2, r2, r2 80212aa: bf28 it cs 80212ac: eba0 7081 subcs.w r0, r0, r1, lsl #30 80212b0: ebb0 7f41 cmp.w r0, r1, lsl #29 80212b4: bf00 nop 80212b6: eb42 0202 adc.w r2, r2, r2 80212ba: bf28 it cs 80212bc: eba0 7041 subcs.w r0, r0, r1, lsl #29 80212c0: ebb0 7f01 cmp.w r0, r1, lsl #28 80212c4: bf00 nop 80212c6: eb42 0202 adc.w r2, r2, r2 80212ca: bf28 it cs 80212cc: eba0 7001 subcs.w r0, r0, r1, lsl #28 80212d0: ebb0 6fc1 cmp.w r0, r1, lsl #27 80212d4: bf00 nop 80212d6: eb42 0202 adc.w r2, r2, r2 80212da: bf28 it cs 80212dc: eba0 60c1 subcs.w r0, r0, r1, lsl #27 80212e0: ebb0 6f81 cmp.w r0, r1, lsl #26 80212e4: bf00 nop 80212e6: eb42 0202 adc.w r2, r2, r2 80212ea: bf28 it cs 80212ec: eba0 6081 subcs.w r0, r0, r1, lsl #26 80212f0: ebb0 6f41 cmp.w r0, r1, lsl #25 80212f4: bf00 nop 80212f6: eb42 0202 adc.w r2, r2, r2 80212fa: bf28 it cs 80212fc: eba0 6041 subcs.w r0, r0, r1, lsl #25 8021300: ebb0 6f01 cmp.w r0, r1, lsl #24 8021304: bf00 nop 8021306: eb42 0202 adc.w r2, r2, r2 802130a: bf28 it cs 802130c: eba0 6001 subcs.w r0, r0, r1, lsl #24 8021310: ebb0 5fc1 cmp.w r0, r1, lsl #23 8021314: bf00 nop 8021316: eb42 0202 adc.w r2, r2, r2 802131a: bf28 it cs 802131c: eba0 50c1 subcs.w r0, r0, r1, lsl #23 8021320: ebb0 5f81 cmp.w r0, r1, lsl #22 8021324: bf00 nop 8021326: eb42 0202 adc.w r2, r2, r2 802132a: bf28 it cs 802132c: eba0 5081 subcs.w r0, r0, r1, lsl #22 8021330: ebb0 5f41 cmp.w r0, r1, lsl #21 8021334: bf00 nop 8021336: eb42 0202 adc.w r2, r2, r2 802133a: bf28 it cs 802133c: eba0 5041 subcs.w r0, r0, r1, lsl #21 8021340: ebb0 5f01 cmp.w r0, r1, lsl #20 8021344: bf00 nop 8021346: eb42 0202 adc.w r2, r2, r2 802134a: bf28 it cs 802134c: eba0 5001 subcs.w r0, r0, r1, lsl #20 8021350: ebb0 4fc1 cmp.w r0, r1, lsl #19 8021354: bf00 nop 8021356: eb42 0202 adc.w r2, r2, r2 802135a: bf28 it cs 802135c: eba0 40c1 subcs.w r0, r0, r1, lsl #19 8021360: ebb0 4f81 cmp.w r0, r1, lsl #18 8021364: bf00 nop 8021366: eb42 0202 adc.w r2, r2, r2 802136a: bf28 it cs 802136c: eba0 4081 subcs.w r0, r0, r1, lsl #18 8021370: ebb0 4f41 cmp.w r0, r1, lsl #17 8021374: bf00 nop 8021376: eb42 0202 adc.w r2, r2, r2 802137a: bf28 it cs 802137c: eba0 4041 subcs.w r0, r0, r1, lsl #17 8021380: ebb0 4f01 cmp.w r0, r1, lsl #16 8021384: bf00 nop 8021386: eb42 0202 adc.w r2, r2, r2 802138a: bf28 it cs 802138c: eba0 4001 subcs.w r0, r0, r1, lsl #16 8021390: ebb0 3fc1 cmp.w r0, r1, lsl #15 8021394: bf00 nop 8021396: eb42 0202 adc.w r2, r2, r2 802139a: bf28 it cs 802139c: eba0 30c1 subcs.w r0, r0, r1, lsl #15 80213a0: ebb0 3f81 cmp.w r0, r1, lsl #14 80213a4: bf00 nop 80213a6: eb42 0202 adc.w r2, r2, r2 80213aa: bf28 it cs 80213ac: eba0 3081 subcs.w r0, r0, r1, lsl #14 80213b0: ebb0 3f41 cmp.w r0, r1, lsl #13 80213b4: bf00 nop 80213b6: eb42 0202 adc.w r2, r2, r2 80213ba: bf28 it cs 80213bc: eba0 3041 subcs.w r0, r0, r1, lsl #13 80213c0: ebb0 3f01 cmp.w r0, r1, lsl #12 80213c4: bf00 nop 80213c6: eb42 0202 adc.w r2, r2, r2 80213ca: bf28 it cs 80213cc: eba0 3001 subcs.w r0, r0, r1, lsl #12 80213d0: ebb0 2fc1 cmp.w r0, r1, lsl #11 80213d4: bf00 nop 80213d6: eb42 0202 adc.w r2, r2, r2 80213da: bf28 it cs 80213dc: eba0 20c1 subcs.w r0, r0, r1, lsl #11 80213e0: ebb0 2f81 cmp.w r0, r1, lsl #10 80213e4: bf00 nop 80213e6: eb42 0202 adc.w r2, r2, r2 80213ea: bf28 it cs 80213ec: eba0 2081 subcs.w r0, r0, r1, lsl #10 80213f0: ebb0 2f41 cmp.w r0, r1, lsl #9 80213f4: bf00 nop 80213f6: eb42 0202 adc.w r2, r2, r2 80213fa: bf28 it cs 80213fc: eba0 2041 subcs.w r0, r0, r1, lsl #9 8021400: ebb0 2f01 cmp.w r0, r1, lsl #8 8021404: bf00 nop 8021406: eb42 0202 adc.w r2, r2, r2 802140a: bf28 it cs 802140c: eba0 2001 subcs.w r0, r0, r1, lsl #8 8021410: ebb0 1fc1 cmp.w r0, r1, lsl #7 8021414: bf00 nop 8021416: eb42 0202 adc.w r2, r2, r2 802141a: bf28 it cs 802141c: eba0 10c1 subcs.w r0, r0, r1, lsl #7 8021420: ebb0 1f81 cmp.w r0, r1, lsl #6 8021424: bf00 nop 8021426: eb42 0202 adc.w r2, r2, r2 802142a: bf28 it cs 802142c: eba0 1081 subcs.w r0, r0, r1, lsl #6 8021430: ebb0 1f41 cmp.w r0, r1, lsl #5 8021434: bf00 nop 8021436: eb42 0202 adc.w r2, r2, r2 802143a: bf28 it cs 802143c: eba0 1041 subcs.w r0, r0, r1, lsl #5 8021440: ebb0 1f01 cmp.w r0, r1, lsl #4 8021444: bf00 nop 8021446: eb42 0202 adc.w r2, r2, r2 802144a: bf28 it cs 802144c: eba0 1001 subcs.w r0, r0, r1, lsl #4 8021450: ebb0 0fc1 cmp.w r0, r1, lsl #3 8021454: bf00 nop 8021456: eb42 0202 adc.w r2, r2, r2 802145a: bf28 it cs 802145c: eba0 00c1 subcs.w r0, r0, r1, lsl #3 8021460: ebb0 0f81 cmp.w r0, r1, lsl #2 8021464: bf00 nop 8021466: eb42 0202 adc.w r2, r2, r2 802146a: bf28 it cs 802146c: eba0 0081 subcs.w r0, r0, r1, lsl #2 8021470: ebb0 0f41 cmp.w r0, r1, lsl #1 8021474: bf00 nop 8021476: eb42 0202 adc.w r2, r2, r2 802147a: bf28 it cs 802147c: eba0 0041 subcs.w r0, r0, r1, lsl #1 8021480: ebb0 0f01 cmp.w r0, r1 8021484: bf00 nop 8021486: eb42 0202 adc.w r2, r2, r2 802148a: bf28 it cs 802148c: eba0 0001 subcs.w r0, r0, r1 8021490: 4610 mov r0, r2 8021492: 4770 bx lr 8021494: bf0c ite eq 8021496: 2001 moveq r0, #1 8021498: 2000 movne r0, #0 802149a: 4770 bx lr 802149c: fab1 f281 clz r2, r1 80214a0: f1c2 021f rsb r2, r2, #31 80214a4: fa20 f002 lsr.w r0, r0, r2 80214a8: 4770 bx lr 80214aa: b108 cbz r0, 80214b0 <__aeabi_uidiv+0x258> 80214ac: f04f 30ff mov.w r0, #4294967295 80214b0: f7ff bb8e b.w 8020bd0 <__aeabi_idiv0> 080214b4 <__aeabi_uidivmod>: 80214b4: 2900 cmp r1, #0 80214b6: d0f8 beq.n 80214aa <__aeabi_uidiv+0x252> 80214b8: e92d 4003 stmdb sp!, {r0, r1, lr} 80214bc: f7ff fecc bl 8021258 <__aeabi_uidiv> 80214c0: e8bd 4006 ldmia.w sp!, {r1, r2, lr} 80214c4: fb02 f300 mul.w r3, r2, r0 80214c8: eba1 0103 sub.w r1, r1, r3 80214cc: 4770 bx lr 80214ce: bf00 nop 080214d0 <__libc_init_array>: 80214d0: b570 push {r4, r5, r6, lr} 80214d2: f248 56dc movw r6, #34268 ; 0x85dc 80214d6: f248 55dc movw r5, #34268 ; 0x85dc 80214da: f6c0 0603 movt r6, #2051 ; 0x803 80214de: f6c0 0503 movt r5, #2051 ; 0x803 80214e2: 1b76 subs r6, r6, r5 80214e4: 10b6 asrs r6, r6, #2 80214e6: d007 beq.n 80214f8 <__libc_init_array+0x28> 80214e8: 3d04 subs r5, #4 80214ea: 2400 movs r4, #0 80214ec: f855 3f04 ldr.w r3, [r5, #4]! 80214f0: 3401 adds r4, #1 80214f2: 4798 blx r3 80214f4: 42a6 cmp r6, r4 80214f6: d1f9 bne.n 80214ec <__libc_init_array+0x1c> 80214f8: f248 56e0 movw r6, #34272 ; 0x85e0 80214fc: f248 55dc movw r5, #34268 ; 0x85dc 8021500: f6c0 0603 movt r6, #2051 ; 0x803 8021504: f6c0 0503 movt r5, #2051 ; 0x803 8021508: 1b76 subs r6, r6, r5 802150a: f017 f857 bl 80385bc <_init> 802150e: 10b6 asrs r6, r6, #2 8021510: d008 beq.n 8021524 <__libc_init_array+0x54> 8021512: 3d04 subs r5, #4 8021514: 2400 movs r4, #0 8021516: f855 3f04 ldr.w r3, [r5, #4]! 802151a: 3401 adds r4, #1 802151c: 4798 blx r3 802151e: 42a6 cmp r6, r4 8021520: d1f9 bne.n 8021516 <__libc_init_array+0x46> 8021522: bd70 pop {r4, r5, r6, pc} 8021524: bd70 pop {r4, r5, r6, pc} 8021526: bf00 nop 08021528 : 8021528: 2a03 cmp r2, #3 802152a: b470 push {r4, r5, r6} 802152c: d922 bls.n 8021574 802152e: ea41 0300 orr.w r3, r1, r0 8021532: 079b lsls r3, r3, #30 8021534: d013 beq.n 802155e 8021536: 7805 ldrb r5, [r0, #0] 8021538: 3a01 subs r2, #1 802153a: 780c ldrb r4, [r1, #0] 802153c: 2300 movs r3, #0 802153e: 42a5 cmp r5, r4 8021540: d006 beq.n 8021550 8021542: e01b b.n 802157c 8021544: f810 5f01 ldrb.w r5, [r0, #1]! 8021548: f811 4f01 ldrb.w r4, [r1, #1]! 802154c: 42a5 cmp r5, r4 802154e: d115 bne.n 802157c 8021550: 4293 cmp r3, r2 8021552: f103 0301 add.w r3, r3, #1 8021556: d1f5 bne.n 8021544 8021558: 2000 movs r0, #0 802155a: bc70 pop {r4, r5, r6} 802155c: 4770 bx lr 802155e: 460c mov r4, r1 8021560: 4603 mov r3, r0 8021562: 3104 adds r1, #4 8021564: 3004 adds r0, #4 8021566: 681e ldr r6, [r3, #0] 8021568: 6825 ldr r5, [r4, #0] 802156a: 42ae cmp r6, r5 802156c: d108 bne.n 8021580 802156e: 3a04 subs r2, #4 8021570: 2a03 cmp r2, #3 8021572: d8f4 bhi.n 802155e 8021574: 2a00 cmp r2, #0 8021576: d1de bne.n 8021536 8021578: 4610 mov r0, r2 802157a: e7ee b.n 802155a 802157c: 1b28 subs r0, r5, r4 802157e: e7ec b.n 802155a 8021580: 4621 mov r1, r4 8021582: 4618 mov r0, r3 8021584: 2a00 cmp r2, #0 8021586: d1d6 bne.n 8021536 8021588: e7f6 b.n 8021578 802158a: bf00 nop 0802158c : 802158c: 2a03 cmp r2, #3 802158e: e92d 0ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp} 8021592: d809 bhi.n 80215a8 8021594: b12a cbz r2, 80215a2 8021596: 2300 movs r3, #0 8021598: 5ccc ldrb r4, [r1, r3] 802159a: 54c4 strb r4, [r0, r3] 802159c: 3301 adds r3, #1 802159e: 4293 cmp r3, r2 80215a0: d1fa bne.n 8021598 80215a2: e8bd 0ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp} 80215a6: 4770 bx lr 80215a8: 0783 lsls r3, r0, #30 80215aa: 4402 add r2, r0 80215ac: d00e beq.n 80215cc 80215ae: 1c44 adds r4, r0, #1 80215b0: 1c4d adds r5, r1, #1 80215b2: f815 7c01 ldrb.w r7, [r5, #-1] 80215b6: f004 0603 and.w r6, r4, #3 80215ba: 4623 mov r3, r4 80215bc: 3401 adds r4, #1 80215be: 4629 mov r1, r5 80215c0: 3501 adds r5, #1 80215c2: f804 7c02 strb.w r7, [r4, #-2] 80215c6: 2e00 cmp r6, #0 80215c8: d1f3 bne.n 80215b2 80215ca: e000 b.n 80215ce 80215cc: 4603 mov r3, r0 80215ce: f011 0403 ands.w r4, r1, #3 80215d2: d06d beq.n 80216b0 80215d4: 1ad7 subs r7, r2, r3 80215d6: 1b0d subs r5, r1, r4 80215d8: 2f03 cmp r7, #3 80215da: 682e ldr r6, [r5, #0] 80215dc: dd19 ble.n 8021612 80215de: f1c4 0c04 rsb ip, r4, #4 80215e2: ea4f 08c4 mov.w r8, r4, lsl #3 80215e6: 1d1c adds r4, r3, #4 80215e8: ea4f 0ccc mov.w ip, ip, lsl #3 80215ec: f855 7f04 ldr.w r7, [r5, #4]! 80215f0: ebc4 0902 rsb r9, r4, r2 80215f4: 4623 mov r3, r4 80215f6: 3104 adds r1, #4 80215f8: 3404 adds r4, #4 80215fa: f1b9 0f03 cmp.w r9, #3 80215fe: fa26 fa08 lsr.w sl, r6, r8 8021602: fa07 fb0c lsl.w fp, r7, ip 8021606: 463e mov r6, r7 8021608: ea4b 070a orr.w r7, fp, sl 802160c: f844 7c08 str.w r7, [r4, #-8] 8021610: dcec bgt.n 80215ec 8021612: 429a cmp r2, r3 8021614: d9c5 bls.n 80215a2 8021616: 3301 adds r3, #1 8021618: 3101 adds r1, #1 802161a: 3201 adds r2, #1 802161c: f811 4c01 ldrb.w r4, [r1, #-1] 8021620: 3301 adds r3, #1 8021622: 3101 adds r1, #1 8021624: 4293 cmp r3, r2 8021626: f803 4c02 strb.w r4, [r3, #-2] 802162a: d1f7 bne.n 802161c 802162c: e7b9 b.n 80215a2 802162e: 680c ldr r4, [r1, #0] 8021630: 3340 adds r3, #64 ; 0x40 8021632: 3140 adds r1, #64 ; 0x40 8021634: f843 4c40 str.w r4, [r3, #-64] 8021638: f851 4c3c ldr.w r4, [r1, #-60] 802163c: f843 4c3c str.w r4, [r3, #-60] 8021640: f851 4c38 ldr.w r4, [r1, #-56] 8021644: f843 4c38 str.w r4, [r3, #-56] 8021648: f851 4c34 ldr.w r4, [r1, #-52] 802164c: f843 4c34 str.w r4, [r3, #-52] 8021650: f851 4c30 ldr.w r4, [r1, #-48] 8021654: f843 4c30 str.w r4, [r3, #-48] 8021658: f851 4c2c ldr.w r4, [r1, #-44] 802165c: f843 4c2c str.w r4, [r3, #-44] 8021660: f851 4c28 ldr.w r4, [r1, #-40] 8021664: f843 4c28 str.w r4, [r3, #-40] 8021668: f851 4c24 ldr.w r4, [r1, #-36] 802166c: f843 4c24 str.w r4, [r3, #-36] 8021670: f851 4c20 ldr.w r4, [r1, #-32] 8021674: f843 4c20 str.w r4, [r3, #-32] 8021678: f851 4c1c ldr.w r4, [r1, #-28] 802167c: f843 4c1c str.w r4, [r3, #-28] 8021680: f851 4c18 ldr.w r4, [r1, #-24] 8021684: f843 4c18 str.w r4, [r3, #-24] 8021688: f851 4c14 ldr.w r4, [r1, #-20] 802168c: f843 4c14 str.w r4, [r3, #-20] 8021690: f851 4c10 ldr.w r4, [r1, #-16] 8021694: f843 4c10 str.w r4, [r3, #-16] 8021698: f851 4c0c ldr.w r4, [r1, #-12] 802169c: f843 4c0c str.w r4, [r3, #-12] 80216a0: f851 4c08 ldr.w r4, [r1, #-8] 80216a4: f843 4c08 str.w r4, [r3, #-8] 80216a8: f851 4c04 ldr.w r4, [r1, #-4] 80216ac: f843 4c04 str.w r4, [r3, #-4] 80216b0: 1ad4 subs r4, r2, r3 80216b2: 2c3f cmp r4, #63 ; 0x3f 80216b4: dcbb bgt.n 802162e 80216b6: e011 b.n 80216dc 80216b8: 680c ldr r4, [r1, #0] 80216ba: 3310 adds r3, #16 80216bc: 3110 adds r1, #16 80216be: f843 4c10 str.w r4, [r3, #-16] 80216c2: f851 4c0c ldr.w r4, [r1, #-12] 80216c6: f843 4c0c str.w r4, [r3, #-12] 80216ca: f851 4c08 ldr.w r4, [r1, #-8] 80216ce: f843 4c08 str.w r4, [r3, #-8] 80216d2: f851 4c04 ldr.w r4, [r1, #-4] 80216d6: f843 4c04 str.w r4, [r3, #-4] 80216da: 1ad4 subs r4, r2, r3 80216dc: 2c0f cmp r4, #15 80216de: dceb bgt.n 80216b8 80216e0: 2c03 cmp r4, #3 80216e2: dd96 ble.n 8021612 80216e4: 1d1c adds r4, r3, #4 80216e6: 1d0d adds r5, r1, #4 80216e8: f855 7c04 ldr.w r7, [r5, #-4] 80216ec: 1b16 subs r6, r2, r4 80216ee: 4623 mov r3, r4 80216f0: 4629 mov r1, r5 80216f2: 3404 adds r4, #4 80216f4: 3504 adds r5, #4 80216f6: 2e03 cmp r6, #3 80216f8: f844 7c08 str.w r7, [r4, #-8] 80216fc: dcf4 bgt.n 80216e8 80216fe: e788 b.n 8021612 08021700 : 8021700: 2a03 cmp r2, #3 8021702: b2c9 uxtb r1, r1 8021704: b470 push {r4, r5, r6} 8021706: d808 bhi.n 802171a 8021708: b12a cbz r2, 8021716 802170a: 4603 mov r3, r0 802170c: 1812 adds r2, r2, r0 802170e: f803 1b01 strb.w r1, [r3], #1 8021712: 4293 cmp r3, r2 8021714: d1fb bne.n 802170e 8021716: bc70 pop {r4, r5, r6} 8021718: 4770 bx lr 802171a: 0783 lsls r3, r0, #30 802171c: 4402 add r2, r0 802171e: d009 beq.n 8021734 8021720: 1c44 adds r4, r0, #1 8021722: f004 0503 and.w r5, r4, #3 8021726: 4623 mov r3, r4 8021728: f804 1c01 strb.w r1, [r4, #-1] 802172c: 3401 adds r4, #1 802172e: 2d00 cmp r5, #0 8021730: d1f7 bne.n 8021722 8021732: e000 b.n 8021736 8021734: 4603 mov r3, r0 8021736: 1ad5 subs r5, r2, r3 8021738: eb01 2401 add.w r4, r1, r1, lsl #8 802173c: 2d3f cmp r5, #63 ; 0x3f 802173e: eb04 4404 add.w r4, r4, r4, lsl #16 8021742: dd2c ble.n 802179e 8021744: 601c str r4, [r3, #0] 8021746: 3340 adds r3, #64 ; 0x40 8021748: 1ad5 subs r5, r2, r3 802174a: f843 4c3c str.w r4, [r3, #-60] 802174e: 2d3f cmp r5, #63 ; 0x3f 8021750: f843 4c38 str.w r4, [r3, #-56] 8021754: f843 4c34 str.w r4, [r3, #-52] 8021758: f843 4c30 str.w r4, [r3, #-48] 802175c: f843 4c2c str.w r4, [r3, #-44] 8021760: f843 4c28 str.w r4, [r3, #-40] 8021764: f843 4c24 str.w r4, [r3, #-36] 8021768: f843 4c20 str.w r4, [r3, #-32] 802176c: f843 4c1c str.w r4, [r3, #-28] 8021770: f843 4c18 str.w r4, [r3, #-24] 8021774: f843 4c14 str.w r4, [r3, #-20] 8021778: f843 4c10 str.w r4, [r3, #-16] 802177c: f843 4c0c str.w r4, [r3, #-12] 8021780: f843 4c08 str.w r4, [r3, #-8] 8021784: f843 4c04 str.w r4, [r3, #-4] 8021788: dcdc bgt.n 8021744 802178a: e008 b.n 802179e 802178c: 601c str r4, [r3, #0] 802178e: 3310 adds r3, #16 8021790: 1ad5 subs r5, r2, r3 8021792: f843 4c0c str.w r4, [r3, #-12] 8021796: f843 4c08 str.w r4, [r3, #-8] 802179a: f843 4c04 str.w r4, [r3, #-4] 802179e: 2d0f cmp r5, #15 80217a0: dcf4 bgt.n 802178c 80217a2: 2d03 cmp r5, #3 80217a4: dd08 ble.n 80217b8 80217a6: 1d1d adds r5, r3, #4 80217a8: 1b56 subs r6, r2, r5 80217aa: f845 4c04 str.w r4, [r5, #-4] 80217ae: 2e03 cmp r6, #3 80217b0: 462b mov r3, r5 80217b2: f105 0504 add.w r5, r5, #4 80217b6: dcf7 bgt.n 80217a8 80217b8: 429a cmp r2, r3 80217ba: d9ac bls.n 8021716 80217bc: 3301 adds r3, #1 80217be: 3201 adds r2, #1 80217c0: f803 1c01 strb.w r1, [r3, #-1] 80217c4: 3301 adds r3, #1 80217c6: 4293 cmp r3, r2 80217c8: d1fa bne.n 80217c0 80217ca: e7a4 b.n 8021716 080217cc : 80217cc: 0783 lsls r3, r0, #30 80217ce: b570 push {r4, r5, r6, lr} 80217d0: 4606 mov r6, r0 80217d2: d114 bne.n 80217fe 80217d4: 6803 ldr r3, [r0, #0] 80217d6: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 80217da: ea22 0303 bic.w r3, r2, r3 80217de: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 80217e2: d10c bne.n 80217fe 80217e4: 1d03 adds r3, r0, #4 80217e6: 461a mov r2, r3 80217e8: f853 4b04 ldr.w r4, [r3], #4 80217ec: f1a4 3501 sub.w r5, r4, #16843009 ; 0x1010101 80217f0: ea25 0404 bic.w r4, r5, r4 80217f4: f014 3f80 tst.w r4, #2155905152 ; 0x80808080 80217f8: d0f5 beq.n 80217e6 80217fa: 4610 mov r0, r2 80217fc: e000 b.n 8021800 80217fe: 4630 mov r0, r6 8021800: 7803 ldrb r3, [r0, #0] 8021802: b12b cbz r3, 8021810 8021804: 1c43 adds r3, r0, #1 8021806: 4618 mov r0, r3 8021808: 3301 adds r3, #1 802180a: 7804 ldrb r4, [r0, #0] 802180c: 2c00 cmp r4, #0 802180e: d1fa bne.n 8021806 8021810: f000 f8f0 bl 80219f4 8021814: 4630 mov r0, r6 8021816: bd70 pop {r4, r5, r6, pc} 08021818 : 8021818: ea80 0201 eor.w r2, r0, r1 802181c: f012 0f03 tst.w r2, #3 8021820: f040 803a bne.w 8021898 8021824: f010 0203 ands.w r2, r0, #3 8021828: f020 0003 bic.w r0, r0, #3 802182c: f021 0103 bic.w r1, r1, #3 8021830: f850 cb04 ldr.w ip, [r0], #4 8021834: bf08 it eq 8021836: f851 3b04 ldreq.w r3, [r1], #4 802183a: d00d beq.n 8021858 802183c: f082 0203 eor.w r2, r2, #3 8021840: ea4f 02c2 mov.w r2, r2, lsl #3 8021844: f06f 437f mvn.w r3, #4278190080 ; 0xff000000 8021848: fa23 f202 lsr.w r2, r3, r2 802184c: f851 3b04 ldr.w r3, [r1], #4 8021850: ea4c 0c02 orr.w ip, ip, r2 8021854: ea43 0302 orr.w r3, r3, r2 8021858: f1ac 3201 sub.w r2, ip, #16843009 ; 0x1010101 802185c: 459c cmp ip, r3 802185e: bf01 itttt eq 8021860: ea22 020c biceq.w r2, r2, ip 8021864: f012 3f80 tsteq.w r2, #2155905152 ; 0x80808080 8021868: f850 cb04 ldreq.w ip, [r0], #4 802186c: f851 3b04 ldreq.w r3, [r1], #4 8021870: d0f2 beq.n 8021858 8021872: ea4f 600c mov.w r0, ip, lsl #24 8021876: ea4f 2c1c mov.w ip, ip, lsr #8 802187a: 2801 cmp r0, #1 802187c: bf28 it cs 802187e: ebb0 6f03 cmpcs.w r0, r3, lsl #24 8021882: bf08 it eq 8021884: 0a1b lsreq r3, r3, #8 8021886: d0f4 beq.n 8021872 8021888: f003 03ff and.w r3, r3, #255 ; 0xff 802188c: ea4f 6010 mov.w r0, r0, lsr #24 8021890: eba0 0003 sub.w r0, r0, r3 8021894: 4770 bx lr 8021896: bf00 nop 08021898 : 8021898: f010 0f03 tst.w r0, #3 802189c: d00a beq.n 80218b4 802189e: f810 2b01 ldrb.w r2, [r0], #1 80218a2: f811 3b01 ldrb.w r3, [r1], #1 80218a6: 2a01 cmp r2, #1 80218a8: bf28 it cs 80218aa: 429a cmpcs r2, r3 80218ac: d0f4 beq.n 8021898 80218ae: eba2 0003 sub.w r0, r2, r3 80218b2: 4770 bx lr 80218b4: f84d 5d04 str.w r5, [sp, #-4]! 80218b8: f84d 4d04 str.w r4, [sp, #-4]! 80218bc: f04f 0201 mov.w r2, #1 80218c0: ea42 2202 orr.w r2, r2, r2, lsl #8 80218c4: ea42 4202 orr.w r2, r2, r2, lsl #16 80218c8: f001 0c03 and.w ip, r1, #3 80218cc: f021 0103 bic.w r1, r1, #3 80218d0: f850 4b04 ldr.w r4, [r0], #4 80218d4: f851 5b04 ldr.w r5, [r1], #4 80218d8: f1bc 0f02 cmp.w ip, #2 80218dc: d026 beq.n 802192c 80218de: d84b bhi.n 8021978 80218e0: f024 4c7f bic.w ip, r4, #4278190080 ; 0xff000000 80218e4: ebbc 2f15 cmp.w ip, r5, lsr #8 80218e8: eba4 0302 sub.w r3, r4, r2 80218ec: ea23 0304 bic.w r3, r3, r4 80218f0: d10d bne.n 802190e 80218f2: ea13 13c2 ands.w r3, r3, r2, lsl #7 80218f6: bf08 it eq 80218f8: f851 5b04 ldreq.w r5, [r1], #4 80218fc: d10a bne.n 8021914 80218fe: ea8c 0c04 eor.w ip, ip, r4 8021902: ebbc 6f05 cmp.w ip, r5, lsl #24 8021906: d10c bne.n 8021922 8021908: f850 4b04 ldr.w r4, [r0], #4 802190c: e7e8 b.n 80218e0 802190e: ea4f 2515 mov.w r5, r5, lsr #8 8021912: e05c b.n 80219ce 8021914: f033 437f bics.w r3, r3, #4278190080 ; 0xff000000 8021918: d152 bne.n 80219c0 802191a: 780d ldrb r5, [r1, #0] 802191c: ea4f 6c14 mov.w ip, r4, lsr #24 8021920: e055 b.n 80219ce 8021922: ea4f 6c14 mov.w ip, r4, lsr #24 8021926: f005 05ff and.w r5, r5, #255 ; 0xff 802192a: e050 b.n 80219ce 802192c: ea4f 4c04 mov.w ip, r4, lsl #16 8021930: eba4 0302 sub.w r3, r4, r2 8021934: ea4f 4c1c mov.w ip, ip, lsr #16 8021938: ea23 0304 bic.w r3, r3, r4 802193c: ebbc 4f15 cmp.w ip, r5, lsr #16 8021940: d117 bne.n 8021972 8021942: ea13 13c2 ands.w r3, r3, r2, lsl #7 8021946: bf08 it eq 8021948: f851 5b04 ldreq.w r5, [r1], #4 802194c: d107 bne.n 802195e 802194e: ea8c 0c04 eor.w ip, ip, r4 8021952: ebbc 4f05 cmp.w ip, r5, lsl #16 8021956: d108 bne.n 802196a 8021958: f850 4b04 ldr.w r4, [r0], #4 802195c: e7e6 b.n 802192c 802195e: 041b lsls r3, r3, #16 8021960: d12e bne.n 80219c0 8021962: 880d ldrh r5, [r1, #0] 8021964: ea4f 4c14 mov.w ip, r4, lsr #16 8021968: e031 b.n 80219ce 802196a: ea4f 4505 mov.w r5, r5, lsl #16 802196e: ea4f 4c14 mov.w ip, r4, lsr #16 8021972: ea4f 4515 mov.w r5, r5, lsr #16 8021976: e02a b.n 80219ce 8021978: f004 0cff and.w ip, r4, #255 ; 0xff 802197c: ebbc 6f15 cmp.w ip, r5, lsr #24 8021980: eba4 0302 sub.w r3, r4, r2 8021984: ea23 0304 bic.w r3, r3, r4 8021988: d10d bne.n 80219a6 802198a: ea13 13c2 ands.w r3, r3, r2, lsl #7 802198e: bf08 it eq 8021990: f851 5b04 ldreq.w r5, [r1], #4 8021994: d10a bne.n 80219ac 8021996: ea8c 0c04 eor.w ip, ip, r4 802199a: ebbc 2f05 cmp.w ip, r5, lsl #8 802199e: d10a bne.n 80219b6 80219a0: f850 4b04 ldr.w r4, [r0], #4 80219a4: e7e8 b.n 8021978 80219a6: ea4f 6515 mov.w r5, r5, lsr #24 80219aa: e010 b.n 80219ce 80219ac: f014 0fff tst.w r4, #255 ; 0xff 80219b0: d006 beq.n 80219c0 80219b2: f851 5b04 ldr.w r5, [r1], #4 80219b6: ea4f 2c14 mov.w ip, r4, lsr #8 80219ba: f025 457f bic.w r5, r5, #4278190080 ; 0xff000000 80219be: e006 b.n 80219ce 80219c0: f04f 0000 mov.w r0, #0 80219c4: f85d 4b04 ldr.w r4, [sp], #4 80219c8: f85d 5b04 ldr.w r5, [sp], #4 80219cc: 4770 bx lr 80219ce: f00c 02ff and.w r2, ip, #255 ; 0xff 80219d2: f005 00ff and.w r0, r5, #255 ; 0xff 80219d6: 2801 cmp r0, #1 80219d8: bf28 it cs 80219da: 4290 cmpcs r0, r2 80219dc: bf04 itt eq 80219de: ea4f 2c1c moveq.w ip, ip, lsr #8 80219e2: 0a2d lsreq r5, r5, #8 80219e4: d0f3 beq.n 80219ce 80219e6: eba2 0000 sub.w r0, r2, r0 80219ea: f85d 4b04 ldr.w r4, [sp], #4 80219ee: f85d 5b04 ldr.w r5, [sp], #4 80219f2: 4770 bx lr 080219f4 : 80219f4: ea80 0201 eor.w r2, r0, r1 80219f8: 4684 mov ip, r0 80219fa: f012 0f03 tst.w r2, #3 80219fe: d14f bne.n 8021aa0 8021a00: f011 0f03 tst.w r1, #3 8021a04: d132 bne.n 8021a6c 8021a06: f84d 4d04 str.w r4, [sp, #-4]! 8021a0a: f011 0f04 tst.w r1, #4 8021a0e: f851 3b04 ldr.w r3, [r1], #4 8021a12: d00b beq.n 8021a2c 8021a14: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 8021a18: 439a bics r2, r3 8021a1a: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 8021a1e: bf04 itt eq 8021a20: f84c 3b04 streq.w r3, [ip], #4 8021a24: f851 3b04 ldreq.w r3, [r1], #4 8021a28: d116 bne.n 8021a58 8021a2a: bf00 nop 8021a2c: f851 4b04 ldr.w r4, [r1], #4 8021a30: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 8021a34: 439a bics r2, r3 8021a36: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 8021a3a: f1a4 3201 sub.w r2, r4, #16843009 ; 0x1010101 8021a3e: d10b bne.n 8021a58 8021a40: f84c 3b04 str.w r3, [ip], #4 8021a44: 43a2 bics r2, r4 8021a46: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 8021a4a: bf04 itt eq 8021a4c: f851 3b04 ldreq.w r3, [r1], #4 8021a50: f84c 4b04 streq.w r4, [ip], #4 8021a54: d0ea beq.n 8021a2c 8021a56: 4623 mov r3, r4 8021a58: f80c 3b01 strb.w r3, [ip], #1 8021a5c: f013 0fff tst.w r3, #255 ; 0xff 8021a60: ea4f 2333 mov.w r3, r3, ror #8 8021a64: d1f8 bne.n 8021a58 8021a66: f85d 4b04 ldr.w r4, [sp], #4 8021a6a: 4770 bx lr 8021a6c: f011 0f01 tst.w r1, #1 8021a70: d006 beq.n 8021a80 8021a72: f811 2b01 ldrb.w r2, [r1], #1 8021a76: f80c 2b01 strb.w r2, [ip], #1 8021a7a: 2a00 cmp r2, #0 8021a7c: bf08 it eq 8021a7e: 4770 bxeq lr 8021a80: f011 0f02 tst.w r1, #2 8021a84: d0bf beq.n 8021a06 8021a86: f831 2b02 ldrh.w r2, [r1], #2 8021a8a: f012 0fff tst.w r2, #255 ; 0xff 8021a8e: bf16 itet ne 8021a90: f82c 2b02 strhne.w r2, [ip], #2 8021a94: f88c 2000 strbeq.w r2, [ip] 8021a98: f412 4f7f tstne.w r2, #65280 ; 0xff00 8021a9c: d1b3 bne.n 8021a06 8021a9e: 4770 bx lr 8021aa0: f811 2b01 ldrb.w r2, [r1], #1 8021aa4: f80c 2b01 strb.w r2, [ip], #1 8021aa8: 2a00 cmp r2, #0 8021aaa: d1f9 bne.n 8021aa0 8021aac: 4770 bx lr 8021aae: bf00 nop 08021ab0 : 8021ab0: f020 0103 bic.w r1, r0, #3 8021ab4: f010 0003 ands.w r0, r0, #3 8021ab8: f1c0 0000 rsb r0, r0, #0 8021abc: f851 3b04 ldr.w r3, [r1], #4 8021ac0: f100 0c04 add.w ip, r0, #4 8021ac4: ea4f 0ccc mov.w ip, ip, lsl #3 8021ac8: f06f 0200 mvn.w r2, #0 8021acc: bf1c itt ne 8021ace: fa22 f20c lsrne.w r2, r2, ip 8021ad2: 4313 orrne r3, r2 8021ad4: f04f 0c01 mov.w ip, #1 8021ad8: ea4c 2c0c orr.w ip, ip, ip, lsl #8 8021adc: ea4c 4c0c orr.w ip, ip, ip, lsl #16 8021ae0: eba3 020c sub.w r2, r3, ip 8021ae4: ea22 0203 bic.w r2, r2, r3 8021ae8: ea12 12cc ands.w r2, r2, ip, lsl #7 8021aec: bf04 itt eq 8021aee: f851 3b04 ldreq.w r3, [r1], #4 8021af2: 3004 addeq r0, #4 8021af4: d0f4 beq.n 8021ae0 8021af6: f013 0fff tst.w r3, #255 ; 0xff 8021afa: bf1f itttt ne 8021afc: 3001 addne r0, #1 8021afe: f413 4f7f tstne.w r3, #65280 ; 0xff00 8021b02: 3001 addne r0, #1 8021b04: f413 0f7f tstne.w r3, #16711680 ; 0xff0000 8021b08: bf18 it ne 8021b0a: 3001 addne r0, #1 8021b0c: 4770 bx lr 8021b0e: bf00 nop 08021b10 : 8021b10: 0783 lsls r3, r0, #30 8021b12: b470 push {r4, r5, r6} 8021b14: d113 bne.n 8021b3e 8021b16: 6803 ldr r3, [r0, #0] 8021b18: f1a3 3401 sub.w r4, r3, #16843009 ; 0x1010101 8021b1c: ea24 0303 bic.w r3, r4, r3 8021b20: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 8021b24: d10b bne.n 8021b3e 8021b26: 1d03 adds r3, r0, #4 8021b28: 461d mov r5, r3 8021b2a: f853 4b04 ldr.w r4, [r3], #4 8021b2e: f1a4 3601 sub.w r6, r4, #16843009 ; 0x1010101 8021b32: ea26 0404 bic.w r4, r6, r4 8021b36: f014 3f80 tst.w r4, #2155905152 ; 0x80808080 8021b3a: d0f5 beq.n 8021b28 8021b3c: e000 b.n 8021b40 8021b3e: 4605 mov r5, r0 8021b40: 782b ldrb r3, [r5, #0] 8021b42: b12b cbz r3, 8021b50 8021b44: 1c6b adds r3, r5, #1 8021b46: 461d mov r5, r3 8021b48: 3301 adds r3, #1 8021b4a: 782c ldrb r4, [r5, #0] 8021b4c: 2c00 cmp r4, #0 8021b4e: d1fa bne.n 8021b46 8021b50: 3901 subs r1, #1 8021b52: 3d01 subs r5, #1 8021b54: 1e53 subs r3, r2, #1 8021b56: b15a cbz r2, 8021b70 8021b58: f811 4f01 ldrb.w r4, [r1, #1]! 8021b5c: 461a mov r2, r3 8021b5e: f805 4f01 strb.w r4, [r5, #1]! 8021b62: b12c cbz r4, 8021b70 8021b64: 2b00 cmp r3, #0 8021b66: d1f5 bne.n 8021b54 8021b68: 706b strb r3, [r5, #1] 8021b6a: 1e53 subs r3, r2, #1 8021b6c: 2a00 cmp r2, #0 8021b6e: d1f3 bne.n 8021b58 8021b70: bc70 pop {r4, r5, r6} 8021b72: 4770 bx lr 08021b74 : 8021b74: b470 push {r4, r5, r6} 8021b76: 2a00 cmp r2, #0 8021b78: d045 beq.n 8021c06 8021b7a: ea41 0300 orr.w r3, r1, r0 8021b7e: f013 0303 ands.w r3, r3, #3 8021b82: d129 bne.n 8021bd8 8021b84: 2a03 cmp r2, #3 8021b86: d927 bls.n 8021bd8 8021b88: 6805 ldr r5, [r0, #0] 8021b8a: 680c ldr r4, [r1, #0] 8021b8c: 42a5 cmp r5, r4 8021b8e: d123 bne.n 8021bd8 8021b90: 1f14 subs r4, r2, #4 8021b92: d03a beq.n 8021c0a 8021b94: f1a5 3201 sub.w r2, r5, #16843009 ; 0x1010101 8021b98: ea22 0505 bic.w r5, r2, r5 8021b9c: f015 3f80 tst.w r5, #2155905152 ; 0x80808080 8021ba0: d00d beq.n 8021bbe 8021ba2: e03a b.n 8021c1a 8021ba4: 685b ldr r3, [r3, #4] 8021ba6: 686a ldr r2, [r5, #4] 8021ba8: f1a3 3501 sub.w r5, r3, #16843009 ; 0x1010101 8021bac: 4293 cmp r3, r2 8021bae: ea25 0503 bic.w r5, r5, r3 8021bb2: d12e bne.n 8021c12 8021bb4: 3c04 subs r4, #4 8021bb6: d028 beq.n 8021c0a 8021bb8: f015 3f80 tst.w r5, #2155905152 ; 0x80808080 8021bbc: d127 bne.n 8021c0e 8021bbe: 460d mov r5, r1 8021bc0: 4603 mov r3, r0 8021bc2: 3104 adds r1, #4 8021bc4: 3004 adds r0, #4 8021bc6: 2c03 cmp r4, #3 8021bc8: d8ec bhi.n 8021ba4 8021bca: 1e66 subs r6, r4, #1 8021bcc: b92c cbnz r4, 8021bda 8021bce: 791c ldrb r4, [r3, #4] 8021bd0: 792a ldrb r2, [r5, #4] 8021bd2: 1aa0 subs r0, r4, r2 8021bd4: bc70 pop {r4, r5, r6} 8021bd6: 4770 bx lr 8021bd8: 1e56 subs r6, r2, #1 8021bda: 7804 ldrb r4, [r0, #0] 8021bdc: 780a ldrb r2, [r1, #0] 8021bde: 4294 cmp r4, r2 8021be0: d1f7 bne.n 8021bd2 8021be2: b1c6 cbz r6, 8021c16 8021be4: b18c cbz r4, 8021c0a 8021be6: 3601 adds r6, #1 8021be8: 1c8b adds r3, r1, #2 8021bea: 1989 adds r1, r1, r6 8021bec: e004 b.n 8021bf8 8021bee: 428b cmp r3, r1 8021bf0: f103 0301 add.w r3, r3, #1 8021bf4: d00b beq.n 8021c0e 8021bf6: b144 cbz r4, 8021c0a 8021bf8: f813 2c01 ldrb.w r2, [r3, #-1] 8021bfc: f810 4f01 ldrb.w r4, [r0, #1]! 8021c00: 4294 cmp r4, r2 8021c02: d0f4 beq.n 8021bee 8021c04: e7e5 b.n 8021bd2 8021c06: 4610 mov r0, r2 8021c08: e7e4 b.n 8021bd4 8021c0a: 4620 mov r0, r4 8021c0c: e7e2 b.n 8021bd4 8021c0e: 2000 movs r0, #0 8021c10: e7e0 b.n 8021bd4 8021c12: 1e66 subs r6, r4, #1 8021c14: e7e1 b.n 8021bda 8021c16: 4630 mov r0, r6 8021c18: e7dc b.n 8021bd4 8021c1a: 4618 mov r0, r3 8021c1c: e7da b.n 8021bd4 8021c1e: bf00 nop 08021c20 : 8021c20: ea41 0300 orr.w r3, r1, r0 8021c24: f013 0f03 tst.w r3, #3 8021c28: 4603 mov r3, r0 8021c2a: b470 push {r4, r5, r6} 8021c2c: d025 beq.n 8021c7a 8021c2e: b1aa cbz r2, 8021c5c 8021c30: 780c ldrb r4, [r1, #0] 8021c32: 3a01 subs r2, #1 8021c34: f803 4b01 strb.w r4, [r3], #1 8021c38: b14c cbz r4, 8021c4e 8021c3a: 461c mov r4, r3 8021c3c: b172 cbz r2, 8021c5c 8021c3e: f811 5f01 ldrb.w r5, [r1, #1]! 8021c42: 3a01 subs r2, #1 8021c44: f804 5b01 strb.w r5, [r4], #1 8021c48: 4623 mov r3, r4 8021c4a: 2d00 cmp r5, #0 8021c4c: d1f6 bne.n 8021c3c 8021c4e: b12a cbz r2, 8021c5c 8021c50: 189a adds r2, r3, r2 8021c52: 2100 movs r1, #0 8021c54: f803 1b01 strb.w r1, [r3], #1 8021c58: 4293 cmp r3, r2 8021c5a: d1fb bne.n 8021c54 8021c5c: bc70 pop {r4, r5, r6} 8021c5e: 4770 bx lr 8021c60: 460e mov r6, r1 8021c62: f851 4b04 ldr.w r4, [r1], #4 8021c66: f1a4 3501 sub.w r5, r4, #16843009 ; 0x1010101 8021c6a: ea25 0504 bic.w r5, r5, r4 8021c6e: f015 3f80 tst.w r5, #2155905152 ; 0x80808080 8021c72: d105 bne.n 8021c80 8021c74: 3a04 subs r2, #4 8021c76: f843 4b04 str.w r4, [r3], #4 8021c7a: 2a03 cmp r2, #3 8021c7c: d8f0 bhi.n 8021c60 8021c7e: e7d6 b.n 8021c2e 8021c80: 4631 mov r1, r6 8021c82: e7d4 b.n 8021c2e 08021c84 : 8021c84: b4f0 push {r4, r5, r6, r7} 8021c86: 7804 ldrb r4, [r0, #0] 8021c88: 2c00 cmp r4, #0 8021c8a: d021 beq.n 8021cd0 8021c8c: 780f ldrb r7, [r1, #0] 8021c8e: 4606 mov r6, r0 8021c90: 4630 mov r0, r6 8021c92: b1af cbz r7, 8021cc0 8021c94: 42a7 cmp r7, r4 8021c96: d019 beq.n 8021ccc 8021c98: 1c4b adds r3, r1, #1 8021c9a: e001 b.n 8021ca0 8021c9c: 4294 cmp r4, r2 8021c9e: d009 beq.n 8021cb4 8021ca0: 461d mov r5, r3 8021ca2: f813 2b01 ldrb.w r2, [r3], #1 8021ca6: 2a00 cmp r2, #0 8021ca8: d1f8 bne.n 8021c9c 8021caa: 7844 ldrb r4, [r0, #1] 8021cac: 3601 adds r6, #1 8021cae: 2c00 cmp r4, #0 8021cb0: d1ee bne.n 8021c90 8021cb2: 782a ldrb r2, [r5, #0] 8021cb4: 2a00 cmp r2, #0 8021cb6: bf14 ite ne 8021cb8: 4630 movne r0, r6 8021cba: 2000 moveq r0, #0 8021cbc: bcf0 pop {r4, r5, r6, r7} 8021cbe: 4770 bx lr 8021cc0: 7844 ldrb r4, [r0, #1] 8021cc2: 460d mov r5, r1 8021cc4: 3601 adds r6, #1 8021cc6: 2c00 cmp r4, #0 8021cc8: d1e2 bne.n 8021c90 8021cca: e7f2 b.n 8021cb2 8021ccc: 463a mov r2, r7 8021cce: e7f1 b.n 8021cb4 8021cd0: 4620 mov r0, r4 8021cd2: e7f3 b.n 8021cbc 08021cd4 : 8021cd4: e92d 07f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl} 8021cd8: 2701 movs r7, #1 8021cda: 463c mov r4, r7 8021cdc: 2500 movs r5, #0 8021cde: f04f 36ff mov.w r6, #4294967295 8021ce2: 1963 adds r3, r4, r5 8021ce4: eb00 0c06 add.w ip, r0, r6 8021ce8: 428b cmp r3, r1 8021cea: d20d bcs.n 8021d08 8021cec: f81c c004 ldrb.w ip, [ip, r4] 8021cf0: f810 8003 ldrb.w r8, [r0, r3] 8021cf4: 45e0 cmp r8, ip 8021cf6: d22e bcs.n 8021d56 8021cf8: 2401 movs r4, #1 8021cfa: 461d mov r5, r3 8021cfc: 1b9f subs r7, r3, r6 8021cfe: 1963 adds r3, r4, r5 8021d00: 428b cmp r3, r1 8021d02: eb00 0c06 add.w ip, r0, r6 8021d06: d3f1 bcc.n 8021cec 8021d08: f04f 0a01 mov.w sl, #1 8021d0c: 2500 movs r5, #0 8021d0e: 4654 mov r4, sl 8021d10: f04f 3cff mov.w ip, #4294967295 8021d14: 6017 str r7, [r2, #0] 8021d16: 1963 adds r3, r4, r5 8021d18: eb00 080c add.w r8, r0, ip 8021d1c: 4299 cmp r1, r3 8021d1e: d90e bls.n 8021d3e 8021d20: f818 8004 ldrb.w r8, [r8, r4] 8021d24: f810 9003 ldrb.w r9, [r0, r3] 8021d28: 45c1 cmp r9, r8 8021d2a: d91a bls.n 8021d62 8021d2c: 2401 movs r4, #1 8021d2e: 461d mov r5, r3 8021d30: ebcc 0a03 rsb sl, ip, r3 8021d34: 1963 adds r3, r4, r5 8021d36: 4299 cmp r1, r3 8021d38: eb00 080c add.w r8, r0, ip 8021d3c: d8f0 bhi.n 8021d20 8021d3e: f10c 0001 add.w r0, ip, #1 8021d42: 3601 adds r6, #1 8021d44: 42b0 cmp r0, r6 8021d46: bf3c itt cc 8021d48: 46ba movcc sl, r7 8021d4a: 4630 movcc r0, r6 8021d4c: f8c2 a000 str.w sl, [r2] 8021d50: e8bd 07f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl} 8021d54: 4770 bx lr 8021d56: d00b beq.n 8021d70 8021d58: 2701 movs r7, #1 8021d5a: 462e mov r6, r5 8021d5c: 463c mov r4, r7 8021d5e: 19ed adds r5, r5, r7 8021d60: e7bf b.n 8021ce2 8021d62: d009 beq.n 8021d78 8021d64: f04f 0a01 mov.w sl, #1 8021d68: 46ac mov ip, r5 8021d6a: 4654 mov r4, sl 8021d6c: 4455 add r5, sl 8021d6e: e7d2 b.n 8021d16 8021d70: 42bc cmp r4, r7 8021d72: d005 beq.n 8021d80 8021d74: 3401 adds r4, #1 8021d76: e7b4 b.n 8021ce2 8021d78: 4554 cmp r4, sl 8021d7a: d005 beq.n 8021d88 8021d7c: 3401 adds r4, #1 8021d7e: e7ca b.n 8021d16 8021d80: 4627 mov r7, r4 8021d82: 461d mov r5, r3 8021d84: 2401 movs r4, #1 8021d86: e7ac b.n 8021ce2 8021d88: 46a2 mov sl, r4 8021d8a: 461d mov r5, r3 8021d8c: 2401 movs r4, #1 8021d8e: e7c2 b.n 8021d16 08021d90 : 8021d90: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8021d94: f2ad 4d24 subw sp, sp, #1060 ; 0x424 8021d98: 4616 mov r6, r2 8021d9a: 4680 mov r8, r0 8021d9c: 460c mov r4, r1 8021d9e: 4610 mov r0, r2 8021da0: 4619 mov r1, r3 8021da2: aa07 add r2, sp, #28 8021da4: 461d mov r5, r3 8021da6: f7ff ff95 bl 8021cd4 8021daa: ab07 add r3, sp, #28 8021dac: f20d 421c addw r2, sp, #1052 ; 0x41c 8021db0: 9003 str r0, [sp, #12] 8021db2: f843 5f04 str.w r5, [r3, #4]! 8021db6: 4293 cmp r3, r2 8021db8: d1fb bne.n 8021db2 8021dba: 1e6f subs r7, r5, #1 8021dbc: 2300 movs r3, #0 8021dbe: a808 add r0, sp, #32 8021dc0: b135 cbz r5, 8021dd0 8021dc2: 5cf2 ldrb r2, [r6, r3] 8021dc4: 1af9 subs r1, r7, r3 8021dc6: 3301 adds r3, #1 8021dc8: 42ab cmp r3, r5 8021dca: f840 1022 str.w r1, [r0, r2, lsl #2] 8021dce: d1f8 bne.n 8021dc2 8021dd0: 9907 ldr r1, [sp, #28] 8021dd2: 4630 mov r0, r6 8021dd4: 9a03 ldr r2, [sp, #12] 8021dd6: 1871 adds r1, r6, r1 8021dd8: f7ff fba6 bl 8021528 8021ddc: 2800 cmp r0, #0 8021dde: d17f bne.n 8021ee0 8021de0: f8dd c00c ldr.w ip, [sp, #12] 8021de4: 4622 mov r2, r4 8021de6: 4682 mov sl, r0 8021de8: 1e6f subs r7, r5, #1 8021dea: f10c 3cff add.w ip, ip, #4294967295 8021dee: f8cd c008 str.w ip, [sp, #8] 8021df2: 44b4 add ip, r6 8021df4: f8cd c014 str.w ip, [sp, #20] 8021df8: f8dd c00c ldr.w ip, [sp, #12] 8021dfc: 4604 mov r4, r0 8021dfe: 9501 str r5, [sp, #4] 8021e00: f1cc 0c01 rsb ip, ip, #1 8021e04: f8cd c010 str.w ip, [sp, #16] 8021e08: e009 b.n 8021e1e 8021e0a: b134 cbz r4, 8021e1a 8021e0c: 9a07 ldr r2, [sp, #28] 8021e0e: 4293 cmp r3, r2 8021e10: bf3e ittt cc 8021e12: 4604 movcc r4, r0 8021e14: 9901 ldrcc r1, [sp, #4] 8021e16: ebc2 0301 rsbcc r3, r2, r1 8021e1a: 449a add sl, r3 8021e1c: 462a mov r2, r5 8021e1e: 9b01 ldr r3, [sp, #4] 8021e20: eb08 0002 add.w r0, r8, r2 8021e24: 2100 movs r1, #0 8021e26: eb0a 0503 add.w r5, sl, r3 8021e2a: 1aaa subs r2, r5, r2 8021e2c: f000 fa78 bl 8022320 8021e30: 2800 cmp r0, #0 8021e32: d14f bne.n 8021ed4 8021e34: 2d00 cmp r5, #0 8021e36: d04d beq.n 8021ed4 8021e38: eb08 0305 add.w r3, r8, r5 8021e3c: a908 add r1, sp, #32 8021e3e: f813 3c01 ldrb.w r3, [r3, #-1] 8021e42: f851 3023 ldr.w r3, [r1, r3, lsl #2] 8021e46: 2b00 cmp r3, #0 8021e48: d1df bne.n 8021e0a 8021e4a: 9a03 ldr r2, [sp, #12] 8021e4c: 4294 cmp r4, r2 8021e4e: bf28 it cs 8021e50: 4622 movcs r2, r4 8021e52: 42ba cmp r2, r7 8021e54: d211 bcs.n 8021e7a 8021e56: eb08 030a add.w r3, r8, sl 8021e5a: f816 c002 ldrb.w ip, [r6, r2] 8021e5e: 18b1 adds r1, r6, r2 8021e60: 5c98 ldrb r0, [r3, r2] 8021e62: 4584 cmp ip, r0 8021e64: d006 beq.n 8021e74 8021e66: e02f b.n 8021ec8 8021e68: f811 0f01 ldrb.w r0, [r1, #1]! 8021e6c: f813 c002 ldrb.w ip, [r3, r2] 8021e70: 4584 cmp ip, r0 8021e72: d129 bne.n 8021ec8 8021e74: 3201 adds r2, #1 8021e76: 42ba cmp r2, r7 8021e78: d3f6 bcc.n 8021e68 8021e7a: 9b03 ldr r3, [sp, #12] 8021e7c: 9802 ldr r0, [sp, #8] 8021e7e: 429c cmp r4, r3 8021e80: bf28 it cs 8021e82: 4618 movcs r0, r3 8021e84: d218 bcs.n 8021eb8 8021e86: f8dd c008 ldr.w ip, [sp, #8] 8021e8a: eb08 030a add.w r3, r8, sl 8021e8e: f816 100c ldrb.w r1, [r6, ip] 8021e92: f813 200c ldrb.w r2, [r3, ip] 8021e96: 4291 cmp r1, r2 8021e98: f040 8085 bne.w 8021fa6 8021e9c: 9a05 ldr r2, [sp, #20] 8021e9e: eb06 0b04 add.w fp, r6, r4 8021ea2: e006 b.n 8021eb2 8021ea4: f813 c001 ldrb.w ip, [r3, r1] 8021ea8: f812 9d01 ldrb.w r9, [r2, #-1]! 8021eac: 45e1 cmp r9, ip 8021eae: d103 bne.n 8021eb8 8021eb0: 4608 mov r0, r1 8021eb2: 1e41 subs r1, r0, #1 8021eb4: 455a cmp r2, fp 8021eb6: d1f5 bne.n 8021ea4 8021eb8: 3401 adds r4, #1 8021eba: 4284 cmp r4, r0 8021ebc: d875 bhi.n 8021faa 8021ebe: 9c07 ldr r4, [sp, #28] 8021ec0: 9b01 ldr r3, [sp, #4] 8021ec2: 44a2 add sl, r4 8021ec4: 1b1c subs r4, r3, r4 8021ec6: e7a9 b.n 8021e1c 8021ec8: f8dd c010 ldr.w ip, [sp, #16] 8021ecc: 2400 movs r4, #0 8021ece: 44e2 add sl, ip 8021ed0: 4492 add sl, r2 8021ed2: e7a3 b.n 8021e1c 8021ed4: 2000 movs r0, #0 8021ed6: b009 add sp, #36 ; 0x24 8021ed8: f50d 6d80 add.w sp, sp, #1024 ; 0x400 8021edc: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8021ee0: f8dd c00c ldr.w ip, [sp, #12] 8021ee4: f04f 0a00 mov.w sl, #0 8021ee8: f8dd b00c ldr.w fp, [sp, #12] 8021eec: f10d 0920 add.w r9, sp, #32 8021ef0: ebcc 0305 rsb r3, ip, r5 8021ef4: 1e6f subs r7, r5, #1 8021ef6: 4563 cmp r3, ip 8021ef8: bf38 it cc 8021efa: 4663 movcc r3, ip 8021efc: 4622 mov r2, r4 8021efe: 3301 adds r3, #1 8021f00: 9307 str r3, [sp, #28] 8021f02: f10c 33ff add.w r3, ip, #4294967295 8021f06: 9301 str r3, [sp, #4] 8021f08: 9b03 ldr r3, [sp, #12] 8021f0a: 44b4 add ip, r6 8021f0c: f8cd c008 str.w ip, [sp, #8] 8021f10: f1c3 0301 rsb r3, r3, #1 8021f14: 9304 str r3, [sp, #16] 8021f16: eb0a 0405 add.w r4, sl, r5 8021f1a: eb08 0002 add.w r0, r8, r2 8021f1e: 2100 movs r1, #0 8021f20: 1aa2 subs r2, r4, r2 8021f22: f000 f9fd bl 8022320 8021f26: 2800 cmp r0, #0 8021f28: d1d4 bne.n 8021ed4 8021f2a: 2c00 cmp r4, #0 8021f2c: d0d2 beq.n 8021ed4 8021f2e: eb08 0304 add.w r3, r8, r4 8021f32: f813 3c01 ldrb.w r3, [r3, #-1] 8021f36: f859 3023 ldr.w r3, [r9, r3, lsl #2] 8021f3a: bb63 cbnz r3, 8021f96 8021f3c: 45bb cmp fp, r7 8021f3e: eb08 000a add.w r0, r8, sl 8021f42: d215 bcs.n 8021f70 8021f44: f8dd c008 ldr.w ip, [sp, #8] 8021f48: f810 300b ldrb.w r3, [r0, fp] 8021f4c: f89c 2000 ldrb.w r2, [ip] 8021f50: 429a cmp r2, r3 8021f52: bf18 it ne 8021f54: 465b movne r3, fp 8021f56: d121 bne.n 8021f9c 8021f58: 9a02 ldr r2, [sp, #8] 8021f5a: 465b mov r3, fp 8021f5c: e005 b.n 8021f6a 8021f5e: f812 1f01 ldrb.w r1, [r2, #1]! 8021f62: f810 c003 ldrb.w ip, [r0, r3] 8021f66: 458c cmp ip, r1 8021f68: d118 bne.n 8021f9c 8021f6a: 3301 adds r3, #1 8021f6c: 42bb cmp r3, r7 8021f6e: d3f6 bcc.n 8021f5e 8021f70: 9b01 ldr r3, [sp, #4] 8021f72: 1c5a adds r2, r3, #1 8021f74: d0af beq.n 8021ed6 8021f76: f8dd c004 ldr.w ip, [sp, #4] 8021f7a: f816 100c ldrb.w r1, [r6, ip] 8021f7e: f810 200c ldrb.w r2, [r0, ip] 8021f82: 4291 cmp r1, r2 8021f84: d106 bne.n 8021f94 8021f86: f113 33ff adds.w r3, r3, #4294967295 8021f8a: d3a4 bcc.n 8021ed6 8021f8c: 5cf1 ldrb r1, [r6, r3] 8021f8e: 5cc2 ldrb r2, [r0, r3] 8021f90: 4291 cmp r1, r2 8021f92: d0f8 beq.n 8021f86 8021f94: 9b07 ldr r3, [sp, #28] 8021f96: 449a add sl, r3 8021f98: 4622 mov r2, r4 8021f9a: e7bc b.n 8021f16 8021f9c: f8dd c010 ldr.w ip, [sp, #16] 8021fa0: 44e2 add sl, ip 8021fa2: 449a add sl, r3 8021fa4: e7f8 b.n 8021f98 8021fa6: 9803 ldr r0, [sp, #12] 8021fa8: e786 b.n 8021eb8 8021faa: eb08 000a add.w r0, r8, sl 8021fae: e792 b.n 8021ed6 08021fb0 : 8021fb0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8021fb4: 4680 mov r8, r0 8021fb6: 7803 ldrb r3, [r0, #0] 8021fb8: b087 sub sp, #28 8021fba: 460e mov r6, r1 8021fbc: 2b00 cmp r3, #0 8021fbe: f000 80f7 beq.w 80221b0 8021fc2: 780a ldrb r2, [r1, #0] 8021fc4: b19a cbz r2, 8021fee 8021fc6: 4684 mov ip, r0 8021fc8: 3101 adds r1, #1 8021fca: 2701 movs r7, #1 8021fcc: e002 b.n 8021fd4 8021fce: f811 2b01 ldrb.w r2, [r1], #1 8021fd2: b15a cbz r2, 8021fec 8021fd4: 4293 cmp r3, r2 8021fd6: bf14 ite ne 8021fd8: 2700 movne r7, #0 8021fda: f007 0701 andeq.w r7, r7, #1 8021fde: f81c 3f01 ldrb.w r3, [ip, #1]! 8021fe2: 460d mov r5, r1 8021fe4: 2b00 cmp r3, #0 8021fe6: d1f2 bne.n 8021fce 8021fe8: 782b ldrb r3, [r5, #0] 8021fea: bb03 cbnz r3, 802202e 8021fec: b11f cbz r7, 8021ff6 8021fee: 4640 mov r0, r8 8021ff0: b007 add sp, #28 8021ff2: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8021ff6: f108 0001 add.w r0, r8, #1 8021ffa: 7831 ldrb r1, [r6, #0] 8021ffc: f000 f9da bl 80223b4 8022000: 1bad subs r5, r5, r6 8022002: 2d01 cmp r5, #1 8022004: bf18 it ne 8022006: 2800 cmpne r0, #0 8022008: 4607 mov r7, r0 802200a: bf08 it eq 802200c: 4680 moveq r8, r0 802200e: d0ee beq.n 8021fee 8022010: 44a8 add r8, r5 8022012: 4540 cmp r0, r8 8022014: bf94 ite ls 8022016: ebc0 0408 rsbls r4, r0, r8 802201a: 2401 movhi r4, #1 802201c: 2d1f cmp r5, #31 802201e: d909 bls.n 8022034 8022020: 4621 mov r1, r4 8022022: 4632 mov r2, r6 8022024: 462b mov r3, r5 8022026: f7ff feb3 bl 8021d90 802202a: 4680 mov r8, r0 802202c: e7df b.n 8021fee 802202e: f04f 0800 mov.w r8, #0 8022032: e7dc b.n 8021fee 8022034: 4629 mov r1, r5 8022036: aa05 add r2, sp, #20 8022038: 4630 mov r0, r6 802203a: f7ff fe4b bl 8021cd4 802203e: 9905 ldr r1, [sp, #20] 8022040: 1871 adds r1, r6, r1 8022042: 9001 str r0, [sp, #4] 8022044: 4630 mov r0, r6 8022046: 9a01 ldr r2, [sp, #4] 8022048: f7ff fa6e bl 8021528 802204c: 2800 cmp r0, #0 802204e: d152 bne.n 80220f6 8022050: 9b01 ldr r3, [sp, #4] 8022052: 4683 mov fp, r0 8022054: 4680 mov r8, r0 8022056: 3b01 subs r3, #1 8022058: 9300 str r3, [sp, #0] 802205a: 18f3 adds r3, r6, r3 802205c: 9303 str r3, [sp, #12] 802205e: 9b01 ldr r3, [sp, #4] 8022060: f1c3 0301 rsb r3, r3, #1 8022064: 9302 str r3, [sp, #8] 8022066: 4622 mov r2, r4 8022068: eb08 0405 add.w r4, r8, r5 802206c: 18b8 adds r0, r7, r2 802206e: 2100 movs r1, #0 8022070: 1aa2 subs r2, r4, r2 8022072: f000 f955 bl 8022320 8022076: 2800 cmp r0, #0 8022078: d1d9 bne.n 802202e 802207a: 2c00 cmp r4, #0 802207c: d0d7 beq.n 802202e 802207e: 9b01 ldr r3, [sp, #4] 8022080: 459b cmp fp, r3 8022082: bf28 it cs 8022084: 465b movcs r3, fp 8022086: 429d cmp r5, r3 8022088: d913 bls.n 80220b2 802208a: 18f9 adds r1, r7, r3 802208c: 5cf0 ldrb r0, [r6, r3] 802208e: 18f2 adds r2, r6, r3 8022090: f811 1008 ldrb.w r1, [r1, r8] 8022094: 4288 cmp r0, r1 8022096: f040 8085 bne.w 80221a4 802209a: eb07 0c08 add.w ip, r7, r8 802209e: e005 b.n 80220ac 80220a0: f812 1f01 ldrb.w r1, [r2, #1]! 80220a4: f81c 0003 ldrb.w r0, [ip, r3] 80220a8: 4288 cmp r0, r1 80220aa: d17b bne.n 80221a4 80220ac: 3301 adds r3, #1 80220ae: 429d cmp r5, r3 80220b0: d8f6 bhi.n 80220a0 80220b2: e89d 000a ldmia.w sp, {r1, r3} 80220b6: 455b cmp r3, fp 80220b8: d97d bls.n 80221b6 80220ba: eb07 0908 add.w r9, r7, r8 80220be: 5c72 ldrb r2, [r6, r1] 80220c0: f819 3001 ldrb.w r3, [r9, r1] 80220c4: 429a cmp r2, r3 80220c6: d176 bne.n 80221b6 80220c8: 9b03 ldr r3, [sp, #12] 80220ca: eb06 0a0b add.w sl, r6, fp 80220ce: e006 b.n 80220de 80220d0: f819 0002 ldrb.w r0, [r9, r2] 80220d4: f813 cd01 ldrb.w ip, [r3, #-1]! 80220d8: 4584 cmp ip, r0 80220da: d103 bne.n 80220e4 80220dc: 4611 mov r1, r2 80220de: 1e4a subs r2, r1, #1 80220e0: 4553 cmp r3, sl 80220e2: d1f5 bne.n 80220d0 80220e4: f10b 0b01 add.w fp, fp, #1 80220e8: 458b cmp fp, r1 80220ea: d866 bhi.n 80221ba 80220ec: 9b05 ldr r3, [sp, #20] 80220ee: 4498 add r8, r3 80220f0: ebc3 0b05 rsb fp, r3, r5 80220f4: e7b7 b.n 8022066 80220f6: 9801 ldr r0, [sp, #4] 80220f8: f04f 0b00 mov.w fp, #0 80220fc: 4622 mov r2, r4 80220fe: 1a2b subs r3, r5, r0 8022100: eb06 0900 add.w r9, r6, r0 8022104: f100 38ff add.w r8, r0, #4294967295 8022108: 4682 mov sl, r0 802210a: 4283 cmp r3, r0 802210c: bf38 it cc 802210e: 4603 movcc r3, r0 8022110: 1839 adds r1, r7, r0 8022112: 3301 adds r3, #1 8022114: 9100 str r1, [sp, #0] 8022116: 9305 str r3, [sp, #20] 8022118: f1c0 0301 rsb r3, r0, #1 802211c: 9302 str r3, [sp, #8] 802211e: eb0b 0405 add.w r4, fp, r5 8022122: 18b8 adds r0, r7, r2 8022124: 2100 movs r1, #0 8022126: 1aa2 subs r2, r4, r2 8022128: f000 f8fa bl 8022320 802212c: 2800 cmp r0, #0 802212e: f47f af7e bne.w 802202e 8022132: 2c00 cmp r4, #0 8022134: f43f af7b beq.w 802202e 8022138: 4555 cmp r5, sl 802213a: bf98 it ls 802213c: eb07 000b addls.w r0, r7, fp 8022140: d914 bls.n 802216c 8022142: 9800 ldr r0, [sp, #0] 8022144: f899 2000 ldrb.w r2, [r9] 8022148: f810 300b ldrb.w r3, [r0, fp] 802214c: 429a cmp r2, r3 802214e: d124 bne.n 802219a 8022150: 464a mov r2, r9 8022152: 4653 mov r3, sl 8022154: eb07 000b add.w r0, r7, fp 8022158: e005 b.n 8022166 802215a: f812 1f01 ldrb.w r1, [r2, #1]! 802215e: f810 c003 ldrb.w ip, [r0, r3] 8022162: 458c cmp ip, r1 8022164: d11a bne.n 802219c 8022166: 3301 adds r3, #1 8022168: 429d cmp r5, r3 802216a: d8f6 bhi.n 802215a 802216c: f1b8 3fff cmp.w r8, #4294967295 8022170: 4643 mov r3, r8 8022172: f43f af5a beq.w 802202a 8022176: f816 1008 ldrb.w r1, [r6, r8] 802217a: f810 2008 ldrb.w r2, [r0, r8] 802217e: 4291 cmp r1, r2 8022180: d107 bne.n 8022192 8022182: f113 33ff adds.w r3, r3, #4294967295 8022186: f4ff af50 bcc.w 802202a 802218a: 5cf1 ldrb r1, [r6, r3] 802218c: 5cc2 ldrb r2, [r0, r3] 802218e: 4291 cmp r1, r2 8022190: d0f7 beq.n 8022182 8022192: 9b05 ldr r3, [sp, #20] 8022194: 449b add fp, r3 8022196: 4622 mov r2, r4 8022198: e7c1 b.n 802211e 802219a: 4653 mov r3, sl 802219c: 9a02 ldr r2, [sp, #8] 802219e: 4493 add fp, r2 80221a0: 449b add fp, r3 80221a2: e7f8 b.n 8022196 80221a4: 9902 ldr r1, [sp, #8] 80221a6: f04f 0b00 mov.w fp, #0 80221aa: 4488 add r8, r1 80221ac: 4498 add r8, r3 80221ae: e75a b.n 8022066 80221b0: 460d mov r5, r1 80221b2: 2701 movs r7, #1 80221b4: e718 b.n 8021fe8 80221b6: 9901 ldr r1, [sp, #4] 80221b8: e794 b.n 80220e4 80221ba: 44b8 add r8, r7 80221bc: e717 b.n 8021fee 80221be: bf00 nop 080221c0 <_strtol_r>: 80221c0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 80221c4: f240 0400 movw r4, #0 80221c8: f2c2 0400 movt r4, #8192 ; 0x2000 80221cc: b085 sub sp, #20 80221ce: 4699 mov r9, r3 80221d0: 460b mov r3, r1 80221d2: f8d4 8000 ldr.w r8, [r4] 80221d6: 9102 str r1, [sp, #8] 80221d8: 9003 str r0, [sp, #12] 80221da: 461c mov r4, r3 80221dc: f814 5b01 ldrb.w r5, [r4], #1 80221e0: eb08 0105 add.w r1, r8, r5 80221e4: 4623 mov r3, r4 80221e6: 7849 ldrb r1, [r1, #1] 80221e8: f001 0108 and.w r1, r1, #8 80221ec: b2c9 uxtb r1, r1 80221ee: 2900 cmp r1, #0 80221f0: d1f3 bne.n 80221da <_strtol_r+0x1a> 80221f2: 2d2d cmp r5, #45 ; 0x2d 80221f4: d07b beq.n 80222ee <_strtol_r+0x12e> 80221f6: 2d2b cmp r5, #43 ; 0x2b 80221f8: bf05 ittet eq 80221fa: 4624 moveq r4, r4 80221fc: 460b moveq r3, r1 80221fe: 460b movne r3, r1 8022200: f814 5b01 ldrbeq.w r5, [r4], #1 8022204: f039 0110 bics.w r1, r9, #16 8022208: d112 bne.n 8022230 <_strtol_r+0x70> 802220a: f1d9 0001 rsbs r0, r9, #1 802220e: bf38 it cc 8022210: 2000 movcc r0, #0 8022212: 2d30 cmp r5, #48 ; 0x30 8022214: d004 beq.n 8022220 <_strtol_r+0x60> 8022216: b158 cbz r0, 8022230 <_strtol_r+0x70> 8022218: f04f 090a mov.w r9, #10 802221c: 46cb mov fp, r9 802221e: e008 b.n 8022232 <_strtol_r+0x72> 8022220: 7821 ldrb r1, [r4, #0] 8022222: f001 01df and.w r1, r1, #223 ; 0xdf 8022226: 2958 cmp r1, #88 ; 0x58 8022228: d065 beq.n 80222f6 <_strtol_r+0x136> 802222a: b108 cbz r0, 8022230 <_strtol_r+0x70> 802222c: f04f 0908 mov.w r9, #8 8022230: 46cb mov fp, r9 8022232: 2b00 cmp r3, #0 8022234: 4659 mov r1, fp 8022236: bf0c ite eq 8022238: f06f 4600 mvneq.w r6, #2147483648 ; 0x80000000 802223c: f04f 4600 movne.w r6, #2147483648 ; 0x80000000 8022240: e88d 000c stmia.w sp, {r2, r3} 8022244: 4630 mov r0, r6 8022246: 2700 movs r7, #0 8022248: f7ff f934 bl 80214b4 <__aeabi_uidivmod> 802224c: 4630 mov r0, r6 802224e: 468a mov sl, r1 8022250: 4659 mov r1, fp 8022252: f7ff f801 bl 8021258 <__aeabi_uidiv> 8022256: 46bc mov ip, r7 8022258: e89d 000c ldmia.w sp, {r2, r3} 802225c: e016 b.n 802228c <_strtol_r+0xcc> 802225e: 3d30 subs r5, #48 ; 0x30 8022260: 45a9 cmp r9, r5 8022262: dd25 ble.n 80222b0 <_strtol_r+0xf0> 8022264: 4584 cmp ip, r0 8022266: bf94 ite ls 8022268: 2100 movls r1, #0 802226a: 2101 movhi r1, #1 802226c: ea51 77d7 orrs.w r7, r1, r7, lsr #31 8022270: d129 bne.n 80222c6 <_strtol_r+0x106> 8022272: 4555 cmp r5, sl 8022274: bfd4 ite le 8022276: 2100 movle r1, #0 8022278: 2101 movgt r1, #1 802227a: 4584 cmp ip, r0 802227c: bf18 it ne 802227e: 2100 movne r1, #0 8022280: bb09 cbnz r1, 80222c6 <_strtol_r+0x106> 8022282: fb0b 5c0c mla ip, fp, ip, r5 8022286: 2701 movs r7, #1 8022288: f814 5b01 ldrb.w r5, [r4], #1 802228c: eb08 0105 add.w r1, r8, r5 8022290: 7849 ldrb r1, [r1, #1] 8022292: f001 0604 and.w r6, r1, #4 8022296: b2f6 uxtb r6, r6 8022298: 2e00 cmp r6, #0 802229a: d1e0 bne.n 802225e <_strtol_r+0x9e> 802229c: f011 0103 ands.w r1, r1, #3 80222a0: d006 beq.n 80222b0 <_strtol_r+0xf0> 80222a2: 2901 cmp r1, #1 80222a4: bf14 ite ne 80222a6: 2157 movne r1, #87 ; 0x57 80222a8: 2137 moveq r1, #55 ; 0x37 80222aa: 1a6d subs r5, r5, r1 80222ac: 45a9 cmp r9, r5 80222ae: dcd9 bgt.n 8022264 <_strtol_r+0xa4> 80222b0: 1c79 adds r1, r7, #1 80222b2: d00b beq.n 80222cc <_strtol_r+0x10c> 80222b4: b9c3 cbnz r3, 80222e8 <_strtol_r+0x128> 80222b6: 4660 mov r0, ip 80222b8: b112 cbz r2, 80222c0 <_strtol_r+0x100> 80222ba: b997 cbnz r7, 80222e2 <_strtol_r+0x122> 80222bc: 9b02 ldr r3, [sp, #8] 80222be: 6013 str r3, [r2, #0] 80222c0: b005 add sp, #20 80222c2: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80222c6: f04f 37ff mov.w r7, #4294967295 80222ca: e7dd b.n 8022288 <_strtol_r+0xc8> 80222cc: 9903 ldr r1, [sp, #12] 80222ce: 2b00 cmp r3, #0 80222d0: bf0c ite eq 80222d2: f06f 4000 mvneq.w r0, #2147483648 ; 0x80000000 80222d6: f04f 4000 movne.w r0, #2147483648 ; 0x80000000 80222da: 2322 movs r3, #34 ; 0x22 80222dc: 600b str r3, [r1, #0] 80222de: 2a00 cmp r2, #0 80222e0: d0ee beq.n 80222c0 <_strtol_r+0x100> 80222e2: 3c01 subs r4, #1 80222e4: 9402 str r4, [sp, #8] 80222e6: e7e9 b.n 80222bc <_strtol_r+0xfc> 80222e8: f1cc 0c00 rsb ip, ip, #0 80222ec: e7e3 b.n 80222b6 <_strtol_r+0xf6> 80222ee: f814 5b01 ldrb.w r5, [r4], #1 80222f2: 2301 movs r3, #1 80222f4: e786 b.n 8022204 <_strtol_r+0x44> 80222f6: f04f 0910 mov.w r9, #16 80222fa: 7865 ldrb r5, [r4, #1] 80222fc: 46cb mov fp, r9 80222fe: 3402 adds r4, #2 8022300: e797 b.n 8022232 <_strtol_r+0x72> 8022302: bf00 nop 08022304 : 8022304: b430 push {r4, r5} 8022306: f240 0404 movw r4, #4 802230a: f2c2 0400 movt r4, #8192 ; 0x2000 802230e: 460d mov r5, r1 8022310: 4613 mov r3, r2 8022312: 4601 mov r1, r0 8022314: 462a mov r2, r5 8022316: 6820 ldr r0, [r4, #0] 8022318: bc30 pop {r4, r5} 802231a: f7ff bf51 b.w 80221c0 <_strtol_r> 802231e: bf00 nop 08022320 : 8022320: 0783 lsls r3, r0, #30 8022322: b2c9 uxtb r1, r1 8022324: b470 push {r4, r5, r6} 8022326: d040 beq.n 80223aa 8022328: 1e54 subs r4, r2, #1 802232a: 2a00 cmp r2, #0 802232c: d03f beq.n 80223ae 802232e: 7803 ldrb r3, [r0, #0] 8022330: 428b cmp r3, r1 8022332: d021 beq.n 8022378 8022334: 1c43 adds r3, r0, #1 8022336: e004 b.n 8022342 8022338: b304 cbz r4, 802237c 802233a: 7802 ldrb r2, [r0, #0] 802233c: 3c01 subs r4, #1 802233e: 428a cmp r2, r1 8022340: d01a beq.n 8022378 8022342: f013 0f03 tst.w r3, #3 8022346: 4618 mov r0, r3 8022348: f103 0301 add.w r3, r3, #1 802234c: d1f4 bne.n 8022338 802234e: 2c03 cmp r4, #3 8022350: d816 bhi.n 8022380 8022352: 1e65 subs r5, r4, #1 8022354: b194 cbz r4, 802237c 8022356: 7803 ldrb r3, [r0, #0] 8022358: 428b cmp r3, r1 802235a: d00d beq.n 8022378 802235c: 1c42 adds r2, r0, #1 802235e: 2300 movs r3, #0 8022360: e002 b.n 8022368 8022362: 7804 ldrb r4, [r0, #0] 8022364: 428c cmp r4, r1 8022366: d007 beq.n 8022378 8022368: 429d cmp r5, r3 802236a: 4610 mov r0, r2 802236c: f103 0301 add.w r3, r3, #1 8022370: f102 0201 add.w r2, r2, #1 8022374: d1f5 bne.n 8022362 8022376: 2000 movs r0, #0 8022378: bc70 pop {r4, r5, r6} 802237a: 4770 bx lr 802237c: 4620 mov r0, r4 802237e: e7fb b.n 8022378 8022380: ea41 2601 orr.w r6, r1, r1, lsl #8 8022384: ea46 4606 orr.w r6, r6, r6, lsl #16 8022388: 4602 mov r2, r0 802238a: 3004 adds r0, #4 802238c: 6813 ldr r3, [r2, #0] 802238e: 4073 eors r3, r6 8022390: f1a3 3501 sub.w r5, r3, #16843009 ; 0x1010101 8022394: ea25 0303 bic.w r3, r5, r3 8022398: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 802239c: d103 bne.n 80223a6 802239e: 3c04 subs r4, #4 80223a0: 2c03 cmp r4, #3 80223a2: d8f1 bhi.n 8022388 80223a4: e7d5 b.n 8022352 80223a6: 4610 mov r0, r2 80223a8: e7d3 b.n 8022352 80223aa: 4614 mov r4, r2 80223ac: e7cf b.n 802234e 80223ae: 4610 mov r0, r2 80223b0: e7e2 b.n 8022378 80223b2: bf00 nop 080223b4 : 80223b4: b2c9 uxtb r1, r1 80223b6: b4f0 push {r4, r5, r6, r7} 80223b8: 2900 cmp r1, #0 80223ba: d04b beq.n 8022454 80223bc: 0783 lsls r3, r0, #30 80223be: d00f beq.n 80223e0 80223c0: 7803 ldrb r3, [r0, #0] 80223c2: 2b00 cmp r3, #0 80223c4: d073 beq.n 80224ae 80223c6: 4299 cmp r1, r3 80223c8: d042 beq.n 8022450 80223ca: 1c43 adds r3, r0, #1 80223cc: e005 b.n 80223da 80223ce: f813 2b01 ldrb.w r2, [r3], #1 80223d2: 2a00 cmp r2, #0 80223d4: d03b beq.n 802244e 80223d6: 4291 cmp r1, r2 80223d8: d03a beq.n 8022450 80223da: 079a lsls r2, r3, #30 80223dc: 4618 mov r0, r3 80223de: d1f6 bne.n 80223ce 80223e0: 6803 ldr r3, [r0, #0] 80223e2: ea41 2701 orr.w r7, r1, r1, lsl #8 80223e6: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 80223ea: ea47 4707 orr.w r7, r7, r7, lsl #16 80223ee: ea22 0203 bic.w r2, r2, r3 80223f2: f012 3f80 tst.w r2, #2155905152 ; 0x80808080 80223f6: d11c bne.n 8022432 80223f8: 407b eors r3, r7 80223fa: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 80223fe: ea22 0303 bic.w r3, r2, r3 8022402: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 8022406: d114 bne.n 8022432 8022408: 1d02 adds r2, r0, #4 802240a: e002 b.n 8022412 802240c: f014 3f80 tst.w r4, #2155905152 ; 0x80808080 8022410: d10f bne.n 8022432 8022412: 4610 mov r0, r2 8022414: f852 3b04 ldr.w r3, [r2], #4 8022418: f1a3 3601 sub.w r6, r3, #16843009 ; 0x1010101 802241c: ea87 0403 eor.w r4, r7, r3 8022420: ea26 0303 bic.w r3, r6, r3 8022424: f1a4 3501 sub.w r5, r4, #16843009 ; 0x1010101 8022428: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 802242c: ea25 0404 bic.w r4, r5, r4 8022430: d0ec beq.n 802240c 8022432: 7803 ldrb r3, [r0, #0] 8022434: 2b00 cmp r3, #0 8022436: d03a beq.n 80224ae 8022438: 4299 cmp r1, r3 802243a: d009 beq.n 8022450 802243c: 1c43 adds r3, r0, #1 802243e: e001 b.n 8022444 8022440: 4291 cmp r1, r2 8022442: d005 beq.n 8022450 8022444: 4618 mov r0, r3 8022446: f813 2b01 ldrb.w r2, [r3], #1 802244a: 2a00 cmp r2, #0 802244c: d1f8 bne.n 8022440 802244e: 4610 mov r0, r2 8022450: bcf0 pop {r4, r5, r6, r7} 8022452: 4770 bx lr 8022454: 0781 lsls r1, r0, #30 8022456: d00d beq.n 8022474 8022458: 7803 ldrb r3, [r0, #0] 802245a: 2b00 cmp r3, #0 802245c: d0f8 beq.n 8022450 802245e: 1c43 adds r3, r0, #1 8022460: e002 b.n 8022468 8022462: 7802 ldrb r2, [r0, #0] 8022464: 2a00 cmp r2, #0 8022466: d0f3 beq.n 8022450 8022468: f013 0f03 tst.w r3, #3 802246c: 4618 mov r0, r3 802246e: f103 0301 add.w r3, r3, #1 8022472: d1f6 bne.n 8022462 8022474: 6803 ldr r3, [r0, #0] 8022476: f1a3 3201 sub.w r2, r3, #16843009 ; 0x1010101 802247a: ea22 0303 bic.w r3, r2, r3 802247e: f013 3f80 tst.w r3, #2155905152 ; 0x80808080 8022482: d10a bne.n 802249a 8022484: 1d02 adds r2, r0, #4 8022486: 4610 mov r0, r2 8022488: f852 1b04 ldr.w r1, [r2], #4 802248c: f1a1 3401 sub.w r4, r1, #16843009 ; 0x1010101 8022490: ea24 0101 bic.w r1, r4, r1 8022494: f011 3f80 tst.w r1, #2155905152 ; 0x80808080 8022498: d0f5 beq.n 8022486 802249a: 7803 ldrb r3, [r0, #0] 802249c: 2b00 cmp r3, #0 802249e: d0d7 beq.n 8022450 80224a0: 1c43 adds r3, r0, #1 80224a2: 4618 mov r0, r3 80224a4: 3301 adds r3, #1 80224a6: 7802 ldrb r2, [r0, #0] 80224a8: 2a00 cmp r2, #0 80224aa: d1fa bne.n 80224a2 80224ac: e7d0 b.n 8022450 80224ae: 4618 mov r0, r3 80224b0: e7ce b.n 8022450 80224b2: bf00 nop 080224b4 : { /* Check the parameters */ assert_param(IS_NVIC_PRIORITY_GROUP(NVIC_PriorityGroup)); /* Set the PRIGROUP[10:8] bits according to NVIC_PriorityGroup value */ SCB->AIRCR = AIRCR_VECTKEY_MASK | NVIC_PriorityGroup; 80224b4: f040 60bf orr.w r0, r0, #100139008 ; 0x5f80000 80224b8: 4b02 ldr r3, [pc, #8] ; (80224c4 ) 80224ba: f440 3000 orr.w r0, r0, #131072 ; 0x20000 80224be: 60d8 str r0, [r3, #12] 80224c0: 4770 bx lr 80224c2: bf00 nop 80224c4: e000ed00 .word 0xe000ed00 080224c8 : /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NVIC_InitStruct->NVIC_IRQChannelCmd)); assert_param(IS_NVIC_PREEMPTION_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority)); assert_param(IS_NVIC_SUB_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelSubPriority)); if (NVIC_InitStruct->NVIC_IRQChannelCmd != DISABLE) 80224c8: 78c3 ldrb r3, [r0, #3] 80224ca: b30b cbz r3, 8022510 { /* Compute the Corresponding IRQ Priority --------------------------------*/ tmppriority = (0x700 - ((SCB->AIRCR) & (uint32_t)0x700))>> 0x08; 80224cc: 4b16 ldr r3, [pc, #88] ; (8022528 ) tmppre = (0x4 - tmppriority); tmpsub = tmpsub >> tmppriority; tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; 80224ce: 7841 ldrb r1, [r0, #1] assert_param(IS_NVIC_SUB_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelSubPriority)); if (NVIC_InitStruct->NVIC_IRQChannelCmd != DISABLE) { /* Compute the Corresponding IRQ Priority --------------------------------*/ tmppriority = (0x700 - ((SCB->AIRCR) & (uint32_t)0x700))>> 0x08; 80224d0: 68db ldr r3, [r3, #12] 80224d2: 43db mvns r3, r3 80224d4: f3c3 2302 ubfx r3, r3, #8, #3 tmppre = (0x4 - tmppriority); 80224d8: f1c3 0204 rsb r2, r3, #4 tmpsub = tmpsub >> tmppriority; tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; 80224dc: b2d2 uxtb r2, r2 80224de: fa01 f202 lsl.w r2, r1, r2 if (NVIC_InitStruct->NVIC_IRQChannelCmd != DISABLE) { /* Compute the Corresponding IRQ Priority --------------------------------*/ tmppriority = (0x700 - ((SCB->AIRCR) & (uint32_t)0x700))>> 0x08; tmppre = (0x4 - tmppriority); tmpsub = tmpsub >> tmppriority; 80224e2: 210f movs r1, #15 80224e4: fa41 f303 asr.w r3, r1, r3 tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; tmppriority |= (uint8_t)(NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub); 80224e8: 7881 ldrb r1, [r0, #2] /* Compute the Corresponding IRQ Priority --------------------------------*/ tmppriority = (0x700 - ((SCB->AIRCR) & (uint32_t)0x700))>> 0x08; tmppre = (0x4 - tmppriority); tmpsub = tmpsub >> tmppriority; tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; 80224ea: b2d2 uxtb r2, r2 tmppriority |= (uint8_t)(NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub); 80224ec: 400b ands r3, r1 80224ee: 431a orrs r2, r3 tmppriority = tmppriority << 0x04; NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority; 80224f0: 7803 ldrb r3, [r0, #0] 80224f2: f103 4360 add.w r3, r3, #3758096384 ; 0xe0000000 80224f6: f503 4361 add.w r3, r3, #57600 ; 0xe100 tmpsub = tmpsub >> tmppriority; tmppriority = NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; tmppriority |= (uint8_t)(NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub); tmppriority = tmppriority << 0x04; 80224fa: 0112 lsls r2, r2, #4 NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority; 80224fc: f883 2300 strb.w r2, [r3, #768] ; 0x300 /* Enable the Selected IRQ Channels --------------------------------------*/ NVIC->ISER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 8022500: 7803 ldrb r3, [r0, #0] (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 8022502: 2201 movs r2, #1 tmppriority = tmppriority << 0x04; NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority; /* Enable the Selected IRQ Channels --------------------------------------*/ NVIC->ISER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 8022504: 0959 lsrs r1, r3, #5 (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 8022506: f003 031f and.w r3, r3, #31 802250a: fa02 f303 lsl.w r3, r2, r3 802250e: e007 b.n 8022520 } else { /* Disable the Selected IRQ Channels -------------------------------------*/ NVIC->ICER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 8022510: 7803 ldrb r3, [r0, #0] (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 8022512: 2201 movs r2, #1 (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); } else { /* Disable the Selected IRQ Channels -------------------------------------*/ NVIC->ICER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 8022514: 0959 lsrs r1, r3, #5 (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); 8022516: f003 031f and.w r3, r3, #31 802251a: fa02 f303 lsl.w r3, r2, r3 (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); } else { /* Disable the Selected IRQ Channels -------------------------------------*/ NVIC->ICER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = 802251e: 3120 adds r1, #32 8022520: 4a02 ldr r2, [pc, #8] ; (802252c ) 8022522: f842 3021 str.w r3, [r2, r1, lsl #2] 8022526: 4770 bx lr 8022528: e000ed00 .word 0xe000ed00 802252c: e000e100 .word 0xe000e100 08022530 : { /* Check the parameters */ assert_param(IS_NVIC_VECTTAB(NVIC_VectTab)); assert_param(IS_NVIC_OFFSET(Offset)); SCB->VTOR = NVIC_VectTab | (Offset & (uint32_t)0x1FFFFF80); 8022530: f021 4160 bic.w r1, r1, #3758096384 ; 0xe0000000 8022534: f021 017f bic.w r1, r1, #127 ; 0x7f 8022538: 4b01 ldr r3, [pc, #4] ; (8022540 ) 802253a: 4308 orrs r0, r1 802253c: 6098 str r0, [r3, #8] 802253e: 4770 bx lr 8022540: e000ed00 .word 0xe000ed00 08022544 : * @retval None */ void CRC_ResetDR(void) { /* Reset CRC generator */ CRC->CR = CRC_CR_RESET; 8022544: 4b01 ldr r3, [pc, #4] ; (802254c ) 8022546: 2201 movs r2, #1 8022548: 609a str r2, [r3, #8] 802254a: 4770 bx lr 802254c: 40023000 .word 0x40023000 08022550 : * @param pBuffer: pointer to the buffer containing the data to be computed * @param BufferLength: length of the buffer to be computed * @retval 32-bit CRC */ uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength) { 8022550: b510 push {r4, lr} uint32_t index = 0; for(index = 0; index < BufferLength; index++) 8022552: 2300 movs r3, #0 8022554: 4c05 ldr r4, [pc, #20] ; (802256c ) 8022556: e003 b.n 8022560 { CRC->DR = pBuffer[index]; 8022558: f850 2023 ldr.w r2, [r0, r3, lsl #2] */ uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength) { uint32_t index = 0; for(index = 0; index < BufferLength; index++) 802255c: 3301 adds r3, #1 { CRC->DR = pBuffer[index]; 802255e: 6022 str r2, [r4, #0] */ uint32_t CRC_CalcBlockCRC(uint32_t pBuffer[], uint32_t BufferLength) { uint32_t index = 0; for(index = 0; index < BufferLength; index++) 8022560: 428b cmp r3, r1 8022562: d1f9 bne.n 8022558 { CRC->DR = pBuffer[index]; } return (CRC->DR); 8022564: 4b01 ldr r3, [pc, #4] ; (802256c ) 8022566: 6818 ldr r0, [r3, #0] } 8022568: bd10 pop {r4, pc} 802256a: bf00 nop 802256c: 40023000 .word 0x40023000 08022570 : * @param None * @retval None */ void FLASH_Unlock(void) { if((FLASH->CR & FLASH_CR_LOCK) != RESET) 8022570: 4b04 ldr r3, [pc, #16] ; (8022584 ) 8022572: 691a ldr r2, [r3, #16] 8022574: 2a00 cmp r2, #0 8022576: da04 bge.n 8022582 { /* Authorize the FLASH Registers access */ FLASH->KEYR = FLASH_KEY1; 8022578: 4a03 ldr r2, [pc, #12] ; (8022588 ) 802257a: 605a str r2, [r3, #4] FLASH->KEYR = FLASH_KEY2; 802257c: f102 3288 add.w r2, r2, #2290649224 ; 0x88888888 8022580: 605a str r2, [r3, #4] 8022582: 4770 bx lr 8022584: 40023c00 .word 0x40023c00 8022588: 45670123 .word 0x45670123 0802258c : * @retval None */ void FLASH_Lock(void) { /* Set the LOCK Bit to lock the FLASH Registers access */ FLASH->CR |= FLASH_CR_LOCK; 802258c: 4b02 ldr r3, [pc, #8] ; (8022598 ) 802258e: 691a ldr r2, [r3, #16] 8022590: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000 8022594: 611a str r2, [r3, #16] 8022596: 4770 bx lr 8022598: 40023c00 .word 0x40023c00 0802259c : { /* Check the parameters */ assert_param(IS_FLASH_CLEAR_FLAG(FLASH_FLAG)); /* Clear the flags */ FLASH->SR = FLASH_FLAG; 802259c: 4b01 ldr r3, [pc, #4] ; (80225a4 ) 802259e: 60d8 str r0, [r3, #12] 80225a0: 4770 bx lr 80225a2: bf00 nop 80225a4: 40023c00 .word 0x40023c00 080225a8 : */ FLASH_Status FLASH_GetStatus(void) { FLASH_Status flashstatus = FLASH_COMPLETE; if((FLASH->SR & FLASH_FLAG_BSY) == FLASH_FLAG_BSY) 80225a8: 4b0b ldr r3, [pc, #44] ; (80225d8 ) 80225aa: 68da ldr r2, [r3, #12] 80225ac: 03d0 lsls r0, r2, #15 80225ae: d40d bmi.n 80225cc { flashstatus = FLASH_BUSY; } else { if((FLASH->SR & FLASH_FLAG_WRPERR) != (uint32_t)0x00) 80225b0: 68da ldr r2, [r3, #12] 80225b2: 06d1 lsls r1, r2, #27 80225b4: d40c bmi.n 80225d0 { flashstatus = FLASH_ERROR_WRP; } else { if((FLASH->SR & (uint32_t)0xEF) != (uint32_t)0x00) 80225b6: 68da ldr r2, [r3, #12] 80225b8: f012 0fef tst.w r2, #239 ; 0xef 80225bc: d10a bne.n 80225d4 { flashstatus = FLASH_ERROR_PROGRAM; } else { if((FLASH->SR & FLASH_FLAG_OPERR) != (uint32_t)0x00) 80225be: 68db ldr r3, [r3, #12] 80225c0: f013 0f02 tst.w r3, #2 { flashstatus = FLASH_ERROR_OPERATION; 80225c4: bf0c ite eq 80225c6: 2008 moveq r0, #8 80225c8: 2007 movne r0, #7 80225ca: 4770 bx lr { FLASH_Status flashstatus = FLASH_COMPLETE; if((FLASH->SR & FLASH_FLAG_BSY) == FLASH_FLAG_BSY) { flashstatus = FLASH_BUSY; 80225cc: 2001 movs r0, #1 80225ce: 4770 bx lr } else { if((FLASH->SR & FLASH_FLAG_WRPERR) != (uint32_t)0x00) { flashstatus = FLASH_ERROR_WRP; 80225d0: 2005 movs r0, #5 80225d2: 4770 bx lr } else { if((FLASH->SR & (uint32_t)0xEF) != (uint32_t)0x00) { flashstatus = FLASH_ERROR_PROGRAM; 80225d4: 2006 movs r0, #6 } } } /* Return the FLASH Status */ return flashstatus; } 80225d6: 4770 bx lr 80225d8: 40023c00 .word 0x40023c00 080225dc : * @param None * @retval FLASH Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PROGRAM, * FLASH_ERROR_WRP, FLASH_ERROR_OPERATION or FLASH_COMPLETE. */ FLASH_Status FLASH_WaitForLastOperation(void) { 80225dc: b507 push {r0, r1, r2, lr} __IO FLASH_Status status = FLASH_COMPLETE; 80225de: 2308 movs r3, #8 80225e0: f88d 3007 strb.w r3, [sp, #7] /* Wait for the FLASH operation to complete by polling on BUSY flag to be reset. Even if the FLASH operation fails, the BUSY flag will be reset and an error flag will be set */ while(status == FLASH_BUSY) { status = FLASH_GetStatus(); 80225e4: f7ff ffe0 bl 80225a8 80225e8: f88d 0007 strb.w r0, [sp, #7] status = FLASH_GetStatus(); /* Wait for the FLASH operation to complete by polling on BUSY flag to be reset. Even if the FLASH operation fails, the BUSY flag will be reset and an error flag will be set */ while(status == FLASH_BUSY) 80225ec: f89d 3007 ldrb.w r3, [sp, #7] 80225f0: 2b01 cmp r3, #1 80225f2: d0f7 beq.n 80225e4 { status = FLASH_GetStatus(); } /* Return the operation status */ return status; 80225f4: f89d 0007 ldrb.w r0, [sp, #7] } 80225f8: bd0e pop {r1, r2, r3, pc} 80225fa: 0000 movs r0, r0 080225fc : * @param Data: specifies the data to be programmed. * @retval FLASH Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PROGRAM, * FLASH_ERROR_WRP, FLASH_ERROR_OPERATION or FLASH_COMPLETE. */ FLASH_Status FLASH_ProgramByte(uint32_t Address, uint8_t Data) { 80225fc: b570 push {r4, r5, r6, lr} 80225fe: 4605 mov r5, r0 8022600: 460e mov r6, r1 /* Check the parameters */ assert_param(IS_FLASH_ADDRESS(Address)); /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 8022602: f7ff ffeb bl 80225dc if(status == FLASH_COMPLETE) 8022606: 2808 cmp r0, #8 8022608: d111 bne.n 802262e { /* if the previous operation is completed, proceed to program the new data */ FLASH->CR &= CR_PSIZE_MASK; 802260a: 4c09 ldr r4, [pc, #36] ; (8022630 ) 802260c: 6923 ldr r3, [r4, #16] 802260e: f423 7340 bic.w r3, r3, #768 ; 0x300 8022612: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_PSIZE_BYTE; 8022614: 6923 ldr r3, [r4, #16] 8022616: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_CR_PG; 8022618: 6923 ldr r3, [r4, #16] 802261a: f043 0301 orr.w r3, r3, #1 802261e: 6123 str r3, [r4, #16] *(__IO uint8_t*)Address = Data; 8022620: 702e strb r6, [r5, #0] /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 8022622: f7ff ffdb bl 80225dc /* if the program operation is completed, disable the PG Bit */ FLASH->CR &= (~FLASH_CR_PG); 8022626: 6923 ldr r3, [r4, #16] 8022628: f023 0301 bic.w r3, r3, #1 802262c: 6123 str r3, [r4, #16] } /* Return the Program Status */ return status; } 802262e: bd70 pop {r4, r5, r6, pc} 8022630: 40023c00 .word 0x40023c00 08022634 : * @param Data: specifies the data to be programmed. * @retval FLASH Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PROGRAM, * FLASH_ERROR_WRP, FLASH_ERROR_OPERATION or FLASH_COMPLETE. */ FLASH_Status FLASH_ProgramWord(uint32_t Address, uint32_t Data) { 8022634: b570 push {r4, r5, r6, lr} 8022636: 4605 mov r5, r0 8022638: 460e mov r6, r1 /* Check the parameters */ assert_param(IS_FLASH_ADDRESS(Address)); /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 802263a: f7ff ffcf bl 80225dc if(status == FLASH_COMPLETE) 802263e: 2808 cmp r0, #8 8022640: d113 bne.n 802266a { /* if the previous operation is completed, proceed to program the new data */ FLASH->CR &= CR_PSIZE_MASK; 8022642: 4c0a ldr r4, [pc, #40] ; (802266c ) 8022644: 6923 ldr r3, [r4, #16] 8022646: f423 7340 bic.w r3, r3, #768 ; 0x300 802264a: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_PSIZE_WORD; 802264c: 6923 ldr r3, [r4, #16] 802264e: f443 7300 orr.w r3, r3, #512 ; 0x200 8022652: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_CR_PG; 8022654: 6923 ldr r3, [r4, #16] 8022656: f043 0301 orr.w r3, r3, #1 802265a: 6123 str r3, [r4, #16] *(__IO uint32_t*)Address = Data; 802265c: 602e str r6, [r5, #0] /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 802265e: f7ff ffbd bl 80225dc /* if the program operation is completed, disable the PG Bit */ FLASH->CR &= (~FLASH_CR_PG); 8022662: 6923 ldr r3, [r4, #16] 8022664: f023 0301 bic.w r3, r3, #1 8022668: 6123 str r3, [r4, #16] } /* Return the Program Status */ return status; } 802266a: bd70 pop {r4, r5, r6, pc} 802266c: 40023c00 .word 0x40023c00 08022670 : * * @retval FLASH Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PROGRAM, * FLASH_ERROR_WRP, FLASH_ERROR_OPERATION or FLASH_COMPLETE. */ FLASH_Status FLASH_EraseSector(uint32_t FLASH_Sector, uint8_t VoltageRange) { 8022670: b570 push {r4, r5, r6, lr} 8022672: 4606 mov r6, r0 /* Check the parameters */ assert_param(IS_FLASH_SECTOR(FLASH_Sector)); assert_param(IS_VOLTAGERANGE(VoltageRange)); if(VoltageRange == VoltageRange_1) 8022674: b141 cbz r1, 8022688 { tmp_psize = FLASH_PSIZE_BYTE; } else if(VoltageRange == VoltageRange_2) 8022676: 2901 cmp r1, #1 8022678: d008 beq.n 802268c { tmp_psize = FLASH_PSIZE_HALF_WORD; } else if(VoltageRange == VoltageRange_3) { tmp_psize = FLASH_PSIZE_WORD; 802267a: 2902 cmp r1, #2 802267c: bf14 ite ne 802267e: f44f 7540 movne.w r5, #768 ; 0x300 8022682: f44f 7500 moveq.w r5, #512 ; 0x200 8022686: e003 b.n 8022690 assert_param(IS_FLASH_SECTOR(FLASH_Sector)); assert_param(IS_VOLTAGERANGE(VoltageRange)); if(VoltageRange == VoltageRange_1) { tmp_psize = FLASH_PSIZE_BYTE; 8022688: 460d mov r5, r1 802268a: e001 b.n 8022690 } else if(VoltageRange == VoltageRange_2) { tmp_psize = FLASH_PSIZE_HALF_WORD; 802268c: f44f 7580 mov.w r5, #256 ; 0x100 else { tmp_psize = FLASH_PSIZE_DOUBLE_WORD; } /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 8022690: f7ff ffa4 bl 80225dc if(status == FLASH_COMPLETE) 8022694: 2808 cmp r0, #8 8022696: d11e bne.n 80226d6 { /* if the previous operation is completed, proceed to erase the sector */ FLASH->CR &= CR_PSIZE_MASK; 8022698: 4c0f ldr r4, [pc, #60] ; (80226d8 ) 802269a: 6923 ldr r3, [r4, #16] 802269c: f423 7340 bic.w r3, r3, #768 ; 0x300 80226a0: 6123 str r3, [r4, #16] FLASH->CR |= tmp_psize; 80226a2: 6921 ldr r1, [r4, #16] 80226a4: 430d orrs r5, r1 80226a6: 6125 str r5, [r4, #16] FLASH->CR &= SECTOR_MASK; 80226a8: 6923 ldr r3, [r4, #16] 80226aa: f023 03f8 bic.w r3, r3, #248 ; 0xf8 80226ae: 6123 str r3, [r4, #16] FLASH->CR |= FLASH_CR_SER | FLASH_Sector; 80226b0: 6923 ldr r3, [r4, #16] 80226b2: f043 0302 orr.w r3, r3, #2 80226b6: 431e orrs r6, r3 80226b8: 6126 str r6, [r4, #16] FLASH->CR |= FLASH_CR_STRT; 80226ba: 6923 ldr r3, [r4, #16] 80226bc: f443 3380 orr.w r3, r3, #65536 ; 0x10000 80226c0: 6123 str r3, [r4, #16] /* Wait for last operation to be completed */ status = FLASH_WaitForLastOperation(); 80226c2: f7ff ff8b bl 80225dc /* if the erase operation is completed, disable the SER Bit */ FLASH->CR &= (~FLASH_CR_SER); 80226c6: 6923 ldr r3, [r4, #16] 80226c8: f023 0302 bic.w r3, r3, #2 80226cc: 6123 str r3, [r4, #16] FLASH->CR &= SECTOR_MASK; 80226ce: 6923 ldr r3, [r4, #16] 80226d0: f023 03f8 bic.w r3, r3, #248 ; 0xf8 80226d4: 6123 str r3, [r4, #16] } /* Return the Erase Status */ return status; } 80226d6: bd70 pop {r4, r5, r6, pc} 80226d8: 40023c00 .word 0x40023c00 080226dc : * @note By default, The GPIO pins are configured in input floating mode (except JTAG pins). * @param GPIOx: where x can be (A..I) to select the GPIO peripheral. * @retval None */ void GPIO_DeInit(GPIO_TypeDef* GPIOx) { 80226dc: b508 push {r3, lr} /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); if (GPIOx == GPIOA) 80226de: 4b2c ldr r3, [pc, #176] ; (8022790 ) 80226e0: 4298 cmp r0, r3 80226e2: d105 bne.n 80226f0 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOA, ENABLE); 80226e4: 2001 movs r0, #1 80226e6: 4601 mov r1, r0 80226e8: f000 f968 bl 80229bc RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOA, DISABLE); 80226ec: 2001 movs r0, #1 80226ee: e048 b.n 8022782 } else if (GPIOx == GPIOB) 80226f0: 4b28 ldr r3, [pc, #160] ; (8022794 ) 80226f2: 4298 cmp r0, r3 80226f4: d105 bne.n 8022702 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOB, ENABLE); 80226f6: 2002 movs r0, #2 80226f8: 2101 movs r1, #1 80226fa: f000 f95f bl 80229bc RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOB, DISABLE); 80226fe: 2002 movs r0, #2 8022700: e03f b.n 8022782 } else if (GPIOx == GPIOC) 8022702: 4b25 ldr r3, [pc, #148] ; (8022798 ) 8022704: 4298 cmp r0, r3 8022706: d105 bne.n 8022714 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOC, ENABLE); 8022708: 2004 movs r0, #4 802270a: 2101 movs r1, #1 802270c: f000 f956 bl 80229bc RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOC, DISABLE); 8022710: 2004 movs r0, #4 8022712: e036 b.n 8022782 } else if (GPIOx == GPIOD) 8022714: 4b21 ldr r3, [pc, #132] ; (802279c ) 8022716: 4298 cmp r0, r3 8022718: d105 bne.n 8022726 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOD, ENABLE); 802271a: 2008 movs r0, #8 802271c: 2101 movs r1, #1 802271e: f000 f94d bl 80229bc RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOD, DISABLE); 8022722: 2008 movs r0, #8 8022724: e02d b.n 8022782 } else if (GPIOx == GPIOE) 8022726: 4b1e ldr r3, [pc, #120] ; (80227a0 ) 8022728: 4298 cmp r0, r3 802272a: d105 bne.n 8022738 { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOE, ENABLE); 802272c: 2010 movs r0, #16 802272e: 2101 movs r1, #1 8022730: f000 f944 bl 80229bc RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOE, DISABLE); 8022734: 2010 movs r0, #16 8022736: e024 b.n 8022782 } else if (GPIOx == GPIOF) 8022738: 4b1a ldr r3, [pc, #104] ; (80227a4 ) 802273a: 4298 cmp r0, r3 802273c: d105 bne.n 802274a { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOF, ENABLE); 802273e: 2020 movs r0, #32 8022740: 2101 movs r1, #1 8022742: f000 f93b bl 80229bc RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOF, DISABLE); 8022746: 2020 movs r0, #32 8022748: e01b b.n 8022782 } else if (GPIOx == GPIOG) 802274a: 4b17 ldr r3, [pc, #92] ; (80227a8 ) 802274c: 4298 cmp r0, r3 802274e: d105 bne.n 802275c { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOG, ENABLE); 8022750: 2040 movs r0, #64 ; 0x40 8022752: 2101 movs r1, #1 8022754: f000 f932 bl 80229bc RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOG, DISABLE); 8022758: 2040 movs r0, #64 ; 0x40 802275a: e012 b.n 8022782 } else if (GPIOx == GPIOH) 802275c: 4b13 ldr r3, [pc, #76] ; (80227ac ) 802275e: 4298 cmp r0, r3 8022760: d105 bne.n 802276e { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOH, ENABLE); 8022762: 2080 movs r0, #128 ; 0x80 8022764: 2101 movs r1, #1 8022766: f000 f929 bl 80229bc RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOH, DISABLE); 802276a: 2080 movs r0, #128 ; 0x80 802276c: e009 b.n 8022782 } else { if (GPIOx == GPIOI) 802276e: 4b10 ldr r3, [pc, #64] ; (80227b0 ) 8022770: 4298 cmp r0, r3 8022772: d10b bne.n 802278c { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, ENABLE); 8022774: f44f 7080 mov.w r0, #256 ; 0x100 8022778: 2101 movs r1, #1 802277a: f000 f91f bl 80229bc RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, DISABLE); 802277e: f44f 7080 mov.w r0, #256 ; 0x100 8022782: 2100 movs r1, #0 } } } 8022784: e8bd 4008 ldmia.w sp!, {r3, lr} else { if (GPIOx == GPIOI) { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, ENABLE); RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_GPIOI, DISABLE); 8022788: f000 b918 b.w 80229bc 802278c: bd08 pop {r3, pc} 802278e: bf00 nop 8022790: 40020000 .word 0x40020000 8022794: 40020400 .word 0x40020400 8022798: 40020800 .word 0x40020800 802279c: 40020c00 .word 0x40020c00 80227a0: 40021000 .word 0x40021000 80227a4: 40021400 .word 0x40021400 80227a8: 40021800 .word 0x40021800 80227ac: 40021c00 .word 0x40021c00 80227b0: 40022000 .word 0x40022000 080227b4 : * @param GPIO_InitStruct: pointer to a GPIO_InitTypeDef structure that contains * the configuration information for the specified GPIO peripheral. * @retval None */ void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct) { 80227b4: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} /*-- GPIO Mode Configuration --*/ for (pinpos = 0x00; pinpos < 0x10; pinpos++) { pos = ((uint32_t)0x01) << pinpos; /* Get the port pins position */ currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; 80227b8: 680f ldr r7, [r1, #0] assert_param(IS_GPIO_MODE(GPIO_InitStruct->GPIO_Mode)); assert_param(IS_GPIO_PUPD(GPIO_InitStruct->GPIO_PuPd)); /* -------------------------Configure the port pins---------------- */ /*-- GPIO Mode Configuration --*/ for (pinpos = 0x00; pinpos < 0x10; pinpos++) 80227ba: 2300 movs r3, #0 { pos = ((uint32_t)0x01) << pinpos; 80227bc: f04f 0c01 mov.w ip, #1 /* Get the port pins position */ currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; if (currentpin == pos) { GPIOx->MODER &= ~(GPIO_MODER_MODER0 << (pinpos * 2)); 80227c0: f04f 0803 mov.w r8, #3 /* -------------------------Configure the port pins---------------- */ /*-- GPIO Mode Configuration --*/ for (pinpos = 0x00; pinpos < 0x10; pinpos++) { pos = ((uint32_t)0x01) << pinpos; 80227c4: fa0c f203 lsl.w r2, ip, r3 /* Get the port pins position */ currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; 80227c8: ea02 0507 and.w r5, r2, r7 if (currentpin == pos) 80227cc: 4295 cmp r5, r2 80227ce: d131 bne.n 8022834 * @param GPIOx: where x can be (A..I) to select the GPIO peripheral. * @param GPIO_InitStruct: pointer to a GPIO_InitTypeDef structure that contains * the configuration information for the specified GPIO peripheral. * @retval None */ void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct) 80227d0: 005a lsls r2, r3, #1 /* Get the port pins position */ currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; if (currentpin == pos) { GPIOx->MODER &= ~(GPIO_MODER_MODER0 << (pinpos * 2)); 80227d2: 6806 ldr r6, [r0, #0] 80227d4: fa08 f402 lsl.w r4, r8, r2 80227d8: 43e4 mvns r4, r4 80227da: 4026 ands r6, r4 80227dc: 6006 str r6, [r0, #0] GPIOx->MODER |= (((uint32_t)GPIO_InitStruct->GPIO_Mode) << (pinpos * 2)); 80227de: 790e ldrb r6, [r1, #4] 80227e0: f8d0 9000 ldr.w r9, [r0] 80227e4: fa06 fa02 lsl.w sl, r6, r2 if ((GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT) || (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_AF)) 80227e8: 3e01 subs r6, #1 currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; if (currentpin == pos) { GPIOx->MODER &= ~(GPIO_MODER_MODER0 << (pinpos * 2)); GPIOx->MODER |= (((uint32_t)GPIO_InitStruct->GPIO_Mode) << (pinpos * 2)); 80227ea: ea4a 0909 orr.w r9, sl, r9 if ((GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT) || (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_AF)) 80227ee: 2e01 cmp r6, #1 currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; if (currentpin == pos) { GPIOx->MODER &= ~(GPIO_MODER_MODER0 << (pinpos * 2)); GPIOx->MODER |= (((uint32_t)GPIO_InitStruct->GPIO_Mode) << (pinpos * 2)); 80227f0: f8c0 9000 str.w r9, [r0] if ((GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT) || (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_AF)) 80227f4: d815 bhi.n 8022822 { /* Check Speed mode parameters */ assert_param(IS_GPIO_SPEED(GPIO_InitStruct->GPIO_Speed)); /* Speed mode configuration */ GPIOx->OSPEEDR &= ~(GPIO_OSPEEDER_OSPEEDR0 << (pinpos * 2)); 80227f6: 6886 ldr r6, [r0, #8] GPIOx->OSPEEDR |= ((uint32_t)(GPIO_InitStruct->GPIO_Speed) << (pinpos * 2)); 80227f8: f891 9005 ldrb.w r9, [r1, #5] { /* Check Speed mode parameters */ assert_param(IS_GPIO_SPEED(GPIO_InitStruct->GPIO_Speed)); /* Speed mode configuration */ GPIOx->OSPEEDR &= ~(GPIO_OSPEEDER_OSPEEDR0 << (pinpos * 2)); 80227fc: 4026 ands r6, r4 80227fe: 6086 str r6, [r0, #8] GPIOx->OSPEEDR |= ((uint32_t)(GPIO_InitStruct->GPIO_Speed) << (pinpos * 2)); 8022800: 6886 ldr r6, [r0, #8] 8022802: fa09 f902 lsl.w r9, r9, r2 8022806: ea49 0606 orr.w r6, r9, r6 802280a: 6086 str r6, [r0, #8] /* Check Output mode parameters */ assert_param(IS_GPIO_OTYPE(GPIO_InitStruct->GPIO_OType)); /* Output mode configuration*/ GPIOx->OTYPER &= ~((GPIO_OTYPER_OT_0) << ((uint16_t)pinpos)) ; 802280c: 6846 ldr r6, [r0, #4] 802280e: ea26 0505 bic.w r5, r6, r5 8022812: 6045 str r5, [r0, #4] GPIOx->OTYPER |= (uint16_t)(((uint16_t)GPIO_InitStruct->GPIO_OType) << ((uint16_t)pinpos)); 8022814: 798d ldrb r5, [r1, #6] 8022816: 6846 ldr r6, [r0, #4] 8022818: fa05 f503 lsl.w r5, r5, r3 temp = ((uint32_t)(GPIO_AF) << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; GPIOx->AFR[GPIO_PinSource >> 0x03] &= ~((uint32_t)0xF << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; temp_2 = GPIOx->AFR[GPIO_PinSource >> 0x03] | temp; GPIOx->AFR[GPIO_PinSource >> 0x03] = temp_2; } 802281c: b2ad uxth r5, r5 /* Check Output mode parameters */ assert_param(IS_GPIO_OTYPE(GPIO_InitStruct->GPIO_OType)); /* Output mode configuration*/ GPIOx->OTYPER &= ~((GPIO_OTYPER_OT_0) << ((uint16_t)pinpos)) ; GPIOx->OTYPER |= (uint16_t)(((uint16_t)GPIO_InitStruct->GPIO_OType) << ((uint16_t)pinpos)); 802281e: 4335 orrs r5, r6 8022820: 6045 str r5, [r0, #4] } /* Pull-up Pull down resistor configuration*/ GPIOx->PUPDR &= ~(GPIO_PUPDR_PUPDR0 << ((uint16_t)pinpos * 2)); 8022822: 68c5 ldr r5, [r0, #12] 8022824: 402c ands r4, r5 8022826: 60c4 str r4, [r0, #12] GPIOx->PUPDR |= (((uint32_t)GPIO_InitStruct->GPIO_PuPd) << (pinpos * 2)); 8022828: 79cd ldrb r5, [r1, #7] 802282a: 68c4 ldr r4, [r0, #12] 802282c: fa05 f202 lsl.w r2, r5, r2 8022830: 4322 orrs r2, r4 8022832: 60c2 str r2, [r0, #12] assert_param(IS_GPIO_MODE(GPIO_InitStruct->GPIO_Mode)); assert_param(IS_GPIO_PUPD(GPIO_InitStruct->GPIO_PuPd)); /* -------------------------Configure the port pins---------------- */ /*-- GPIO Mode Configuration --*/ for (pinpos = 0x00; pinpos < 0x10; pinpos++) 8022834: 3301 adds r3, #1 8022836: 2b10 cmp r3, #16 8022838: d1c4 bne.n 80227c4 /* Pull-up Pull down resistor configuration*/ GPIOx->PUPDR &= ~(GPIO_PUPDR_PUPDR0 << ((uint16_t)pinpos * 2)); GPIOx->PUPDR |= (((uint32_t)GPIO_InitStruct->GPIO_PuPd) << (pinpos * 2)); } } } 802283a: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 0802283e : { /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN(GPIO_Pin)); GPIOx->BSRRL = GPIO_Pin; 802283e: 8301 strh r1, [r0, #24] 8022840: 4770 bx lr 08022842 : { /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN(GPIO_Pin)); GPIOx->BSRRH = GPIO_Pin; 8022842: 8341 strh r1, [r0, #26] 8022844: 4770 bx lr 08022846 : /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource)); assert_param(IS_GPIO_AF(GPIO_AF)); temp = ((uint32_t)(GPIO_AF) << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; 8022846: f001 0307 and.w r3, r1, #7 GPIOx->AFR[GPIO_PinSource >> 0x03] &= ~((uint32_t)0xF << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; 802284a: 08c9 lsrs r1, r1, #3 802284c: 3108 adds r1, #8 * @arg GPIO_AF_DCMI: Connect DCMI pins to AF13 * @arg GPIO_AF_EVENTOUT: Connect EVENTOUT pins to AF15 * @retval None */ void GPIO_PinAFConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_PinSource, uint8_t GPIO_AF) { 802284e: b530 push {r4, r5, lr} /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource)); assert_param(IS_GPIO_AF(GPIO_AF)); temp = ((uint32_t)(GPIO_AF) << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; 8022850: 009b lsls r3, r3, #2 GPIOx->AFR[GPIO_PinSource >> 0x03] &= ~((uint32_t)0xF << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; 8022852: f850 5021 ldr.w r5, [r0, r1, lsl #2] 8022856: 240f movs r4, #15 8022858: fa04 f403 lsl.w r4, r4, r3 802285c: ea25 0404 bic.w r4, r5, r4 8022860: f840 4021 str.w r4, [r0, r1, lsl #2] temp_2 = GPIOx->AFR[GPIO_PinSource >> 0x03] | temp; 8022864: f850 4021 ldr.w r4, [r0, r1, lsl #2] /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource)); assert_param(IS_GPIO_AF(GPIO_AF)); temp = ((uint32_t)(GPIO_AF) << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; 8022868: fa02 f203 lsl.w r2, r2, r3 GPIOx->AFR[GPIO_PinSource >> 0x03] &= ~((uint32_t)0xF << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; temp_2 = GPIOx->AFR[GPIO_PinSource >> 0x03] | temp; 802286c: 4314 orrs r4, r2 GPIOx->AFR[GPIO_PinSource >> 0x03] = temp_2; 802286e: f840 4021 str.w r4, [r0, r1, lsl #2] 8022872: bd30 pop {r4, r5, pc} 08022874 : void PWR_BackupAccessCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); *(__IO uint32_t *) CR_DBP_BB = (uint32_t)NewState; 8022874: 4b01 ldr r3, [pc, #4] ; (802287c ) 8022876: 6018 str r0, [r3, #0] 8022878: 4770 bx lr 802287a: bf00 nop 802287c: 420e0020 .word 0x420e0020 08022880 : /* Check the parameters */ assert_param(IS_RCC_LSE(RCC_LSE)); /* Reset LSEON and LSEBYP bits before configuring the LSE ------------------*/ /* Reset LSEON bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_OFF; 8022880: 4b06 ldr r3, [pc, #24] ; (802289c ) 8022882: 2200 movs r2, #0 /* Reset LSEBYP bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_OFF; /* Configure LSE (RCC_LSE_OFF is already covered by the code section above) */ switch (RCC_LSE) 8022884: 2801 cmp r0, #1 /* Check the parameters */ assert_param(IS_RCC_LSE(RCC_LSE)); /* Reset LSEON and LSEBYP bits before configuring the LSE ------------------*/ /* Reset LSEON bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_OFF; 8022886: 701a strb r2, [r3, #0] /* Reset LSEBYP bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_OFF; 8022888: 701a strb r2, [r3, #0] /* Configure LSE (RCC_LSE_OFF is already covered by the code section above) */ switch (RCC_LSE) 802288a: d002 beq.n 8022892 802288c: 2804 cmp r0, #4 802288e: d104 bne.n 802289a 8022890: e001 b.n 8022896 { case RCC_LSE_ON: /* Set LSEON bit */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_ON; 8022892: 7018 strb r0, [r3, #0] break; 8022894: 4770 bx lr case RCC_LSE_Bypass: /* Set LSEBYP and LSEON bits */ *(__IO uint8_t *) BDCR_ADDRESS = RCC_LSE_Bypass | RCC_LSE_ON; 8022896: 2205 movs r2, #5 8022898: 701a strb r2, [r3, #0] 802289a: 4770 bx lr 802289c: 40023870 .word 0x40023870 080228a0 : void RCC_LSICmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); *(__IO uint32_t *) CSR_LSION_BB = (uint32_t)NewState; 80228a0: 4b01 ldr r3, [pc, #4] ; (80228a8 ) 80228a2: 6018 str r0, [r3, #0] 80228a4: 4770 bx lr 80228a6: bf00 nop 80228a8: 42470e80 .word 0x42470e80 080228ac : void RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clocks) { uint32_t tmp = 0, presc = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; /* Get SYSCLK source -------------------------------------------------------*/ tmp = RCC->CFGR & RCC_CFGR_SWS; 80228ac: 4b1e ldr r3, [pc, #120] ; (8022928 ) 80228ae: 689a ldr r2, [r3, #8] 80228b0: f002 020c and.w r2, r2, #12 switch (tmp) 80228b4: 2a04 cmp r2, #4 * configuration based on this function will be incorrect. * * @retval None */ void RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clocks) { 80228b6: b510 push {r4, lr} uint32_t tmp = 0, presc = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; /* Get SYSCLK source -------------------------------------------------------*/ tmp = RCC->CFGR & RCC_CFGR_SWS; switch (tmp) 80228b8: d003 beq.n 80228c2 80228ba: 2a08 cmp r2, #8 80228bc: d003 beq.n 80228c6 80228be: 4b1b ldr r3, [pc, #108] ; (802292c ) 80228c0: e018 b.n 80228f4 { case 0x00: /* HSI used as system clock source */ RCC_Clocks->SYSCLK_Frequency = HSI_VALUE; break; case 0x04: /* HSE used as system clock source */ RCC_Clocks->SYSCLK_Frequency = HSE_VALUE; 80228c2: 4b1b ldr r3, [pc, #108] ; (8022930 ) 80228c4: e016 b.n 80228f4 case 0x08: /* PLL used as system clock source */ /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN SYSCLK = PLL_VCO / PLLP */ pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; 80228c6: 6859 ldr r1, [r3, #4] pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; 80228c8: 685a ldr r2, [r3, #4] if (pllsource != 0) 80228ca: f411 0f80 tst.w r1, #4194304 ; 0x400000 { /* HSE used as PLL clock source */ pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 80228ce: 6859 ldr r1, [r3, #4] 80228d0: bf14 ite ne 80228d2: 4b17 ldrne r3, [pc, #92] ; (8022930 ) } else { /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 80228d4: 4b15 ldreq r3, [pc, #84] ; (802292c ) /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN SYSCLK = PLL_VCO / PLLP */ pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; 80228d6: f002 023f and.w r2, r2, #63 ; 0x3f pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); } else { /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 80228da: fbb3 f3f2 udiv r3, r3, r2 } pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; 80228de: 4a12 ldr r2, [pc, #72] ; (8022928 ) 80228e0: 6852 ldr r2, [r2, #4] 80228e2: f3c2 4201 ubfx r2, r2, #16, #2 pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; if (pllsource != 0) { /* HSE used as PLL clock source */ pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 80228e6: f3c1 1188 ubfx r1, r1, #6, #9 { /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); } pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; 80228ea: 3201 adds r2, #1 pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); } else { /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); 80228ec: 434b muls r3, r1 } pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; 80228ee: 0052 lsls r2, r2, #1 RCC_Clocks->SYSCLK_Frequency = pllvco/pllp; 80228f0: fbb3 f3f2 udiv r3, r3, r2 break; } /* Compute HCLK, PCLK1 and PCLK2 clocks frequencies ------------------------*/ /* Get HCLK prescaler */ tmp = RCC->CFGR & RCC_CFGR_HPRE; 80228f4: 490c ldr r1, [pc, #48] ; (8022928 ) /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); } pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; RCC_Clocks->SYSCLK_Frequency = pllvco/pllp; 80228f6: 6003 str r3, [r0, #0] break; } /* Compute HCLK, PCLK1 and PCLK2 clocks frequencies ------------------------*/ /* Get HCLK prescaler */ tmp = RCC->CFGR & RCC_CFGR_HPRE; 80228f8: 688b ldr r3, [r1, #8] tmp = tmp >> 4; presc = APBAHBPrescTable[tmp]; 80228fa: 4a0e ldr r2, [pc, #56] ; (8022934 ) } /* Compute HCLK, PCLK1 and PCLK2 clocks frequencies ------------------------*/ /* Get HCLK prescaler */ tmp = RCC->CFGR & RCC_CFGR_HPRE; tmp = tmp >> 4; 80228fc: f3c3 1303 ubfx r3, r3, #4, #4 presc = APBAHBPrescTable[tmp]; 8022900: 5cd4 ldrb r4, [r2, r3] /* HCLK clock frequency */ RCC_Clocks->HCLK_Frequency = RCC_Clocks->SYSCLK_Frequency >> presc; 8022902: 6803 ldr r3, [r0, #0] 8022904: fa23 f304 lsr.w r3, r3, r4 8022908: 6043 str r3, [r0, #4] /* Get PCLK1 prescaler */ tmp = RCC->CFGR & RCC_CFGR_PPRE1; 802290a: 688c ldr r4, [r1, #8] tmp = tmp >> 10; 802290c: f3c4 2482 ubfx r4, r4, #10, #3 presc = APBAHBPrescTable[tmp]; 8022910: 5d14 ldrb r4, [r2, r4] /* PCLK1 clock frequency */ RCC_Clocks->PCLK1_Frequency = RCC_Clocks->HCLK_Frequency >> presc; 8022912: fa23 f404 lsr.w r4, r3, r4 8022916: 6084 str r4, [r0, #8] /* Get PCLK2 prescaler */ tmp = RCC->CFGR & RCC_CFGR_PPRE2; 8022918: 6889 ldr r1, [r1, #8] tmp = tmp >> 13; 802291a: f3c1 3142 ubfx r1, r1, #13, #3 presc = APBAHBPrescTable[tmp]; 802291e: 5c52 ldrb r2, [r2, r1] /* PCLK2 clock frequency */ RCC_Clocks->PCLK2_Frequency = RCC_Clocks->HCLK_Frequency >> presc; 8022920: fa23 f302 lsr.w r3, r3, r2 8022924: 60c3 str r3, [r0, #12] 8022926: bd10 pop {r4, pc} 8022928: 40023800 .word 0x40023800 802292c: 00f42400 .word 0x00f42400 8022930: 017d7840 .word 0x017d7840 8022934: 200000f8 .word 0x200000f8 08022938 : uint32_t tmpreg = 0; /* Check the parameters */ assert_param(IS_RCC_RTCCLK_SOURCE(RCC_RTCCLKSource)); if ((RCC_RTCCLKSource & 0x00000300) == 0x00000300) 8022938: f400 7340 and.w r3, r0, #768 ; 0x300 802293c: f5b3 7f40 cmp.w r3, #768 ; 0x300 8022940: 4b08 ldr r3, [pc, #32] ; (8022964 ) 8022942: d108 bne.n 8022956 { /* If HSE is selected as RTC clock source, configure HSE division factor for RTC clock */ tmpreg = RCC->CFGR; 8022944: 6899 ldr r1, [r3, #8] /* Clear RTCPRE[4:0] bits */ tmpreg &= ~RCC_CFGR_RTCPRE; /* Configure HSE division factor for RTC clock */ tmpreg |= (RCC_RTCCLKSource & 0xFFFFCFF); 8022946: f020 4270 bic.w r2, r0, #4026531840 ; 0xf0000000 if ((RCC_RTCCLKSource & 0x00000300) == 0x00000300) { /* If HSE is selected as RTC clock source, configure HSE division factor for RTC clock */ tmpreg = RCC->CFGR; /* Clear RTCPRE[4:0] bits */ tmpreg &= ~RCC_CFGR_RTCPRE; 802294a: f421 11f8 bic.w r1, r1, #2031616 ; 0x1f0000 /* Configure HSE division factor for RTC clock */ tmpreg |= (RCC_RTCCLKSource & 0xFFFFCFF); 802294e: f422 7240 bic.w r2, r2, #768 ; 0x300 8022952: 430a orrs r2, r1 /* Store the new value */ RCC->CFGR = tmpreg; 8022954: 609a str r2, [r3, #8] } /* Select the RTC clock source */ RCC->BDCR |= (RCC_RTCCLKSource & 0x00000FFF); 8022956: 6f1a ldr r2, [r3, #112] ; 0x70 8022958: 0500 lsls r0, r0, #20 802295a: ea42 5010 orr.w r0, r2, r0, lsr #20 802295e: 6718 str r0, [r3, #112] ; 0x70 8022960: 4770 bx lr 8022962: bf00 nop 8022964: 40023800 .word 0x40023800 08022968 : void RCC_RTCCLKCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); *(__IO uint32_t *) BDCR_RTCEN_BB = (uint32_t)NewState; 8022968: 4b01 ldr r3, [pc, #4] ; (8022970 ) 802296a: 6018 str r0, [r3, #0] 802296c: 4770 bx lr 802296e: bf00 nop 8022970: 42470e3c .word 0x42470e3c 08022974 : * @param NewState: new state of the specified peripheral clock. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_AHB1PeriphClockCmd(uint32_t RCC_AHB1Periph, FunctionalState NewState) { 8022974: 4b04 ldr r3, [pc, #16] ; (8022988 ) assert_param(IS_RCC_AHB1_CLOCK_PERIPH(RCC_AHB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->AHB1ENR |= RCC_AHB1Periph; 8022976: 6b1a ldr r2, [r3, #48] ; 0x30 { /* Check the parameters */ assert_param(IS_RCC_AHB1_CLOCK_PERIPH(RCC_AHB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8022978: b109 cbz r1, 802297e { RCC->AHB1ENR |= RCC_AHB1Periph; 802297a: 4310 orrs r0, r2 802297c: e001 b.n 8022982 } else { RCC->AHB1ENR &= ~RCC_AHB1Periph; 802297e: ea22 0000 bic.w r0, r2, r0 8022982: 6318 str r0, [r3, #48] ; 0x30 8022984: 4770 bx lr 8022986: bf00 nop 8022988: 40023800 .word 0x40023800 0802298c : * @param NewState: new state of the specified peripheral clock. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_APB1PeriphClockCmd(uint32_t RCC_APB1Periph, FunctionalState NewState) { 802298c: 4b04 ldr r3, [pc, #16] ; (80229a0 ) assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->APB1ENR |= RCC_APB1Periph; 802298e: 6c1a ldr r2, [r3, #64] ; 0x40 { /* Check the parameters */ assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8022990: b109 cbz r1, 8022996 { RCC->APB1ENR |= RCC_APB1Periph; 8022992: 4310 orrs r0, r2 8022994: e001 b.n 802299a } else { RCC->APB1ENR &= ~RCC_APB1Periph; 8022996: ea22 0000 bic.w r0, r2, r0 802299a: 6418 str r0, [r3, #64] ; 0x40 802299c: 4770 bx lr 802299e: bf00 nop 80229a0: 40023800 .word 0x40023800 080229a4 : * @param NewState: new state of the specified peripheral clock. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_APB2PeriphClockCmd(uint32_t RCC_APB2Periph, FunctionalState NewState) { 80229a4: 4b04 ldr r3, [pc, #16] ; (80229b8 ) assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->APB2ENR |= RCC_APB2Periph; 80229a6: 6c5a ldr r2, [r3, #68] ; 0x44 { /* Check the parameters */ assert_param(IS_RCC_APB2_PERIPH(RCC_APB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 80229a8: b109 cbz r1, 80229ae { RCC->APB2ENR |= RCC_APB2Periph; 80229aa: 4310 orrs r0, r2 80229ac: e001 b.n 80229b2 } else { RCC->APB2ENR &= ~RCC_APB2Periph; 80229ae: ea22 0000 bic.w r0, r2, r0 80229b2: 6458 str r0, [r3, #68] ; 0x44 80229b4: 4770 bx lr 80229b6: bf00 nop 80229b8: 40023800 .word 0x40023800 080229bc : * @param NewState: new state of the specified peripheral reset. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_AHB1PeriphResetCmd(uint32_t RCC_AHB1Periph, FunctionalState NewState) { 80229bc: 4b04 ldr r3, [pc, #16] ; (80229d0 ) assert_param(IS_RCC_AHB1_RESET_PERIPH(RCC_AHB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->AHB1RSTR |= RCC_AHB1Periph; 80229be: 691a ldr r2, [r3, #16] { /* Check the parameters */ assert_param(IS_RCC_AHB1_RESET_PERIPH(RCC_AHB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 80229c0: b109 cbz r1, 80229c6 { RCC->AHB1RSTR |= RCC_AHB1Periph; 80229c2: 4310 orrs r0, r2 80229c4: e001 b.n 80229ca } else { RCC->AHB1RSTR &= ~RCC_AHB1Periph; 80229c6: ea22 0000 bic.w r0, r2, r0 80229ca: 6118 str r0, [r3, #16] 80229cc: 4770 bx lr 80229ce: bf00 nop 80229d0: 40023800 .word 0x40023800 080229d4 : * @param NewState: new state of the specified peripheral reset. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_APB1PeriphResetCmd(uint32_t RCC_APB1Periph, FunctionalState NewState) { 80229d4: 4b04 ldr r3, [pc, #16] ; (80229e8 ) /* Check the parameters */ assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->APB1RSTR |= RCC_APB1Periph; 80229d6: 6a1a ldr r2, [r3, #32] void RCC_APB1PeriphResetCmd(uint32_t RCC_APB1Periph, FunctionalState NewState) { /* Check the parameters */ assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 80229d8: b109 cbz r1, 80229de { RCC->APB1RSTR |= RCC_APB1Periph; 80229da: 4310 orrs r0, r2 80229dc: e001 b.n 80229e2 } else { RCC->APB1RSTR &= ~RCC_APB1Periph; 80229de: ea22 0000 bic.w r0, r2, r0 80229e2: 6218 str r0, [r3, #32] 80229e4: 4770 bx lr 80229e6: bf00 nop 80229e8: 40023800 .word 0x40023800 080229ec : * @param NewState: new state of the specified peripheral reset. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_APB2PeriphResetCmd(uint32_t RCC_APB2Periph, FunctionalState NewState) { 80229ec: 4b04 ldr r3, [pc, #16] ; (8022a00 ) /* Check the parameters */ assert_param(IS_RCC_APB2_RESET_PERIPH(RCC_APB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { RCC->APB2RSTR |= RCC_APB2Periph; 80229ee: 6a5a ldr r2, [r3, #36] ; 0x24 void RCC_APB2PeriphResetCmd(uint32_t RCC_APB2Periph, FunctionalState NewState) { /* Check the parameters */ assert_param(IS_RCC_APB2_RESET_PERIPH(RCC_APB2Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 80229f0: b109 cbz r1, 80229f6 { RCC->APB2RSTR |= RCC_APB2Periph; 80229f2: 4310 orrs r0, r2 80229f4: e001 b.n 80229fa } else { RCC->APB2RSTR &= ~RCC_APB2Periph; 80229f6: ea22 0000 bic.w r0, r2, r0 80229fa: 6258 str r0, [r3, #36] ; 0x24 80229fc: 4770 bx lr 80229fe: bf00 nop 8022a00: 40023800 .word 0x40023800 08022a04 : /* Check the parameters */ assert_param(IS_RCC_FLAG(RCC_FLAG)); /* Get the RCC register index */ tmp = RCC_FLAG >> 5; 8022a04: 0943 lsrs r3, r0, #5 if (tmp == 1) /* The flag to check is in CR register */ 8022a06: 2b01 cmp r3, #1 8022a08: 4a07 ldr r2, [pc, #28] ; (8022a28 ) 8022a0a: d101 bne.n 8022a10 { statusreg = RCC->CR; 8022a0c: 6813 ldr r3, [r2, #0] 8022a0e: e003 b.n 8022a18 } else if (tmp == 2) /* The flag to check is in BDCR register */ 8022a10: 2b02 cmp r3, #2 { statusreg = RCC->BDCR; 8022a12: bf0c ite eq 8022a14: 6f13 ldreq r3, [r2, #112] ; 0x70 } else /* The flag to check is in CSR register */ { statusreg = RCC->CSR; 8022a16: 6f53 ldrne r3, [r2, #116] ; 0x74 } /* Get the flag position */ tmp = RCC_FLAG & FLAG_MASK; if ((statusreg & ((uint32_t)1 << tmp)) != (uint32_t)RESET) 8022a18: f000 001f and.w r0, r0, #31 8022a1c: fa23 f000 lsr.w r0, r3, r0 { bitstatus = RESET; } /* Return the flag status */ return bitstatus; } 8022a20: f000 0001 and.w r0, r0, #1 8022a24: 4770 bx lr 8022a26: bf00 nop 8022a28: 40023800 .word 0x40023800 08022a2c : * @param Value: Byte to be converted. * @retval Converted byte */ static uint8_t RTC_ByteToBcd2(uint8_t Value) { uint8_t bcdhigh = 0; 8022a2c: 2300 movs r3, #0 while (Value >= 10) 8022a2e: e003 b.n 8022a38 { bcdhigh++; 8022a30: 3301 adds r3, #1 Value -= 10; 8022a32: 380a subs r0, #10 { uint8_t bcdhigh = 0; while (Value >= 10) { bcdhigh++; 8022a34: b2db uxtb r3, r3 Value -= 10; 8022a36: b2c0 uxtb r0, r0 */ static uint8_t RTC_ByteToBcd2(uint8_t Value) { uint8_t bcdhigh = 0; while (Value >= 10) 8022a38: 2809 cmp r0, #9 8022a3a: d8f9 bhi.n 8022a30 { bcdhigh++; Value -= 10; } return ((uint8_t)(bcdhigh << 4) | Value); 8022a3c: ea40 1003 orr.w r0, r0, r3, lsl #4 } 8022a40: b2c0 uxtb r0, r0 8022a42: 4770 bx lr 08022a44 : * @retval Converted word */ static uint8_t RTC_Bcd2ToByte(uint8_t Value) { uint8_t tmp = 0; tmp = ((uint8_t)(Value & (uint8_t)0xF0) >> (uint8_t)0x4) * 10; 8022a44: 0902 lsrs r2, r0, #4 return (tmp + (Value & (uint8_t)0x0F)); 8022a46: f000 030f and.w r3, r0, #15 8022a4a: 200a movs r0, #10 8022a4c: fb00 3002 mla r0, r0, r2, r3 } 8022a50: b2c0 uxtb r0, r0 8022a52: 4770 bx lr 08022a54 : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC is in Init mode * - ERROR: RTC is not in Init mode */ ErrorStatus RTC_EnterInitMode(void) { 8022a54: b082 sub sp, #8 __IO uint32_t initcounter = 0x00; 8022a56: 2300 movs r3, #0 8022a58: 9301 str r3, [sp, #4] ErrorStatus status = ERROR; uint32_t initstatus = 0x00; /* Check if the Initialization mode is set */ if ((RTC->ISR & RTC_ISR_INITF) == (uint32_t)RESET) 8022a5a: 4b0d ldr r3, [pc, #52] ; (8022a90 ) 8022a5c: 68da ldr r2, [r3, #12] 8022a5e: 0650 lsls r0, r2, #25 8022a60: d413 bmi.n 8022a8a { /* Set the Initialization mode */ RTC->ISR = (uint32_t)RTC_INIT_MASK; 8022a62: f04f 32ff mov.w r2, #4294967295 8022a66: 60da str r2, [r3, #12] /* Wait till RTC is in INIT state and if Time out is reached exit */ do { initstatus = RTC->ISR & RTC_ISR_INITF; 8022a68: 68da ldr r2, [r3, #12] initcounter++; 8022a6a: 9901 ldr r1, [sp, #4] 8022a6c: 3101 adds r1, #1 8022a6e: 9101 str r1, [sp, #4] } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); 8022a70: 9901 ldr r1, [sp, #4] 8022a72: f5b1 3f80 cmp.w r1, #65536 ; 0x10000 RTC->ISR = (uint32_t)RTC_INIT_MASK; /* Wait till RTC is in INIT state and if Time out is reached exit */ do { initstatus = RTC->ISR & RTC_ISR_INITF; 8022a76: f002 0240 and.w r2, r2, #64 ; 0x40 initcounter++; } while((initcounter != INITMODE_TIMEOUT) && (initstatus == 0x00)); 8022a7a: d001 beq.n 8022a80 8022a7c: 2a00 cmp r2, #0 8022a7e: d0f3 beq.n 8022a68 if ((RTC->ISR & RTC_ISR_INITF) != RESET) 8022a80: 4b03 ldr r3, [pc, #12] ; (8022a90 ) 8022a82: 68d8 ldr r0, [r3, #12] { status = SUCCESS; 8022a84: f3c0 1080 ubfx r0, r0, #6, #1 8022a88: e000 b.n 8022a8c status = ERROR; } } else { status = SUCCESS; 8022a8a: 2001 movs r0, #1 } return (status); } 8022a8c: b002 add sp, #8 8022a8e: 4770 bx lr 8022a90: 40002800 .word 0x40002800 08022a94 : * @retval None */ void RTC_ExitInitMode(void) { /* Exit Initialization mode */ RTC->ISR &= (uint32_t)~RTC_ISR_INIT; 8022a94: 4b02 ldr r3, [pc, #8] ; (8022aa0 ) 8022a96: 68da ldr r2, [r3, #12] 8022a98: f022 0280 bic.w r2, r2, #128 ; 0x80 8022a9c: 60da str r2, [r3, #12] 8022a9e: 4770 bx lr 8022aa0: 40002800 .word 0x40002800 08022aa4 : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC registers are initialized * - ERROR: RTC registers are not initialized */ ErrorStatus RTC_Init(RTC_InitTypeDef* RTC_InitStruct) { 8022aa4: b538 push {r3, r4, r5, lr} assert_param(IS_RTC_HOUR_FORMAT(RTC_InitStruct->RTC_HourFormat)); assert_param(IS_RTC_ASYNCH_PREDIV(RTC_InitStruct->RTC_AsynchPrediv)); assert_param(IS_RTC_SYNCH_PREDIV(RTC_InitStruct->RTC_SynchPrediv)); /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; 8022aa6: 4c0f ldr r4, [pc, #60] ; (8022ae4 ) 8022aa8: 23ca movs r3, #202 ; 0xca 8022aaa: 6263 str r3, [r4, #36] ; 0x24 RTC->WPR = 0x53; 8022aac: 2353 movs r3, #83 ; 0x53 8022aae: 6263 str r3, [r4, #36] ; 0x24 * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC registers are initialized * - ERROR: RTC registers are not initialized */ ErrorStatus RTC_Init(RTC_InitTypeDef* RTC_InitStruct) { 8022ab0: 4605 mov r5, r0 /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; RTC->WPR = 0x53; /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) 8022ab2: f7ff ffcf bl 8022a54 8022ab6: b188 cbz r0, 8022adc status = ERROR; } else { /* Clear RTC CR FMT Bit */ RTC->CR &= ((uint32_t)~(RTC_CR_FMT)); 8022ab8: 68a3 ldr r3, [r4, #8] 8022aba: f023 0340 bic.w r3, r3, #64 ; 0x40 8022abe: 60a3 str r3, [r4, #8] /* Set RTC_CR register */ RTC->CR |= ((uint32_t)(RTC_InitStruct->RTC_HourFormat)); 8022ac0: 68a2 ldr r2, [r4, #8] 8022ac2: 682b ldr r3, [r5, #0] 8022ac4: 4313 orrs r3, r2 8022ac6: 60a3 str r3, [r4, #8] /* Configure the RTC PRER */ RTC->PRER = (uint32_t)(RTC_InitStruct->RTC_SynchPrediv); 8022ac8: 68ab ldr r3, [r5, #8] 8022aca: 6123 str r3, [r4, #16] RTC->PRER |= (uint32_t)(RTC_InitStruct->RTC_AsynchPrediv << 16); 8022acc: 6923 ldr r3, [r4, #16] 8022ace: 686a ldr r2, [r5, #4] 8022ad0: ea43 4302 orr.w r3, r3, r2, lsl #16 8022ad4: 6123 str r3, [r4, #16] /* Exit Initialization mode */ RTC_ExitInitMode(); 8022ad6: f7ff ffdd bl 8022a94 status = SUCCESS; 8022ada: 2001 movs r0, #1 } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 8022adc: 4b01 ldr r3, [pc, #4] ; (8022ae4 ) 8022ade: 22ff movs r2, #255 ; 0xff 8022ae0: 625a str r2, [r3, #36] ; 0x24 return status; } 8022ae2: bd38 pop {r3, r4, r5, pc} 8022ae4: 40002800 .word 0x40002800 08022ae8 : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC registers are synchronised * - ERROR: RTC registers are not synchronised */ ErrorStatus RTC_WaitForSynchro(void) { 8022ae8: b082 sub sp, #8 __IO uint32_t synchrocounter = 0; 8022aea: 2300 movs r3, #0 8022aec: 9301 str r3, [sp, #4] ErrorStatus status = ERROR; uint32_t synchrostatus = 0x00; /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; 8022aee: 4b0e ldr r3, [pc, #56] ; (8022b28 ) 8022af0: 22ca movs r2, #202 ; 0xca 8022af2: 625a str r2, [r3, #36] ; 0x24 RTC->WPR = 0x53; 8022af4: 2253 movs r2, #83 ; 0x53 8022af6: 625a str r2, [r3, #36] ; 0x24 /* Clear RSF flag */ RTC->ISR &= (uint32_t)RTC_RSF_MASK; 8022af8: 68da ldr r2, [r3, #12] 8022afa: f022 02a0 bic.w r2, r2, #160 ; 0xa0 8022afe: 60da str r2, [r3, #12] /* Wait the registers to be synchronised */ do { synchrostatus = RTC->ISR & RTC_ISR_RSF; 8022b00: 68d9 ldr r1, [r3, #12] synchrocounter++; 8022b02: 9a01 ldr r2, [sp, #4] 8022b04: 3201 adds r2, #1 8022b06: 9201 str r2, [sp, #4] } while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00)); 8022b08: 9a01 ldr r2, [sp, #4] 8022b0a: f5b2 3f00 cmp.w r2, #131072 ; 0x20000 RTC->ISR &= (uint32_t)RTC_RSF_MASK; /* Wait the registers to be synchronised */ do { synchrostatus = RTC->ISR & RTC_ISR_RSF; 8022b0e: f001 0120 and.w r1, r1, #32 8022b12: 4a05 ldr r2, [pc, #20] ; (8022b28 ) synchrocounter++; } while((synchrocounter != SYNCHRO_TIMEOUT) && (synchrostatus == 0x00)); 8022b14: d001 beq.n 8022b1a 8022b16: 2900 cmp r1, #0 8022b18: d0f2 beq.n 8022b00 if ((RTC->ISR & RTC_ISR_RSF) != RESET) 8022b1a: 68d0 ldr r0, [r2, #12] { status = ERROR; } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 8022b1c: 23ff movs r3, #255 ; 0xff 8022b1e: 6253 str r3, [r2, #36] ; 0x24 return (status); } 8022b20: f3c0 1040 ubfx r0, r0, #5, #1 8022b24: b002 add sp, #8 8022b26: 4770 bx lr 8022b28: 40002800 .word 0x40002800 08022b2c : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC Time register is configured * - ERROR: RTC Time register is not configured */ ErrorStatus RTC_SetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct) { 8022b2c: b5f8 push {r3, r4, r5, r6, r7, lr} 8022b2e: 4b24 ldr r3, [pc, #144] ; (8022bc0 ) 8022b30: 460c mov r4, r1 /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); if (RTC_Format == RTC_Format_BIN) { if ((RTC->CR & RTC_CR_FMT) != (uint32_t)RESET) 8022b32: 689b ldr r3, [r3, #8] ErrorStatus status = ERROR; /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); if (RTC_Format == RTC_Format_BIN) 8022b34: b920 cbnz r0, 8022b40 { if ((RTC->CR & RTC_CR_FMT) != (uint32_t)RESET) 8022b36: f013 0340 ands.w r3, r3, #64 ; 0x40 8022b3a: d12e bne.n 8022b9a assert_param(IS_RTC_HOUR12(RTC_TimeStruct->RTC_Hours)); assert_param(IS_RTC_H12(RTC_TimeStruct->RTC_H12)); } else { RTC_TimeStruct->RTC_H12 = 0x00; 8022b3c: 70cb strb r3, [r1, #3] 8022b3e: e02c b.n 8022b9a assert_param(IS_RTC_MINUTES(RTC_TimeStruct->RTC_Minutes)); assert_param(IS_RTC_SECONDS(RTC_TimeStruct->RTC_Seconds)); } else { if ((RTC->CR & RTC_CR_FMT) != (uint32_t)RESET) 8022b40: f013 0340 ands.w r3, r3, #64 ; 0x40 8022b44: d11e bne.n 8022b84 assert_param(IS_RTC_HOUR12(tmpreg)); assert_param(IS_RTC_H12(RTC_TimeStruct->RTC_H12)); } else { RTC_TimeStruct->RTC_H12 = 0x00; 8022b46: 70cb strb r3, [r1, #3] 8022b48: e01c b.n 8022b84 ((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Seconds)) | \ (((uint32_t)RTC_TimeStruct->RTC_H12) << 16)); } /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; 8022b4a: 4c1d ldr r4, [pc, #116] ; (8022bc0 ) 8022b4c: 23ca movs r3, #202 ; 0xca 8022b4e: 6263 str r3, [r4, #36] ; 0x24 RTC->WPR = 0x53; 8022b50: 2353 movs r3, #83 ; 0x53 8022b52: 6263 str r3, [r4, #36] ; 0x24 /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) 8022b54: f7ff ff7e bl 8022a54 8022b58: b180 cbz r0, 8022b7c status = ERROR; } else { /* Set the RTC_TR register */ RTC->TR = (uint32_t)(tmpreg & RTC_TR_RESERVED_MASK); 8022b5a: f005 357f and.w r5, r5, #2139062143 ; 0x7f7f7f7f 8022b5e: f025 45fe bic.w r5, r5, #2130706432 ; 0x7f000000 8022b62: 6025 str r5, [r4, #0] /* Exit Initialization mode */ RTC_ExitInitMode(); 8022b64: f7ff ff96 bl 8022a94 /* If RTC_CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */ if ((RTC->CR & RTC_CR_BYPSHAD) == RESET) 8022b68: 68a3 ldr r3, [r4, #8] 8022b6a: 0699 lsls r1, r3, #26 8022b6c: d405 bmi.n 8022b7a { if (RTC_WaitForSynchro() == ERROR) 8022b6e: f7ff ffbb bl 8022ae8 RTC->WPR = 0x53; /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) { status = ERROR; 8022b72: 3000 adds r0, #0 8022b74: bf18 it ne 8022b76: 2001 movne r0, #1 8022b78: e000 b.n 8022b7c status = SUCCESS; } } else { status = SUCCESS; 8022b7a: 2001 movs r0, #1 } } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 8022b7c: 4b10 ldr r3, [pc, #64] ; (8022bc0 ) 8022b7e: 22ff movs r2, #255 ; 0xff 8022b80: 625a str r2, [r3, #36] ; 0x24 8022b82: bdf8 pop {r3, r4, r5, r6, r7, pc} /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ ((uint32_t)(RTC_TimeStruct->RTC_Minutes) << 8) | \ 8022b84: 7865 ldrb r5, [r4, #1] } /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ 8022b86: 7823 ldrb r3, [r4, #0] ((uint32_t)(RTC_TimeStruct->RTC_Minutes) << 8) | \ 8022b88: 022d lsls r5, r5, #8 } /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ 8022b8a: ea45 4503 orr.w r5, r5, r3, lsl #16 ((uint32_t)(RTC_TimeStruct->RTC_Minutes) << 8) | \ ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ 8022b8e: 78a3 ldrb r3, [r4, #2] /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ ((uint32_t)(RTC_TimeStruct->RTC_Minutes) << 8) | \ 8022b90: 431d orrs r5, r3 ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ ((uint32_t)(RTC_TimeStruct->RTC_H12) << 16)); 8022b92: 78e3 ldrb r3, [r4, #3] } /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = (((uint32_t)(RTC_TimeStruct->RTC_Hours) << 16) | \ 8022b94: ea45 4503 orr.w r5, r5, r3, lsl #16 8022b98: e7d7 b.n 8022b4a ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ ((uint32_t)(RTC_TimeStruct->RTC_H12) << 16)); } else { tmpreg = (uint32_t)(((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Hours) << 16) | \ 8022b9a: 7820 ldrb r0, [r4, #0] 8022b9c: f7ff ff46 bl 8022a2c 8022ba0: 4607 mov r7, r0 ((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Minutes) << 8) | \ 8022ba2: 7860 ldrb r0, [r4, #1] 8022ba4: f7ff ff42 bl 8022a2c 8022ba8: 4606 mov r6, r0 ((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Seconds)) | \ 8022baa: 78a0 ldrb r0, [r4, #2] 8022bac: f7ff ff3e bl 8022a2c (((uint32_t)RTC_TimeStruct->RTC_H12) << 16)); 8022bb0: 78e5 ldrb r5, [r4, #3] ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ ((uint32_t)(RTC_TimeStruct->RTC_H12) << 16)); } else { tmpreg = (uint32_t)(((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Hours) << 16) | \ 8022bb2: ea40 4005 orr.w r0, r0, r5, lsl #16 ((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Minutes) << 8) | \ 8022bb6: ea40 4507 orr.w r5, r0, r7, lsl #16 ((uint32_t)RTC_TimeStruct->RTC_Seconds) | \ ((uint32_t)(RTC_TimeStruct->RTC_H12) << 16)); } else { tmpreg = (uint32_t)(((uint32_t)RTC_ByteToBcd2(RTC_TimeStruct->RTC_Hours) << 16) | \ 8022bba: ea45 2506 orr.w r5, r5, r6, lsl #8 8022bbe: e7c4 b.n 8022b4a 8022bc0: 40002800 .word 0x40002800 08022bc4 : /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK); 8022bc4: 4b0f ldr r3, [pc, #60] ; (8022c04 ) 8022bc6: 681b ldr r3, [r3, #0] * @param RTC_TimeStruct: pointer to a RTC_TimeTypeDef structure that will * contain the returned current time configuration. * @retval None */ void RTC_GetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct) { 8022bc8: b570 push {r4, r5, r6, lr} /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK); /* Fill the structure fields with the read parameters */ RTC_TimeStruct->RTC_Hours = (uint8_t)((tmpreg & (RTC_TR_HT | RTC_TR_HU)) >> 16); 8022bca: f3c3 4205 ubfx r2, r3, #16, #6 RTC_TimeStruct->RTC_Minutes = (uint8_t)((tmpreg & (RTC_TR_MNT | RTC_TR_MNU)) >>8); 8022bce: f3c3 2606 ubfx r6, r3, #8, #7 RTC_TimeStruct->RTC_Seconds = (uint8_t)(tmpreg & (RTC_TR_ST | RTC_TR_SU)); 8022bd2: f003 057f and.w r5, r3, #127 ; 0x7f RTC_TimeStruct->RTC_H12 = (uint8_t)((tmpreg & (RTC_TR_PM)) >> 16); 8022bd6: f403 0380 and.w r3, r3, #4194304 ; 0x400000 8022bda: 0c1b lsrs r3, r3, #16 * @param RTC_TimeStruct: pointer to a RTC_TimeTypeDef structure that will * contain the returned current time configuration. * @retval None */ void RTC_GetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct) { 8022bdc: 460c mov r4, r1 /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK); /* Fill the structure fields with the read parameters */ RTC_TimeStruct->RTC_Hours = (uint8_t)((tmpreg & (RTC_TR_HT | RTC_TR_HU)) >> 16); 8022bde: 700a strb r2, [r1, #0] RTC_TimeStruct->RTC_Minutes = (uint8_t)((tmpreg & (RTC_TR_MNT | RTC_TR_MNU)) >>8); 8022be0: 704e strb r6, [r1, #1] RTC_TimeStruct->RTC_Seconds = (uint8_t)(tmpreg & (RTC_TR_ST | RTC_TR_SU)); 8022be2: 708d strb r5, [r1, #2] RTC_TimeStruct->RTC_H12 = (uint8_t)((tmpreg & (RTC_TR_PM)) >> 16); 8022be4: 70cb strb r3, [r1, #3] /* Check the input parameters format */ if (RTC_Format == RTC_Format_BIN) 8022be6: b958 cbnz r0, 8022c00 { /* Convert the structure parameters to Binary format */ RTC_TimeStruct->RTC_Hours = (uint8_t)RTC_Bcd2ToByte(RTC_TimeStruct->RTC_Hours); 8022be8: 4610 mov r0, r2 8022bea: f7ff ff2b bl 8022a44 8022bee: 7020 strb r0, [r4, #0] RTC_TimeStruct->RTC_Minutes = (uint8_t)RTC_Bcd2ToByte(RTC_TimeStruct->RTC_Minutes); 8022bf0: 4630 mov r0, r6 8022bf2: f7ff ff27 bl 8022a44 8022bf6: 7060 strb r0, [r4, #1] RTC_TimeStruct->RTC_Seconds = (uint8_t)RTC_Bcd2ToByte(RTC_TimeStruct->RTC_Seconds); 8022bf8: 4628 mov r0, r5 8022bfa: f7ff ff23 bl 8022a44 8022bfe: 70a0 strb r0, [r4, #2] 8022c00: bd70 pop {r4, r5, r6, pc} 8022c02: bf00 nop 8022c04: 40002800 .word 0x40002800 08022c08 : * @retval An ErrorStatus enumeration value: * - SUCCESS: RTC Date register is configured * - ERROR: RTC Date register is not configured */ ErrorStatus RTC_SetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct) { 8022c08: b5f8 push {r3, r4, r5, r6, r7, lr} 8022c0a: 460c mov r4, r1 8022c0c: 784b ldrb r3, [r1, #1] ErrorStatus status = ERROR; /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); if ((RTC_Format == RTC_Format_BIN) && ((RTC_DateStruct->RTC_Month & 0x10) == 0x10)) 8022c0e: 2800 cmp r0, #0 8022c10: d138 bne.n 8022c84 8022c12: f003 0210 and.w r2, r3, #16 8022c16: b2d2 uxtb r2, r2 8022c18: b30a cbz r2, 8022c5e { RTC_DateStruct->RTC_Month = (RTC_DateStruct->RTC_Month & (uint32_t)~(0x10)) + 0x0A; 8022c1a: f023 0310 bic.w r3, r3, #16 8022c1e: 330a adds r3, #10 8022c20: 704b strb r3, [r1, #1] 8022c22: e01c b.n 8022c5e ((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Date)) | \ ((uint32_t)RTC_DateStruct->RTC_WeekDay << 13)); } /* Disable the write protection for RTC registers */ RTC->WPR = 0xCA; 8022c24: 4c1c ldr r4, [pc, #112] ; (8022c98 ) 8022c26: 23ca movs r3, #202 ; 0xca 8022c28: 6263 str r3, [r4, #36] ; 0x24 RTC->WPR = 0x53; 8022c2a: 2353 movs r3, #83 ; 0x53 8022c2c: 6263 str r3, [r4, #36] ; 0x24 /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) 8022c2e: f7ff ff11 bl 8022a54 8022c32: b180 cbz r0, 8022c56 status = ERROR; } else { /* Set the RTC_DR register */ RTC->DR = (uint32_t)(tmpreg & RTC_DR_RESERVED_MASK); 8022c34: f025 457f bic.w r5, r5, #4278190080 ; 0xff000000 8022c38: f025 05c0 bic.w r5, r5, #192 ; 0xc0 8022c3c: 6065 str r5, [r4, #4] /* Exit Initialization mode */ RTC_ExitInitMode(); 8022c3e: f7ff ff29 bl 8022a94 /* If RTC_CR_BYPSHAD bit = 0, wait for synchro else this check is not needed */ if ((RTC->CR & RTC_CR_BYPSHAD) == RESET) 8022c42: 68a3 ldr r3, [r4, #8] 8022c44: 0698 lsls r0, r3, #26 8022c46: d405 bmi.n 8022c54 { if (RTC_WaitForSynchro() == ERROR) 8022c48: f7ff ff4e bl 8022ae8 RTC->WPR = 0x53; /* Set Initialization mode */ if (RTC_EnterInitMode() == ERROR) { status = ERROR; 8022c4c: 3000 adds r0, #0 8022c4e: bf18 it ne 8022c50: 2001 movne r0, #1 8022c52: e000 b.n 8022c56 status = SUCCESS; } } else { status = SUCCESS; 8022c54: 2001 movs r0, #1 } } /* Enable the write protection for RTC registers */ RTC->WPR = 0xFF; 8022c56: 4b10 ldr r3, [pc, #64] ; (8022c98 ) 8022c58: 22ff movs r2, #255 ; 0xff 8022c5a: 625a str r2, [r3, #36] ; 0x24 8022c5c: bdf8 pop {r3, r4, r5, r6, r7, pc} ((uint32_t)RTC_DateStruct->RTC_Date) | \ (((uint32_t)RTC_DateStruct->RTC_WeekDay) << 13)); } else { tmpreg = (((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Year) << 16) | \ 8022c5e: 78e0 ldrb r0, [r4, #3] 8022c60: f7ff fee4 bl 8022a2c 8022c64: 4607 mov r7, r0 ((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Month) << 8) | \ 8022c66: 7860 ldrb r0, [r4, #1] 8022c68: f7ff fee0 bl 8022a2c 8022c6c: 4606 mov r6, r0 ((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Date)) | \ 8022c6e: 78a0 ldrb r0, [r4, #2] 8022c70: f7ff fedc bl 8022a2c ((uint32_t)RTC_DateStruct->RTC_WeekDay << 13)); 8022c74: 7825 ldrb r5, [r4, #0] ((uint32_t)RTC_DateStruct->RTC_Date) | \ (((uint32_t)RTC_DateStruct->RTC_WeekDay) << 13)); } else { tmpreg = (((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Year) << 16) | \ 8022c76: ea40 3045 orr.w r0, r0, r5, lsl #13 ((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Month) << 8) | \ 8022c7a: ea40 4507 orr.w r5, r0, r7, lsl #16 ((uint32_t)RTC_DateStruct->RTC_Date) | \ (((uint32_t)RTC_DateStruct->RTC_WeekDay) << 13)); } else { tmpreg = (((uint32_t)RTC_ByteToBcd2(RTC_DateStruct->RTC_Year) << 16) | \ 8022c7e: ea45 2506 orr.w r5, r5, r6, lsl #8 8022c82: e7cf b.n 8022c24 assert_param(IS_RTC_WEEKDAY(RTC_DateStruct->RTC_WeekDay)); /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = ((((uint32_t)RTC_DateStruct->RTC_Year) << 16) | \ 8022c84: 78cd ldrb r5, [r1, #3] (((uint32_t)RTC_DateStruct->RTC_Month) << 8) | \ ((uint32_t)RTC_DateStruct->RTC_Date) | \ 8022c86: 788a ldrb r2, [r1, #2] /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = ((((uint32_t)RTC_DateStruct->RTC_Year) << 16) | \ (((uint32_t)RTC_DateStruct->RTC_Month) << 8) | \ 8022c88: 021b lsls r3, r3, #8 assert_param(IS_RTC_WEEKDAY(RTC_DateStruct->RTC_WeekDay)); /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = ((((uint32_t)RTC_DateStruct->RTC_Year) << 16) | \ 8022c8a: ea43 4505 orr.w r5, r3, r5, lsl #16 (((uint32_t)RTC_DateStruct->RTC_Month) << 8) | \ ((uint32_t)RTC_DateStruct->RTC_Date) | \ (((uint32_t)RTC_DateStruct->RTC_WeekDay) << 13)); 8022c8e: 780b ldrb r3, [r1, #0] /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = ((((uint32_t)RTC_DateStruct->RTC_Year) << 16) | \ (((uint32_t)RTC_DateStruct->RTC_Month) << 8) | \ 8022c90: 4315 orrs r5, r2 assert_param(IS_RTC_WEEKDAY(RTC_DateStruct->RTC_WeekDay)); /* Check the input parameters format */ if (RTC_Format != RTC_Format_BIN) { tmpreg = ((((uint32_t)RTC_DateStruct->RTC_Year) << 16) | \ 8022c92: ea45 3543 orr.w r5, r5, r3, lsl #13 8022c96: e7c5 b.n 8022c24 8022c98: 40002800 .word 0x40002800 08022c9c : /* Check the parameters */ assert_param(IS_RTC_FORMAT(RTC_Format)); /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->DR & RTC_DR_RESERVED_MASK); 8022c9c: 4b0e ldr r3, [pc, #56] ; (8022cd8 ) 8022c9e: 685b ldr r3, [r3, #4] * @param RTC_DateStruct: pointer to a RTC_DateTypeDef structure that will * contain the returned current date configuration. * @retval None */ void RTC_GetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct) { 8022ca0: b570 push {r4, r5, r6, lr} /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->DR & RTC_DR_RESERVED_MASK); /* Fill the structure fields with the read parameters */ RTC_DateStruct->RTC_Year = (uint8_t)((tmpreg & (RTC_DR_YT | RTC_DR_YU)) >> 16); 8022ca2: f3c3 4207 ubfx r2, r3, #16, #8 RTC_DateStruct->RTC_Month = (uint8_t)((tmpreg & (RTC_DR_MT | RTC_DR_MU)) >> 8); 8022ca6: f3c3 2604 ubfx r6, r3, #8, #5 RTC_DateStruct->RTC_Date = (uint8_t)(tmpreg & (RTC_DR_DT | RTC_DR_DU)); 8022caa: f003 053f and.w r5, r3, #63 ; 0x3f RTC_DateStruct->RTC_WeekDay = (uint8_t)((tmpreg & (RTC_DR_WDU)) >> 13); 8022cae: f3c3 3342 ubfx r3, r3, #13, #3 * @param RTC_DateStruct: pointer to a RTC_DateTypeDef structure that will * contain the returned current date configuration. * @retval None */ void RTC_GetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct) { 8022cb2: 460c mov r4, r1 /* Get the RTC_TR register */ tmpreg = (uint32_t)(RTC->DR & RTC_DR_RESERVED_MASK); /* Fill the structure fields with the read parameters */ RTC_DateStruct->RTC_Year = (uint8_t)((tmpreg & (RTC_DR_YT | RTC_DR_YU)) >> 16); 8022cb4: 70ca strb r2, [r1, #3] RTC_DateStruct->RTC_Month = (uint8_t)((tmpreg & (RTC_DR_MT | RTC_DR_MU)) >> 8); 8022cb6: 704e strb r6, [r1, #1] RTC_DateStruct->RTC_Date = (uint8_t)(tmpreg & (RTC_DR_DT | RTC_DR_DU)); 8022cb8: 708d strb r5, [r1, #2] RTC_DateStruct->RTC_WeekDay = (uint8_t)((tmpreg & (RTC_DR_WDU)) >> 13); 8022cba: 700b strb r3, [r1, #0] /* Check the input parameters format */ if (RTC_Format == RTC_Format_BIN) 8022cbc: b958 cbnz r0, 8022cd6 { /* Convert the structure parameters to Binary format */ RTC_DateStruct->RTC_Year = (uint8_t)RTC_Bcd2ToByte(RTC_DateStruct->RTC_Year); 8022cbe: 4610 mov r0, r2 8022cc0: f7ff fec0 bl 8022a44 8022cc4: 70e0 strb r0, [r4, #3] RTC_DateStruct->RTC_Month = (uint8_t)RTC_Bcd2ToByte(RTC_DateStruct->RTC_Month); 8022cc6: 4630 mov r0, r6 8022cc8: f7ff febc bl 8022a44 8022ccc: 7060 strb r0, [r4, #1] RTC_DateStruct->RTC_Date = (uint8_t)RTC_Bcd2ToByte(RTC_DateStruct->RTC_Date); 8022cce: 4628 mov r0, r5 8022cd0: f7ff feb8 bl 8022a44 8022cd4: 70a0 strb r0, [r4, #2] 8022cd6: bd70 pop {r4, r5, r6, pc} 8022cd8: 40002800 .word 0x40002800 08022cdc : * specify the register. * @param Data: Data to be written in the specified RTC Backup data register. * @retval None */ void RTC_WriteBackupRegister(uint32_t RTC_BKP_DR, uint32_t Data) { 8022cdc: b082 sub sp, #8 __IO uint32_t tmp = 0; 8022cde: 2300 movs r3, #0 8022ce0: 9301 str r3, [sp, #4] /* Check the parameters */ assert_param(IS_RTC_BKP(RTC_BKP_DR)); tmp = RTC_BASE + 0x50; 8022ce2: 4b05 ldr r3, [pc, #20] ; (8022cf8 ) 8022ce4: 9301 str r3, [sp, #4] tmp += (RTC_BKP_DR * 4); 8022ce6: 9b01 ldr r3, [sp, #4] 8022ce8: eb03 0080 add.w r0, r3, r0, lsl #2 8022cec: 9001 str r0, [sp, #4] /* Write the specified register */ *(__IO uint32_t *)tmp = (uint32_t)Data; 8022cee: 9b01 ldr r3, [sp, #4] 8022cf0: 6019 str r1, [r3, #0] } 8022cf2: b002 add sp, #8 8022cf4: 4770 bx lr 8022cf6: bf00 nop 8022cf8: 40002850 .word 0x40002850 08022cfc : * This parameter can be: RTC_BKP_DRx where x can be from 0 to 19 to * specify the register. * @retval None */ uint32_t RTC_ReadBackupRegister(uint32_t RTC_BKP_DR) { 8022cfc: b082 sub sp, #8 __IO uint32_t tmp = 0; 8022cfe: 2300 movs r3, #0 8022d00: 9301 str r3, [sp, #4] /* Check the parameters */ assert_param(IS_RTC_BKP(RTC_BKP_DR)); tmp = RTC_BASE + 0x50; 8022d02: 4b05 ldr r3, [pc, #20] ; (8022d18 ) 8022d04: 9301 str r3, [sp, #4] tmp += (RTC_BKP_DR * 4); 8022d06: 9b01 ldr r3, [sp, #4] 8022d08: eb03 0080 add.w r0, r3, r0, lsl #2 8022d0c: 9001 str r0, [sp, #4] /* Read the specified register */ return (*(__IO uint32_t *)tmp); 8022d0e: 9b01 ldr r3, [sp, #4] 8022d10: 6818 ldr r0, [r3, #0] } 8022d12: b002 add sp, #8 8022d14: 4770 bx lr 8022d16: bf00 nop 8022d18: 40002850 .word 0x40002850 08022d1c : /* Check the parameters */ assert_param(IS_RTC_GET_IT(RTC_IT)); /* Get the TAMPER Interrupt enable bit and pending bit */ tmpreg = (uint32_t)(RTC->TAFCR & (RTC_TAFCR_TAMPIE)); 8022d1c: 4b0a ldr r3, [pc, #40] ; (8022d48 ) 8022d1e: 6c1a ldr r2, [r3, #64] ; 0x40 * @arg RTC_IT_ALRA: Alarm A interrupt * @arg RTC_IT_TAMP1: Tamper 1 event interrupt * @retval The new state of RTC_IT (SET or RESET). */ ITStatus RTC_GetITStatus(uint32_t RTC_IT) { 8022d20: b510 push {r4, lr} /* Get the TAMPER Interrupt enable bit and pending bit */ tmpreg = (uint32_t)(RTC->TAFCR & (RTC_TAFCR_TAMPIE)); /* Get the Interrupt enable Status */ enablestatus = (uint32_t)((RTC->CR & RTC_IT) | (tmpreg & (RTC_IT >> 15))); 8022d22: 689c ldr r4, [r3, #8] /* Get the Interrupt pending bit */ tmpreg = (uint32_t)((RTC->ISR & (uint32_t)(RTC_IT >> 4))); 8022d24: 68d9 ldr r1, [r3, #12] /* Check the parameters */ assert_param(IS_RTC_GET_IT(RTC_IT)); /* Get the TAMPER Interrupt enable bit and pending bit */ tmpreg = (uint32_t)(RTC->TAFCR & (RTC_TAFCR_TAMPIE)); 8022d26: f002 0204 and.w r2, r2, #4 /* Get the Interrupt enable Status */ enablestatus = (uint32_t)((RTC->CR & RTC_IT) | (tmpreg & (RTC_IT >> 15))); 8022d2a: ea02 32d0 and.w r2, r2, r0, lsr #15 8022d2e: ea00 0304 and.w r3, r0, r4 /* Get the Interrupt pending bit */ tmpreg = (uint32_t)((RTC->ISR & (uint32_t)(RTC_IT >> 4))); /* Get the status of the Interrupt */ if ((enablestatus != (uint32_t)RESET) && ((tmpreg & 0x0000FFFF) != (uint32_t)RESET)) 8022d32: 4313 orrs r3, r2 8022d34: d006 beq.n 8022d44 /* Get the Interrupt enable Status */ enablestatus = (uint32_t)((RTC->CR & RTC_IT) | (tmpreg & (RTC_IT >> 15))); /* Get the Interrupt pending bit */ tmpreg = (uint32_t)((RTC->ISR & (uint32_t)(RTC_IT >> 4))); 8022d36: b28b uxth r3, r1 /* Get the status of the Interrupt */ if ((enablestatus != (uint32_t)RESET) && ((tmpreg & 0x0000FFFF) != (uint32_t)RESET)) 8022d38: ea13 1310 ands.w r3, r3, r0, lsr #4 { bitstatus = SET; 8022d3c: bf0c ite eq 8022d3e: 2000 moveq r0, #0 8022d40: 2001 movne r0, #1 8022d42: bd10 pop {r4, pc} } else { bitstatus = RESET; 8022d44: 4618 mov r0, r3 } return bitstatus; } 8022d46: bd10 pop {r4, pc} 8022d48: 40002800 .word 0x40002800 08022d4c : /* Get the RTC_ISR Interrupt pending bits mask */ tmpreg = (uint32_t)(RTC_IT >> 4); /* Clear the interrupt pending bits in the RTC_ISR register */ RTC->ISR = (uint32_t)((uint32_t)(~((tmpreg | RTC_ISR_INIT)& 0x0000FFFF) | (uint32_t)(RTC->ISR & RTC_ISR_INIT))); 8022d4c: 4b05 ldr r3, [pc, #20] ; (8022d64 ) 8022d4e: 68da ldr r2, [r3, #12] 8022d50: f3c0 100f ubfx r0, r0, #4, #16 8022d54: f040 0080 orr.w r0, r0, #128 ; 0x80 8022d58: f002 0280 and.w r2, r2, #128 ; 0x80 8022d5c: ea62 0200 orn r2, r2, r0 8022d60: 60da str r2, [r3, #12] 8022d62: 4770 bx lr 8022d64: 40002800 .word 0x40002800 08022d68 : */ void SYSCFG_ETH_MediaInterfaceConfig(uint32_t SYSCFG_ETH_MediaInterface) { assert_param(IS_SYSCFG_ETH_MEDIA_INTERFACE(SYSCFG_ETH_MediaInterface)); /* Configure MII_RMII selection bit */ *(__IO uint32_t *) PMC_MII_RMII_SEL_BB = SYSCFG_ETH_MediaInterface; 8022d68: 4b01 ldr r3, [pc, #4] ; (8022d70 ) 8022d6a: 6018 str r0, [r3, #0] 8022d6c: 4770 bx lr 8022d6e: bf00 nop 8022d70: 422700dc .word 0x422700dc 08022d74 : { /* Check the parameters */ assert_param(IS_TIM_ALL_PERIPH(TIMx)); /* Clear the IT pending Bit */ TIMx->SR = (uint16_t)~TIM_IT; 8022d74: 43c9 mvns r1, r1 8022d76: 8201 strh r1, [r0, #16] 8022d78: 4770 bx lr 8022d7a: 0000 movs r0, r0 08022d7c : * @param USARTx: where x can be 1, 2, 3, 4, 5 or 6 to select the USART or * UART peripheral. * @retval None */ void USART_DeInit(USART_TypeDef* USARTx) { 8022d7c: b508 push {r3, lr} /* Check the parameters */ assert_param(IS_USART_ALL_PERIPH(USARTx)); if (USARTx == USART1) 8022d7e: 4b23 ldr r3, [pc, #140] ; (8022e0c ) 8022d80: 4298 cmp r0, r3 8022d82: d105 bne.n 8022d90 { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART1, ENABLE); 8022d84: 2010 movs r0, #16 8022d86: 2101 movs r1, #1 8022d88: f7ff fe30 bl 80229ec RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART1, DISABLE); 8022d8c: 2010 movs r0, #16 8022d8e: e037 b.n 8022e00 } else if (USARTx == USART2) 8022d90: 4b1f ldr r3, [pc, #124] ; (8022e10 ) 8022d92: 4298 cmp r0, r3 8022d94: d107 bne.n 8022da6 { RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART2, ENABLE); 8022d96: f44f 3000 mov.w r0, #131072 ; 0x20000 8022d9a: 2101 movs r1, #1 8022d9c: f7ff fe1a bl 80229d4 RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART2, DISABLE); 8022da0: f44f 3000 mov.w r0, #131072 ; 0x20000 8022da4: e009 b.n 8022dba } else if (USARTx == USART3) 8022da6: 4b1b ldr r3, [pc, #108] ; (8022e14 ) 8022da8: 4298 cmp r0, r3 8022daa: d10b bne.n 8022dc4 { RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, ENABLE); 8022dac: f44f 2080 mov.w r0, #262144 ; 0x40000 8022db0: 2101 movs r1, #1 8022db2: f7ff fe0f bl 80229d4 RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, DISABLE); 8022db6: f44f 2080 mov.w r0, #262144 ; 0x40000 8022dba: 2100 movs r1, #0 { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, DISABLE); } } } 8022dbc: e8bd 4008 ldmia.w sp!, {r3, lr} RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART2, DISABLE); } else if (USARTx == USART3) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_USART3, DISABLE); 8022dc0: f7ff be08 b.w 80229d4 } else if (USARTx == UART4) 8022dc4: 4b14 ldr r3, [pc, #80] ; (8022e18 ) 8022dc6: 4298 cmp r0, r3 8022dc8: d107 bne.n 8022dda { RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART4, ENABLE); 8022dca: f44f 2000 mov.w r0, #524288 ; 0x80000 8022dce: 2101 movs r1, #1 8022dd0: f7ff fe00 bl 80229d4 RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART4, DISABLE); 8022dd4: f44f 2000 mov.w r0, #524288 ; 0x80000 8022dd8: e7ef b.n 8022dba } else if (USARTx == UART5) 8022dda: 4b10 ldr r3, [pc, #64] ; (8022e1c ) 8022ddc: 4298 cmp r0, r3 8022dde: d107 bne.n 8022df0 { RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART5, ENABLE); 8022de0: f44f 1080 mov.w r0, #1048576 ; 0x100000 8022de4: 2101 movs r1, #1 8022de6: f7ff fdf5 bl 80229d4 RCC_APB1PeriphResetCmd(RCC_APB1Periph_UART5, DISABLE); 8022dea: f44f 1080 mov.w r0, #1048576 ; 0x100000 8022dee: e7e4 b.n 8022dba } else { if (USARTx == USART6) 8022df0: 4b0b ldr r3, [pc, #44] ; (8022e20 ) 8022df2: 4298 cmp r0, r3 8022df4: d109 bne.n 8022e0a { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, ENABLE); 8022df6: 2020 movs r0, #32 8022df8: 2101 movs r1, #1 8022dfa: f7ff fdf7 bl 80229ec RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, DISABLE); 8022dfe: 2020 movs r0, #32 8022e00: 2100 movs r1, #0 } } } 8022e02: e8bd 4008 ldmia.w sp!, {r3, lr} else { if (USARTx == USART6) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_USART6, DISABLE); 8022e06: f7ff bdf1 b.w 80229ec 8022e0a: bd08 pop {r3, pc} 8022e0c: 40011000 .word 0x40011000 8022e10: 40004400 .word 0x40004400 8022e14: 40004800 .word 0x40004800 8022e18: 40004c00 .word 0x40004c00 8022e1c: 40005000 .word 0x40005000 8022e20: 40011400 .word 0x40011400 08022e24 : { assert_param(IS_USART_1236_PERIPH(USARTx)); } /*---------------------------- USART CR2 Configuration -----------------------*/ tmpreg = USARTx->CR2; 8022e24: 8a03 ldrh r3, [r0, #16] /* Clear STOP[13:12] bits */ tmpreg &= (uint32_t)~((uint32_t)USART_CR2_STOP); /* Configure the USART Stop Bits, Clock, CPOL, CPHA and LastBit : Set STOP[13:12] bits according to USART_StopBits value */ tmpreg |= (uint32_t)USART_InitStruct->USART_StopBits; 8022e26: 88ca ldrh r2, [r1, #6] { assert_param(IS_USART_1236_PERIPH(USARTx)); } /*---------------------------- USART CR2 Configuration -----------------------*/ tmpreg = USARTx->CR2; 8022e28: b29b uxth r3, r3 /* Clear STOP[13:12] bits */ tmpreg &= (uint32_t)~((uint32_t)USART_CR2_STOP); 8022e2a: f423 5340 bic.w r3, r3, #12288 ; 0x3000 * @param USART_InitStruct: pointer to a USART_InitTypeDef structure that contains * the configuration information for the specified USART peripheral. * @retval None */ void USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct) { 8022e2e: b530 push {r4, r5, lr} /* Configure the USART Stop Bits, Clock, CPOL, CPHA and LastBit : Set STOP[13:12] bits according to USART_StopBits value */ tmpreg |= (uint32_t)USART_InitStruct->USART_StopBits; /* Write to USART CR2 */ USARTx->CR2 = (uint16_t)tmpreg; 8022e30: 4313 orrs r3, r2 * @param USART_InitStruct: pointer to a USART_InitTypeDef structure that contains * the configuration information for the specified USART peripheral. * @retval None */ void USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct) { 8022e32: 460d mov r5, r1 /* Configure the USART Stop Bits, Clock, CPOL, CPHA and LastBit : Set STOP[13:12] bits according to USART_StopBits value */ tmpreg |= (uint32_t)USART_InitStruct->USART_StopBits; /* Write to USART CR2 */ USARTx->CR2 = (uint16_t)tmpreg; 8022e34: 8203 strh r3, [r0, #16] /*---------------------------- USART CR1 Configuration -----------------------*/ tmpreg = USARTx->CR1; 8022e36: 8983 ldrh r3, [r0, #12] /* Configure the USART Word Length, Parity and mode: Set the M bits according to USART_WordLength value Set PCE and PS bits according to USART_Parity value Set TE and RE bits according to USART_Mode value */ tmpreg |= (uint32_t)USART_InitStruct->USART_WordLength | USART_InitStruct->USART_Parity | 8022e38: 8909 ldrh r1, [r1, #8] 8022e3a: 88aa ldrh r2, [r5, #4] /*---------------------------- USART CR1 Configuration -----------------------*/ tmpreg = USARTx->CR1; /* Clear M, PCE, PS, TE and RE bits */ tmpreg &= (uint32_t)~((uint32_t)CR1_CLEAR_MASK); 8022e3c: f423 53b0 bic.w r3, r3, #5632 ; 0x1600 /* Configure the USART Word Length, Parity and mode: Set the M bits according to USART_WordLength value Set PCE and PS bits according to USART_Parity value Set TE and RE bits according to USART_Mode value */ tmpreg |= (uint32_t)USART_InitStruct->USART_WordLength | USART_InitStruct->USART_Parity | 8022e40: 430a orrs r2, r1 8022e42: 8969 ldrh r1, [r5, #10] /*---------------------------- USART CR1 Configuration -----------------------*/ tmpreg = USARTx->CR1; /* Clear M, PCE, PS, TE and RE bits */ tmpreg &= (uint32_t)~((uint32_t)CR1_CLEAR_MASK); 8022e44: f023 030c bic.w r3, r3, #12 8022e48: 041b lsls r3, r3, #16 /* Configure the USART Word Length, Parity and mode: Set the M bits according to USART_WordLength value Set PCE and PS bits according to USART_Parity value Set TE and RE bits according to USART_Mode value */ tmpreg |= (uint32_t)USART_InitStruct->USART_WordLength | USART_InitStruct->USART_Parity | 8022e4a: 430a orrs r2, r1 /*---------------------------- USART CR1 Configuration -----------------------*/ tmpreg = USARTx->CR1; /* Clear M, PCE, PS, TE and RE bits */ tmpreg &= (uint32_t)~((uint32_t)CR1_CLEAR_MASK); 8022e4c: 0c1b lsrs r3, r3, #16 /* Configure the USART Word Length, Parity and mode: Set the M bits according to USART_WordLength value Set PCE and PS bits according to USART_Parity value Set TE and RE bits according to USART_Mode value */ tmpreg |= (uint32_t)USART_InitStruct->USART_WordLength | USART_InitStruct->USART_Parity | 8022e4e: b292 uxth r2, r2 USART_InitStruct->USART_Mode; /* Write to USART CR1 */ USARTx->CR1 = (uint16_t)tmpreg; 8022e50: 4313 orrs r3, r2 8022e52: 8183 strh r3, [r0, #12] /*---------------------------- USART CR3 Configuration -----------------------*/ tmpreg = USARTx->CR3; 8022e54: 8a83 ldrh r3, [r0, #20] /* Clear CTSE and RTSE bits */ tmpreg &= (uint32_t)~((uint32_t)CR3_CLEAR_MASK); /* Configure the USART HFC : Set CTSE and RTSE bits according to USART_HardwareFlowControl value */ tmpreg |= USART_InitStruct->USART_HardwareFlowControl; 8022e56: 89aa ldrh r2, [r5, #12] /* Write to USART CR1 */ USARTx->CR1 = (uint16_t)tmpreg; /*---------------------------- USART CR3 Configuration -----------------------*/ tmpreg = USARTx->CR3; 8022e58: b29b uxth r3, r3 /* Clear CTSE and RTSE bits */ tmpreg &= (uint32_t)~((uint32_t)CR3_CLEAR_MASK); 8022e5a: f423 7340 bic.w r3, r3, #768 ; 0x300 /* Configure the USART HFC : Set CTSE and RTSE bits according to USART_HardwareFlowControl value */ tmpreg |= USART_InitStruct->USART_HardwareFlowControl; /* Write to USART CR3 */ USARTx->CR3 = (uint16_t)tmpreg; 8022e5e: 4313 orrs r3, r2 * @param USART_InitStruct: pointer to a USART_InitTypeDef structure that contains * the configuration information for the specified USART peripheral. * @retval None */ void USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct) { 8022e60: b085 sub sp, #20 /* Configure the USART HFC : Set CTSE and RTSE bits according to USART_HardwareFlowControl value */ tmpreg |= USART_InitStruct->USART_HardwareFlowControl; /* Write to USART CR3 */ USARTx->CR3 = (uint16_t)tmpreg; 8022e62: 8283 strh r3, [r0, #20] * @param USART_InitStruct: pointer to a USART_InitTypeDef structure that contains * the configuration information for the specified USART peripheral. * @retval None */ void USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct) { 8022e64: 4604 mov r4, r0 /* Write to USART CR3 */ USARTx->CR3 = (uint16_t)tmpreg; /*---------------------------- USART BRR Configuration -----------------------*/ /* Configure the USART Baud Rate */ RCC_GetClocksFreq(&RCC_ClocksStatus); 8022e66: 4668 mov r0, sp 8022e68: f7ff fd20 bl 80228ac if ((USARTx == USART1) || (USARTx == USART6)) 8022e6c: 4b19 ldr r3, [pc, #100] ; (8022ed4 ) 8022e6e: 429c cmp r4, r3 8022e70: d003 beq.n 8022e7a 8022e72: f503 6380 add.w r3, r3, #1024 ; 0x400 8022e76: 429c cmp r4, r3 8022e78: d101 bne.n 8022e7e { apbclock = RCC_ClocksStatus.PCLK2_Frequency; 8022e7a: 9b03 ldr r3, [sp, #12] 8022e7c: e000 b.n 8022e80 } else { apbclock = RCC_ClocksStatus.PCLK1_Frequency; 8022e7e: 9b02 ldr r3, [sp, #8] } /* Determine the integer part */ if ((USARTx->CR1 & USART_CR1_OVER8) != 0) 8022e80: 89a2 ldrh r2, [r4, #12] 8022e82: b212 sxth r2, r2 8022e84: 2a00 cmp r2, #0 8022e86: f04f 0119 mov.w r1, #25 8022e8a: 682a ldr r2, [r5, #0] { /* Integer part computing in case Oversampling mode is 8 Samples */ integerdivider = ((25 * apbclock) / (2 * (USART_InitStruct->USART_BaudRate))); 8022e8c: fb01 f103 mul.w r1, r1, r3 { apbclock = RCC_ClocksStatus.PCLK1_Frequency; } /* Determine the integer part */ if ((USARTx->CR1 & USART_CR1_OVER8) != 0) 8022e90: da01 bge.n 8022e96 { /* Integer part computing in case Oversampling mode is 8 Samples */ integerdivider = ((25 * apbclock) / (2 * (USART_InitStruct->USART_BaudRate))); 8022e92: 0052 lsls r2, r2, #1 8022e94: e000 b.n 8022e98 } else /* if ((USARTx->CR1 & USART_CR1_OVER8) == 0) */ { /* Integer part computing in case Oversampling mode is 16 Samples */ integerdivider = ((25 * apbclock) / (4 * (USART_InitStruct->USART_BaudRate))); 8022e96: 0092 lsls r2, r2, #2 } tmpreg = (integerdivider / 100) << 4; 8022e98: 2364 movs r3, #100 ; 0x64 integerdivider = ((25 * apbclock) / (2 * (USART_InitStruct->USART_BaudRate))); } else /* if ((USARTx->CR1 & USART_CR1_OVER8) == 0) */ { /* Integer part computing in case Oversampling mode is 16 Samples */ integerdivider = ((25 * apbclock) / (4 * (USART_InitStruct->USART_BaudRate))); 8022e9a: fbb1 f1f2 udiv r1, r1, r2 } tmpreg = (integerdivider / 100) << 4; 8022e9e: fbb1 f2f3 udiv r2, r1, r3 8022ea2: 0112 lsls r2, r2, #4 /* Determine the fractional part */ fractionaldivider = integerdivider - (100 * (tmpreg >> 4)); 8022ea4: 0910 lsrs r0, r2, #4 8022ea6: fb03 1110 mls r1, r3, r0, r1 /* Implement the fractional part in the register */ if ((USARTx->CR1 & USART_CR1_OVER8) != 0) 8022eaa: 89a0 ldrh r0, [r4, #12] 8022eac: b200 sxth r0, r0 8022eae: 2800 cmp r0, #0 8022eb0: da06 bge.n 8022ec0 { tmpreg |= ((((fractionaldivider * 8) + 50) / 100)) & ((uint8_t)0x07); 8022eb2: 00c9 lsls r1, r1, #3 8022eb4: 3132 adds r1, #50 ; 0x32 8022eb6: fbb1 f3f3 udiv r3, r1, r3 8022eba: f003 0307 and.w r3, r3, #7 8022ebe: e005 b.n 8022ecc } else /* if ((USARTx->CR1 & USART_CR1_OVER8) == 0) */ { tmpreg |= ((((fractionaldivider * 16) + 50) / 100)) & ((uint8_t)0x0F); 8022ec0: 0109 lsls r1, r1, #4 8022ec2: 3132 adds r1, #50 ; 0x32 8022ec4: fbb1 f3f3 udiv r3, r1, r3 8022ec8: f003 030f and.w r3, r3, #15 8022ecc: 431a orrs r2, r3 } /* Write to USART BRR register */ USARTx->BRR = (uint16_t)tmpreg; 8022ece: 8122 strh r2, [r4, #8] } 8022ed0: b005 add sp, #20 8022ed2: bd30 pop {r4, r5, pc} 8022ed4: 40011000 .word 0x40011000 08022ed8 : assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the selected USART by setting the UE bit in the CR1 register */ USARTx->CR1 |= USART_CR1_UE; 8022ed8: 8983 ldrh r3, [r0, #12] { /* Check the parameters */ assert_param(IS_USART_ALL_PERIPH(USARTx)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8022eda: b119 cbz r1, 8022ee4 { /* Enable the selected USART by setting the UE bit in the CR1 register */ USARTx->CR1 |= USART_CR1_UE; 8022edc: b29b uxth r3, r3 8022ede: f443 5300 orr.w r3, r3, #8192 ; 0x2000 8022ee2: e003 b.n 8022eec } else { /* Disable the selected USART by clearing the UE bit in the CR1 register */ USARTx->CR1 &= (uint16_t)~((uint16_t)USART_CR1_UE); 8022ee4: f423 5300 bic.w r3, r3, #8192 ; 0x2000 8022ee8: 041b lsls r3, r3, #16 8022eea: 0c1b lsrs r3, r3, #16 8022eec: 8183 strh r3, [r0, #12] 8022eee: 4770 bx lr 08022ef0 : { /* Check the parameters */ assert_param(IS_USART_ALL_PERIPH(USARTx)); /* Receive Data */ return (uint16_t)(USARTx->DR & (uint16_t)0x01FF); 8022ef0: 8880 ldrh r0, [r0, #4] 8022ef2: 05c0 lsls r0, r0, #23 } 8022ef4: 0dc0 lsrs r0, r0, #23 8022ef6: 4770 bx lr 08022ef8 : } usartxbase = (uint32_t)USARTx; /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); 8022ef8: f3c1 1342 ubfx r3, r1, #5, #3 * @param NewState: new state of the specified USARTx interrupts. * This parameter can be: ENABLE or DISABLE. * @retval None */ void USART_ITConfig(USART_TypeDef* USARTx, uint16_t USART_IT, FunctionalState NewState) { 8022efc: b510 push {r4, lr} /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); /* Get the interrupt position */ itpos = USART_IT & IT_MASK; itmask = (((uint32_t)0x01) << itpos); 8022efe: 2401 movs r4, #1 8022f00: f001 011f and.w r1, r1, #31 if (usartreg == 0x01) /* The IT is in CR1 register */ 8022f04: 42a3 cmp r3, r4 /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); /* Get the interrupt position */ itpos = USART_IT & IT_MASK; itmask = (((uint32_t)0x01) << itpos); 8022f06: fa04 f101 lsl.w r1, r4, r1 if (usartreg == 0x01) /* The IT is in CR1 register */ 8022f0a: d101 bne.n 8022f10 { usartxbase += 0x0C; 8022f0c: 300c adds r0, #12 8022f0e: e004 b.n 8022f1a } else if (usartreg == 0x02) /* The IT is in CR2 register */ 8022f10: 2b02 cmp r3, #2 8022f12: d101 bne.n 8022f18 { usartxbase += 0x10; 8022f14: 3010 adds r0, #16 8022f16: e000 b.n 8022f1a } else /* The IT is in CR3 register */ { usartxbase += 0x14; 8022f18: 3014 adds r0, #20 } if (NewState != DISABLE) { *(__IO uint32_t*)usartxbase |= itmask; 8022f1a: 6803 ldr r3, [r0, #0] } else /* The IT is in CR3 register */ { usartxbase += 0x14; } if (NewState != DISABLE) 8022f1c: b10a cbz r2, 8022f22 { *(__IO uint32_t*)usartxbase |= itmask; 8022f1e: 4319 orrs r1, r3 8022f20: e001 b.n 8022f26 } else { *(__IO uint32_t*)usartxbase &= ~itmask; 8022f22: ea23 0101 bic.w r1, r3, r1 8022f26: 6001 str r1, [r0, #0] 8022f28: bd10 pop {r4, pc} 08022f2a : * @arg USART_IT_FE: Framing Error interrupt * @arg USART_IT_PE: Parity Error interrupt * @retval The new state of USART_IT (SET or RESET). */ ITStatus USART_GetITStatus(USART_TypeDef* USARTx, uint16_t USART_IT) { 8022f2a: b510 push {r4, lr} { assert_param(IS_USART_1236_PERIPH(USARTx)); } /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); 8022f2c: f3c1 1442 ubfx r4, r1, #5, #3 /* Get the interrupt position */ itmask = USART_IT & IT_MASK; itmask = (uint32_t)0x01 << itmask; 8022f30: 2201 movs r2, #1 8022f32: f001 031f and.w r3, r1, #31 if (usartreg == 0x01) /* The IT is in CR1 register */ 8022f36: 2c01 cmp r4, #1 /* Get the USART register index */ usartreg = (((uint8_t)USART_IT) >> 0x05); /* Get the interrupt position */ itmask = USART_IT & IT_MASK; itmask = (uint32_t)0x01 << itmask; 8022f38: fa02 f203 lsl.w r2, r2, r3 if (usartreg == 0x01) /* The IT is in CR1 register */ 8022f3c: d101 bne.n 8022f42 { itmask &= USARTx->CR1; 8022f3e: 8983 ldrh r3, [r0, #12] 8022f40: e003 b.n 8022f4a } else if (usartreg == 0x02) /* The IT is in CR2 register */ 8022f42: 2c02 cmp r4, #2 { itmask &= USARTx->CR2; 8022f44: bf0c ite eq 8022f46: 8a03 ldrheq r3, [r0, #16] } else /* The IT is in CR3 register */ { itmask &= USARTx->CR3; 8022f48: 8a83 ldrhne r3, [r0, #20] 8022f4a: b29b uxth r3, r3 8022f4c: 4013 ands r3, r2 } bitpos = USART_IT >> 0x08; bitpos = (uint32_t)0x01 << bitpos; bitpos &= USARTx->SR; 8022f4e: 8802 ldrh r2, [r0, #0] 8022f50: b292 uxth r2, r2 if ((itmask != (uint16_t)RESET)&&(bitpos != (uint16_t)RESET)) 8022f52: b143 cbz r3, 8022f66 { itmask &= USARTx->CR3; } bitpos = USART_IT >> 0x08; bitpos = (uint32_t)0x01 << bitpos; 8022f54: 2301 movs r3, #1 8022f56: 0a09 lsrs r1, r1, #8 8022f58: fa03 f101 lsl.w r1, r3, r1 bitpos &= USARTx->SR; if ((itmask != (uint16_t)RESET)&&(bitpos != (uint16_t)RESET)) 8022f5c: 4211 tst r1, r2 { bitstatus = SET; 8022f5e: bf0c ite eq 8022f60: 2000 moveq r0, #0 8022f62: 2001 movne r0, #1 8022f64: bd10 pop {r4, pc} } else { bitstatus = RESET; 8022f66: 4618 mov r0, r3 } return bitstatus; } 8022f68: bd10 pop {r4, pc} 08022f6a : { assert_param(IS_USART_1236_PERIPH(USARTx)); } bitpos = USART_IT >> 0x08; itmask = ((uint16_t)0x01 << (uint16_t)bitpos); 8022f6a: 0a09 lsrs r1, r1, #8 8022f6c: 2301 movs r3, #1 8022f6e: fa03 f301 lsl.w r3, r3, r1 USARTx->SR = (uint16_t)~itmask; 8022f72: 43db mvns r3, r3 8022f74: 8003 strh r3, [r0, #0] 8022f76: 4770 bx lr 08022f78 : SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */ #endif /* Reset the RCC clock configuration to the default reset state ------------*/ /* Set HSION bit */ RCC->CR |= (uint32_t)0x00000001; 8022f78: 4b35 ldr r3, [pc, #212] ; (8023050 ) 8022f7a: 681a ldr r2, [r3, #0] 8022f7c: f042 0201 orr.w r2, r2, #1 8022f80: 601a str r2, [r3, #0] /* Reset CFGR register */ RCC->CFGR = 0x00000000; 8022f82: 2200 movs r2, #0 8022f84: 609a str r2, [r3, #8] /* Reset HSEON, CSSON and PLLON bits */ RCC->CR &= (uint32_t)0xFEF6FFFF; 8022f86: 6819 ldr r1, [r3, #0] 8022f88: f021 7184 bic.w r1, r1, #17301504 ; 0x1080000 8022f8c: f421 3180 bic.w r1, r1, #65536 ; 0x10000 8022f90: 6019 str r1, [r3, #0] /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x24003010; 8022f92: 4930 ldr r1, [pc, #192] ; (8023054 ) 8022f94: 6059 str r1, [r3, #4] /* Reset HSEBYP bit */ RCC->CR &= (uint32_t)0xFFFBFFFF; 8022f96: 6819 ldr r1, [r3, #0] * SystemFrequency variable. * @param None * @retval None */ void SystemInit(void) { 8022f98: b082 sub sp, #8 /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x24003010; /* Reset HSEBYP bit */ RCC->CR &= (uint32_t)0xFFFBFFFF; 8022f9a: f421 2180 bic.w r1, r1, #262144 ; 0x40000 8022f9e: 6019 str r1, [r3, #0] /* Disable all interrupts */ RCC->CIR = 0x00000000; 8022fa0: 60da str r2, [r3, #12] static void SetSysClock(void) { /******************************************************************************/ /* PLL (clocked by HSE) used as System clock source */ /******************************************************************************/ __IO uint32_t StartUpCounter = 0, HSEStatus = 0; 8022fa2: 9200 str r2, [sp, #0] 8022fa4: 9201 str r2, [sp, #4] /* Enable HSE */ RCC->CR |= ((uint32_t)RCC_CR_HSEON); 8022fa6: 681a ldr r2, [r3, #0] 8022fa8: f442 3280 orr.w r2, r2, #65536 ; 0x10000 8022fac: 601a str r2, [r3, #0] /* Wait till HSE is ready and if Time out is reached exit */ do { HSEStatus = RCC->CR & RCC_CR_HSERDY; 8022fae: 681a ldr r2, [r3, #0] 8022fb0: f402 3200 and.w r2, r2, #131072 ; 0x20000 8022fb4: 9201 str r2, [sp, #4] StartUpCounter++; 8022fb6: 9a00 ldr r2, [sp, #0] 8022fb8: 3201 adds r2, #1 8022fba: 9200 str r2, [sp, #0] } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); 8022fbc: 9a01 ldr r2, [sp, #4] 8022fbe: b91a cbnz r2, 8022fc8 8022fc0: 9a00 ldr r2, [sp, #0] 8022fc2: f5b2 6fa0 cmp.w r2, #1280 ; 0x500 8022fc6: d1f2 bne.n 8022fae if ((RCC->CR & RCC_CR_HSERDY) != RESET) 8022fc8: 4b21 ldr r3, [pc, #132] ; (8023050 ) 8022fca: 681b ldr r3, [r3, #0] 8022fcc: f413 3300 ands.w r3, r3, #131072 ; 0x20000 { HSEStatus = (uint32_t)0x01; 8022fd0: bf18 it ne 8022fd2: 2301 movne r3, #1 } else { HSEStatus = (uint32_t)0x00; 8022fd4: 9301 str r3, [sp, #4] } if (HSEStatus == (uint32_t)0x01) 8022fd6: 9b01 ldr r3, [sp, #4] 8022fd8: 2b01 cmp r3, #1 8022fda: d133 bne.n 8023044 { /* Select regulator voltage output Scale 1 mode, System frequency up to 168 MHz */ RCC->APB1ENR |= RCC_APB1ENR_PWREN; 8022fdc: 4b1c ldr r3, [pc, #112] ; (8023050 ) 8022fde: 6c1a ldr r2, [r3, #64] ; 0x40 8022fe0: f042 5280 orr.w r2, r2, #268435456 ; 0x10000000 8022fe4: 641a str r2, [r3, #64] ; 0x40 PWR->CR |= PWR_CR_VOS; 8022fe6: 4a1c ldr r2, [pc, #112] ; (8023058 ) 8022fe8: 6811 ldr r1, [r2, #0] 8022fea: f441 4180 orr.w r1, r1, #16384 ; 0x4000 8022fee: 6011 str r1, [r2, #0] /* HCLK = SYSCLK / 1*/ RCC->CFGR |= RCC_CFGR_HPRE_DIV1; 8022ff0: 689a ldr r2, [r3, #8] 8022ff2: 609a str r2, [r3, #8] /* PCLK2 = HCLK / 2*/ RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; 8022ff4: 689a ldr r2, [r3, #8] 8022ff6: f442 4200 orr.w r2, r2, #32768 ; 0x8000 8022ffa: 609a str r2, [r3, #8] /* PCLK1 = HCLK / 4*/ RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; 8022ffc: 689a ldr r2, [r3, #8] 8022ffe: f442 52a0 orr.w r2, r2, #5120 ; 0x1400 8023002: 609a str r2, [r3, #8] /* Configure the main PLL */ RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | 8023004: 4a15 ldr r2, [pc, #84] ; (802305c ) 8023006: 605a str r2, [r3, #4] (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24); /* Enable the main PLL */ RCC->CR |= RCC_CR_PLLON; 8023008: 681a ldr r2, [r3, #0] 802300a: f042 7280 orr.w r2, r2, #16777216 ; 0x1000000 802300e: 601a str r2, [r3, #0] /* Wait till the main PLL is ready */ while((RCC->CR & RCC_CR_PLLRDY) == 0) 8023010: 6819 ldr r1, [r3, #0] 8023012: 4a0f ldr r2, [pc, #60] ; (8023050 ) 8023014: 0189 lsls r1, r1, #6 8023016: d5fb bpl.n 8023010 { } /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ FLASH->ACR = FLASH_ACR_ICEN |FLASH_ACR_DCEN |FLASH_ACR_LATENCY_5WS; 8023018: 4b11 ldr r3, [pc, #68] ; (8023060 ) 802301a: f240 6105 movw r1, #1541 ; 0x605 802301e: 6019 str r1, [r3, #0] /* Select the main PLL as system clock source */ RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); 8023020: 6893 ldr r3, [r2, #8] 8023022: f023 0303 bic.w r3, r3, #3 8023026: 6093 str r3, [r2, #8] RCC->CFGR |= RCC_CFGR_SW_PLL; 8023028: 6893 ldr r3, [r2, #8] 802302a: f043 0302 orr.w r3, r3, #2 802302e: 6093 str r3, [r2, #8] /* Wait till the main PLL is used as system clock source */ while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); 8023030: 6891 ldr r1, [r2, #8] 8023032: 4b07 ldr r3, [pc, #28] ; (8023050 ) 8023034: f001 010c and.w r1, r1, #12 8023038: 2908 cmp r1, #8 802303a: d1f9 bne.n 8023030 { } /* Добавил переход на внутренний генератор в случае отказа HSE */ RCC->CR|=RCC_CR_CSSON; 802303c: 681a ldr r2, [r3, #0] 802303e: f442 2200 orr.w r2, r2, #524288 ; 0x80000 8023042: 601a str r2, [r3, #0] /* Configure the Vector Table location add offset address ------------------*/ #ifdef VECT_TAB_SRAM SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ #else SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ 8023044: 4b07 ldr r3, [pc, #28] ; (8023064 ) 8023046: f04f 6200 mov.w r2, #134217728 ; 0x8000000 802304a: 609a str r2, [r3, #8] #endif } 802304c: b002 add sp, #8 802304e: 4770 bx lr 8023050: 40023800 .word 0x40023800 8023054: 24003010 .word 0x24003010 8023058: 40007000 .word 0x40007000 802305c: 07405419 .word 0x07405419 8023060: 40023c00 .word 0x40023c00 8023064: e000ed00 .word 0xe000ed00 08023068 : GPIO_TABLE(EXPAND_AS_DEFS) }; void gpio_hw_config_pin(GPIO_TypeDef *port, uint8_t pin, uint16_t conf) { uint8_t shift; shift = pin * 2; 8023068: 004b lsls r3, r1, #1 port->MODER &= ~(GPIO_MODER_MASK << shift); 802306a: b2db uxtb r3, r3 gpio_pindef_t gpio_pins[] = { GPIO_TABLE(EXPAND_AS_DEFS) }; void gpio_hw_config_pin(GPIO_TypeDef *port, uint8_t pin, uint16_t conf) { 802306c: b570 push {r4, r5, r6, lr} uint8_t shift; shift = pin * 2; port->MODER &= ~(GPIO_MODER_MASK << shift); 802306e: 2403 movs r4, #3 8023070: 6805 ldr r5, [r0, #0] 8023072: fa04 f403 lsl.w r4, r4, r3 8023076: 43e4 mvns r4, r4 8023078: 4025 ands r5, r4 802307a: 6005 str r5, [r0, #0] port->MODER |= (uint32_t)((conf >> GPIO_MODE_CFG_SHIFT) & GPIO_MODER_MASK) << shift; 802307c: 6806 ldr r6, [r0, #0] 802307e: f002 0503 and.w r5, r2, #3 8023082: fa05 f503 lsl.w r5, r5, r3 8023086: 4335 orrs r5, r6 8023088: 6005 str r5, [r0, #0] port->OTYPER &= ~(GPIO_TYPER_MASK << pin); 802308a: 6846 ldr r6, [r0, #4] 802308c: 2501 movs r5, #1 802308e: fa05 f501 lsl.w r5, r5, r1 8023092: ea26 0505 bic.w r5, r6, r5 8023096: 6045 str r5, [r0, #4] port->OTYPER |= (uint32_t)((conf >> GPIO_TYPE_CFG_SHIFT) & GPIO_TYPER_MASK) << pin; 8023098: 6845 ldr r5, [r0, #4] 802309a: f3c2 0680 ubfx r6, r2, #2, #1 802309e: fa06 f101 lsl.w r1, r6, r1 80230a2: 4329 orrs r1, r5 80230a4: 6041 str r1, [r0, #4] port->OSPEEDR &= ~(GPIO_SPEEDR_MASK << shift); 80230a6: 6881 ldr r1, [r0, #8] 80230a8: 4021 ands r1, r4 80230aa: 6081 str r1, [r0, #8] port->OSPEEDR |= (uint32_t)((conf >> GPIO_SPEED_CFG_SHIFT) & GPIO_SPEEDR_MASK) << shift; 80230ac: 6885 ldr r5, [r0, #8] 80230ae: f3c2 1101 ubfx r1, r2, #4, #2 80230b2: fa01 f103 lsl.w r1, r1, r3 80230b6: 4329 orrs r1, r5 80230b8: 6081 str r1, [r0, #8] port->PUPDR &= ~(GPIO_PUPDR_MASK << shift); 80230ba: 68c1 ldr r1, [r0, #12] 80230bc: 400c ands r4, r1 80230be: 60c4 str r4, [r0, #12] port->PUPDR |= (uint32_t)((conf >> GPIO_PUPD_CFG_SHIFT) & GPIO_PUPDR_MASK) << shift; 80230c0: 68c1 ldr r1, [r0, #12] 80230c2: f3c2 1281 ubfx r2, r2, #6, #2 80230c6: fa02 f303 lsl.w r3, r2, r3 80230ca: 430b orrs r3, r1 80230cc: 60c3 str r3, [r0, #12] 80230ce: bd70 pop {r4, r5, r6, pc} 080230d0 : } void gpio_connect_af(gpio_t id, uint8_t af_n) { 80230d0: b510 push {r4, lr} gpio_pindef_t *pin = &gpio_pins[id]; 80230d2: 4b13 ldr r3, [pc, #76] ; (8023120 ) 80230d4: eb03 02c0 add.w r2, r3, r0, lsl #3 uint8_t shift; if (pin->pin < 8) { shift = pin->pin * 4; pin->port->AFR[0] &= ~((uint32_t)GPIO_AFR_MASK << shift); 80230d8: f853 3030 ldr.w r3, [r3, r0, lsl #3] } void gpio_connect_af(gpio_t id, uint8_t af_n) { gpio_pindef_t *pin = &gpio_pins[id]; uint8_t shift; if (pin->pin < 8) { 80230dc: 7912 ldrb r2, [r2, #4] 80230de: 2a07 cmp r2, #7 80230e0: d80e bhi.n 8023100 shift = pin->pin * 4; 80230e2: 0092 lsls r2, r2, #2 pin->port->AFR[0] &= ~((uint32_t)GPIO_AFR_MASK << shift); 80230e4: 6a1c ldr r4, [r3, #32] 80230e6: b2d2 uxtb r2, r2 80230e8: 200f movs r0, #15 80230ea: fa00 f002 lsl.w r0, r0, r2 80230ee: ea24 0000 bic.w r0, r4, r0 80230f2: 6218 str r0, [r3, #32] pin->port->AFR[0] |= af_n << shift; 80230f4: 6a18 ldr r0, [r3, #32] 80230f6: fa01 f202 lsl.w r2, r1, r2 80230fa: 4302 orrs r2, r0 80230fc: 621a str r2, [r3, #32] 80230fe: bd10 pop {r4, pc} } else { shift = (pin->pin - 8) * 4; 8023100: 3a08 subs r2, #8 8023102: 0092 lsls r2, r2, #2 pin->port->AFR[1] &= ~((uint32_t)GPIO_AFR_MASK << shift); 8023104: 6a5c ldr r4, [r3, #36] ; 0x24 8023106: b2d2 uxtb r2, r2 8023108: 200f movs r0, #15 802310a: fa00 f002 lsl.w r0, r0, r2 802310e: ea24 0000 bic.w r0, r4, r0 8023112: 6258 str r0, [r3, #36] ; 0x24 pin->port->AFR[1] |= af_n << shift; 8023114: 6a58 ldr r0, [r3, #36] ; 0x24 8023116: fa01 f202 lsl.w r2, r1, r2 802311a: 4302 orrs r2, r0 802311c: 625a str r2, [r3, #36] ; 0x24 802311e: bd10 pop {r4, pc} 8023120: 2000010c .word 0x2000010c 08023124 : } } } void gpio_set(gpio_t pin, bool value) { if (gpio_pins[pin].flags & GPIO_INV) 8023124: 4b0e ldr r3, [pc, #56] ; (8023160 ) 8023126: eb03 02c0 add.w r2, r3, r0, lsl #3 802312a: 88d2 ldrh r2, [r2, #6] 802312c: f002 0210 and.w r2, r2, #16 8023130: b292 uxth r2, r2 8023132: b10a cbz r2, 8023138 value = !value; 8023134: f081 0101 eor.w r1, r1, #1 8023138: 00c2 lsls r2, r0, #3 if (value) 802313a: b141 cbz r1, 802314e gpio_pins[pin].port->BSRRL = 1 << gpio_pins[pin].pin; 802313c: f853 1030 ldr.w r1, [r3, r0, lsl #3] 8023140: 189b adds r3, r3, r2 8023142: 2201 movs r2, #1 8023144: 791b ldrb r3, [r3, #4] 8023146: fa02 f303 lsl.w r3, r2, r3 802314a: 830b strh r3, [r1, #24] 802314c: 4770 bx lr else gpio_pins[pin].port->BSRRH = 1 << gpio_pins[pin].pin; 802314e: f853 1030 ldr.w r1, [r3, r0, lsl #3] 8023152: 189b adds r3, r3, r2 8023154: 2201 movs r2, #1 8023156: 791b ldrb r3, [r3, #4] 8023158: fa02 f303 lsl.w r3, r2, r3 802315c: 834b strh r3, [r1, #26] 802315e: 4770 bx lr 8023160: 2000010c .word 0x2000010c 08023164 : } /* * TODO add analog flag and setup ADC pins in a proper way */ static void gpio_set_config(gpio_t id) { 8023164: b570 push {r4, r5, r6, lr} gpio_pindef_t *pin = &gpio_pins[id]; 8023166: 4e1e ldr r6, [pc, #120] ; (80231e0 ) 8023168: eb06 05c0 add.w r5, r6, r0, lsl #3 } /* * TODO add analog flag and setup ADC pins in a proper way */ static void gpio_set_config(gpio_t id) { 802316c: 4604 mov r4, r0 gpio_pindef_t *pin = &gpio_pins[id]; if (pin->flags & GPIO_AF) { 802316e: 88e9 ldrh r1, [r5, #6] 8023170: f401 7300 and.w r3, r1, #512 ; 0x200 8023174: b29b uxth r3, r3 8023176: b13b cbz r3, 8023188 uint8_t af_n = (uint8_t)(pin->flags >> _GPIO_AF_SHIFT); gpio_connect_af(id, af_n); 8023178: 0a89 lsrs r1, r1, #10 802317a: f7ff ffa9 bl 80230d0 gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_AF_CFG | 802317e: f856 0034 ldr.w r0, [r6, r4, lsl #3] 8023182: 7929 ldrb r1, [r5, #4] 8023184: 2232 movs r2, #50 ; 0x32 8023186: e005 b.n 8023194 GPIO_SPEED_HIGH_CFG); } else if (pin->flags & GPIO_IN) 8023188: 07cb lsls r3, r1, #31 802318a: d507 bpl.n 802319c gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_IN_CFG | 802318c: f856 0030 ldr.w r0, [r6, r0, lsl #3] 8023190: 7929 ldrb r1, [r5, #4] 8023192: 2230 movs r2, #48 ; 0x30 ((pin->flags & GPIO_OD) ? GPIO_TYPE_OD_CFG : GPIO_TYPE_PP_CFG) | GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); } } 8023194: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} gpio_connect_af(id, af_n); gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_AF_CFG | GPIO_SPEED_HIGH_CFG); } else if (pin->flags & GPIO_IN) gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_IN_CFG | 8023198: f7ff bf66 b.w 8023068 GPIO_SPEED_HIGH_CFG); else if (pin->flags & GPIO_IN_PU) { 802319c: f001 0302 and.w r3, r1, #2 80231a0: b29b uxth r3, r3 80231a2: b123 cbz r3, 80231ae gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_IN_CFG | GPIO_PU_CFG | 80231a4: f856 0030 ldr.w r0, [r6, r0, lsl #3] 80231a8: 7929 ldrb r1, [r5, #4] 80231aa: 2270 movs r2, #112 ; 0x70 80231ac: e00d b.n 80231ca GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); } else if (pin->flags & GPIO_OUT) { 80231ae: f001 0304 and.w r3, r1, #4 80231b2: b29b uxth r3, r3 80231b4: b19b cbz r3, 80231de gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_OUT_CFG | 80231b6: f001 0120 and.w r1, r1, #32 80231ba: b28a uxth r2, r1 80231bc: f856 0030 ldr.w r0, [r6, r0, lsl #3] 80231c0: 7929 ldrb r1, [r5, #4] 80231c2: 2a00 cmp r2, #0 80231c4: bf0c ite eq 80231c6: 2231 moveq r2, #49 ; 0x31 80231c8: 2235 movne r2, #53 ; 0x35 80231ca: f7ff ff4d bl 8023068 ((pin->flags & GPIO_OD) ? GPIO_TYPE_OD_CFG : GPIO_TYPE_PP_CFG) | GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); 80231ce: 88e9 ldrh r1, [r5, #6] 80231d0: 4620 mov r0, r4 80231d2: f3c1 01c0 ubfx r1, r1, #3, #1 } } 80231d6: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} else if (pin->flags & GPIO_OUT) { gpio_hw_config_pin(pin->port, pin->pin, GPIO_MODE_OUT_CFG | ((pin->flags & GPIO_OD) ? GPIO_TYPE_OD_CFG : GPIO_TYPE_PP_CFG) | GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); 80231da: f7ff bfa3 b.w 8023124 80231de: bd70 pop {r4, r5, r6, pc} 80231e0: 2000010c .word 0x2000010c 080231e4 : } } void gpio_init(void) { 80231e4: b538 push {r3, r4, r5, lr} uint32_t i; GPIO_DeInit(GPIOA); 80231e6: 4812 ldr r0, [pc, #72] ; (8023230 ) GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); } } void gpio_init(void) { 80231e8: 4d12 ldr r5, [pc, #72] ; (8023234 ) uint32_t i; GPIO_DeInit(GPIOA); 80231ea: f7ff fa77 bl 80226dc GPIO_DeInit(GPIOB); 80231ee: 4812 ldr r0, [pc, #72] ; (8023238 ) 80231f0: f7ff fa74 bl 80226dc GPIO_DeInit(GPIOC); 80231f4: 4811 ldr r0, [pc, #68] ; (802323c ) 80231f6: f7ff fa71 bl 80226dc GPIO_DeInit(GPIOD); 80231fa: 4811 ldr r0, [pc, #68] ; (8023240 ) 80231fc: f7ff fa6e bl 80226dc GPIO_DeInit(GPIOE); 8023200: 4810 ldr r0, [pc, #64] ; (8023244 ) 8023202: f7ff fa6b bl 80226dc // configure clocks RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN | RCC_AHB1ENR_GPIOBEN | 8023206: 4b10 ldr r3, [pc, #64] ; (8023248 ) 8023208: 6b1a ldr r2, [r3, #48] ; 0x30 802320a: f042 021f orr.w r2, r2, #31 802320e: 631a str r2, [r3, #48] ; 0x30 RCC_AHB1ENR_GPIOCEN | RCC_AHB1ENR_GPIODEN | RCC_AHB1ENR_GPIOEEN; // configure gpios for (i = 0; i < GPIO_TOTAL_COUNT; i++) { 8023210: 2400 movs r4, #0 GPIO_SPEED_HIGH_CFG); gpio_set(id, pin->flags & GPIO_SET); } } void gpio_init(void) { 8023212: eb05 03c4 add.w r3, r5, r4, lsl #3 RCC_AHB1ENR_GPIOCEN | RCC_AHB1ENR_GPIODEN | RCC_AHB1ENR_GPIOEEN; // configure gpios for (i = 0; i < GPIO_TOTAL_COUNT; i++) { if (gpio_pins[i].flags & GPIO_NOINIT) 8023216: 88db ldrh r3, [r3, #6] 8023218: f003 0380 and.w r3, r3, #128 ; 0x80 802321c: b29b uxth r3, r3 802321e: b913 cbnz r3, 8023226 continue; else { gpio_set_config(i); 8023220: b2e0 uxtb r0, r4 8023222: f7ff ff9f bl 8023164 RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN | RCC_AHB1ENR_GPIOBEN | RCC_AHB1ENR_GPIOCEN | RCC_AHB1ENR_GPIODEN | RCC_AHB1ENR_GPIOEEN; // configure gpios for (i = 0; i < GPIO_TOTAL_COUNT; i++) { 8023226: 3401 adds r4, #1 8023228: 2c11 cmp r4, #17 802322a: d1f2 bne.n 8023212 continue; else { gpio_set_config(i); } } } 802322c: bd38 pop {r3, r4, r5, pc} 802322e: bf00 nop 8023230: 40020000 .word 0x40020000 8023234: 2000010c .word 0x2000010c 8023238: 40020400 .word 0x40020400 802323c: 40020800 .word 0x40020800 8023240: 40020c00 .word 0x40020c00 8023244: 40021000 .word 0x40021000 8023248: 40023800 .word 0x40023800 0802324c : gpio_pins[pin].port->BSRRH = 1 << gpio_pins[pin].pin; } void gpio_invert_output(gpio_t pin) { gpio_pins[pin].port->ODR ^= 1 << gpio_pins[pin].pin; 802324c: 4a06 ldr r2, [pc, #24] ; (8023268 ) 802324e: f852 3030 ldr.w r3, [r2, r0, lsl #3] 8023252: eb02 02c0 add.w r2, r2, r0, lsl #3 8023256: 6959 ldr r1, [r3, #20] 8023258: 7912 ldrb r2, [r2, #4] 802325a: 2001 movs r0, #1 802325c: fa00 f202 lsl.w r2, r0, r2 8023260: 404a eors r2, r1 8023262: 615a str r2, [r3, #20] 8023264: 4770 bx lr 8023266: bf00 nop 8023268: 2000010c .word 0x2000010c 0802326c : } bool gpio_get(gpio_t pin) { bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { 802326c: 490e ldr r1, [pc, #56] ; (80232a8 ) 802326e: eb01 02c0 add.w r2, r1, r0, lsl #3 void gpio_invert_output(gpio_t pin) { gpio_pins[pin].port->ODR ^= 1 << gpio_pins[pin].pin; } bool gpio_get(gpio_t pin) { 8023272: b510 push {r4, lr} bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { 8023274: 88d3 ldrh r3, [r2, #6] 8023276: f003 0480 and.w r4, r3, #128 ; 0x80 802327a: b2a4 uxth r4, r4 802327c: b994 cbnz r4, 80232a4 return false; } else { value = (gpio_pins[pin].port->IDR & (1 << gpio_pins[pin].pin)) >> gpio_pins[pin].pin; 802327e: f851 1030 ldr.w r1, [r1, r0, lsl #3] 8023282: 7912 ldrb r2, [r2, #4] 8023284: 6908 ldr r0, [r1, #16] 8023286: 2101 movs r1, #1 8023288: fa01 f102 lsl.w r1, r1, r2 802328c: 4001 ands r1, r0 return (gpio_pins[pin].flags & GPIO_INV) ? !value : value; 802328e: f003 0310 and.w r3, r3, #16 bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { return false; } else { value = (gpio_pins[pin].port->IDR & (1 << gpio_pins[pin].pin)) >> gpio_pins[pin].pin; 8023292: 40d1 lsrs r1, r2 return (gpio_pins[pin].flags & GPIO_INV) ? !value : value; 8023294: b29b uxth r3, r3 bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { return false; } else { value = (gpio_pins[pin].port->IDR & (1 << gpio_pins[pin].pin)) >> gpio_pins[pin].pin; 8023296: bf0c ite eq 8023298: 2000 moveq r0, #0 802329a: 2001 movne r0, #1 return (gpio_pins[pin].flags & GPIO_INV) ? !value : value; 802329c: b11b cbz r3, 80232a6 802329e: f080 0001 eor.w r0, r0, #1 80232a2: bd10 pop {r4, pc} } bool gpio_get(gpio_t pin) { bool value; if (gpio_pins[pin].flags & GPIO_NOINIT) { return false; 80232a4: 2000 movs r0, #0 } else { value = (gpio_pins[pin].port->IDR & (1 << gpio_pins[pin].pin)) >> gpio_pins[pin].pin; return (gpio_pins[pin].flags & GPIO_INV) ? !value : value; } } 80232a6: bd10 pop {r4, pc} 80232a8: 2000010c .word 0x2000010c 080232ac : /* Устанавливаем новое время */ TM_RTC_GetDateTimeFromUnix(&newData, unixTime); TM_RTC_SetDateTime(&newData, TM_RTC_Format_BIN); } TM_RTC_Result_t TM_RTC_SetDateTime(TM_RTC_t* data, TM_RTC_Format_t format) { 80232ac: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} TM_RTC_t tmp; /* Check date and time validation */ if (format == TM_RTC_Format_BCD) { 80232b0: 2901 cmp r1, #1 /* Устанавливаем новое время */ TM_RTC_GetDateTimeFromUnix(&newData, unixTime); TM_RTC_SetDateTime(&newData, TM_RTC_Format_BIN); } TM_RTC_Result_t TM_RTC_SetDateTime(TM_RTC_t* data, TM_RTC_Format_t format) { 80232b2: 4603 mov r3, r0 80232b4: 460e mov r6, r1 80232b6: 79c0 ldrb r0, [r0, #7] TM_RTC_t tmp; /* Check date and time validation */ if (format == TM_RTC_Format_BCD) { 80232b8: d137 bne.n 802332a tmp.date = TM_RTC_BCD2BIN(data->date); tmp.month = TM_RTC_BCD2BIN(data->month); 80232ba: 7a1c ldrb r4, [r3, #8] tmp.year = TM_RTC_BCD2BIN(data->year); 80232bc: 7a5d ldrb r5, [r3, #9] tmp.hours = TM_RTC_BCD2BIN(data->hours); tmp.minutes = TM_RTC_BCD2BIN(data->minutes); tmp.seconds = TM_RTC_BCD2BIN(data->seconds); 80232be: f893 8000 ldrb.w r8, [r3] TM_RTC_Result_t TM_RTC_SetDateTime(TM_RTC_t* data, TM_RTC_Format_t format) { TM_RTC_t tmp; /* Check date and time validation */ if (format == TM_RTC_Format_BCD) { tmp.date = TM_RTC_BCD2BIN(data->date); 80232c2: 220a movs r2, #10 80232c4: 0901 lsrs r1, r0, #4 80232c6: f000 000f and.w r0, r0, #15 80232ca: fb02 0001 mla r0, r2, r1, r0 tmp.month = TM_RTC_BCD2BIN(data->month); 80232ce: 0921 lsrs r1, r4, #4 80232d0: f004 040f and.w r4, r4, #15 80232d4: fb02 4101 mla r1, r2, r1, r4 tmp.year = TM_RTC_BCD2BIN(data->year); 80232d8: 092c lsrs r4, r5, #4 80232da: f005 050f and.w r5, r5, #15 80232de: fb02 5404 mla r4, r2, r4, r5 tmp.hours = TM_RTC_BCD2BIN(data->hours); 80232e2: 795d ldrb r5, [r3, #5] 80232e4: ea4f 1c15 mov.w ip, r5, lsr #4 80232e8: f005 050f and.w r5, r5, #15 80232ec: fb02 5c0c mla ip, r2, ip, r5 tmp.minutes = TM_RTC_BCD2BIN(data->minutes); 80232f0: 791d ldrb r5, [r3, #4] 80232f2: 092f lsrs r7, r5, #4 80232f4: f005 050f and.w r5, r5, #15 80232f8: fb02 5707 mla r7, r2, r7, r5 tmp.seconds = TM_RTC_BCD2BIN(data->seconds); 80232fc: ea4f 1518 mov.w r5, r8, lsr #4 8023300: f008 080f and.w r8, r8, #15 8023304: fb02 8505 mla r5, r2, r5, r8 tmp.day = TM_RTC_BCD2BIN(data->day); 8023308: f893 8006 ldrb.w r8, [r3, #6] 802330c: ea4f 1918 mov.w r9, r8, lsr #4 8023310: f008 080f and.w r8, r8, #15 8023314: fb02 8209 mla r2, r2, r9, r8 TM_RTC_Result_t TM_RTC_SetDateTime(TM_RTC_t* data, TM_RTC_Format_t format) { TM_RTC_t tmp; /* Check date and time validation */ if (format == TM_RTC_Format_BCD) { tmp.date = TM_RTC_BCD2BIN(data->date); 8023318: b2c0 uxtb r0, r0 tmp.month = TM_RTC_BCD2BIN(data->month); 802331a: b2c9 uxtb r1, r1 tmp.year = TM_RTC_BCD2BIN(data->year); 802331c: b2e4 uxtb r4, r4 tmp.hours = TM_RTC_BCD2BIN(data->hours); 802331e: fa5f fc8c uxtb.w ip, ip tmp.minutes = TM_RTC_BCD2BIN(data->minutes); 8023322: b2ff uxtb r7, r7 tmp.seconds = TM_RTC_BCD2BIN(data->seconds); 8023324: b2ed uxtb r5, r5 tmp.day = TM_RTC_BCD2BIN(data->day); 8023326: b2d2 uxtb r2, r2 8023328: e006 b.n 8023338 } else { tmp.date = data->date; tmp.month = data->month; 802332a: 7a19 ldrb r1, [r3, #8] tmp.year = data->year; 802332c: 7a5c ldrb r4, [r3, #9] tmp.hours = data->hours; 802332e: f893 c005 ldrb.w ip, [r3, #5] tmp.minutes = data->minutes; 8023332: 791f ldrb r7, [r3, #4] tmp.seconds = data->seconds; 8023334: 781d ldrb r5, [r3, #0] tmp.day = data->day; 8023336: 799a ldrb r2, [r3, #6] } /* Check year and month */ if ( 8023338: 2c63 cmp r4, #99 ; 0x63 802333a: d86c bhi.n 8023416 tmp.year > 99 || 802333c: 2900 cmp r1, #0 802333e: d06a beq.n 8023416 tmp.month == 0 || 8023340: 290c cmp r1, #12 8023342: d868 bhi.n 8023416 tmp.month > 12 || 8023344: 2800 cmp r0, #0 8023346: d066 beq.n 8023416 tmp.date == 0 || tmp.date > TM_RTC_Months[TM_RTC_LEAP_YEAR(2000 + tmp.year) ? 1 : 0][tmp.month - 1] || 8023348: f014 0f03 tst.w r4, #3 802334c: d10a bne.n 8023364 802334e: f504 69fa add.w r9, r4, #2000 ; 0x7d0 8023352: f04f 0864 mov.w r8, #100 ; 0x64 8023356: fb99 faf8 sdiv sl, r9, r8 802335a: fb08 981a mls r8, r8, sl, r9 802335e: f1b8 0f00 cmp.w r8, #0 8023362: d10c bne.n 802337e 8023364: f504 64fa add.w r4, r4, #2000 ; 0x7d0 8023368: f44f 78c8 mov.w r8, #400 ; 0x190 802336c: fb94 f9f8 sdiv r9, r4, r8 8023370: fb08 4419 mls r4, r8, r9, r4 8023374: f1d4 0401 rsbs r4, r4, #1 8023378: bf38 it cc 802337a: 2400 movcc r4, #0 802337c: e000 b.n 8023380 802337e: 2401 movs r4, #1 8023380: f8df 80a8 ldr.w r8, [pc, #168] ; 802342c 8023384: f04f 090c mov.w r9, #12 8023388: fb09 8404 mla r4, r9, r4, r8 802338c: 1861 adds r1, r4, r1 /* Check year and month */ if ( tmp.year > 99 || tmp.month == 0 || tmp.month > 12 || tmp.date == 0 || 802338e: f811 1c01 ldrb.w r1, [r1, #-1] 8023392: 4281 cmp r1, r0 8023394: d33f bcc.n 8023416 tmp.date > TM_RTC_Months[TM_RTC_LEAP_YEAR(2000 + tmp.year) ? 1 : 0][tmp.month - 1] || 8023396: f1bc 0f17 cmp.w ip, #23 802339a: d83c bhi.n 8023416 tmp.hours > 23 || 802339c: 2f3b cmp r7, #59 ; 0x3b 802339e: d83a bhi.n 8023416 tmp.minutes > 59 || 80233a0: 2d3b cmp r5, #59 ; 0x3b 80233a2: d838 bhi.n 8023416 tmp.seconds > 59 || 80233a4: 2a00 cmp r2, #0 80233a6: d036 beq.n 8023416 tmp.day == 0 || 80233a8: 2a07 cmp r2, #7 80233aa: d834 bhi.n 8023416 /* Invalid date */ return TM_RTC_Result_Error; } /* Fill time */ RTC_TimeStruct.RTC_Hours = data->hours; 80233ac: 795a ldrb r2, [r3, #5] 80233ae: 4d1b ldr r5, [pc, #108] ; (802341c ) RTC_TimeStruct.RTC_Minutes = data->minutes; RTC_TimeStruct.RTC_Seconds = data->seconds; /* Fill date */ RTC_DateStruct.RTC_Date = data->date; 80233b0: 4c1b ldr r4, [pc, #108] ; (8023420 ) /* Invalid date */ return TM_RTC_Result_Error; } /* Fill time */ RTC_TimeStruct.RTC_Hours = data->hours; 80233b2: 702a strb r2, [r5, #0] RTC_TimeStruct.RTC_Minutes = data->minutes; 80233b4: 791a ldrb r2, [r3, #4] RTC_DateStruct.RTC_Month = data->month; RTC_DateStruct.RTC_Year = data->year; RTC_DateStruct.RTC_WeekDay = data->day; /* Set the RTC time base to 1s and hours format to 24h */ RTC_InitStruct.RTC_HourFormat = RTC_HourFormat_24; 80233b6: 481b ldr r0, [pc, #108] ; (8023424 ) return TM_RTC_Result_Error; } /* Fill time */ RTC_TimeStruct.RTC_Hours = data->hours; RTC_TimeStruct.RTC_Minutes = data->minutes; 80233b8: 706a strb r2, [r5, #1] RTC_TimeStruct.RTC_Seconds = data->seconds; 80233ba: 781a ldrb r2, [r3, #0] 80233bc: 70aa strb r2, [r5, #2] /* Fill date */ RTC_DateStruct.RTC_Date = data->date; 80233be: 79da ldrb r2, [r3, #7] 80233c0: 70a2 strb r2, [r4, #2] RTC_DateStruct.RTC_Month = data->month; 80233c2: 7a1a ldrb r2, [r3, #8] 80233c4: 7062 strb r2, [r4, #1] RTC_DateStruct.RTC_Year = data->year; 80233c6: 7a5a ldrb r2, [r3, #9] RTC_DateStruct.RTC_WeekDay = data->day; 80233c8: 799b ldrb r3, [r3, #6] RTC_TimeStruct.RTC_Minutes = data->minutes; RTC_TimeStruct.RTC_Seconds = data->seconds; /* Fill date */ RTC_DateStruct.RTC_Date = data->date; RTC_DateStruct.RTC_Month = data->month; RTC_DateStruct.RTC_Year = data->year; 80233ca: 70e2 strb r2, [r4, #3] RTC_DateStruct.RTC_WeekDay = data->day; /* Set the RTC time base to 1s and hours format to 24h */ RTC_InitStruct.RTC_HourFormat = RTC_HourFormat_24; RTC_InitStruct.RTC_AsynchPrediv = RTC_ASYNC_PREDIV; 80233cc: 221f movs r2, #31 RTC_DateStruct.RTC_Month = data->month; RTC_DateStruct.RTC_Year = data->year; RTC_DateStruct.RTC_WeekDay = data->day; /* Set the RTC time base to 1s and hours format to 24h */ RTC_InitStruct.RTC_HourFormat = RTC_HourFormat_24; 80233ce: 2700 movs r7, #0 RTC_InitStruct.RTC_AsynchPrediv = RTC_ASYNC_PREDIV; 80233d0: 6042 str r2, [r0, #4] RTC_InitStruct.RTC_SynchPrediv = RTC_SYNC_PREDIV; 80233d2: f502 7278 add.w r2, r2, #992 ; 0x3e0 RTC_TimeStruct.RTC_Seconds = data->seconds; /* Fill date */ RTC_DateStruct.RTC_Date = data->date; RTC_DateStruct.RTC_Month = data->month; RTC_DateStruct.RTC_Year = data->year; RTC_DateStruct.RTC_WeekDay = data->day; 80233d6: 7023 strb r3, [r4, #0] /* Set the RTC time base to 1s and hours format to 24h */ RTC_InitStruct.RTC_HourFormat = RTC_HourFormat_24; 80233d8: 6007 str r7, [r0, #0] RTC_InitStruct.RTC_AsynchPrediv = RTC_ASYNC_PREDIV; RTC_InitStruct.RTC_SynchPrediv = RTC_SYNC_PREDIV; 80233da: 6082 str r2, [r0, #8] RTC_Init(&RTC_InitStruct); 80233dc: f7ff fb62 bl 8022aa4 /* Set time */ if (format == TM_RTC_Format_BCD) { 80233e0: 2e01 cmp r6, #1 80233e2: d105 bne.n 80233f0 RTC_SetTime(RTC_Format_BCD, &RTC_TimeStruct); 80233e4: 4630 mov r0, r6 80233e6: 4629 mov r1, r5 80233e8: f7ff fba0 bl 8022b2c RTC_SetTime(RTC_Format_BIN, &RTC_TimeStruct); } /* Set date */ if (format == TM_RTC_Format_BCD) { RTC_SetDate(RTC_Format_BCD, &RTC_DateStruct); 80233ec: 4630 mov r0, r6 80233ee: e004 b.n 80233fa /* Set time */ if (format == TM_RTC_Format_BCD) { RTC_SetTime(RTC_Format_BCD, &RTC_TimeStruct); } else { RTC_SetTime(RTC_Format_BIN, &RTC_TimeStruct); 80233f0: 4638 mov r0, r7 80233f2: 4629 mov r1, r5 80233f4: f7ff fb9a bl 8022b2c /* Set date */ if (format == TM_RTC_Format_BCD) { RTC_SetDate(RTC_Format_BCD, &RTC_DateStruct); } else { RTC_SetDate(RTC_Format_BIN, &RTC_DateStruct); 80233f8: 4638 mov r0, r7 80233fa: 4621 mov r1, r4 80233fc: f7ff fc04 bl 8022c08 } if (TM_RTC_Status != RTC_STATUS_ZERO) { 8023400: 4b09 ldr r3, [pc, #36] ; (8023428 ) 8023402: 6818 ldr r0, [r3, #0] 8023404: b140 cbz r0, 8023418 /* Write backup registers */ RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_TIME_OK); 8023406: 2013 movs r0, #19 8023408: f244 3121 movw r1, #17185 ; 0x4321 802340c: f7ff fc66 bl 8022cdc } /* Return OK */ return TM_RTC_Result_Ok; 8023410: 2000 movs r0, #0 8023412: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} tmp.seconds > 59 || tmp.day == 0 || tmp.day > 7 ) { /* Invalid date */ return TM_RTC_Result_Error; 8023416: 2001 movs r0, #1 RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_TIME_OK); } /* Return OK */ return TM_RTC_Result_Ok; } 8023418: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802341c: 2000df74 .word 0x2000df74 8023420: 2000df84 .word 0x2000df84 8023424: 2000df78 .word 0x2000df78 8023428: 20001438 .word 0x20001438 802342c: 20000194 .word 0x20000194 08023430 : uint16_t TM_RTC_GetDaysInYear(uint8_t year) { /* Return days in year */ return TM_RTC_DAYS_IN_YEAR(2000 + year); } void TM_RTC_Config(TM_RTC_ClockSource_t source) { 8023430: b508 push {r3, lr} if (source == TM_RTC_ClockSource_Internal) { 8023432: b950 cbnz r0, 802344a /* Enable the LSI OSC */ RCC_LSICmd(ENABLE); 8023434: 2001 movs r0, #1 8023436: f7ff fa33 bl 80228a0 /* Wait till LSI is ready */ while (RCC_GetFlagStatus(RCC_FLAG_LSIRDY) == RESET); 802343a: 2061 movs r0, #97 ; 0x61 802343c: f7ff fae2 bl 8022a04 8023440: 2800 cmp r0, #0 8023442: d0fa beq.n 802343a /* Select the RTC Clock Source */ RCC_RTCCLKConfig(RCC_RTCCLKSource_LSI); 8023444: f44f 7000 mov.w r0, #512 ; 0x200 8023448: e00a b.n 8023460 } else if (source == TM_RTC_ClockSource_External) { 802344a: 2801 cmp r0, #1 802344c: d10a bne.n 8023464 /* Enable the LSE OSC */ RCC_LSEConfig(RCC_LSE_ON); 802344e: f7ff fa17 bl 8022880 /* Wait till LSE is ready */ while (RCC_GetFlagStatus(RCC_FLAG_LSERDY) == RESET); 8023452: 2041 movs r0, #65 ; 0x41 8023454: f7ff fad6 bl 8022a04 8023458: 2800 cmp r0, #0 802345a: d0fa beq.n 8023452 /* Select the RTC Clock Source */ RCC_RTCCLKConfig(RCC_RTCCLKSource_LSE); 802345c: f44f 7080 mov.w r0, #256 ; 0x100 8023460: f7ff fa6a bl 8022938 } /* Enable the RTC Clock */ RCC_RTCCLKCmd(ENABLE); 8023464: 2001 movs r0, #1 8023466: f7ff fa7f bl 8022968 /* Wait for register synchronization */ RTC_WaitForSynchro(); 802346a: f7ff fb3d bl 8022ae8 /* Write status */ RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_INIT_OK); 802346e: 2013 movs r0, #19 8023470: f241 2134 movw r1, #4660 ; 0x1234 } 8023474: e8bd 4008 ldmia.w sp!, {r3, lr} /* Wait for register synchronization */ RTC_WaitForSynchro(); /* Write status */ RTC_WriteBackupRegister(RTC_STATUS_REG, RTC_STATUS_INIT_OK); 8023478: f7ff bc30 b.w 8022cdc 0802347c : /* Enable wakeup command */ RTC_WakeUpCmd(ENABLE); } } uint32_t TM_RTC_GetUnixTimeStamp(TM_RTC_t* data) { 802347c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} uint32_t days = 0, seconds = 0; uint16_t i; uint16_t year = (uint16_t) (data->year + 2000); 8023480: 7a42 ldrb r2, [r0, #9] 8023482: f240 73b2 movw r3, #1970 ; 0x7b2 8023486: f502 62fa add.w r2, r2, #2000 ; 0x7d0 802348a: 2100 movs r1, #0 if (year < TM_RTC_OFFSET_YEAR) { return 0; } /* Days in back years */ for (i = TM_RTC_OFFSET_YEAR; i < year; i++) { days += TM_RTC_DAYS_IN_YEAR(i); 802348c: f44f 75c8 mov.w r5, #400 ; 0x190 8023490: 2664 movs r6, #100 ; 0x64 8023492: 079c lsls r4, r3, #30 8023494: d108 bne.n 80234a8 8023496: fbb3 f4f6 udiv r4, r3, r6 802349a: fb06 3414 mls r4, r6, r4, r3 802349e: b2a4 uxth r4, r4 80234a0: b114 cbz r4, 80234a8 80234a2: f44f 74b7 mov.w r4, #366 ; 0x16e 80234a6: e008 b.n 80234ba 80234a8: fbb3 f4f5 udiv r4, r3, r5 80234ac: fb05 3414 mls r4, r5, r4, r3 80234b0: b2a4 uxth r4, r4 80234b2: 2c00 cmp r4, #0 80234b4: d0f5 beq.n 80234a2 80234b6: f240 146d movw r4, #365 ; 0x16d /* Year is below offset year */ if (year < TM_RTC_OFFSET_YEAR) { return 0; } /* Days in back years */ for (i = TM_RTC_OFFSET_YEAR; i < year; i++) { 80234ba: 3301 adds r3, #1 80234bc: b29b uxth r3, r3 80234be: 4293 cmp r3, r2 days += TM_RTC_DAYS_IN_YEAR(i); 80234c0: 4421 add r1, r4 /* Year is below offset year */ if (year < TM_RTC_OFFSET_YEAR) { return 0; } /* Days in back years */ for (i = TM_RTC_OFFSET_YEAR; i < year; i++) { 80234c2: d3e6 bcc.n 8023492 days += TM_RTC_DAYS_IN_YEAR(i); } /* Days in current year */ for (i = 1; i < data->month; i++) { days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; 80234c4: 2364 movs r3, #100 ; 0x64 80234c6: fbb2 f7f3 udiv r7, r2, r3 80234ca: fb03 2317 mls r3, r3, r7, r2 80234ce: b29f uxth r7, r3 80234d0: f44f 73c8 mov.w r3, #400 ; 0x190 80234d4: fbb2 f4f3 udiv r4, r2, r3 80234d8: fb03 2414 mls r4, r3, r4, r2 80234dc: b2a4 uxth r4, r4 80234de: f1d4 0401 rsbs r4, r4, #1 80234e2: bf38 it cc 80234e4: 2400 movcc r4, #0 /* Days in back years */ for (i = TM_RTC_OFFSET_YEAR; i < year; i++) { days += TM_RTC_DAYS_IN_YEAR(i); } /* Days in current year */ for (i = 1; i < data->month; i++) { 80234e6: 7a06 ldrb r6, [r0, #8] days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; 80234e8: f8df c058 ldr.w ip, [pc, #88] ; 8023544 80234ec: 2300 movs r3, #0 80234ee: f002 0203 and.w r2, r2, #3 80234f2: f04f 080c mov.w r8, #12 80234f6: e00c b.n 8023512 80234f8: b922 cbnz r2, 8023504 80234fa: 2f00 cmp r7, #0 80234fc: bf0c ite eq 80234fe: 4625 moveq r5, r4 8023500: 2501 movne r5, #1 8023502: e000 b.n 8023506 8023504: 4625 mov r5, r4 8023506: fb08 3505 mla r5, r8, r5, r3 802350a: 3301 adds r3, #1 802350c: f81c 5005 ldrb.w r5, [ip, r5] 8023510: 1949 adds r1, r1, r5 /* Days in back years */ for (i = TM_RTC_OFFSET_YEAR; i < year; i++) { days += TM_RTC_DAYS_IN_YEAR(i); } /* Days in current year */ for (i = 1; i < data->month; i++) { 8023512: 1c5d adds r5, r3, #1 8023514: b2ad uxth r5, r5 8023516: 42b5 cmp r5, r6 8023518: d3ee bcc.n 80234f8 days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; } /* Day starts with 1 */ days += data->date - 1; 802351a: 79c3 ldrb r3, [r0, #7] seconds = days * TM_RTC_SECONDS_PER_DAY; seconds += data->hours * TM_RTC_SECONDS_PER_HOUR; 802351c: 7944 ldrb r4, [r0, #5] /* Days in current year */ for (i = 1; i < data->month; i++) { days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; } /* Day starts with 1 */ days += data->date - 1; 802351e: 3b01 subs r3, #1 8023520: 1859 adds r1, r3, r1 seconds = days * TM_RTC_SECONDS_PER_DAY; seconds += data->hours * TM_RTC_SECONDS_PER_HOUR; seconds += data->minutes * TM_RTC_SECONDS_PER_MINUTE; 8023522: 7903 ldrb r3, [r0, #4] 8023524: 009a lsls r2, r3, #2 8023526: 019b lsls r3, r3, #6 8023528: 1a9a subs r2, r3, r2 days += TM_RTC_Months[TM_RTC_LEAP_YEAR(year)][i - 1]; } /* Day starts with 1 */ days += data->date - 1; seconds = days * TM_RTC_SECONDS_PER_DAY; seconds += data->hours * TM_RTC_SECONDS_PER_HOUR; 802352a: f44f 6361 mov.w r3, #3600 ; 0xe10 802352e: fb03 2304 mla r3, r3, r4, r2 seconds += data->minutes * TM_RTC_SECONDS_PER_MINUTE; seconds += data->seconds; 8023532: 7802 ldrb r2, [r0, #0] /* seconds = days * 86400; */ return seconds; } 8023534: 4802 ldr r0, [pc, #8] ; (8023540 ) } /* Day starts with 1 */ days += data->date - 1; seconds = days * TM_RTC_SECONDS_PER_DAY; seconds += data->hours * TM_RTC_SECONDS_PER_HOUR; seconds += data->minutes * TM_RTC_SECONDS_PER_MINUTE; 8023536: 189b adds r3, r3, r2 seconds += data->seconds; /* seconds = days * 86400; */ return seconds; } 8023538: fb00 3001 mla r0, r0, r1, r3 802353c: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8023540: 00015180 .word 0x00015180 8023544: 20000194 .word 0x20000194 08023548 : /* Return status from set date time function */ return TM_RTC_SetDateTime(&tmp, TM_RTC_Format_BIN); } void TM_RTC_GetDateTime(TM_RTC_t* data, TM_RTC_Format_t format) { 8023548: b538 push {r3, r4, r5, lr} 802354a: 4604 mov r4, r0 uint32_t unix; /* Get time */ if (format == TM_RTC_Format_BIN) { 802354c: 460d mov r5, r1 802354e: b909 cbnz r1, 8023554 RTC_GetTime(RTC_Format_BIN, &RTC_TimeStruct); 8023550: 4608 mov r0, r1 8023552: e000 b.n 8023556 } else { RTC_GetTime(RTC_Format_BCD, &RTC_TimeStruct); 8023554: 2001 movs r0, #1 8023556: 4911 ldr r1, [pc, #68] ; (802359c ) 8023558: f7ff fb34 bl 8022bc4 } /* Format hours */ data->hours = RTC_TimeStruct.RTC_Hours; 802355c: 4b0f ldr r3, [pc, #60] ; (802359c ) 802355e: 781a ldrb r2, [r3, #0] 8023560: 7162 strb r2, [r4, #5] data->minutes = RTC_TimeStruct.RTC_Minutes; 8023562: 785a ldrb r2, [r3, #1] data->seconds = RTC_TimeStruct.RTC_Seconds; 8023564: 789b ldrb r3, [r3, #2] RTC_GetTime(RTC_Format_BCD, &RTC_TimeStruct); } /* Format hours */ data->hours = RTC_TimeStruct.RTC_Hours; data->minutes = RTC_TimeStruct.RTC_Minutes; 8023566: 7122 strb r2, [r4, #4] data->seconds = RTC_TimeStruct.RTC_Seconds; 8023568: 7023 strb r3, [r4, #0] /* Get subseconds */ data->subseconds = RTC->SSR; 802356a: 4b0d ldr r3, [pc, #52] ; (80235a0 ) 802356c: 6a9b ldr r3, [r3, #40] ; 0x28 802356e: 8063 strh r3, [r4, #2] /* Get date */ if (format == TM_RTC_Format_BIN) { 8023570: b90d cbnz r5, 8023576 RTC_GetDate(RTC_Format_BIN, &RTC_DateStruct); 8023572: 4628 mov r0, r5 8023574: e000 b.n 8023578 } else { RTC_GetDate(RTC_Format_BCD, &RTC_DateStruct); 8023576: 2001 movs r0, #1 8023578: 490a ldr r1, [pc, #40] ; (80235a4 ) 802357a: f7ff fb8f bl 8022c9c } /* Format date */ data->year = RTC_DateStruct.RTC_Year; 802357e: 4b09 ldr r3, [pc, #36] ; (80235a4 ) 8023580: 78da ldrb r2, [r3, #3] 8023582: 7262 strb r2, [r4, #9] data->month = RTC_DateStruct.RTC_Month; 8023584: 785a ldrb r2, [r3, #1] 8023586: 7222 strb r2, [r4, #8] data->date = RTC_DateStruct.RTC_Date; 8023588: 789a ldrb r2, [r3, #2] data->day = RTC_DateStruct.RTC_WeekDay; 802358a: 781b ldrb r3, [r3, #0] } /* Format date */ data->year = RTC_DateStruct.RTC_Year; data->month = RTC_DateStruct.RTC_Month; data->date = RTC_DateStruct.RTC_Date; 802358c: 71e2 strb r2, [r4, #7] data->day = RTC_DateStruct.RTC_WeekDay; 802358e: 71a3 strb r3, [r4, #6] /* Calculate unix offset */ unix = TM_RTC_GetUnixTimeStamp(data); 8023590: 4620 mov r0, r4 8023592: f7ff ff73 bl 802347c data->unix = unix; 8023596: 60e0 str r0, [r4, #12] 8023598: bd38 pop {r3, r4, r5, pc} 802359a: bf00 nop 802359c: 2000df74 .word 0x2000df74 80235a0: 40002800 .word 0x40002800 80235a4: 2000df84 .word 0x2000df84 080235a8 : } } uint32_t TM_RTC_Init(TM_RTC_ClockSource_t source) { 80235a8: b5f0 push {r4, r5, r6, r7, lr} uint32_t status; uint8_t stat = 1; TM_RTC_t datatime; /* Enable PWR peripheral clock */ RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE); 80235aa: 2101 movs r1, #1 } } uint32_t TM_RTC_Init(TM_RTC_ClockSource_t source) { 80235ac: b085 sub sp, #20 80235ae: 4605 mov r5, r0 uint32_t status; uint8_t stat = 1; TM_RTC_t datatime; /* Enable PWR peripheral clock */ RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE); 80235b0: f04f 5080 mov.w r0, #268435456 ; 0x10000000 80235b4: f7ff f9ea bl 802298c /* Allow access to BKP Domain */ PWR_BackupAccessCmd(ENABLE); 80235b8: 2001 movs r0, #1 80235ba: f7ff f95b bl 8022874 /* Get RTC status */ status = RTC_ReadBackupRegister(RTC_STATUS_REG); 80235be: 2013 movs r0, #19 80235c0: f7ff fb9c bl 8022cfc if (status == RTC_STATUS_TIME_OK) 80235c4: f244 3321 movw r3, #17185 ; 0x4321 80235c8: 4298 cmp r0, r3 80235ca: 4e25 ldr r6, [pc, #148] ; (8023660 ) 80235cc: d113 bne.n 80235f6 { TM_RTC_Status = RTC_STATUS_TIME_OK; 80235ce: 6030 str r0, [r6, #0] /* Start internal clock if we choose internal clock */ if (source == TM_RTC_ClockSource_Internal) 80235d0: b915 cbnz r5, 80235d8 TM_RTC_Config(TM_RTC_ClockSource_Internal); 80235d2: 4628 mov r0, r5 80235d4: f7ff ff2c bl 8023430 /* Wait for RTC APB registers synchronisation (needed after start-up from Reset) */ RTC_WaitForSynchro(); 80235d8: f7ff fa86 bl 8022ae8 /* Clear interrupt flags */ RTC_ClearITPendingBit(RTC_IT_WUT); 80235dc: f44f 4080 mov.w r0, #16384 ; 0x4000 80235e0: f7ff fbb4 bl 8022d4c EXTI->PR = 0x00400000; 80235e4: 4b1f ldr r3, [pc, #124] ; (8023664 ) 80235e6: f44f 0280 mov.w r2, #4194304 ; 0x400000 80235ea: 615a str r2, [r3, #20] /* Get date and time */ TM_RTC_GetDateTime(&datatime, TM_RTC_Format_BIN); 80235ec: 4668 mov r0, sp 80235ee: 2100 movs r1, #0 80235f0: f7ff ffaa bl 8023548 80235f4: e02f b.n 8023656 } else if (status == RTC_STATUS_INIT_OK) 80235f6: f241 2734 movw r7, #4660 ; 0x1234 80235fa: 42b8 cmp r0, r7 80235fc: d10f bne.n 802361e { TM_RTC_Status = RTC_STATUS_INIT_OK; 80235fe: 6030 str r0, [r6, #0] /* Start internal clock if we choose internal clock */ if (source == TM_RTC_ClockSource_Internal) 8023600: b915 cbnz r5, 8023608 TM_RTC_Config(TM_RTC_ClockSource_Internal); 8023602: 4628 mov r0, r5 8023604: f7ff ff14 bl 8023430 /* Wait for RTC APB registers synchronisation (needed after start-up from Reset) */ RTC_WaitForSynchro(); 8023608: f7ff fa6e bl 8022ae8 /* Clear interrupt flags */ RTC_ClearITPendingBit(RTC_IT_WUT); 802360c: f44f 4080 mov.w r0, #16384 ; 0x4000 8023610: f7ff fb9c bl 8022d4c EXTI->PR = 0x00400000; 8023614: 4b13 ldr r3, [pc, #76] ; (8023664 ) 8023616: f44f 0280 mov.w r2, #4194304 ; 0x400000 802361a: 615a str r2, [r3, #20] 802361c: e01b b.n 8023656 /* Get date and time */ //TM_RTC_GetDateTime(&datatime, TM_RTC_Format_BIN); } else { TM_RTC_Status = RTC_STATUS_ZERO; 802361e: 2400 movs r4, #0 /* Return status = 0 -> RTC Never initialized before */ stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); 8023620: 4628 mov r0, r5 /* Get date and time */ //TM_RTC_GetDateTime(&datatime, TM_RTC_Format_BIN); } else { TM_RTC_Status = RTC_STATUS_ZERO; 8023622: 6034 str r4, [r6, #0] /* Return status = 0 -> RTC Never initialized before */ stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); 8023624: f7ff ff04 bl 8023430 datatime.day = 1; datatime.month = 1; datatime.year = 0; datatime.hours = 0; datatime.minutes = 0; datatime.seconds = 0; 8023628: a804 add r0, sp, #16 stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); /* Set date and time */ datatime.date = 1; 802362a: 2301 movs r3, #1 datatime.day = 1; datatime.month = 1; datatime.year = 0; datatime.hours = 0; datatime.minutes = 0; datatime.seconds = 0; 802362c: f800 4d10 strb.w r4, [r0, #-16]! /* Set date and time */ TM_RTC_SetDateTime(&datatime, TM_RTC_Format_BIN); 8023630: 4621 mov r1, r4 8023632: 4668 mov r0, sp stat = RTC_STATUS_ZERO; /* Config RTC */ TM_RTC_Config(source); /* Set date and time */ datatime.date = 1; 8023634: f88d 3007 strb.w r3, [sp, #7] datatime.day = 1; 8023638: f88d 3006 strb.w r3, [sp, #6] datatime.month = 1; 802363c: f88d 3008 strb.w r3, [sp, #8] datatime.year = 0; 8023640: f88d 4009 strb.w r4, [sp, #9] datatime.hours = 0; 8023644: f88d 4005 strb.w r4, [sp, #5] datatime.minutes = 0; 8023648: f88d 4004 strb.w r4, [sp, #4] datatime.seconds = 0; /* Set date and time */ TM_RTC_SetDateTime(&datatime, TM_RTC_Format_BIN); 802364c: f7ff fe2e bl 80232ac /* Initialized OK */ TM_RTC_Status = RTC_STATUS_INIT_OK; 8023650: 6037 str r7, [r6, #0] } /* If first time initialized */ if (stat == RTC_STATUS_ZERO) return 0; 8023652: 4620 mov r0, r4 8023654: e001 b.n 802365a return TM_RTC_Status; 8023656: 4b02 ldr r3, [pc, #8] ; (8023660 ) 8023658: 6818 ldr r0, [r3, #0] } 802365a: b005 add sp, #20 802365c: bdf0 pop {r4, r5, r6, r7, pc} 802365e: bf00 nop 8023660: 20001438 .word 0x20001438 8023664: 40013c00 .word 0x40013c00 08023668 : /* Read data from backup register */ return *(uint32_t *)((&RTC->BKP0R) + 4 * location); } /* Callbacks */ __weak void TM_RTC_RequestHandler(void) { 8023668: 4770 bx lr 0802366a : /* If user needs this function, then they should be defined separatelly in your project */ } __weak void TM_RTC_AlarmAHandler(void) { 802366a: 4770 bx lr 0802366c : /* If user needs this function, then they should be defined separatelly in your project */ } __weak void TM_RTC_AlarmBHandler(void) { 802366c: 4770 bx lr 802366e: 0000 movs r0, r0 08023670 : /* If user needs this function, then they should be defined separatelly in your project */ } /* Private RTC IRQ handlers */ void RTC_WKUP_IRQHandler(void) { 8023670: b508 push {r3, lr} /* Check for RTC interrupt */ if (RTC_GetITStatus(RTC_IT_WUT) != RESET) { 8023672: f44f 4080 mov.w r0, #16384 ; 0x4000 8023676: f7ff fb51 bl 8022d1c 802367a: b128 cbz r0, 8023688 /* Clear interrupt flags */ RTC_ClearITPendingBit(RTC_IT_WUT); 802367c: f44f 4080 mov.w r0, #16384 ; 0x4000 8023680: f7ff fb64 bl 8022d4c /* Call user function */ TM_RTC_RequestHandler(); 8023684: f7ff fff0 bl 8023668 } /* Clear EXTI line 22 bit */ EXTI->PR = 0x00400000; 8023688: 4b02 ldr r3, [pc, #8] ; (8023694 ) 802368a: f44f 0280 mov.w r2, #4194304 ; 0x400000 802368e: 615a str r2, [r3, #20] 8023690: bd08 pop {r3, pc} 8023692: bf00 nop 8023694: 40013c00 .word 0x40013c00 08023698 : } void RTC_Alarm_IRQHandler(void) { 8023698: b508 push {r3, lr} /* RTC Alarm A check */ if (RTC_GetITStatus(RTC_IT_ALRA) != RESET) { 802369a: f44f 5080 mov.w r0, #4096 ; 0x1000 802369e: f7ff fb3d bl 8022d1c 80236a2: b128 cbz r0, 80236b0 /* Clear RTC Alarm A interrupt flag */ RTC_ClearITPendingBit(RTC_IT_ALRA); 80236a4: f44f 5080 mov.w r0, #4096 ; 0x1000 80236a8: f7ff fb50 bl 8022d4c /* Call user function for Alarm A */ TM_RTC_AlarmAHandler(); 80236ac: f7ff ffdd bl 802366a } /* RTC Alarm B check */ if (RTC_GetITStatus(RTC_IT_ALRB) != RESET) { 80236b0: f44f 5000 mov.w r0, #8192 ; 0x2000 80236b4: f7ff fb32 bl 8022d1c 80236b8: b128 cbz r0, 80236c6 /* Clear RTC Alarm A interrupt flag */ RTC_ClearITPendingBit(RTC_IT_ALRB); 80236ba: f44f 5000 mov.w r0, #8192 ; 0x2000 80236be: f7ff fb45 bl 8022d4c /* Call user function for Alarm B */ TM_RTC_AlarmBHandler(); 80236c2: f7ff ffd3 bl 802366c } /* Clear EXTI line 17 bit */ EXTI->PR = 0x00020000; 80236c6: 4b02 ldr r3, [pc, #8] ; (80236d0 ) 80236c8: f44f 3200 mov.w r2, #131072 ; 0x20000 80236cc: 615a str r2, [r3, #20] 80236ce: bd08 pop {r3, pc} 80236d0: 40013c00 .word 0x40013c00 080236d4 : /** * @brief Установливает время срабатывания профилактики сульфатации */ void RTC_SetProfTime(char *str) { 80236d4: b530 push {r4, r5, lr} uint32_t unixTime; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80236d6: 2200 movs r2, #0 /** * @brief Установливает время срабатывания профилактики сульфатации */ void RTC_SetProfTime(char *str) { 80236d8: b085 sub sp, #20 TM_RTC_t tmp; uint32_t unixTime; uint8_t i = 0; 80236da: 4613 mov r3, r2 /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80236dc: 250a movs r5, #10 uint32_t unixTime; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80236de: e006 b.n 80236ee tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80236e0: fb05 1202 mla r2, r5, r2, r1 80236e4: 3a30 subs r2, #48 ; 0x30 i++; 80236e6: 3301 adds r3, #1 uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); 80236e8: f002 02ff and.w r2, r2, #255 ; 0xff i++; 80236ec: b2db uxtb r3, r3 uint32_t unixTime; uint8_t i = 0; /* Get date */ tmp.date = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 80236ee: 5cc1 ldrb r1, [r0, r3] 80236f0: f1a1 0430 sub.w r4, r1, #48 ; 0x30 80236f4: 2c09 cmp r4, #9 80236f6: d9f3 bls.n 80236e0 tmp.date = tmp.date * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 80236f8: 3301 adds r3, #1 80236fa: f88d 2007 strb.w r2, [sp, #7] 80236fe: b2db uxtb r3, r3 /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8023700: 2200 movs r2, #0 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8023702: 250a movs r5, #10 } i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8023704: e006 b.n 8023714 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8023706: fb05 1202 mla r2, r5, r2, r1 802370a: 3a30 subs r2, #48 ; 0x30 i++; 802370c: 3301 adds r3, #1 i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802370e: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8023712: b2db uxtb r3, r3 } i++; /* Get month */ tmp.month = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8023714: 5cc1 ldrb r1, [r0, r3] 8023716: f1a1 0430 sub.w r4, r1, #48 ; 0x30 802371a: 2c09 cmp r4, #9 802371c: d9f3 bls.n 8023706 tmp.month = tmp.month * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } //i++; i+=3; 802371e: 3303 adds r3, #3 8023720: f88d 2008 strb.w r2, [sp, #8] 8023724: b2db uxtb r3, r3 /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8023726: 2200 movs r2, #0 tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8023728: 250a movs r5, #10 //i++; i+=3; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802372a: e006 b.n 802373a tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802372c: fb05 1202 mla r2, r5, r2, r1 8023730: 3a30 subs r2, #48 ; 0x30 i++; 8023732: 3301 adds r3, #1 i+=3; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8023734: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8023738: b2db uxtb r3, r3 //i++; i+=3; /* Get year */ tmp.year = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802373a: 5cc1 ldrb r1, [r0, r3] 802373c: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8023740: 2c09 cmp r4, #9 8023742: d9f3 bls.n 802372c tmp.year = tmp.year * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; i++; 8023744: 3302 adds r3, #2 8023746: f88d 2009 strb.w r2, [sp, #9] 802374a: b2db uxtb r3, r3 /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 802374c: 2200 movs r2, #0 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802374e: 250a movs r5, #10 i++; i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8023750: e006 b.n 8023760 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8023752: fb05 1202 mla r2, r5, r2, r1 8023756: 3a30 subs r2, #48 ; 0x30 i++; 8023758: 3301 adds r3, #1 i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); 802375a: f002 02ff and.w r2, r2, #255 ; 0xff i++; 802375e: b2db uxtb r3, r3 i++; i++; /* Get hours */ tmp.hours = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8023760: 5cc1 ldrb r1, [r0, r3] 8023762: f1a1 0430 sub.w r4, r1, #48 ; 0x30 8023766: 2c09 cmp r4, #9 8023768: d9f3 bls.n 8023752 tmp.hours = tmp.hours * 10 + TM_RTC_CHAR2NUM(*(str + i)); i++; } i++; 802376a: 3301 adds r3, #1 802376c: f88d 2005 strb.w r2, [sp, #5] 8023770: b2db uxtb r3, r3 /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8023772: 2200 movs r2, #0 tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8023774: 250a movs r5, #10 } i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8023776: e006 b.n 8023786 tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8023778: fb05 1202 mla r2, r5, r2, r1 802377c: 3a30 subs r2, #48 ; 0x30 i++; 802377e: 3301 adds r3, #1 i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { tmp.minutes = tmp.minutes * 10 + TM_RTC_CHAR2NUM(*(str + i)); 8023780: f002 02ff and.w r2, r2, #255 ; 0xff i++; 8023784: b2db uxtb r3, r3 } i++; /* Get minutes */ tmp.minutes = 0; while (TM_RTC_CHARISNUM(*(str + i))) { 8023786: 5cc1 ldrb r1, [r0, r3] 8023788: f1a1 0430 sub.w r4, r1, #48 ; 0x30 802378c: 2c09 cmp r4, #9 802378e: d9f3 bls.n 8023778 i++; } i++; /* Get seconds */ tmp.seconds = 0; 8023790: 2300 movs r3, #0 8023792: f88d 3000 strb.w r3, [sp] /* Устанавливаем +1 для профилактики */ tmp.year += 1; 8023796: f89d 3009 ldrb.w r3, [sp, #9] 802379a: f88d 2004 strb.w r2, [sp, #4] 802379e: 3301 adds r3, #1 unixTime = TM_RTC_GetUnixTimeStamp(&tmp); 80237a0: 4668 mov r0, sp /* Get seconds */ tmp.seconds = 0; /* Устанавливаем +1 для профилактики */ tmp.year += 1; 80237a2: f88d 3009 strb.w r3, [sp, #9] unixTime = TM_RTC_GetUnixTimeStamp(&tmp); 80237a6: f7ff fe69 bl 802347c if (location > 18) { return; } /* Write data to backup register */ *(uint32_t *)((&RTC->BKP0R) + 4 * location) = value; 80237aa: 4b02 ldr r3, [pc, #8] ; (80237b4 ) 80237ac: 6018 str r0, [r3, #0] /* Устанавливаем +1 для профилактики */ tmp.year += 1; unixTime = TM_RTC_GetUnixTimeStamp(&tmp); TM_RTC_WriteBackupRegister(RTC_BKP_DR0, unixTime); 80237ae: b005 add sp, #20 80237b0: bd30 pop {r4, r5, pc} 80237b2: bf00 nop 80237b4: 40002850 .word 0x40002850 080237b8 : //static TN_MUTEX spi_mutex; static uint8_t spi_tx_rx(uint8_t byte) { while (!(SPI2->SR & SPI_SR_TXE)) {} 80237b8: 4907 ldr r1, [pc, #28] ; (80237d8 ) 80237ba: 890a ldrh r2, [r1, #8] 80237bc: 4b06 ldr r3, [pc, #24] ; (80237d8 ) 80237be: f002 0202 and.w r2, r2, #2 80237c2: b292 uxth r2, r2 80237c4: 2a00 cmp r2, #0 80237c6: d0f8 beq.n 80237ba SPI2->DR = byte; 80237c8: 8198 strh r0, [r3, #12] while (!(SPI2->SR & SPI_SR_RXNE)) {} 80237ca: 891a ldrh r2, [r3, #8] 80237cc: 07d2 lsls r2, r2, #31 80237ce: d5fc bpl.n 80237ca return SPI2->DR; 80237d0: 4b01 ldr r3, [pc, #4] ; (80237d8 ) 80237d2: 8998 ldrh r0, [r3, #12] } 80237d4: b2c0 uxtb r0, r0 80237d6: 4770 bx lr 80237d8: 40003800 .word 0x40003800 080237dc : status = spi_tx_rx(0); } while (status & SR_WIP); SPI_FLASH_CS_H(); } static inline void send_addr(int addr) { 80237dc: b510 push {r4, lr} 80237de: 4604 mov r4, r0 spi_tx_rx((addr >> 16) & 0xFF); 80237e0: f3c0 4007 ubfx r0, r0, #16, #8 80237e4: f7ff ffe8 bl 80237b8 spi_tx_rx((addr >> 8) & 0xFF); 80237e8: f3c4 2007 ubfx r0, r4, #8, #8 80237ec: f7ff ffe4 bl 80237b8 spi_tx_rx(addr & 0xFF); 80237f0: b2e0 uxtb r0, r4 } 80237f2: e8bd 4010 ldmia.w sp!, {r4, lr} } static inline void send_addr(int addr) { spi_tx_rx((addr >> 16) & 0xFF); spi_tx_rx((addr >> 8) & 0xFF); spi_tx_rx(addr & 0xFF); 80237f6: f7ff bfdf b.w 80237b8 080237fa : spi_flash_desc_t spi_flash_desc; static inline void wait_write_enable(void) { uint8_t status; // spi_cs_down(); SPI_FLASH_CS_L(); 80237fa: 2005 movs r0, #5 #define SR_WEL (1 << 1) #define SR_SRWD (1 << 7) spi_flash_desc_t spi_flash_desc; static inline void wait_write_enable(void) { 80237fc: b508 push {r3, lr} uint8_t status; // spi_cs_down(); SPI_FLASH_CS_L(); 80237fe: 2100 movs r1, #0 8023800: f7ff fc90 bl 8023124 spi_tx_rx(CMD_RDSR); 8023804: 2005 movs r0, #5 8023806: f7ff ffd7 bl 80237b8 do { status = spi_tx_rx(0); 802380a: 2000 movs r0, #0 802380c: f7ff ffd4 bl 80237b8 } while (!(status & SR_WEL)); 8023810: f000 0002 and.w r0, r0, #2 8023814: b2c0 uxtb r0, r0 8023816: 2800 cmp r0, #0 8023818: d0f7 beq.n 802380a // spi_cs_up(); SPI_FLASH_CS_H(); 802381a: 2005 movs r0, #5 802381c: 2101 movs r1, #1 } 802381e: e8bd 4008 ldmia.w sp!, {r3, lr} spi_tx_rx(CMD_RDSR); do { status = spi_tx_rx(0); } while (!(status & SR_WEL)); // spi_cs_up(); SPI_FLASH_CS_H(); 8023822: f7ff bc7f b.w 8023124 08023826 : } static inline void wait_write_end(void) { uint8_t status; SPI_FLASH_CS_L(); 8023826: 2005 movs r0, #5 } while (!(status & SR_WEL)); // spi_cs_up(); SPI_FLASH_CS_H(); } static inline void wait_write_end(void) { 8023828: b508 push {r3, lr} uint8_t status; SPI_FLASH_CS_L(); 802382a: 2100 movs r1, #0 802382c: f7ff fc7a bl 8023124 spi_tx_rx(CMD_RDSR); 8023830: 2005 movs r0, #5 8023832: f7ff ffc1 bl 80237b8 do { status = spi_tx_rx(0); 8023836: 2000 movs r0, #0 8023838: f7ff ffbe bl 80237b8 } while (status & SR_WIP); 802383c: 07c1 lsls r1, r0, #31 802383e: d4fa bmi.n 8023836 SPI_FLASH_CS_H(); 8023840: 2005 movs r0, #5 8023842: 2101 movs r1, #1 } 8023844: e8bd 4008 ldmia.w sp!, {r3, lr} SPI_FLASH_CS_L(); spi_tx_rx(CMD_RDSR); do { status = spi_tx_rx(0); } while (status & SR_WIP); SPI_FLASH_CS_H(); 8023848: f7ff bc6c b.w 8023124 0802384c : *((uint8_t *)buf++) = spi_tx_rx(0); SPI_FLASH_CS_H(); return 0; } ssize_t spi_flash_read(int addr, void *buf, size_t len, uint32_t timeout) { 802384c: b570 push {r4, r5, r6, lr} 802384e: 4605 mov r5, r0 8023850: 460c mov r4, r1 ssize_t ret = 0; // ret = tn_mutex_lock(&spi_mutex, timeout); // if (ret != TERR_NO_ERR) // return ret; SPI_FLASH_CS_L(); 8023852: 2005 movs r0, #5 8023854: 2100 movs r1, #0 *((uint8_t *)buf++) = spi_tx_rx(0); SPI_FLASH_CS_H(); return 0; } ssize_t spi_flash_read(int addr, void *buf, size_t len, uint32_t timeout) { 8023856: 4616 mov r6, r2 ssize_t ret = 0; // ret = tn_mutex_lock(&spi_mutex, timeout); // if (ret != TERR_NO_ERR) // return ret; SPI_FLASH_CS_L(); 8023858: f7ff fc64 bl 8023124 spi_tx_rx(CMD_READ); 802385c: 2003 movs r0, #3 802385e: f7ff ffab bl 80237b8 send_addr(addr); 8023862: 4628 mov r0, r5 8023864: f7ff ffba bl 80237dc *((uint8_t *)buf++) = spi_tx_rx(0); SPI_FLASH_CS_H(); return 0; } ssize_t spi_flash_read(int addr, void *buf, size_t len, uint32_t timeout) { 8023868: 19a6 adds r6, r4, r6 // return ret; SPI_FLASH_CS_L(); spi_tx_rx(CMD_READ); send_addr(addr); while (len--) 802386a: e004 b.n 8023876 *((uint8_t *)buf++) = spi_tx_rx(0); 802386c: 2000 movs r0, #0 802386e: f7ff ffa3 bl 80237b8 8023872: f804 0b01 strb.w r0, [r4], #1 // return ret; SPI_FLASH_CS_L(); spi_tx_rx(CMD_READ); send_addr(addr); while (len--) 8023876: 42b4 cmp r4, r6 8023878: d1f8 bne.n 802386c *((uint8_t *)buf++) = spi_tx_rx(0); SPI_FLASH_CS_H(); 802387a: 2005 movs r0, #5 802387c: 2101 movs r1, #1 802387e: f7ff fc51 bl 8023124 // tn_mutex_unlock(&spi_mutex); return len; } 8023882: f04f 30ff mov.w r0, #4294967295 8023886: bd70 pop {r4, r5, r6, pc} 08023888 : // ret = tn_mutex_lock(&spi_mutex, timeout); // if (ret != TERR_NO_ERR) // return ret; // don't allow page wrapping ssize_t ret = 0; if ((addr & 0xFF) + len > 0xFF) 8023888: b2c3 uxtb r3, r0 return len; } #define TIMEOUT 10000 uint16_t spi_flash_pp(int addr, const void *buf, size_t len, uint32_t timeout) { 802388a: b570 push {r4, r5, r6, lr} 802388c: 4615 mov r5, r2 // ret = tn_mutex_lock(&spi_mutex, timeout); // if (ret != TERR_NO_ERR) // return ret; // don't allow page wrapping ssize_t ret = 0; if ((addr & 0xFF) + len > 0xFF) 802388e: 18d2 adds r2, r2, r3 8023890: 2aff cmp r2, #255 ; 0xff len = 0x100 - (addr & 0xFF); 8023892: bf88 it hi 8023894: f5c3 7580 rsbhi r5, r3, #256 ; 0x100 return len; } #define TIMEOUT 10000 uint16_t spi_flash_pp(int addr, const void *buf, size_t len, uint32_t timeout) { 8023898: 4604 mov r4, r0 802389a: 460e mov r6, r1 ssize_t ret = 0; if ((addr & 0xFF) + len > 0xFF) len = 0x100 - (addr & 0xFF); ret = len; SPI_FLASH_CS_L(); 802389c: 2005 movs r0, #5 802389e: 2100 movs r1, #0 80238a0: f7ff fc40 bl 8023124 spi_tx_rx(CMD_WREN); 80238a4: 2006 movs r0, #6 80238a6: f7ff ff87 bl 80237b8 SPI_FLASH_CS_H(); 80238aa: 2005 movs r0, #5 80238ac: 2101 movs r1, #1 80238ae: f7ff fc39 bl 8023124 wait_write_enable(); 80238b2: f7ff ffa2 bl 80237fa SPI_FLASH_CS_L(); 80238b6: 2100 movs r1, #0 80238b8: 2005 movs r0, #5 80238ba: f7ff fc33 bl 8023124 spi_tx_rx(CMD_PP); 80238be: 2002 movs r0, #2 80238c0: f7ff ff7a bl 80237b8 send_addr(addr); 80238c4: 4620 mov r0, r4 80238c6: f7ff ff89 bl 80237dc while (len--) 80238ca: 2400 movs r4, #0 80238cc: e003 b.n 80238d6 spi_tx_rx(*((uint8_t *)buf++)); 80238ce: 5d30 ldrb r0, [r6, r4] 80238d0: f7ff ff72 bl 80237b8 80238d4: 3401 adds r4, #1 wait_write_enable(); SPI_FLASH_CS_L(); spi_tx_rx(CMD_PP); send_addr(addr); while (len--) 80238d6: 42ac cmp r4, r5 80238d8: d1f9 bne.n 80238ce spi_tx_rx(*((uint8_t *)buf++)); SPI_FLASH_CS_H(); 80238da: 2005 movs r0, #5 80238dc: 2101 movs r1, #1 80238de: f7ff fc21 bl 8023124 wait_write_end(); 80238e2: f7ff ffa0 bl 8023826 // tn_mutex_unlock(&spi_mutex); return ret; } 80238e6: b2a0 uxth r0, r4 80238e8: bd70 pop {r4, r5, r6, pc} 080238ea : ssize_t spi_flash_write(int addr, const void *buf, size_t len, uint32_t timeout) { 80238ea: b5f8 push {r3, r4, r5, r6, r7, lr} 80238ec: 4607 mov r7, r0 80238ee: 460e mov r6, r1 80238f0: 4615 mov r5, r2 int ret = 0, offset = 0; 80238f2: 2400 movs r4, #0 do { ret = spi_flash_pp(addr + offset, buf + offset, len - offset, 0); 80238f4: 1938 adds r0, r7, r4 80238f6: 1931 adds r1, r6, r4 80238f8: 1b2a subs r2, r5, r4 80238fa: 2300 movs r3, #0 80238fc: f7ff ffc4 bl 8023888 offset += ret; 8023900: 1824 adds r4, r4, r0 } while (len - offset); 8023902: 42a5 cmp r5, r4 8023904: d1f6 bne.n 80238f4 return 0; } 8023906: 2000 movs r0, #0 8023908: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802390a : wait_write_end(); return 0; } int spi_flash_erase_sector(int addr, uint32_t timeout) { 802390a: b510 push {r4, lr} int ret = 0; // ret = tn_mutex_lock(&spi_mutex, timeout); // if (ret != TERR_NO_ERR) // return ret; SPI_FLASH_CS_L(); 802390c: 2100 movs r1, #0 wait_write_end(); return 0; } int spi_flash_erase_sector(int addr, uint32_t timeout) { 802390e: 4604 mov r4, r0 int ret = 0; // ret = tn_mutex_lock(&spi_mutex, timeout); // if (ret != TERR_NO_ERR) // return ret; SPI_FLASH_CS_L(); 8023910: 2005 movs r0, #5 8023912: f7ff fc07 bl 8023124 spi_tx_rx(CMD_WREN); 8023916: 2006 movs r0, #6 8023918: f7ff ff4e bl 80237b8 SPI_FLASH_CS_H(); 802391c: 2005 movs r0, #5 802391e: 2101 movs r1, #1 8023920: f7ff fc00 bl 8023124 wait_write_enable(); 8023924: f7ff ff69 bl 80237fa SPI_FLASH_CS_L(); 8023928: 2100 movs r1, #0 802392a: 2005 movs r0, #5 802392c: f7ff fbfa bl 8023124 spi_tx_rx(CMD_SE); 8023930: 2020 movs r0, #32 8023932: f7ff ff41 bl 80237b8 send_addr(addr); 8023936: 4620 mov r0, r4 8023938: f7ff ff50 bl 80237dc SPI_FLASH_CS_H(); 802393c: 2005 movs r0, #5 802393e: 2101 movs r1, #1 8023940: f7ff fbf0 bl 8023124 wait_write_end(); 8023944: f7ff ff6f bl 8023826 // tn_mutex_unlock(&spi_mutex); return 0; } 8023948: 2000 movs r0, #0 802394a: bd10 pop {r4, pc} 0802394c : bool spi_flash_init(void) { uint32_t i, ptable, bitsize = 0; uint8_t tmp[4]; spi_flash_desc.present = false; 802394c: 4b28 ldr r3, [pc, #160] ; (80239f0 ) // tn_mutex_unlock(&spi_mutex); return 0; } bool spi_flash_init(void) { 802394e: b513 push {r0, r1, r4, lr} uint32_t i, ptable, bitsize = 0; uint8_t tmp[4]; spi_flash_desc.present = false; 8023950: 2400 movs r4, #0 8023952: 701c strb r4, [r3, #0] static void spi_init_(void) { // tn_mutex_create(&spi_mutex, TN_MUTEX_ATTR_INHERIT, 0); //tn_sem_create(&xact.ready, 0, 1); RCC->APB1ENR |= RCC_APB1ENR_SPI2EN; 8023954: 4b27 ldr r3, [pc, #156] ; (80239f4 ) 8023956: 6c1a ldr r2, [r3, #64] ; 0x40 8023958: f442 4280 orr.w r2, r2, #16384 ; 0x4000 802395c: 641a str r2, [r3, #64] ; 0x40 RCC->APB1RSTR |= RCC_APB1RSTR_SPI2RST; 802395e: 6a1a ldr r2, [r3, #32] 8023960: f442 4200 orr.w r2, r2, #32768 ; 0x8000 8023964: 621a str r2, [r3, #32] RCC->APB1RSTR &= ~RCC_APB1RSTR_SPI2RST; 8023966: 6a1a ldr r2, [r3, #32] 8023968: f422 4200 bic.w r2, r2, #32768 ; 0x8000 802396c: 621a str r2, [r3, #32] SPI2->CR1 &= ~SPI_CR1_SPE; 802396e: f5a3 3300 sub.w r3, r3, #131072 ; 0x20000 spi_tx_rx((addr >> 8) & 0xFF); spi_tx_rx(addr & 0xFF); } static int spi_flash_read_sfdp(int addr, void *buf, size_t len) { SPI_FLASH_CS_L(); 8023972: 4621 mov r1, r4 RCC->APB1ENR |= RCC_APB1ENR_SPI2EN; RCC->APB1RSTR |= RCC_APB1RSTR_SPI2RST; RCC->APB1RSTR &= ~RCC_APB1RSTR_SPI2RST; SPI2->CR1 &= ~SPI_CR1_SPE; 8023974: 881a ldrh r2, [r3, #0] 8023976: f022 0240 bic.w r2, r2, #64 ; 0x40 802397a: 0412 lsls r2, r2, #16 802397c: 0c12 lsrs r2, r2, #16 802397e: 801a strh r2, [r3, #0] //SPI2->CR1 = SPI_CR1_MSTR | SPI_CR1_BR_1 | SPI_CR1_SSM | SPI_CR1_SSI; SPI2->CR1 = SPI_CR1_MSTR | SPI_CR1_SSM | SPI_CR1_SSI; 8023980: f44f 7241 mov.w r2, #772 ; 0x304 8023984: 801a strh r2, [r3, #0] SPI2->CR2 = 0;//SPI_CR2_SSOE; 8023986: 809c strh r4, [r3, #4] SPI2->CR1 |= SPI_CR1_SPE; 8023988: 881a ldrh r2, [r3, #0] 802398a: b292 uxth r2, r2 802398c: f042 0240 orr.w r2, r2, #64 ; 0x40 8023990: 801a strh r2, [r3, #0] spi_tx_rx((addr >> 8) & 0xFF); spi_tx_rx(addr & 0xFF); } static int spi_flash_read_sfdp(int addr, void *buf, size_t len) { SPI_FLASH_CS_L(); 8023992: 2005 movs r0, #5 8023994: f7ff fbc6 bl 8023124 spi_tx_rx(CMD_RDSFDP); 8023998: 205a movs r0, #90 ; 0x5a 802399a: f7ff ff0d bl 80237b8 send_addr(addr); 802399e: 4620 mov r0, r4 80239a0: f7ff ff1c bl 80237dc spi_tx_rx(0); 80239a4: 4620 mov r0, r4 80239a6: f7ff ff07 bl 80237b8 while (len--) *((uint8_t *)buf++) = spi_tx_rx(0); 80239aa: 2000 movs r0, #0 80239ac: f7ff ff04 bl 80237b8 80239b0: ab01 add r3, sp, #4 80239b2: 5518 strb r0, [r3, r4] 80239b4: 3401 adds r4, #1 static int spi_flash_read_sfdp(int addr, void *buf, size_t len) { SPI_FLASH_CS_L(); spi_tx_rx(CMD_RDSFDP); send_addr(addr); spi_tx_rx(0); while (len--) 80239b6: 2c04 cmp r4, #4 80239b8: d1f7 bne.n 80239aa *((uint8_t *)buf++) = spi_tx_rx(0); SPI_FLASH_CS_H(); 80239ba: 2005 movs r0, #5 80239bc: 2101 movs r1, #1 80239be: f7ff fbb1 bl 8023124 spi_init_(); // check SFDP magic spi_flash_read_sfdp(0, tmp, 4); if (!(tmp[0] == 0x53 && tmp[1] == 0x46 && 80239c2: f89d 3004 ldrb.w r3, [sp, #4] 80239c6: 2b53 cmp r3, #83 ; 0x53 80239c8: d110 bne.n 80239ec 80239ca: f89d 3005 ldrb.w r3, [sp, #5] 80239ce: 2b46 cmp r3, #70 ; 0x46 80239d0: d10c bne.n 80239ec 80239d2: f89d 3006 ldrb.w r3, [sp, #6] 80239d6: 2b44 cmp r3, #68 ; 0x44 80239d8: d108 bne.n 80239ec 80239da: f89d 0007 ldrb.w r0, [sp, #7] 80239de: f1b0 0c50 subs.w ip, r0, #80 ; 0x50 80239e2: f1dc 0000 rsbs r0, ip, #0 80239e6: eb50 000c adcs.w r0, r0, ip 80239ea: e000 b.n 80239ee tmp[2] == 0x44 && tmp[3] == 0x50)) return 0; 80239ec: 2000 movs r0, #0 if (!spi_flash_desc.sector_size) return; spi_flash_desc.present = true; */ } 80239ee: bd1c pop {r2, r3, r4, pc} 80239f0: 2000dfa4 .word 0x2000dfa4 80239f4: 40023800 .word 0x40023800 080239f8 : #define bufsize2 (countof(txbuf2)-1) uint8_t rxbuf1[bufsize1] = {0}; uint8_t rxbuf2[bufsize2] = {0}; void spi_flash_test(void) { 80239f8: b510 push {r4, lr} if (!spi_flash_init()) 80239fa: f7ff ffa7 bl 802394c 80239fe: 2800 cmp r0, #0 8023a00: d04a beq.n 8023a98 return; int ret = 0, addr = 0, offset = 0; spi_flash_read(0, rxbuf1, bufsize1, 0); 8023a02: 2000 movs r0, #0 8023a04: f640 62f9 movw r2, #3833 ; 0xef9 8023a08: 4603 mov r3, r0 8023a0a: 4924 ldr r1, [pc, #144] ; (8023a9c ) 8023a0c: f7ff ff1e bl 802384c spi_flash_erase_sector(0,0); 8023a10: 2000 movs r0, #0 8023a12: 4601 mov r1, r0 8023a14: f7ff ff79 bl 802390a spi_flash_read(0, rxbuf1, bufsize1, 0); 8023a18: 2000 movs r0, #0 8023a1a: 4920 ldr r1, [pc, #128] ; (8023a9c ) 8023a1c: f640 62f9 movw r2, #3833 ; 0xef9 8023a20: 4603 mov r3, r0 8023a22: f7ff ff13 bl 802384c spi_flash_write(addr, txbuf1, bufsize1, 0); 8023a26: 2000 movs r0, #0 8023a28: 4603 mov r3, r0 8023a2a: 491d ldr r1, [pc, #116] ; (8023aa0 ) 8023a2c: f640 62f9 movw r2, #3833 ; 0xef9 8023a30: f7ff ff5b bl 80238ea memset(rxbuf1, 0, bufsize1); 8023a34: 2100 movs r1, #0 8023a36: f640 62f9 movw r2, #3833 ; 0xef9 8023a3a: 4818 ldr r0, [pc, #96] ; (8023a9c ) 8023a3c: f7fd fe60 bl 8021700 spi_flash_read(0, rxbuf1, bufsize1, 0); 8023a40: 2000 movs r0, #0 8023a42: 4916 ldr r1, [pc, #88] ; (8023a9c ) 8023a44: f640 62f9 movw r2, #3833 ; 0xef9 8023a48: 4603 mov r3, r0 8023a4a: f7ff feff bl 802384c if (memcmp(txbuf1, rxbuf1, bufsize1) != 0) 8023a4e: 4814 ldr r0, [pc, #80] ; (8023aa0 ) 8023a50: 4912 ldr r1, [pc, #72] ; (8023a9c ) 8023a52: f640 62f9 movw r2, #3833 ; 0xef9 8023a56: f7fd fd67 bl 8021528 8023a5a: 4604 mov r4, r0 8023a5c: b9e0 cbnz r0, 8023a98 return; spi_flash_erase_sector(0,0); 8023a5e: 4601 mov r1, r0 8023a60: f7ff ff53 bl 802390a spi_flash_read(0, rxbuf1, bufsize1, 0); 8023a64: 4623 mov r3, r4 8023a66: 4620 mov r0, r4 8023a68: 490c ldr r1, [pc, #48] ; (8023a9c ) 8023a6a: f640 62f9 movw r2, #3833 ; 0xef9 8023a6e: f7ff feed bl 802384c spi_flash_write(0, txbuf2, bufsize2, 0); 8023a72: 4623 mov r3, r4 8023a74: 224e movs r2, #78 ; 0x4e 8023a76: 4620 mov r0, r4 8023a78: 490a ldr r1, [pc, #40] ; (8023aa4 ) 8023a7a: f7ff ff36 bl 80238ea memset(rxbuf2, 0, bufsize2); 8023a7e: 4621 mov r1, r4 8023a80: 224e movs r2, #78 ; 0x4e 8023a82: 4809 ldr r0, [pc, #36] ; (8023aa8 ) 8023a84: f7fd fe3c bl 8021700 spi_flash_read(0, rxbuf2, bufsize2, 0); 8023a88: 4907 ldr r1, [pc, #28] ; (8023aa8 ) 8023a8a: 4620 mov r0, r4 8023a8c: 224e movs r2, #78 ; 0x4e 8023a8e: 4623 mov r3, r4 spi_flash_desc.sector_size, spi_flash_desc.sector_size * spi_flash_desc.sector_count); return 0; */ } 8023a90: e8bd 4010 ldmia.w sp!, {r4, lr} spi_flash_read(0, rxbuf1, bufsize1, 0); spi_flash_write(0, txbuf2, bufsize2, 0); memset(rxbuf2, 0, bufsize2); spi_flash_read(0, rxbuf2, bufsize2, 0); 8023a94: f7ff beda b.w 802384c 8023a98: bd10 pop {r4, pc} 8023a9a: bf00 nop 8023a9c: 2000143c .word 0x2000143c 8023aa0: 200001fb .word 0x200001fb 8023aa4: 200001ac .word 0x200001ac 8023aa8: 20002335 .word 0x20002335 08023aac : \param [in] SubPriority Subpriority value (starting from 0). \return Encoded priority. Value can be used in the function \ref NVIC_SetPriority(). */ __STATIC_INLINE uint32_t NVIC_EncodePriority (uint32_t PriorityGroup, uint32_t PreemptPriority, uint32_t SubPriority) { uint32_t PriorityGroupTmp = (PriorityGroup & 0x07); /* only values 0..7 are used */ 8023aac: f000 0007 and.w r0, r0, #7 uint32_t PreemptPriorityBits; uint32_t SubPriorityBits; PreemptPriorityBits = ((7 - PriorityGroupTmp) > __NVIC_PRIO_BITS) ? __NVIC_PRIO_BITS : 7 - PriorityGroupTmp; 8023ab0: f1c0 0307 rsb r3, r0, #7 SubPriorityBits = ((PriorityGroupTmp + __NVIC_PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + __NVIC_PRIO_BITS; 8023ab4: 1d02 adds r2, r0, #4 { uint32_t PriorityGroupTmp = (PriorityGroup & 0x07); /* only values 0..7 are used */ uint32_t PreemptPriorityBits; uint32_t SubPriorityBits; PreemptPriorityBits = ((7 - PriorityGroupTmp) > __NVIC_PRIO_BITS) ? __NVIC_PRIO_BITS : 7 - PriorityGroupTmp; 8023ab6: 2b04 cmp r3, #4 8023ab8: bf28 it cs 8023aba: 2304 movcs r3, #4 SubPriorityBits = ((PriorityGroupTmp + __NVIC_PRIO_BITS) < 7) ? 0 : PriorityGroupTmp - 7 + __NVIC_PRIO_BITS; 8023abc: 2a06 cmp r2, #6 8023abe: d901 bls.n 8023ac4 8023ac0: 3803 subs r0, #3 8023ac2: e000 b.n 8023ac6 8023ac4: 2000 movs r0, #0 return ( ((PreemptPriority & ((1 << (PreemptPriorityBits)) - 1)) << SubPriorityBits) | 8023ac6: 2201 movs r2, #1 8023ac8: fa02 f303 lsl.w r3, r2, r3 8023acc: 3b01 subs r3, #1 8023ace: f003 0304 and.w r3, r3, #4 ((SubPriority & ((1 << (SubPriorityBits )) - 1))) ); } 8023ad2: fa03 f000 lsl.w r0, r3, r0 8023ad6: 4770 bx lr 08023ad8 : //#include USART_InitTypeDef USART_InitStructure; void uart_hw_init(USART_TypeDef *uart, uint32_t baud, uint16_t wordlen, uint16_t parity, uint16_t stop) { 8023ad8: b570 push {r4, r5, r6, lr} if (wordlen == 8) wordlen_tmp = USART_WordLength_8b; if (wordlen == 9) wordlen_tmp = USART_WordLength_9b; USART_InitStructure.USART_BaudRate = baud; 8023ada: 4d34 ldr r5, [pc, #208] ; (8023bac ) //#include USART_InitTypeDef USART_InitStructure; void uart_hw_init(USART_TypeDef *uart, uint32_t baud, uint16_t wordlen, uint16_t parity, uint16_t stop) { 8023adc: f8bd 6010 ldrh.w r6, [sp, #16] wordlen_tmp = USART_WordLength_9b; USART_InitStructure.USART_BaudRate = baud; USART_InitStructure.USART_WordLength = wordlen_tmp; USART_InitStructure.USART_StopBits = stop; USART_InitStructure.USART_Parity = parity; 8023ae0: 812b strh r3, [r5, #8] void uart_hw_init(USART_TypeDef *uart, uint32_t baud, uint16_t wordlen, uint16_t parity, uint16_t stop) { uint16_t wordlen_tmp; if (wordlen == 8) wordlen_tmp = USART_WordLength_8b; if (wordlen == 9) 8023ae2: 2a09 cmp r2, #9 8023ae4: bf0c ite eq 8023ae6: f44f 5280 moveq.w r2, #4096 ; 0x1000 8023aea: 2200 movne r2, #0 USART_InitStructure.USART_BaudRate = baud; USART_InitStructure.USART_WordLength = wordlen_tmp; USART_InitStructure.USART_StopBits = stop; USART_InitStructure.USART_Parity = parity; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; 8023aec: 230c movs r3, #12 if (wordlen == 9) wordlen_tmp = USART_WordLength_9b; USART_InitStructure.USART_BaudRate = baud; USART_InitStructure.USART_WordLength = wordlen_tmp; USART_InitStructure.USART_StopBits = stop; 8023aee: 80ee strh r6, [r5, #6] USART_InitStructure.USART_Parity = parity; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; 8023af0: 2600 movs r6, #0 //#include USART_InitTypeDef USART_InitStructure; void uart_hw_init(USART_TypeDef *uart, uint32_t baud, uint16_t wordlen, uint16_t parity, uint16_t stop) { 8023af2: 4604 mov r4, r0 USART_InitStructure.USART_BaudRate = baud; USART_InitStructure.USART_WordLength = wordlen_tmp; USART_InitStructure.USART_StopBits = stop; USART_InitStructure.USART_Parity = parity; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; 8023af4: 816b strh r3, [r5, #10] if (wordlen == 8) wordlen_tmp = USART_WordLength_8b; if (wordlen == 9) wordlen_tmp = USART_WordLength_9b; USART_InitStructure.USART_BaudRate = baud; 8023af6: 6029 str r1, [r5, #0] USART_InitStructure.USART_WordLength = wordlen_tmp; 8023af8: 80aa strh r2, [r5, #4] USART_InitStructure.USART_StopBits = stop; USART_InitStructure.USART_Parity = parity; USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; 8023afa: 81ae strh r6, [r5, #12] USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; USART_DeInit(uart); 8023afc: f7ff f93e bl 8022d7c if (uart == USART1) { 8023b00: 4b2b ldr r3, [pc, #172] ; (8023bb0 ) 8023b02: 429c cmp r4, r3 8023b04: d111 bne.n 8023b2a RCC->APB2ENR |= RCC_APB2Periph_USART1; 8023b06: f503 3394 add.w r3, r3, #75776 ; 0x12800 8023b0a: 6c5a ldr r2, [r3, #68] ; 0x44 8023b0c: f042 0210 orr.w r2, r2, #16 8023b10: 645a str r2, [r3, #68] ; 0x44 \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). */ __STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void) { return ((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos); /* read priority grouping field */ 8023b12: 4b28 ldr r3, [pc, #160] ; (8023bb4 ) 8023b14: 68d8 ldr r0, [r3, #12] NVIC_SetPriority(USART1_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 0x04, 0)); 8023b16: f3c0 2002 ubfx r0, r0, #8, #3 8023b1a: f7ff ffc7 bl 8023aac __STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) { if(IRQn < 0) { SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for Cortex-M System Interrupts */ else { NVIC->IP[(uint32_t)(IRQn)] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for device specific Interrupts */ 8023b1e: 4b26 ldr r3, [pc, #152] ; (8023bb8 ) 8023b20: 0100 lsls r0, r0, #4 8023b22: f883 0325 strb.w r0, [r3, #805] ; 0x325 \param [in] IRQn External interrupt number. Value cannot be negative. */ __STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn) { /* NVIC->ISER[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); enable interrupt */ NVIC->ISER[(uint32_t)((int32_t)IRQn) >> 5] = (uint32_t)(1 << ((uint32_t)((int32_t)IRQn) & (uint32_t)0x1F)); /* enable interrupt */ 8023b26: 2220 movs r2, #32 8023b28: e028 b.n 8023b7c USART_Cmd(USART1, ENABLE); USART_ITConfig(USART1, USART_IT_RXNE, ENABLE); USART_ITConfig(USART1, USART_IT_TXE, DISABLE); } if (uart == USART2) { 8023b2a: 4b24 ldr r3, [pc, #144] ; (8023bbc ) 8023b2c: 429c cmp r4, r3 8023b2e: d111 bne.n 8023b54 RCC->APB1ENR |= RCC_APB1Periph_USART2; 8023b30: f503 33fa add.w r3, r3, #128000 ; 0x1f400 8023b34: 6c1a ldr r2, [r3, #64] ; 0x40 8023b36: f442 3200 orr.w r2, r2, #131072 ; 0x20000 8023b3a: 641a str r2, [r3, #64] ; 0x40 \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). */ __STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void) { return ((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos); /* read priority grouping field */ 8023b3c: 4b1d ldr r3, [pc, #116] ; (8023bb4 ) 8023b3e: 68d8 ldr r0, [r3, #12] NVIC_SetPriority(USART2_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 0x04, 0)); 8023b40: f3c0 2002 ubfx r0, r0, #8, #3 8023b44: f7ff ffb2 bl 8023aac __STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) { if(IRQn < 0) { SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for Cortex-M System Interrupts */ else { NVIC->IP[(uint32_t)(IRQn)] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for device specific Interrupts */ 8023b48: 4b1b ldr r3, [pc, #108] ; (8023bb8 ) 8023b4a: 0100 lsls r0, r0, #4 8023b4c: f883 0326 strb.w r0, [r3, #806] ; 0x326 \param [in] IRQn External interrupt number. Value cannot be negative. */ __STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn) { /* NVIC->ISER[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); enable interrupt */ NVIC->ISER[(uint32_t)((int32_t)IRQn) >> 5] = (uint32_t)(1 << ((uint32_t)((int32_t)IRQn) & (uint32_t)0x1F)); /* enable interrupt */ 8023b50: 2240 movs r2, #64 ; 0x40 8023b52: e013 b.n 8023b7c USART_Cmd(USART2, ENABLE); USART_ITConfig(USART2, USART_IT_RXNE, ENABLE); USART_ITConfig(USART2, USART_IT_TXE, DISABLE); } if (uart == USART3) { 8023b54: 4b1a ldr r3, [pc, #104] ; (8023bc0 ) 8023b56: 429c cmp r4, r3 8023b58: d127 bne.n 8023baa RCC->APB1ENR |= RCC_APB1Periph_USART3; 8023b5a: f503 33f8 add.w r3, r3, #126976 ; 0x1f000 8023b5e: 6c1a ldr r2, [r3, #64] ; 0x40 8023b60: f442 2280 orr.w r2, r2, #262144 ; 0x40000 8023b64: 641a str r2, [r3, #64] ; 0x40 \return Priority grouping field (SCB->AIRCR [10:8] PRIGROUP field). */ __STATIC_INLINE uint32_t NVIC_GetPriorityGrouping(void) { return ((SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) >> SCB_AIRCR_PRIGROUP_Pos); /* read priority grouping field */ 8023b66: 4b13 ldr r3, [pc, #76] ; (8023bb4 ) 8023b68: 68d8 ldr r0, [r3, #12] NVIC_SetPriority(USART3_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 0x04, 0)); 8023b6a: f3c0 2002 ubfx r0, r0, #8, #3 8023b6e: f7ff ff9d bl 8023aac __STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) { if(IRQn < 0) { SCB->SHP[((uint32_t)(IRQn) & 0xF)-4] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for Cortex-M System Interrupts */ else { NVIC->IP[(uint32_t)(IRQn)] = ((priority << (8 - __NVIC_PRIO_BITS)) & 0xff); } /* set Priority for device specific Interrupts */ 8023b72: 4b11 ldr r3, [pc, #68] ; (8023bb8 ) 8023b74: 0100 lsls r0, r0, #4 8023b76: f883 0327 strb.w r0, [r3, #807] ; 0x327 \param [in] IRQn External interrupt number. Value cannot be negative. */ __STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn) { /* NVIC->ISER[((uint32_t)(IRQn) >> 5)] = (1 << ((uint32_t)(IRQn) & 0x1F)); enable interrupt */ NVIC->ISER[(uint32_t)((int32_t)IRQn) >> 5] = (uint32_t)(1 << ((uint32_t)((int32_t)IRQn) & (uint32_t)0x1F)); /* enable interrupt */ 8023b7a: 2280 movs r2, #128 ; 0x80 8023b7c: 605a str r2, [r3, #4] NVIC_EnableIRQ(USART3_IRQn); USART_Init(USART3, &USART_InitStructure); 8023b7e: 4620 mov r0, r4 8023b80: 4629 mov r1, r5 8023b82: f7ff f94f bl 8022e24 USART_Cmd(USART3, ENABLE); 8023b86: 4620 mov r0, r4 8023b88: 2101 movs r1, #1 8023b8a: f7ff f9a5 bl 8022ed8 USART_ITConfig(USART3, USART_IT_RXNE, ENABLE); 8023b8e: 4620 mov r0, r4 8023b90: 2201 movs r2, #1 8023b92: f240 5125 movw r1, #1317 ; 0x525 8023b96: f7ff f9af bl 8022ef8 USART_ITConfig(USART3, USART_IT_TXE, DISABLE); 8023b9a: 4620 mov r0, r4 8023b9c: f240 7127 movw r1, #1831 ; 0x727 8023ba0: 4632 mov r2, r6 } } 8023ba2: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} NVIC_SetPriority(USART3_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(), 0x04, 0)); NVIC_EnableIRQ(USART3_IRQn); USART_Init(USART3, &USART_InitStructure); USART_Cmd(USART3, ENABLE); USART_ITConfig(USART3, USART_IT_RXNE, ENABLE); USART_ITConfig(USART3, USART_IT_TXE, DISABLE); 8023ba6: f7ff b9a7 b.w 8022ef8 8023baa: bd70 pop {r4, r5, r6, pc} 8023bac: 2000dfb0 .word 0x2000dfb0 8023bb0: 40011000 .word 0x40011000 8023bb4: e000ed00 .word 0xe000ed00 8023bb8: e000e100 .word 0xe000e100 8023bbc: 40004400 .word 0x40004400 8023bc0: 40004800 .word 0x40004800 08023bc4 : } } void InitUSART(void) { 8023bc4: b507 push {r0, r1, r2, lr} uart_hw_init(UPS_USART, UPS_USART_BAUD, UPS_USART_WORD_LEN, UPS_USART_PARITY, UPS_USART_STOP_BIT); 8023bc6: 2300 movs r3, #0 8023bc8: 9300 str r3, [sp, #0] 8023bca: 4803 ldr r0, [pc, #12] ; (8023bd8 ) 8023bcc: f44f 31e1 mov.w r1, #115200 ; 0x1c200 8023bd0: 2208 movs r2, #8 8023bd2: f7ff ff81 bl 8023ad8 } 8023bd6: bd0e pop {r1, r2, r3, pc} 8023bd8: 40004400 .word 0x40004400 08023bdc : void send_test(void) { UPS_USART->DR = 0x55; 8023bdc: 4b01 ldr r3, [pc, #4] ; (8023be4 ) 8023bde: 2255 movs r2, #85 ; 0x55 8023be0: 809a strh r2, [r3, #4] 8023be2: 4770 bx lr 8023be4: 40004400 .word 0x40004400 08023be8 : rxUART = USART_ReceiveData(UPS_USART); } } void USART1_IRQHandler(void) { 8023be8: 4770 bx lr 8023bea: 0000 movs r0, r0 08023bec : } void USART2_IRQHandler(void) { 8023bec: b508 push {r3, lr} uint8_t rxUART = 0; inline void rs232_irq_handler(void) { if(USART_GetITStatus(UPS_USART, USART_IT_RXNE) != RESET) 8023bee: 4808 ldr r0, [pc, #32] ; (8023c10 ) 8023bf0: f240 5125 movw r1, #1317 ; 0x525 8023bf4: f7ff f999 bl 8022f2a 8023bf8: b148 cbz r0, 8023c0e { USART_ClearITPendingBit(UPS_USART, USART_IT_RXNE); 8023bfa: 4805 ldr r0, [pc, #20] ; (8023c10 ) 8023bfc: f240 5125 movw r1, #1317 ; 0x525 8023c00: f7ff f9b3 bl 8022f6a rxUART = USART_ReceiveData(UPS_USART); 8023c04: 4802 ldr r0, [pc, #8] ; (8023c10 ) 8023c06: f7ff f973 bl 8022ef0 8023c0a: 4b02 ldr r3, [pc, #8] ; (8023c14 ) 8023c0c: 7018 strb r0, [r3, #0] 8023c0e: bd08 pop {r3, pc} 8023c10: 40004400 .word 0x40004400 8023c14: 20002383 .word 0x20002383 08023c18 : void USART2_IRQHandler(void) { rs232_irq_handler(); } void USART3_IRQHandler(void) { 8023c18: 4770 bx lr 8023c1a: 0000 movs r0, r0 08023c1c : /** * @brief Задача инициализации. Запускает основные задачи девайса и умирает. * @retval */ void InitTask(void *params) { 8023c1c: b51f push {r0, r1, r2, r3, r4, lr} // ----------------------------------------------------------------------------- #ifdef LED_ENABLE LED_Init(); /* Простая мигалка для подтверждения живучести контроллера */ xTaskCreate(vTaskLedBlink, "LED_Blink", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL);//&xTaskToKill 8023c1e: 2400 movs r4, #0 void InitTask(void *params) { // ----------------------------------------------------------------------------- // xTaskCreate(vTaskWdt, "WDT", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); // ----------------------------------------------------------------------------- InitUSART(); 8023c20: f7ff ffd0 bl 8023bc4 send_test(); 8023c24: f7ff ffda bl 8023bdc // ----------------------------------------------------------------------------- // RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE); /* SETTINGS_SetDefaultDebug(); SETTINGS_Save();*/ SETTINGS_Load(); 8023c28: f001 f816 bl 8024c58 set_mode_jumper(); 8023c2c: f001 f8f6 bl 8024e1c #endif // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- #ifdef LED_ENABLE LED_Init(); 8023c30: f001 f873 bl 8024d1a /* Простая мигалка для подтверждения живучести контроллера */ xTaskCreate(vTaskLedBlink, "LED_Blink", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL);//&xTaskToKill 8023c34: 2280 movs r2, #128 ; 0x80 8023c36: 4623 mov r3, r4 8023c38: 4914 ldr r1, [pc, #80] ; (8023c8c ) 8023c3a: 9400 str r4, [sp, #0] 8023c3c: 9401 str r4, [sp, #4] 8023c3e: 9402 str r4, [sp, #8] 8023c40: 9403 str r4, [sp, #12] 8023c42: 4813 ldr r0, [pc, #76] ; (8023c90 ) 8023c44: f001 fc34 bl 80254b0 #endif // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- #ifdef BUTTON_ENABLE BUTTON_Init(); 8023c48: f001 f8a0 bl 8024d8c xTaskCreate(vTaskButtons, "Buttons", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); 8023c4c: 4911 ldr r1, [pc, #68] ; (8023c94 ) 8023c4e: 9400 str r4, [sp, #0] 8023c50: 2280 movs r2, #128 ; 0x80 8023c52: 4623 mov r3, r4 8023c54: 9401 str r4, [sp, #4] 8023c56: 9402 str r4, [sp, #8] 8023c58: 9403 str r4, [sp, #12] 8023c5a: 480f ldr r0, [pc, #60] ; (8023c98 ) 8023c5c: f001 fc28 bl 80254b0 //xTaskCreate( d_inouts_task, "inouts_task", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); // xTaskCreate( d_inouts_test, "d_inouts_test", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL); // ----------------------------------------------------------------------------- #ifdef RTC_ENABLE TM_RTC_Init(TM_RTC_ClockSource_External); // Так было 8023c60: 2001 movs r0, #1 8023c62: f7ff fca1 bl 80235a8 #endif // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- #ifdef NET_ENABLE ETH_BSP_Config(); 8023c66: f00c fab1 bl 80301cc LwIP_Init(); 8023c6a: f00c f8c5 bl 802fdf8 #ifdef WEB_SERVER_ENABLE HTTP_Init(); 8023c6e: f002 fae7 bl 8026240 //TEST_IO(); /* Контроль успешной загрузки. Сброс флага bootry */ /* Сброс флага и сохранение нового значения во флеш памяти происходт после некоторой задержки для запуска всех задач */ vTaskDelay(4000); 8023c72: f44f 607a mov.w r0, #4000 ; 0xfa0 8023c76: f001 feb1 bl 80259dc /* if (!dhcp) SNMP_SendUserTrap(DEVICE_REBOOTED); printf("Hello world\r\n");*/ vTaskDelete(NULL); 8023c7a: 4620 mov r0, r4 8023c7c: f001 fcf0 bl 8025660 taskYIELD(); } 8023c80: b004 add sp, #16 8023c82: e8bd 4010 ldmia.w sp!, {r4, lr} SNMP_SendUserTrap(DEVICE_REBOOTED); printf("Hello world\r\n");*/ vTaskDelete(NULL); taskYIELD(); 8023c86: f002 b885 b.w 8025d94 8023c8a: bf00 nop 8023c8c: 08030c24 .word 0x08030c24 8023c90: 08024cfd .word 0x08024cfd 8023c94: 08030c2e .word 0x08030c2e 8023c98: 08024e09 .word 0x08024e09 08023c9c
: void vApplicationTickHook(void) { } int main() { 8023c9c: b51f push {r0, r1, r2, r3, r4, lr} This function disables IRQ interrupts by setting the I-bit in the CPSR. Can only be executed in Privileged modes. */ __attribute__( ( always_inline ) ) __STATIC_INLINE void __disable_irq(void) { __ASM volatile ("cpsid i" : : : "memory"); 8023c9e: b672 cpsid i //TIM_Cmd(TIM13, DISABLE); //TIM_ClearITPendingBit(TIM13, TIM_IT_Update); __disable_irq(); NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x20000); 8023ca0: f04f 6000 mov.w r0, #134217728 ; 0x8000000 8023ca4: f44f 3100 mov.w r1, #131072 ; 0x20000 8023ca8: f7fe fc42 bl 8022530 __STATIC_INLINE void NVIC_SetPriorityGrouping(uint32_t PriorityGroup) { uint32_t reg_value; uint32_t PriorityGroupTmp = (PriorityGroup & (uint32_t)0x07); /* only values 0..7 are used */ reg_value = SCB->AIRCR; /* read old register configuration */ 8023cac: 4a17 ldr r2, [pc, #92] ; (8023d0c ) 8023cae: 68d1 ldr r1, [r2, #12] reg_value &= ~(SCB_AIRCR_VECTKEY_Msk | SCB_AIRCR_PRIGROUP_Msk); /* clear bits to change */ 8023cb0: f64f 03ff movw r3, #63743 ; 0xf8ff 8023cb4: 400b ands r3, r1 reg_value = (reg_value | 8023cb6: f043 63bf orr.w r3, r3, #100139008 ; 0x5f80000 8023cba: f443 3300 orr.w r3, r3, #131072 ; 0x20000 ((uint32_t)0x5FA << SCB_AIRCR_VECTKEY_Pos) | (PriorityGroupTmp << 8)); /* Insert write key and priorty group */ SCB->AIRCR = reg_value; 8023cbe: 60d3 str r3, [r2, #12] NVIC_SetPriorityGrouping(0); NVIC_PriorityGroupConfig( NVIC_PriorityGroup_4 ); 8023cc0: f44f 7040 mov.w r0, #768 ; 0x300 8023cc4: f7fe fbf6 bl 80224b4 This function enables IRQ interrupts by clearing the I-bit in the CPSR. Can only be executed in Privileged modes. */ __attribute__( ( always_inline ) ) __STATIC_INLINE void __enable_irq(void) { __ASM volatile ("cpsie i" : : : "memory"); 8023cc8: b662 cpsie i __enable_irq(); //WDG_Init(); RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE); 8023cca: 2101 movs r1, #1 8023ccc: f44f 5080 mov.w r0, #4096 ; 0x1000 8023cd0: f7fe fe50 bl 8022974 /* Clear flash error flags if were set */ FLASH_ClearFlag(FLASH_FLAG_PGPERR); 8023cd4: 2040 movs r0, #64 ; 0x40 gpio_init(); spi_flash_test(); // NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); xTaskCreate( InitTask, "InitTask", 1000, NULL, tskIDLE_PRIORITY, NULL); 8023cd6: 2400 movs r4, #0 //WDG_Init(); RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_CRC, ENABLE); /* Clear flash error flags if were set */ FLASH_ClearFlag(FLASH_FLAG_PGPERR); 8023cd8: f7fe fc60 bl 802259c FLASH_ClearFlag(FLASH_FLAG_PGSERR); 8023cdc: 2080 movs r0, #128 ; 0x80 8023cde: f7fe fc5d bl 802259c gpio_init(); 8023ce2: f7ff fa7f bl 80231e4 spi_flash_test(); 8023ce6: f7ff fe87 bl 80239f8 // NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); xTaskCreate( InitTask, "InitTask", 1000, NULL, tskIDLE_PRIORITY, NULL); 8023cea: 4909 ldr r1, [pc, #36] ; (8023d10 ) 8023cec: 9400 str r4, [sp, #0] 8023cee: f44f 727a mov.w r2, #1000 ; 0x3e8 8023cf2: 4623 mov r3, r4 8023cf4: 9401 str r4, [sp, #4] 8023cf6: 9402 str r4, [sp, #8] 8023cf8: 9403 str r4, [sp, #12] 8023cfa: 4806 ldr r0, [pc, #24] ; (8023d14 ) 8023cfc: f001 fbd8 bl 80254b0 vTaskStartScheduler(); 8023d00: f001 fd08 bl 8025714 /*while(1) { }*/ } 8023d04: 4620 mov r0, r4 8023d06: b004 add sp, #16 8023d08: bd10 pop {r4, pc} 8023d0a: bf00 nop 8023d0c: e000ed00 .word 0xe000ed00 8023d10: 08030c36 .word 0x08030c36 8023d14: 08023c1d .word 0x08023c1d 08023d18 : * @brief This function handles NMI exception. * @param None * @retval None */ void NMI_Handler(void) { 8023d18: 4770 bx lr 8023d1a: 0000 movs r0, r0 08023d1c : } void HardFault_Output(uint32_t *sp) { 8023d1c: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} uint32_t r0 = sp[0]; uint32_t r1 = sp[1]; 8023d20: e890 0808 ldmia.w r0, {r3, fp} uint32_t r2 = sp[2]; 8023d24: f8d0 a008 ldr.w sl, [r0, #8] uint32_t r3 = sp[3]; 8023d28: f8d0 900c ldr.w r9, [r0, #12] uint32_t r12 = sp[4]; 8023d2c: f8d0 8010 ldr.w r8, [r0, #16] uint32_t lr = sp[5]; 8023d30: 6947 ldr r7, [r0, #20] uint32_t pc = sp[6]; 8023d32: 6986 ldr r6, [r0, #24] uint32_t psr = sp[7]; 8023d34: 69c5 ldr r5, [r0, #28] printf("HardFault:\n\r"); 8023d36: 9301 str r3, [sp, #4] void NMI_Handler(void) { } void HardFault_Output(uint32_t *sp) { 8023d38: 4604 mov r4, r0 uint32_t r12 = sp[4]; uint32_t lr = sp[5]; uint32_t pc = sp[6]; uint32_t psr = sp[7]; printf("HardFault:\n\r"); 8023d3a: 4816 ldr r0, [pc, #88] ; (8023d94 ) 8023d3c: f000 fbbc bl 80244b8 /* Print CFSR register */ /* Print CPU registers */ printf("\n\rRegisters:\n\r"); 8023d40: 4815 ldr r0, [pc, #84] ; (8023d98 ) 8023d42: f000 fbb9 bl 80244b8 printf("SP 0x%08lx\n\r", (uint32_t)sp); 8023d46: 4815 ldr r0, [pc, #84] ; (8023d9c ) 8023d48: 4621 mov r1, r4 8023d4a: f000 fbb5 bl 80244b8 printf("R0 0x%08lx\n\r", r0); 8023d4e: 9b01 ldr r3, [sp, #4] 8023d50: 4813 ldr r0, [pc, #76] ; (8023da0 ) 8023d52: 4619 mov r1, r3 8023d54: f000 fbb0 bl 80244b8 printf("R1 0x%08lx\n\r", r1); 8023d58: 4812 ldr r0, [pc, #72] ; (8023da4 ) 8023d5a: 4659 mov r1, fp 8023d5c: f000 fbac bl 80244b8 printf("R2 0x%08lx\n\r", r2); 8023d60: 4811 ldr r0, [pc, #68] ; (8023da8 ) 8023d62: 4651 mov r1, sl 8023d64: f000 fba8 bl 80244b8 printf("R3 0x%08lx\n\r", r3); 8023d68: 4810 ldr r0, [pc, #64] ; (8023dac ) 8023d6a: 4649 mov r1, r9 8023d6c: f000 fba4 bl 80244b8 printf("R12 0x%08lx\n\r", r12); 8023d70: 480f ldr r0, [pc, #60] ; (8023db0 ) 8023d72: 4641 mov r1, r8 8023d74: f000 fba0 bl 80244b8 printf("LR 0x%08lx\n\r", lr); 8023d78: 480e ldr r0, [pc, #56] ; (8023db4 ) 8023d7a: 4639 mov r1, r7 8023d7c: f000 fb9c bl 80244b8 printf("PC 0x%08lx\n\r", pc); 8023d80: 480d ldr r0, [pc, #52] ; (8023db8 ) 8023d82: 4631 mov r1, r6 8023d84: f000 fb98 bl 80244b8 printf("PSR 0x%08lx\n\r", psr); 8023d88: 480c ldr r0, [pc, #48] ; (8023dbc ) 8023d8a: 4629 mov r1, r5 8023d8c: f000 fb94 bl 80244b8 8023d90: e7fe b.n 8023d90 8023d92: bf00 nop 8023d94: 08030c3f .word 0x08030c3f 8023d98: 08030c4c .word 0x08030c4c 8023d9c: 08030c5b .word 0x08030c5b 8023da0: 08030c71 .word 0x08030c71 8023da4: 08030c87 .word 0x08030c87 8023da8: 08030c9d .word 0x08030c9d 8023dac: 08030cb3 .word 0x08030cb3 8023db0: 08030cc9 .word 0x08030cc9 8023db4: 08030cdf .word 0x08030cdf 8023db8: 08030cf5 .word 0x08030cf5 8023dbc: 08030d0b .word 0x08030d0b 08023dc0 : * @retval None */ __attribute__( (naked) ) void HardFault_Handler(void) { __asm volatile 8023dc0: f01e 0f04 tst.w lr, #4 8023dc4: bf0c ite eq 8023dc6: f3ef 8008 mrseq r0, MSP 8023dca: f3ef 8009 mrsne r0, PSP 8023dce: f8df 1004 ldr.w r1, [pc, #4] ; 8023dd4 8023dd2: 4708 bx r1 08023dd4 : 8023dd4: 08023d1d .word 0x08023d1d 08023dd8 : * @brief This function handles Memory Manage exception. * @param None * @retval None */ void MemManage_Handler(void) { 8023dd8: e7fe b.n 8023dd8 8023dda: 0000 movs r0, r0 08023ddc : } } void TIM8_UP_TIM13_IRQHandler(void) { TIM_ClearITPendingBit(TIM13, TIM_IT_Update); 8023ddc: 4801 ldr r0, [pc, #4] ; (8023de4 ) 8023dde: 2101 movs r1, #1 8023de0: f7fe bfc8 b.w 8022d74 8023de4: 40001c00 .word 0x40001c00 08023de8 : * @brief This function handles Bus Fault exception. * @param None * @retval None */ void BusFault_Handler(void) { 8023de8: e7fe b.n 8023de8 08023dea : * @brief This function handles Usage Fault exception. * @param None * @retval None */ void UsageFault_Handler(void) { 8023dea: e7fe b.n 8023dea 08023dec : * @brief This function handles Debug Monitor exception. * @param None * @retval None */ void DebugMon_Handler(void) { 8023dec: 4770 bx lr 08023dee : /*void PPP_IRQHandler(void) { }*/ void SDIO_IRQHandler(void) { 8023dee: 4770 bx lr 08023df0 : * @brief This function handles ethernet DMA interrupt request. * @param None * @retval None */ void ETH_IRQHandler(void) { 8023df0: b507 push {r0, r1, r2, lr} portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; 8023df2: 2300 movs r3, #0 /* Frame received */ if ( ETH_GetDMAFlagStatus(ETH_DMA_FLAG_R) == SET) 8023df4: 2040 movs r0, #64 ; 0x40 * @param None * @retval None */ void ETH_IRQHandler(void) { portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; 8023df6: 9301 str r3, [sp, #4] /* Frame received */ if ( ETH_GetDMAFlagStatus(ETH_DMA_FLAG_R) == SET) 8023df8: f00c fc86 bl 8030708 8023dfc: 2801 cmp r0, #1 8023dfe: d104 bne.n 8023e0a { /* Give the semaphore to wakeup LwIP task */ xSemaphoreGiveFromISR( s_xSemaphore, &xHigherPriorityTaskWoken ); 8023e00: 4b09 ldr r3, [pc, #36] ; (8023e28 ) 8023e02: a901 add r1, sp, #4 8023e04: 6818 ldr r0, [r3, #0] 8023e06: f001 fa43 bl 8025290 } /* Clear the interrupt flags. */ /* Clear the Eth DMA Rx IT pending bits */ ETH_DMAClearITPendingBit(ETH_DMA_IT_R); 8023e0a: 2040 movs r0, #64 ; 0x40 8023e0c: f00c fc92 bl 8030734 ETH_DMAClearITPendingBit(ETH_DMA_IT_NIS); 8023e10: f44f 3080 mov.w r0, #65536 ; 0x10000 8023e14: f00c fc8e bl 8030734 // Switch tasks if necessary. */ if( xHigherPriorityTaskWoken != pdFALSE ) 8023e18: 9b01 ldr r3, [sp, #4] 8023e1a: b11b cbz r3, 8023e24 { portEND_SWITCHING_ISR( xHigherPriorityTaskWoken ); 8023e1c: 4b03 ldr r3, [pc, #12] ; (8023e2c ) 8023e1e: f04f 5280 mov.w r2, #268435456 ; 0x10000000 8023e22: 601a str r2, [r3, #0] } } 8023e24: bd0e pop {r1, r2, r3, pc} 8023e26: bf00 nop 8023e28: 2000df4c .word 0x2000df4c 8023e2c: e000ed04 .word 0xe000ed04 08023e30 : #ifdef PRINTF_LONG_LONG_SUPPORT static void _TFP_GCC_NO_INLINE_ ulli2a( unsigned long long int num, struct param *p) { 8023e30: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} int n = 0; unsigned long long int d = 1; char *bf = p->bf; while (num / d >= p->base) 8023e34: 68d3 ldr r3, [r2, #12] static void _TFP_GCC_NO_INLINE_ ulli2a( unsigned long long int num, struct param *p) { int n = 0; unsigned long long int d = 1; char *bf = p->bf; 8023e36: f8d2 b010 ldr.w fp, [r2, #16] #ifdef PRINTF_LONG_LONG_SUPPORT static void _TFP_GCC_NO_INLINE_ ulli2a( unsigned long long int num, struct param *p) { 8023e3a: 4681 mov r9, r0 8023e3c: 468a mov sl, r1 8023e3e: 4690 mov r8, r2 int n = 0; unsigned long long int d = 1; char *bf = p->bf; while (num / d >= p->base) 8023e40: 461e mov r6, r3 8023e42: 2700 movs r7, #0 #ifdef PRINTF_LONG_LONG_SUPPORT static void _TFP_GCC_NO_INLINE_ ulli2a( unsigned long long int num, struct param *p) { int n = 0; unsigned long long int d = 1; 8023e44: 2401 movs r4, #1 8023e46: 2500 movs r5, #0 char *bf = p->bf; while (num / d >= p->base) 8023e48: e006 b.n 8023e58 d *= p->base; 8023e4a: fb04 f307 mul.w r3, r4, r7 8023e4e: fb06 3305 mla r3, r6, r5, r3 8023e52: fba4 4506 umull r4, r5, r4, r6 8023e56: 195d adds r5, r3, r5 unsigned long long int num, struct param *p) { int n = 0; unsigned long long int d = 1; char *bf = p->bf; while (num / d >= p->base) 8023e58: 4648 mov r0, r9 8023e5a: 4651 mov r1, sl 8023e5c: 4622 mov r2, r4 8023e5e: 462b mov r3, r5 8023e60: f7fc fe70 bl 8020b44 <__aeabi_uldivmod> 8023e64: 42b9 cmp r1, r7 8023e66: bf08 it eq 8023e68: 42b0 cmpeq r0, r6 8023e6a: d2ee bcs.n 8023e4a 8023e6c: 2600 movs r6, #0 8023e6e: e02d b.n 8023ecc d *= p->base; while (d != 0) { int dgt = num / d; 8023e70: 4622 mov r2, r4 8023e72: 462b mov r3, r5 8023e74: 4648 mov r0, r9 8023e76: 4651 mov r1, sl 8023e78: f7fc fe64 bl 8020b44 <__aeabi_uldivmod> num %= d; 8023e7c: 4651 mov r1, sl 8023e7e: 4622 mov r2, r4 8023e80: 462b mov r3, r5 unsigned long long int d = 1; char *bf = p->bf; while (num / d >= p->base) d *= p->base; while (d != 0) { int dgt = num / d; 8023e82: 4607 mov r7, r0 num %= d; 8023e84: 4648 mov r0, r9 8023e86: f7fc fe5d bl 8020b44 <__aeabi_uldivmod> d /= p->base; 8023e8a: 4620 mov r0, r4 8023e8c: 4629 mov r1, r5 char *bf = p->bf; while (num / d >= p->base) d *= p->base; while (d != 0) { int dgt = num / d; num %= d; 8023e8e: 4691 mov r9, r2 8023e90: 469a mov sl, r3 d /= p->base; 8023e92: f8d8 200c ldr.w r2, [r8, #12] 8023e96: 2300 movs r3, #0 8023e98: f7fc fe54 bl 8020b44 <__aeabi_uldivmod> 8023e9c: 4604 mov r4, r0 8023e9e: 460d mov r5, r1 if (n || dgt > 0 || d == 0) { 8023ea0: b926 cbnz r6, 8023eac 8023ea2: 2f00 cmp r7, #0 8023ea4: dc02 bgt.n 8023eac 8023ea6: ea54 0305 orrs.w r3, r4, r5 8023eaa: d1e1 bne.n 8023e70 *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); 8023eac: 2f09 cmp r7, #9 8023eae: b2fa uxtb r2, r7 8023eb0: dd07 ble.n 8023ec2 8023eb2: f898 3000 ldrb.w r3, [r8] 8023eb6: f013 0f04 tst.w r3, #4 8023eba: bf0c ite eq 8023ebc: 2357 moveq r3, #87 ; 0x57 8023ebe: 2337 movne r3, #55 ; 0x37 8023ec0: e000 b.n 8023ec4 8023ec2: 2330 movs r3, #48 ; 0x30 8023ec4: 189b adds r3, r3, r2 8023ec6: f80b 3b01 strb.w r3, [fp], #1 ++n; 8023eca: 3601 adds r6, #1 int n = 0; unsigned long long int d = 1; char *bf = p->bf; while (num / d >= p->base) d *= p->base; while (d != 0) { 8023ecc: ea54 0305 orrs.w r3, r4, r5 8023ed0: d1ce bne.n 8023e70 if (n || dgt > 0 || d == 0) { *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); ++n; } } *bf = 0; 8023ed2: 2300 movs r3, #0 8023ed4: f88b 3000 strb.w r3, [fp] 8023ed8: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 08023edc : } #endif #ifdef PRINTF_LONG_SUPPORT static void uli2a(unsigned long int num, struct param *p) { 8023edc: b570 push {r4, r5, r6, lr} int n = 0; unsigned long int d = 1; char *bf = p->bf; while (num / d >= p->base) 8023ede: 68ca ldr r2, [r1, #12] #ifdef PRINTF_LONG_SUPPORT static void uli2a(unsigned long int num, struct param *p) { int n = 0; unsigned long int d = 1; char *bf = p->bf; 8023ee0: 690c ldr r4, [r1, #16] #ifdef PRINTF_LONG_SUPPORT static void uli2a(unsigned long int num, struct param *p) { int n = 0; unsigned long int d = 1; 8023ee2: 2301 movs r3, #1 char *bf = p->bf; while (num / d >= p->base) 8023ee4: e000 b.n 8023ee8 d *= p->base; 8023ee6: 4353 muls r3, r2 static void uli2a(unsigned long int num, struct param *p) { int n = 0; unsigned long int d = 1; char *bf = p->bf; while (num / d >= p->base) 8023ee8: fbb0 f5f3 udiv r5, r0, r3 8023eec: 4295 cmp r5, r2 8023eee: d2fa bcs.n 8023ee6 8023ef0: 2500 movs r5, #0 8023ef2: e01a b.n 8023f2a d *= p->base; while (d != 0) { int dgt = num / d; num %= d; d /= p->base; 8023ef4: 68ce ldr r6, [r1, #12] unsigned long int d = 1; char *bf = p->bf; while (num / d >= p->base) d *= p->base; while (d != 0) { int dgt = num / d; 8023ef6: fbb0 f2f3 udiv r2, r0, r3 num %= d; 8023efa: fb03 0012 mls r0, r3, r2, r0 d /= p->base; 8023efe: fbb3 f3f6 udiv r3, r3, r6 if (n || dgt > 0 || d == 0) { 8023f02: b91d cbnz r5, 8023f0c 8023f04: 2a00 cmp r2, #0 8023f06: dc01 bgt.n 8023f0c 8023f08: 2b00 cmp r3, #0 8023f0a: d1f3 bne.n 8023ef4 *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); 8023f0c: 2a09 cmp r2, #9 8023f0e: b2d6 uxtb r6, r2 8023f10: dd06 ble.n 8023f20 8023f12: 780a ldrb r2, [r1, #0] 8023f14: f012 0f04 tst.w r2, #4 8023f18: bf0c ite eq 8023f1a: 2257 moveq r2, #87 ; 0x57 8023f1c: 2237 movne r2, #55 ; 0x37 8023f1e: e000 b.n 8023f22 8023f20: 2230 movs r2, #48 ; 0x30 8023f22: 1992 adds r2, r2, r6 8023f24: f804 2b01 strb.w r2, [r4], #1 ++n; 8023f28: 3501 adds r5, #1 int n = 0; unsigned long int d = 1; char *bf = p->bf; while (num / d >= p->base) d *= p->base; while (d != 0) { 8023f2a: 2b00 cmp r3, #0 8023f2c: d1e2 bne.n 8023ef4 if (n || dgt > 0 || d == 0) { *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); ++n; } } *bf = 0; 8023f2e: 7023 strb r3, [r4, #0] 8023f30: bd70 pop {r4, r5, r6, pc} 08023f32 : uli2a(num, p); } #endif static void ui2a(unsigned int num, struct param *p) { 8023f32: b570 push {r4, r5, r6, lr} int n = 0; unsigned int d = 1; char *bf = p->bf; while (num / d >= p->base) 8023f34: 68ca ldr r2, [r1, #12] static void ui2a(unsigned int num, struct param *p) { int n = 0; unsigned int d = 1; char *bf = p->bf; 8023f36: 690c ldr r4, [r1, #16] #endif static void ui2a(unsigned int num, struct param *p) { int n = 0; unsigned int d = 1; 8023f38: 2301 movs r3, #1 char *bf = p->bf; while (num / d >= p->base) 8023f3a: e000 b.n 8023f3e d *= p->base; 8023f3c: 4353 muls r3, r2 static void ui2a(unsigned int num, struct param *p) { int n = 0; unsigned int d = 1; char *bf = p->bf; while (num / d >= p->base) 8023f3e: fbb0 f5f3 udiv r5, r0, r3 8023f42: 4295 cmp r5, r2 8023f44: d2fa bcs.n 8023f3c 8023f46: 2500 movs r5, #0 8023f48: e01a b.n 8023f80 d *= p->base; while (d != 0) { int dgt = num / d; num %= d; d /= p->base; 8023f4a: 68ce ldr r6, [r1, #12] unsigned int d = 1; char *bf = p->bf; while (num / d >= p->base) d *= p->base; while (d != 0) { int dgt = num / d; 8023f4c: fbb0 f2f3 udiv r2, r0, r3 num %= d; 8023f50: fb03 0012 mls r0, r3, r2, r0 d /= p->base; 8023f54: fbb3 f3f6 udiv r3, r3, r6 if (n || dgt > 0 || d == 0) { 8023f58: b91d cbnz r5, 8023f62 8023f5a: 2a00 cmp r2, #0 8023f5c: dc01 bgt.n 8023f62 8023f5e: 2b00 cmp r3, #0 8023f60: d1f3 bne.n 8023f4a *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); 8023f62: 2a09 cmp r2, #9 8023f64: b2d6 uxtb r6, r2 8023f66: dd06 ble.n 8023f76 8023f68: 780a ldrb r2, [r1, #0] 8023f6a: f012 0f04 tst.w r2, #4 8023f6e: bf0c ite eq 8023f70: 2257 moveq r2, #87 ; 0x57 8023f72: 2237 movne r2, #55 ; 0x37 8023f74: e000 b.n 8023f78 8023f76: 2230 movs r2, #48 ; 0x30 8023f78: 1992 adds r2, r2, r6 8023f7a: f804 2b01 strb.w r2, [r4], #1 ++n; 8023f7e: 3501 adds r5, #1 int n = 0; unsigned int d = 1; char *bf = p->bf; while (num / d >= p->base) d *= p->base; while (d != 0) { 8023f80: 2b00 cmp r3, #0 8023f82: d1e2 bne.n 8023f4a if (n || dgt > 0 || d == 0) { *bf++ = dgt + (dgt < 10 ? '0' : (p->uc ? 'A' : 'a') - 10); ++n; } } *bf = 0; 8023f84: 7023 strb r3, [r4, #0] 8023f86: bd70 pop {r4, r5, r6, pc} 08023f88 : } static void putchw(void *putp, putcf putf, struct param *p) { 8023f88: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} char ch; int n = p->width; char *bf = p->bf; 8023f8c: 6913 ldr r3, [r2, #16] } static void putchw(void *putp, putcf putf, struct param *p) { char ch; int n = p->width; 8023f8e: 6854 ldr r4, [r2, #4] } static void putchw(void *putp, putcf putf, struct param *p) { 8023f90: 4606 mov r6, r0 8023f92: 460f mov r7, r1 8023f94: 4615 mov r5, r2 char ch; int n = p->width; char *bf = p->bf; /* Number of filling characters */ while (*bf++ && n > 0) 8023f96: e000 b.n 8023f9a n--; 8023f98: 3c01 subs r4, #1 char ch; int n = p->width; char *bf = p->bf; /* Number of filling characters */ while (*bf++ && n > 0) 8023f9a: f813 2b01 ldrb.w r2, [r3], #1 8023f9e: b912 cbnz r2, 8023fa6 n--; if (p->sign) 8023fa0: 7a2b ldrb r3, [r5, #8] 8023fa2: b91b cbnz r3, 8023fac 8023fa4: e003 b.n 8023fae char ch; int n = p->width; char *bf = p->bf; /* Number of filling characters */ while (*bf++ && n > 0) 8023fa6: 2c00 cmp r4, #0 8023fa8: dcf6 bgt.n 8023f98 8023faa: e7f9 b.n 8023fa0 n--; if (p->sign) n--; 8023fac: 3c01 subs r4, #1 if (p->alt && p->base == 16) 8023fae: 782b ldrb r3, [r5, #0] 8023fb0: 0799 lsls r1, r3, #30 8023fb2: d507 bpl.n 8023fc4 8023fb4: 68eb ldr r3, [r5, #12] 8023fb6: 2b10 cmp r3, #16 8023fb8: d101 bne.n 8023fbe n -= 2; 8023fba: 3c02 subs r4, #2 8023fbc: e002 b.n 8023fc4 else if (p->alt && p->base == 8) 8023fbe: 2b08 cmp r3, #8 n--; 8023fc0: bf08 it eq 8023fc2: 3c01 subeq r4, #1 /* Fill with space to align to the right, before alternate or sign */ if (!p->lz && !p->align_left) { 8023fc4: 782b ldrb r3, [r5, #0] 8023fc6: f013 0f09 tst.w r3, #9 8023fca: d10d bne.n 8023fe8 8023fcc: 46a0 mov r8, r4 8023fce: e004 b.n 8023fda while (n-- > 0) putf(putp, ' '); 8023fd0: 4630 mov r0, r6 8023fd2: 2120 movs r1, #32 8023fd4: 47b8 blx r7 8023fd6: f108 38ff add.w r8, r8, #4294967295 else if (p->alt && p->base == 8) n--; /* Fill with space to align to the right, before alternate or sign */ if (!p->lz && !p->align_left) { while (n-- > 0) 8023fda: f1b8 0f00 cmp.w r8, #0 8023fde: dcf7 bgt.n 8023fd0 return neg ? -fvalue : fvalue; } static void putchw(void *putp, putcf putf, struct param *p) 8023fe0: 1e63 subs r3, r4, #1 8023fe2: ea24 74e4 bic.w r4, r4, r4, asr #31 8023fe6: 1b1c subs r4, r3, r4 while (n-- > 0) putf(putp, ' '); } /* print sign */ if (p->sign) 8023fe8: 7a29 ldrb r1, [r5, #8] 8023fea: b109 cbz r1, 8023ff0 putf(putp, p->sign); 8023fec: 4630 mov r0, r6 8023fee: 47b8 blx r7 /* Alternate */ if (p->alt && p->base == 16) { 8023ff0: 782b ldrb r3, [r5, #0] 8023ff2: 079a lsls r2, r3, #30 8023ff4: d512 bpl.n 802401c 8023ff6: 68eb ldr r3, [r5, #12] 8023ff8: 2b10 cmp r3, #16 8023ffa: d10a bne.n 8024012 putf(putp, '0'); 8023ffc: 2130 movs r1, #48 ; 0x30 8023ffe: 4630 mov r0, r6 8024000: 47b8 blx r7 putf(putp, (p->uc ? 'X' : 'x')); 8024002: 782b ldrb r3, [r5, #0] 8024004: f013 0f04 tst.w r3, #4 8024008: 4630 mov r0, r6 802400a: bf0c ite eq 802400c: 2178 moveq r1, #120 ; 0x78 802400e: 2158 movne r1, #88 ; 0x58 8024010: e003 b.n 802401a } else if (p->alt && p->base == 8) { 8024012: 2b08 cmp r3, #8 8024014: d102 bne.n 802401c putf(putp, '0'); 8024016: 4630 mov r0, r6 8024018: 2130 movs r1, #48 ; 0x30 802401a: 47b8 blx r7 } /* Fill with zeros, after alternate or sign */ if (p->lz) { 802401c: 782b ldrb r3, [r5, #0] 802401e: 07db lsls r3, r3, #31 8024020: d50d bpl.n 802403e 8024022: 46a0 mov r8, r4 8024024: e004 b.n 8024030 while (n-- > 0) putf(putp, '0'); 8024026: 4630 mov r0, r6 8024028: 2130 movs r1, #48 ; 0x30 802402a: 47b8 blx r7 802402c: f108 38ff add.w r8, r8, #4294967295 putf(putp, '0'); } /* Fill with zeros, after alternate or sign */ if (p->lz) { while (n-- > 0) 8024030: f1b8 0f00 cmp.w r8, #0 8024034: dcf7 bgt.n 8024026 return neg ? -fvalue : fvalue; } static void putchw(void *putp, putcf putf, struct param *p) 8024036: 1e63 subs r3, r4, #1 8024038: ea24 74e4 bic.w r4, r4, r4, asr #31 802403c: 1b1c subs r4, r3, r4 while (n-- > 0) putf(putp, '0'); } /* Put actual buffer */ bf = p->bf; 802403e: f8d5 8010 ldr.w r8, [r5, #16] while ((ch = *bf++)) 8024042: e001 b.n 8024048 putf(putp, ch); 8024044: 4630 mov r0, r6 8024046: 47b8 blx r7 putf(putp, '0'); } /* Put actual buffer */ bf = p->bf; while ((ch = *bf++)) 8024048: f818 1b01 ldrb.w r1, [r8], #1 802404c: 2900 cmp r1, #0 802404e: d1f9 bne.n 8024044 putf(putp, ch); /* Fill with space to align to the left, after string */ if (!p->lz && p->align_left) { 8024050: 782b ldrb r3, [r5, #0] 8024052: f003 0309 and.w r3, r3, #9 8024056: 2b08 cmp r3, #8 8024058: d106 bne.n 8024068 802405a: e003 b.n 8024064 while (n-- > 0) putf(putp, ' '); 802405c: 4630 mov r0, r6 802405e: 2120 movs r1, #32 8024060: 47b8 blx r7 8024062: 3c01 subs r4, #1 while ((ch = *bf++)) putf(putp, ch); /* Fill with space to align to the left, after string */ if (!p->lz && p->align_left) { while (n-- > 0) 8024064: 2c00 cmp r4, #0 8024066: dcf9 bgt.n 802405c 8024068: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 0802406c <_vsprintf_putcf>: }; static void _vsprintf_putcf(void *p, char c) { struct _vsprintf_putcf_data *data = (struct _vsprintf_putcf_data*)p; data->dest[data->num_chars++] = c; 802406c: e890 000c ldmia.w r0, {r2, r3} 8024070: 54d1 strb r1, [r2, r3] 8024072: 3301 adds r3, #1 8024074: 6043 str r3, [r0, #4] 8024076: 4770 bx lr 08024078 : putf(putp, ' '); } } void tfp_format(void *putp, putcf putf, const char *fmt, va_list va) { 8024078: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802407c: b09b sub sp, #108 ; 0x6c 802407e: 4617 mov r7, r2 char bf[23]; /* long = 64b on some architectures */ #else char bf[12]; /* int = 32b on some architectures */ #endif char ch; p.bf = bf; 8024080: aa04 add r2, sp, #16 putf(putp, ' '); } } void tfp_format(void *putp, putcf putf, const char *fmt, va_list va) { 8024082: 4605 mov r5, r0 8024084: 460e mov r6, r1 8024086: 461c mov r4, r3 char bf[23]; /* long = 64b on some architectures */ #else char bf[12]; /* int = 32b on some architectures */ #endif char ch; p.bf = bf; 8024088: 920e str r2, [sp, #56] ; 0x38 while ((ch = *(fmt++))) { 802408a: e208 b.n 802449e if (ch != '%') { 802408c: 2925 cmp r1, #37 ; 0x25 802408e: d000 beq.n 8024092 8024090: e13a b.n 8024308 #endif /* Init parameter struct */ p.lz = 0; p.alt = 0; p.width = 0; p.align_left = 0; 8024092: f89d 2028 ldrb.w r2, [sp, #40] ; 0x28 char lng = 0; /* 1 for long, 2 for long long */ #endif /* Init parameter struct */ p.lz = 0; p.alt = 0; p.width = 0; 8024096: 2300 movs r3, #0 p.align_left = 0; 8024098: f002 02fc and.w r2, r2, #252 ; 0xfc 802409c: f363 02c3 bfi r2, r3, #3, #1 80240a0: f88d 2028 strb.w r2, [sp, #40] ; 0x28 p.sign = 0; p.prec = 2; 80240a4: 2102 movs r1, #2 } else { #ifdef PRINTF_LONG_SUPPORT char lng = 0; /* 1 for long, 2 for long long */ #endif /* Init parameter struct */ p.lz = 0; 80240a6: b2d2 uxtb r2, r2 80240a8: f002 0c01 and.w ip, r2, #1 80240ac: f3c2 0040 ubfx r0, r2, #1, #1 p.alt = 0; p.width = 0; 80240b0: 930b str r3, [sp, #44] ; 0x2c p.align_left = 0; p.sign = 0; 80240b2: f88d 3030 strb.w r3, [sp, #48] ; 0x30 p.prec = 2; 80240b6: f88d 103c strb.w r1, [sp, #60] ; 0x3c 80240ba: f3c2 02c0 ubfx r2, r2, #3, #1 /* Flags */ while ((ch = *(fmt++))) { 80240be: e012 b.n 80240e6 switch (ch) { 80240c0: 292d cmp r1, #45 ; 0x2d 80240c2: d00f beq.n 80240e4 80240c4: d804 bhi.n 80240d0 80240c6: 2923 cmp r1, #35 ; 0x23 80240c8: d008 beq.n 80240dc 80240ca: 292b cmp r1, #43 ; 0x2b 80240cc: d10f bne.n 80240ee 80240ce: e007 b.n 80240e0 80240d0: 2930 cmp r1, #48 ; 0x30 80240d2: d000 beq.n 80240d6 80240d4: e00b b.n 80240ee case '-': p.align_left = 1; continue; case '0': p.lz = 1; 80240d6: f04f 0c01 mov.w ip, #1 continue; 80240da: e004 b.n 80240e6 case '#': p.alt = 1; 80240dc: 2001 movs r0, #1 continue; 80240de: e002 b.n 80240e6 case '+': p.sign = 1; 80240e0: 2301 movs r3, #1 continue; 80240e2: e000 b.n 80240e6 /* Flags */ while ((ch = *(fmt++))) { switch (ch) { case '-': p.align_left = 1; 80240e4: 2201 movs r2, #1 p.align_left = 0; p.sign = 0; p.prec = 2; /* Flags */ while ((ch = *(fmt++))) { 80240e6: f817 1b01 ldrb.w r1, [r7], #1 80240ea: 2900 cmp r1, #0 80240ec: d1e8 bne.n 80240c0 80240ee: f89d 8028 ldrb.w r8, [sp, #40] ; 0x28 80240f2: f88d 3030 strb.w r3, [sp, #48] ; 0x30 80240f6: f36c 0800 bfi r8, ip, #0, #1 80240fa: 46c4 mov ip, r8 80240fc: f360 0c41 bfi ip, r0, #1, #1 8024100: 4660 mov r0, ip } break; } /* Width */ if (ch >= '0' && ch <= '9') { 8024102: f1a1 0330 sub.w r3, r1, #48 ; 0x30 8024106: f362 00c3 bfi r0, r2, #3, #1 802410a: 2b09 cmp r3, #9 802410c: f88d 0028 strb.w r0, [sp, #40] ; 0x28 8024110: d81d bhi.n 802414e 8024112: e004 b.n 802411e unsigned int num = 0; int digit; while ((digit = a2d(ch)) >= 0) { if (digit > base) break; num = num * base + digit; 8024114: fb00 3202 mla r2, r0, r2, r3 ch = *p++; 8024118: f817 1b01 ldrb.w r1, [r7], #1 802411c: e001 b.n 8024122 } break; } /* Width */ if (ch >= '0' && ch <= '9') { 802411e: 2200 movs r2, #0 unsigned int num = 0; int digit; while ((digit = a2d(ch)) >= 0) { if (digit > base) break; num = num * base + digit; 8024120: 200a movs r0, #10 ui2a(num, p); } static int a2d(char ch) { if (ch >= '0' && ch <= '9') 8024122: f1a1 0330 sub.w r3, r1, #48 ; 0x30 8024126: fa5f fc83 uxtb.w ip, r3 802412a: f1bc 0f09 cmp.w ip, #9 802412e: d9f1 bls.n 8024114 return ch - '0'; else if (ch >= 'a' && ch <= 'f') 8024130: f1a1 0361 sub.w r3, r1, #97 ; 0x61 8024134: 2b05 cmp r3, #5 8024136: d802 bhi.n 802413e return ch - 'a' + 10; 8024138: f1a1 0357 sub.w r3, r1, #87 ; 0x57 802413c: e1b5 b.n 80244aa else if (ch >= 'A' && ch <= 'F') 802413e: f1a1 0341 sub.w r3, r1, #65 ; 0x41 8024142: 2b05 cmp r3, #5 8024144: d802 bhi.n 802414c return ch - 'A' + 10; 8024146: f1a1 0337 sub.w r3, r1, #55 ; 0x37 802414a: e1ae b.n 80244aa break; num = num * base + digit; ch = *p++; } *src = p; *nump = num; 802414c: 920b str r2, [sp, #44] ; 0x2c } /* We accept 'x.y' format but don't support it completely: * we ignore the 'y' digit => this ignores 0-fill * size and makes it == width (ie. 'x') */ if (ch == '.') { 802414e: 292e cmp r1, #46 ; 0x2e 8024150: d10e bne.n 8024170 //p.lz = 1; /* zero-padding */ /* ignore actual 0-fill size: */ ch = *(fmt++); if (ch >= '0' && ch <= '9') 8024152: 783a ldrb r2, [r7, #0] 8024154: 3a30 subs r2, #48 ; 0x30 8024156: b2d2 uxtb r2, r2 * we ignore the 'y' digit => this ignores 0-fill * size and makes it == width (ie. 'x') */ if (ch == '.') { //p.lz = 1; /* zero-padding */ /* ignore actual 0-fill size: */ ch = *(fmt++); 8024158: 1c7b adds r3, r7, #1 if (ch >= '0' && ch <= '9') 802415a: 2a09 cmp r2, #9 p.prec = ch - '0'; 802415c: bf98 it ls 802415e: f88d 203c strbls.w r2, [sp, #60] ; 0x3c do { ch = *(fmt++); 8024162: f813 1b01 ldrb.w r1, [r3], #1 } while (ch >= '0' && ch <= '9'); 8024166: f1a1 0230 sub.w r2, r1, #48 ; 0x30 802416a: 2a09 cmp r2, #9 ch = *(fmt++); if (ch >= '0' && ch <= '9') p.prec = ch - '0'; do { ch = *(fmt++); 802416c: 461f mov r7, r3 } while (ch >= '0' && ch <= '9'); 802416e: d9f8 bls.n 8024162 } #ifdef PRINTF_SIZE_T_SUPPORT # ifdef PRINTF_LONG_SUPPORT if (ch == 'z') { 8024170: 297a cmp r1, #122 ; 0x7a 8024172: d102 bne.n 802417a ch = *(fmt++); 8024174: f817 1b01 ldrb.w r1, [r7], #1 8024178: e005 b.n 8024186 } else # endif #endif #ifdef PRINTF_LONG_SUPPORT if (ch == 'l') { 802417a: 296c cmp r1, #108 ; 0x6c 802417c: d109 bne.n 8024192 ch = *(fmt++); 802417e: 7839 ldrb r1, [r7, #0] lng = 1; #ifdef PRINTF_LONG_LONG_SUPPORT if (ch == 'l') { 8024180: 296c cmp r1, #108 ; 0x6c 8024182: d002 beq.n 802418a # endif #endif #ifdef PRINTF_LONG_SUPPORT if (ch == 'l') { ch = *(fmt++); 8024184: 3701 adds r7, #1 lng = 1; 8024186: 2301 movs r3, #1 8024188: e004 b.n 8024194 #ifdef PRINTF_LONG_LONG_SUPPORT if (ch == 'l') { ch = *(fmt++); 802418a: 7879 ldrb r1, [r7, #1] lng = 2; 802418c: 2302 movs r3, #2 if (ch == 'l') { ch = *(fmt++); lng = 1; #ifdef PRINTF_LONG_LONG_SUPPORT if (ch == 'l') { ch = *(fmt++); 802418e: 3702 adds r7, #2 8024190: e000 b.n 8024194 while ((ch = *(fmt++))) { if (ch != '%') { putf(putp, ch); } else { #ifdef PRINTF_LONG_SUPPORT char lng = 0; /* 1 for long, 2 for long long */ 8024192: 2300 movs r3, #0 lng = 2; } #endif } #endif switch (ch) { 8024194: 2969 cmp r1, #105 ; 0x69 8024196: d036 beq.n 8024206 8024198: d816 bhi.n 80241c8 802419a: 2963 cmp r1, #99 ; 0x63 802419c: f000 80a1 beq.w 80242e2 80241a0: d80c bhi.n 80241bc 80241a2: 2946 cmp r1, #70 ; 0x46 80241a4: f000 80b3 beq.w 802430e 80241a8: d806 bhi.n 80241b8 80241aa: 2900 cmp r1, #0 80241ac: f000 8181 beq.w 80244b2 80241b0: 2925 cmp r1, #37 ; 0x25 80241b2: f040 8174 bne.w 802449e 80241b6: e0a7 b.n 8024308 80241b8: 2958 cmp r1, #88 ; 0x58 80241ba: e012 b.n 80241e2 80241bc: 2964 cmp r1, #100 ; 0x64 80241be: d022 beq.n 8024206 80241c0: 2966 cmp r1, #102 ; 0x66 80241c2: f040 816c bne.w 802449e 80241c6: e0a2 b.n 802430e 80241c8: 2973 cmp r1, #115 ; 0x73 80241ca: f000 8090 beq.w 80242ee 80241ce: d805 bhi.n 80241dc 80241d0: 296f cmp r1, #111 ; 0x6f 80241d2: d078 beq.n 80242c6 80241d4: 2970 cmp r1, #112 ; 0x70 80241d6: f040 8162 bne.w 802449e 80241da: e040 b.n 802425e 80241dc: 2975 cmp r1, #117 ; 0x75 80241de: d003 beq.n 80241e8 80241e0: 2978 cmp r1, #120 ; 0x78 80241e2: f040 815c bne.w 802449e 80241e6: e041 b.n 802426c case 0: goto abort; case 'u': p.base = 10; 80241e8: 220a movs r2, #10 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 80241ea: 2b02 cmp r3, #2 #endif switch (ch) { case 0: goto abort; case 'u': p.base = 10; 80241ec: 920d str r2, [sp, #52] ; 0x34 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 80241ee: d107 bne.n 8024200 ulli2a(va_arg(va, unsigned long long int), &p); 80241f0: 3407 adds r4, #7 80241f2: f024 0307 bic.w r3, r4, #7 80241f6: f103 0408 add.w r4, r3, #8 80241fa: e9d3 0100 ldrd r0, r1, [r3] 80241fe: e017 b.n 8024230 else #endif if (1 == lng) uli2a(va_arg(va, unsigned long int), &p); 8024200: 6820 ldr r0, [r4, #0] 8024202: a90a add r1, sp, #40 ; 0x28 8024204: e04f b.n 80242a6 ui2a(va_arg(va, unsigned int), &p); putchw(putp, putf, &p); break; case 'd': case 'i': p.base = 10; 8024206: 220a movs r2, #10 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 8024208: 2b02 cmp r3, #2 ui2a(va_arg(va, unsigned int), &p); putchw(putp, putf, &p); break; case 'd': case 'i': p.base = 10; 802420a: 920d str r2, [sp, #52] ; 0x34 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 802420c: d112 bne.n 8024234 lli2a(va_arg(va, long long int), &p); 802420e: 3407 adds r4, #7 8024210: f024 0307 bic.w r3, r4, #7 8024214: e9d3 0100 ldrd r0, r1, [r3] 8024218: f103 0408 add.w r4, r3, #8 *bf = 0; } static void lli2a(long long int num, struct param *p) { if (num < 0) { 802421c: 2800 cmp r0, #0 802421e: f171 0300 sbcs.w r3, r1, #0 8024222: da05 bge.n 8024230 num = -num; p->sign = '-'; 8024224: 232d movs r3, #45 ; 0x2d } static void lli2a(long long int num, struct param *p) { if (num < 0) { num = -num; 8024226: 4240 negs r0, r0 8024228: eb61 0141 sbc.w r1, r1, r1, lsl #1 p->sign = '-'; 802422c: f88d 3030 strb.w r3, [sp, #48] ; 0x30 } ulli2a(num, p); 8024230: aa0a add r2, sp, #40 ; 0x28 8024232: e033 b.n 802429c #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) lli2a(va_arg(va, long long int), &p); else #endif if (1 == lng) 8024234: 2b01 cmp r3, #1 li2a(va_arg(va, long int), &p); 8024236: 6820 ldr r0, [r4, #0] 8024238: f104 0804 add.w r8, r4, #4 #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) lli2a(va_arg(va, long long int), &p); else #endif if (1 == lng) 802423c: d107 bne.n 802424e *bf = 0; } static void li2a(long num, struct param *p) { if (num < 0) { 802423e: 2800 cmp r0, #0 8024240: da03 bge.n 802424a num = -num; p->sign = '-'; 8024242: 232d movs r3, #45 ; 0x2d } static void li2a(long num, struct param *p) { if (num < 0) { num = -num; 8024244: 4240 negs r0, r0 p->sign = '-'; 8024246: f88d 3030 strb.w r3, [sp, #48] ; 0x30 } uli2a(num, p); 802424a: a90a add r1, sp, #40 ; 0x28 802424c: e02f b.n 80242ae *bf = 0; } static void i2a(int num, struct param *p) { if (num < 0) { 802424e: 2800 cmp r0, #0 8024250: da03 bge.n 802425a num = -num; p->sign = '-'; 8024252: 232d movs r3, #45 ; 0x2d } static void i2a(int num, struct param *p) { if (num < 0) { num = -num; 8024254: 4240 negs r0, r0 p->sign = '-'; 8024256: f88d 3030 strb.w r3, [sp, #48] ; 0x30 } ui2a(num, p); 802425a: a90a add r1, sp, #40 ; 0x28 802425c: e02a b.n 80242b4 i2a(va_arg(va, int), &p); putchw(putp, putf, &p); break; #ifdef SIZEOF_POINTER case 'p': p.alt = 1; 802425e: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 8024262: f043 0302 orr.w r3, r3, #2 8024266: f88d 3028 strb.w r3, [sp, #40] ; 0x28 # if defined(SIZEOF_INT) && SIZEOF_POINTER <= SIZEOF_INT lng = 0; 802426a: 2300 movs r3, #0 lng = 2; # endif #endif case 'x': case 'X': p.base = 16; 802426c: 2210 movs r2, #16 p.uc = (ch == 'X')?1:0; 802426e: f1b1 0e58 subs.w lr, r1, #88 ; 0x58 8024272: f1de 0100 rsbs r1, lr, #0 8024276: f89d 0028 ldrb.w r0, [sp, #40] ; 0x28 lng = 2; # endif #endif case 'x': case 'X': p.base = 16; 802427a: 920d str r2, [sp, #52] ; 0x34 p.uc = (ch == 'X')?1:0; 802427c: eb51 010e adcs.w r1, r1, lr 8024280: aa1a add r2, sp, #104 ; 0x68 8024282: f361 0082 bfi r0, r1, #2, #1 #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 8024286: 2b02 cmp r3, #2 # endif #endif case 'x': case 'X': p.base = 16; p.uc = (ch == 'X')?1:0; 8024288: f802 0d40 strb.w r0, [r2, #-64]! #ifdef PRINTF_LONG_SUPPORT #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) 802428c: d109 bne.n 80242a2 ulli2a(va_arg(va, unsigned long long int), &p); 802428e: 3407 adds r4, #7 8024290: f024 0307 bic.w r3, r4, #7 8024294: e9d3 0100 ldrd r0, r1, [r3] 8024298: f103 0408 add.w r4, r3, #8 802429c: f7ff fdc8 bl 8023e30 80242a0: e00b b.n 80242ba else #endif if (1 == lng) uli2a(va_arg(va, unsigned long int), &p); 80242a2: 6820 ldr r0, [r4, #0] 80242a4: 4611 mov r1, r2 #ifdef PRINTF_LONG_LONG_SUPPORT if (2 == lng) ulli2a(va_arg(va, unsigned long long int), &p); else #endif if (1 == lng) 80242a6: 2b01 cmp r3, #1 80242a8: f104 0804 add.w r8, r4, #4 80242ac: d102 bne.n 80242b4 uli2a(va_arg(va, unsigned long int), &p); 80242ae: f7ff fe15 bl 8023edc 80242b2: e001 b.n 80242b8 else #endif ui2a(va_arg(va, unsigned int), &p); 80242b4: f7ff fe3d bl 8023f32 80242b8: 4644 mov r4, r8 putchw(putp, putf, &p); 80242ba: 4628 mov r0, r5 80242bc: 4631 mov r1, r6 80242be: aa0a add r2, sp, #40 ; 0x28 80242c0: f7ff fe62 bl 8023f88 break; 80242c4: e0eb b.n 802449e case 'o': p.base = 8; 80242c6: 2308 movs r3, #8 ui2a(va_arg(va, unsigned int), &p); 80242c8: 6820 ldr r0, [r4, #0] #endif ui2a(va_arg(va, unsigned int), &p); putchw(putp, putf, &p); break; case 'o': p.base = 8; 80242ca: 930d str r3, [sp, #52] ; 0x34 ui2a(va_arg(va, unsigned int), &p); 80242cc: a90a add r1, sp, #40 ; 0x28 80242ce: f7ff fe30 bl 8023f32 putchw(putp, putf, &p); 80242d2: 4628 mov r0, r5 80242d4: 4631 mov r1, r6 80242d6: aa0a add r2, sp, #40 ; 0x28 ui2a(va_arg(va, unsigned int), &p); putchw(putp, putf, &p); break; case 'o': p.base = 8; ui2a(va_arg(va, unsigned int), &p); 80242d8: f104 0804 add.w r8, r4, #4 putchw(putp, putf, &p); 80242dc: f7ff fe54 bl 8023f88 80242e0: e010 b.n 8024304 break; case 'c': putf(putp, (char)(va_arg(va, int))); 80242e2: 4628 mov r0, r5 80242e4: 7821 ldrb r1, [r4, #0] 80242e6: f104 0804 add.w r8, r4, #4 80242ea: 47b0 blx r6 80242ec: e00a b.n 8024304 break; case 's': p.bf = va_arg(va, char *); 80242ee: 6823 ldr r3, [r4, #0] putchw(putp, putf, &p); 80242f0: aa0a add r2, sp, #40 ; 0x28 80242f2: 4628 mov r0, r5 80242f4: 4631 mov r1, r6 break; case 'c': putf(putp, (char)(va_arg(va, int))); break; case 's': p.bf = va_arg(va, char *); 80242f6: 930e str r3, [sp, #56] ; 0x38 putchw(putp, putf, &p); 80242f8: f7ff fe46 bl 8023f88 p.bf = bf; 80242fc: aa04 add r2, sp, #16 break; case 'c': putf(putp, (char)(va_arg(va, int))); break; case 's': p.bf = va_arg(va, char *); 80242fe: f104 0804 add.w r8, r4, #4 putchw(putp, putf, &p); p.bf = bf; 8024302: 920e str r2, [sp, #56] ; 0x38 break; case 'c': putf(putp, (char)(va_arg(va, int))); break; case 's': p.bf = va_arg(va, char *); 8024304: 4644 mov r4, r8 putchw(putp, putf, &p); p.bf = bf; break; 8024306: e0ca b.n 802449e case '%': putf(putp, ch); 8024308: 4628 mov r0, r5 802430a: 47b0 blx r6 break; 802430c: e0c7 b.n 802449e case 'f': case 'F': fval = va_arg(va, double); 802430e: 3407 adds r4, #7 8024310: f024 0307 bic.w r3, r4, #7 8024314: f103 0408 add.w r4, r3, #8 8024318: e893 0404 ldmia.w r3, {r2, sl} 802431c: 9200 str r2, [sp, #0] sign = 0; if (fval < 0) 802431e: 4610 mov r0, r2 8024320: 4651 mov r1, sl 8024322: 2200 movs r2, #0 8024324: 2300 movs r3, #0 8024326: f7fc fbbd bl 8020aa4 <__aeabi_dcmplt> 802432a: b138 cbz r0, 802433c { sign = 1; p.width--; 802432c: 9b0b ldr r3, [sp, #44] ; 0x2c 802432e: 3b01 subs r3, #1 8024330: 930b str r3, [sp, #44] ; 0x2c fval = - fval; 8024332: f10a 4a00 add.w sl, sl, #2147483648 ; 0x80000000 case 'F': fval = va_arg(va, double); sign = 0; if (fval < 0) { sign = 1; 8024336: f04f 0b01 mov.w fp, #1 802433a: e009 b.n 8024350 p.width--; fval = - fval; } else if (p.sign) { 802433c: f89d 3030 ldrb.w r3, [sp, #48] ; 0x30 8024340: b12b cbz r3, 802434e sign = 2; p.width--; 8024342: 9b0b ldr r3, [sp, #44] ; 0x2c 8024344: 3b01 subs r3, #1 8024346: 930b str r3, [sp, #44] ; 0x2c sign = 1; p.width--; fval = - fval; } else if (p.sign) { sign = 2; 8024348: f04f 0b02 mov.w fp, #2 802434c: e000 b.n 8024350 putf(putp, ch); break; case 'f': case 'F': fval = va_arg(va, double); sign = 0; 802434e: 469b mov fp, r3 else if (p.sign) { sign = 2; p.width--; } fpart = (int)fval; 8024350: 4651 mov r1, sl 8024352: 9800 ldr r0, [sp, #0] 8024354: f7fc fbce bl 8020af4 <__aeabi_d2iz> fiter = 0; 8024358: 2200 movs r2, #0 else if (p.sign) { sign = 2; p.width--; } fpart = (int)fval; 802435a: 9001 str r0, [sp, #4] 802435c: 4680 mov r8, r0 fiter = 0; while (fpart != 0) { temp_buffer[fiter++] = fpart % 10; 802435e: 210a movs r1, #10 } fpart = (int)fval; fiter = 0; while (fpart != 0) 8024360: e008 b.n 8024374 { temp_buffer[fiter++] = fpart % 10; 8024362: fb98 f0f1 sdiv r0, r8, r1 8024366: ab10 add r3, sp, #64 ; 0x40 8024368: fb01 8810 mls r8, r1, r0, r8 802436c: f843 8022 str.w r8, [r3, r2, lsl #2] 8024370: 3201 adds r2, #1 fpart = fpart / 10; 8024372: 4680 mov r8, r0 } fpart = (int)fval; fiter = 0; while (fpart != 0) 8024374: f1b8 0f00 cmp.w r8, #0 8024378: d1f3 bne.n 8024362 temp_buffer[fiter++] = fpart % 10; fpart = fpart / 10; } fiter--; if (fiter == -1) 802437a: f102 39ff add.w r9, r2, #4294967295 802437e: b912 cbnz r2, 8024386 p.width--; 8024380: 9a0b ldr r2, [sp, #44] ; 0x2c 8024382: 3a01 subs r2, #1 8024384: 920b str r2, [sp, #44] ; 0x2c /* Leading zeros */ if (p.lz) { 8024386: f89d 2028 ldrb.w r2, [sp, #40] ; 0x28 802438a: 07d0 lsls r0, r2, #31 802438c: d51b bpl.n 80243c6 if (sign == 1) 802438e: f1bb 0f01 cmp.w fp, #1 8024392: d102 bne.n 802439a putf(putp, '-'); 8024394: 4628 mov r0, r5 8024396: 212d movs r1, #45 ; 0x2d 8024398: e007 b.n 80243aa else if (sign == 2) 802439a: f1bb 0f02 cmp.w fp, #2 802439e: d105 bne.n 80243ac putf(putp, '+'); 80243a0: 4628 mov r0, r5 80243a2: 212b movs r1, #43 ; 0x2b 80243a4: e001 b.n 80243aa while (p.width-- > p.prec + fiter + 2) { putf(putp, '0'); 80243a6: 4628 mov r0, r5 80243a8: 2130 movs r1, #48 ; 0x30 80243aa: 47b0 blx r6 if (sign == 1) putf(putp, '-'); else if (sign == 2) putf(putp, '+'); while (p.width-- > p.prec + fiter + 2) 80243ac: f89d 203c ldrb.w r2, [sp, #60] ; 0x3c 80243b0: 9b0b ldr r3, [sp, #44] ; 0x2c 80243b2: 444a add r2, r9 80243b4: 3202 adds r2, #2 80243b6: 1e59 subs r1, r3, #1 80243b8: 4293 cmp r3, r2 80243ba: 910b str r1, [sp, #44] ; 0x2c 80243bc: dcf3 bgt.n 80243a6 80243be: e017 b.n 80243f0 else { while (p.width-- > p.prec + fiter + 2) { putf(putp, ' '); 80243c0: 4628 mov r0, r5 80243c2: 2120 movs r1, #32 80243c4: 47b0 blx r6 } } else { while (p.width-- > p.prec + fiter + 2) 80243c6: f89d 103c ldrb.w r1, [sp, #60] ; 0x3c 80243ca: 9a0b ldr r2, [sp, #44] ; 0x2c 80243cc: 4449 add r1, r9 80243ce: 3102 adds r1, #2 80243d0: 1e50 subs r0, r2, #1 80243d2: 428a cmp r2, r1 80243d4: 900b str r0, [sp, #44] ; 0x2c 80243d6: dcf3 bgt.n 80243c0 { putf(putp, ' '); } if (sign == 1) 80243d8: f1bb 0f01 cmp.w fp, #1 80243dc: d102 bne.n 80243e4 putf(putp, '-'); 80243de: 4628 mov r0, r5 80243e0: 212d movs r1, #45 ; 0x2d 80243e2: e004 b.n 80243ee else if (sign == 2) 80243e4: f1bb 0f02 cmp.w fp, #2 80243e8: d102 bne.n 80243f0 putf(putp, '+'); 80243ea: 4628 mov r0, r5 80243ec: 212b movs r1, #43 ; 0x2b 80243ee: 47b0 blx r6 } if (fiter == -1) 80243f0: f1b9 3fff cmp.w r9, #4294967295 80243f4: d102 bne.n 80243fc putf(putp, '0'); 80243f6: 4628 mov r0, r5 80243f8: 2130 movs r1, #48 ; 0x30 80243fa: e007 b.n 802440c while (fiter > -1) { putf(putp, '0' + (temp_buffer[fiter--])); 80243fc: ab10 add r3, sp, #64 ; 0x40 80243fe: 4628 mov r0, r5 8024400: f853 1029 ldr.w r1, [r3, r9, lsl #2] 8024404: 3130 adds r1, #48 ; 0x30 8024406: f109 39ff add.w r9, r9, #4294967295 802440a: b2c9 uxtb r1, r1 802440c: 47b0 blx r6 } if (fiter == -1) putf(putp, '0'); while (fiter > -1) 802440e: f1b9 3fff cmp.w r9, #4294967295 8024412: d1f3 bne.n 80243fc { putf(putp, '0' + (temp_buffer[fiter--])); } putf(putp, '.'); 8024414: 4628 mov r0, r5 8024416: 212e movs r1, #46 ; 0x2e 8024418: 47b0 blx r6 ffactor = 1; 802441a: f04f 0901 mov.w r9, #1 while (p.prec-- > 0) 802441e: e01d b.n 802445c { ffactor *= 10; 8024420: 230a movs r3, #10 fpart = (int)((fval - (int)fval)*ffactor); 8024422: 9801 ldr r0, [sp, #4] putf(putp, '.'); ffactor = 1; while (p.prec-- > 0) { ffactor *= 10; 8024424: fb03 f909 mul.w r9, r3, r9 fpart = (int)((fval - (int)fval)*ffactor); 8024428: f7fc f864 bl 80204f4 <__aeabi_i2d> 802442c: 4602 mov r2, r0 802442e: 460b mov r3, r1 8024430: 9800 ldr r0, [sp, #0] 8024432: 4651 mov r1, sl 8024434: f7fb ff10 bl 8020258 <__aeabi_dsub> 8024438: e9cd 0102 strd r0, r1, [sp, #8] 802443c: 4648 mov r0, r9 802443e: f7fc f859 bl 80204f4 <__aeabi_i2d> 8024442: 4602 mov r2, r0 8024444: 460b mov r3, r1 8024446: e9dd 0102 ldrd r0, r1, [sp, #8] 802444a: f7fc f8b9 bl 80205c0 <__aeabi_dmul> 802444e: f7fc fb51 bl 8020af4 <__aeabi_d2iz> if (fpart == 0) 8024452: 4680 mov r8, r0 8024454: b910 cbnz r0, 802445c putf(putp, '0'); 8024456: 4628 mov r0, r5 8024458: 2130 movs r1, #48 ; 0x30 802445a: 47b0 blx r6 putf(putp, '0' + (temp_buffer[fiter--])); } putf(putp, '.'); ffactor = 1; while (p.prec-- > 0) 802445c: f89d 303c ldrb.w r3, [sp, #60] ; 0x3c 8024460: 1e5a subs r2, r3, #1 8024462: f88d 203c strb.w r2, [sp, #60] ; 0x3c 8024466: 2b00 cmp r3, #0 8024468: d1da bne.n 8024420 putf(putp, '0'); } fiter = 0; while (fpart != 0) { temp_buffer[fiter++] = fpart % 10; 802446a: 220a movs r2, #10 802446c: e008 b.n 8024480 802446e: fb98 f1f2 sdiv r1, r8, r2 8024472: a810 add r0, sp, #64 ; 0x40 8024474: fb02 8811 mls r8, r2, r1, r8 8024478: f840 8023 str.w r8, [r0, r3, lsl #2] 802447c: 3301 adds r3, #1 fpart = fpart / 10; 802447e: 4688 mov r8, r1 fpart = (int)((fval - (int)fval)*ffactor); if (fpart == 0) putf(putp, '0'); } fiter = 0; while (fpart != 0) 8024480: f1b8 0f00 cmp.w r8, #0 8024484: d1f3 bne.n 802446e 8024486: 4698 mov r8, r3 temp_buffer[fiter++] = fpart % 10; fpart = fpart / 10; } fiter--; while (fiter > -1) 8024488: e006 b.n 8024498 { putf(putp, '0' + (temp_buffer[fiter--])); 802448a: ab10 add r3, sp, #64 ; 0x40 802448c: 4628 mov r0, r5 802448e: f853 1028 ldr.w r1, [r3, r8, lsl #2] 8024492: 3130 adds r1, #48 ; 0x30 8024494: b2c9 uxtb r1, r1 8024496: 47b0 blx r6 temp_buffer[fiter++] = fpart % 10; fpart = fpart / 10; } fiter--; while (fiter > -1) 8024498: f118 38ff adds.w r8, r8, #4294967295 802449c: d2f5 bcs.n 802448a char bf[12]; /* int = 32b on some architectures */ #endif char ch; p.bf = bf; while ((ch = *(fmt++))) { 802449e: f817 1b01 ldrb.w r1, [r7], #1 80244a2: 2900 cmp r1, #0 80244a4: f47f adf2 bne.w 802408c 80244a8: e003 b.n 80244b2 { const char *p = *src; unsigned int num = 0; int digit; while ((digit = a2d(ch)) >= 0) { if (digit > base) 80244aa: 2b0a cmp r3, #10 80244ac: f77f ae32 ble.w 8024114 80244b0: e64c b.n 802414c break; } } } abort:; } 80244b2: b01b add sp, #108 ; 0x6c 80244b4: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 080244b8 : stdout_putf = putf; stdout_putp = putp; } void tfp_printf(char *fmt, ...) { 80244b8: b40f push {r0, r1, r2, r3} 80244ba: b507 push {r0, r1, r2, lr} va_list va; va_start(va, fmt); tfp_format(stdout_putp, stdout_putf, fmt, va); 80244bc: 4906 ldr r1, [pc, #24] ; (80244d8 ) stdout_putf = putf; stdout_putp = putp; } void tfp_printf(char *fmt, ...) { 80244be: ab04 add r3, sp, #16 va_list va; va_start(va, fmt); tfp_format(stdout_putp, stdout_putf, fmt, va); 80244c0: 6808 ldr r0, [r1, #0] 80244c2: 4906 ldr r1, [pc, #24] ; (80244dc ) stdout_putf = putf; stdout_putp = putp; } void tfp_printf(char *fmt, ...) { 80244c4: f853 2b04 ldr.w r2, [r3], #4 va_list va; va_start(va, fmt); tfp_format(stdout_putp, stdout_putf, fmt, va); 80244c8: 6809 ldr r1, [r1, #0] } void tfp_printf(char *fmt, ...) { va_list va; va_start(va, fmt); 80244ca: 9301 str r3, [sp, #4] tfp_format(stdout_putp, stdout_putf, fmt, va); 80244cc: f7ff fdd4 bl 8024078 va_end(va); } 80244d0: e8bd 400e ldmia.w sp!, {r1, r2, r3, lr} 80244d4: b004 add sp, #16 80244d6: 4770 bx lr 80244d8: 20002388 .word 0x20002388 80244dc: 20002384 .word 0x20002384 080244e0 : struct _vsprintf_putcf_data *data = (struct _vsprintf_putcf_data*)p; data->dest[data->num_chars++] = c; } int tfp_vsprintf(char *str, const char *format, va_list ap) { 80244e0: b537 push {r0, r1, r2, r4, r5, lr} 80244e2: 460d mov r5, r1 80244e4: 4613 mov r3, r2 struct _vsprintf_putcf_data data; data.dest = str; 80244e6: 9000 str r0, [sp, #0] data.num_chars = 0; 80244e8: 2400 movs r4, #0 tfp_format(&data, _vsprintf_putcf, format, ap); 80244ea: 4668 mov r0, sp 80244ec: 462a mov r2, r5 80244ee: 4904 ldr r1, [pc, #16] ; (8024500 ) int tfp_vsprintf(char *str, const char *format, va_list ap) { struct _vsprintf_putcf_data data; data.dest = str; data.num_chars = 0; 80244f0: 9401 str r4, [sp, #4] tfp_format(&data, _vsprintf_putcf, format, ap); 80244f2: f7ff fdc1 bl 8024078 data.dest[data.num_chars] = '\0'; 80244f6: e89d 000c ldmia.w sp, {r2, r3} 80244fa: 54d4 strb r4, [r2, r3] return data.num_chars; } 80244fc: 9801 ldr r0, [sp, #4] 80244fe: bd3e pop {r1, r2, r3, r4, r5, pc} 8024500: 0802406d .word 0x0802406d 08024504 : int tfp_sprintf(char *str, const char *format, ...) { 8024504: b40e push {r1, r2, r3} 8024506: b503 push {r0, r1, lr} 8024508: aa03 add r2, sp, #12 802450a: f852 1b04 ldr.w r1, [r2], #4 va_list ap; int retval; va_start(ap, format); 802450e: 9201 str r2, [sp, #4] retval = tfp_vsprintf(str, format, ap); 8024510: f7ff ffe6 bl 80244e0 va_end(ap); return retval; } 8024514: e8bd 400c ldmia.w sp!, {r2, r3, lr} 8024518: b003 add sp, #12 802451a: 4770 bx lr 0802451c : /* if (upsParams.lineFailBit) *str = '1'; else *str = '0';*/ *len = 1; 802451c: 2301 movs r3, #1 802451e: 700b strb r3, [r1, #0] 8024520: 4770 bx lr 08024522 : /** * @brief */ void GetLowBatteryBitStr(char *str, uint8_t *len) { 8024522: 4770 bx lr 08024524 : /** * @brief */ void GetInputFreqStr(char *str, uint8_t *len) { 8024524: b510 push {r4, lr} 8024526: 460c mov r4, r1 /* sprintf(str, "%0.1f", upsParams.inputFrequency); //strcpy(str, upsParamsStr.inputFrequency);*/ *len = strlen(str); 8024528: f7fd fac2 bl 8021ab0 802452c: 7020 strb r0, [r4, #0] 802452e: bd10 pop {r4, pc} 08024530 : /** * @brief */ void GetOutputFreqStr(char *str, uint8_t *len) { 8024530: b510 push {r4, lr} 8024532: 460c mov r4, r1 // sprintf(str, "%0.1f", upsParams.outputFrequency); //strcpy(str, upsParamsStr.outputFrequency); *len = strlen(str); 8024534: f7fd fabc bl 8021ab0 8024538: 7020 strb r0, [r4, #0] 802453a: bd10 pop {r4, pc} 0802453c : /** * @brief */ void GetInputVoltageStr(char *str, uint8_t *len) { 802453c: b510 push {r4, lr} 802453e: 460c mov r4, r1 // sprintf(str, "%0.1f", upsParams.inputVoltage); //strcpy(str, upsParamsStr.inputVoltage); *len = strlen(str); 8024540: f7fd fab6 bl 8021ab0 8024544: 7020 strb r0, [r4, #0] 8024546: bd10 pop {r4, pc} 08024548 : /** * @brief */ void GetOutputVoltageStr(char *str, uint8_t *len) { 8024548: b510 push {r4, lr} 802454a: 460c mov r4, r1 //sprintf(str, "%0.1f", upsParams.outputVoltage); //strcpy(str, upsParamsStr.outputVoltage); *len = strlen(str); 802454c: f7fd fab0 bl 8021ab0 8024550: 7020 strb r0, [r4, #0] 8024552: bd10 pop {r4, pc} 08024554 : /** * @brief */ void GetPowerStr(char *str, uint8_t *len) { 8024554: b510 push {r4, lr} 8024556: 460c mov r4, r1 // sprintf(str, "%0.1f", upsParams.power); //sprintf(str, upsParamsStr.power); *len = strlen(str); 8024558: f7fd faaa bl 8021ab0 802455c: 7020 strb r0, [r4, #0] 802455e: bd10 pop {r4, pc} 08024560 : /** * @brief */ void GetBatCapacityStr(char *str, uint8_t *len) { 8024560: b510 push {r4, lr} 8024562: 460c mov r4, r1 // sprintf(str, "%0.1f", upsParams.batteryCapacity); //strcpy(str, upsParamsStr.batteryCapacity); *len = strlen(str); 8024564: f7fd faa4 bl 8021ab0 8024568: 7020 strb r0, [r4, #0] 802456a: bd10 pop {r4, pc} 0802456c : /** * @brief */ void GetRuntimeStr(char *str, uint8_t *len) { 802456c: b510 push {r4, lr} 802456e: 460c mov r4, r1 // sprintf(str, "%d", upsParams.runtime); //strcpy(str, upsParamsStr.runtime); *len = strlen(str); 8024570: f7fd fa9e bl 8021ab0 8024574: 7020 strb r0, [r4, #0] 8024576: bd10 pop {r4, pc} 08024578 : /** * @brief */ void GetInternalTempStr(char *str, uint8_t *len) { 8024578: b510 push {r4, lr} 802457a: 460c mov r4, r1 // sprintf(str, "%0.1f", upsParams.temperature); //strcpy(str, upsParamsStr.temperature); *len = strlen(str); 802457c: f7fd fa98 bl 8021ab0 8024580: 7020 strb r0, [r4, #0] 8024582: bd10 pop {r4, pc} 08024584 : /* // if (upsParams.monitor_power) *str = '1'; else *str = '0';*/ *len = 1; 8024584: 2301 movs r3, #1 8024586: 700b strb r3, [r1, #0] 8024588: 4770 bx lr 0802458a : /*// if (upsParams.monitor_temperature) *str = '1'; else *str = '0';*/ *len = 1; 802458a: 2301 movs r3, #1 802458c: 700b strb r3, [r1, #0] 802458e: 4770 bx lr 08024590 : /* if (upsParams.connect) *str = '0'; else *str = '1';*/ *len = 1; 8024590: 2301 movs r3, #1 8024592: 700b strb r3, [r1, #0] 8024594: 4770 bx lr 8024596: 0000 movs r0, r0 08024598 : /** * @brief Время работы устройства */ void GetWorkTimeStr(char *str, uint8_t *len) { 8024598: b57f push {r0, r1, r2, r3, r4, r5, r6, lr} 802459a: 4604 mov r4, r0 u32_t tick; uint16_t day; uint8_t hour; uint8_t min; snmp_get_sysuptime(&tick); 802459c: a803 add r0, sp, #12 /** * @brief Время работы устройства */ void GetWorkTimeStr(char *str, uint8_t *len) { 802459e: 460e mov r6, r1 u32_t tick; uint16_t day; uint8_t hour; uint8_t min; snmp_get_sysuptime(&tick); 80245a0: f008 f98c bl 802c8bc day = tick/8640000; 80245a4: 9803 ldr r0, [sp, #12] tick = tick%8640000; 80245a6: 4b0c ldr r3, [pc, #48] ; (80245d8 ) hour = tick/360000; tick = tick%360000; 80245a8: 4d0c ldr r5, [pc, #48] ; (80245dc ) snmp_get_sysuptime(&tick); day = tick/8640000; tick = tick%8640000; 80245aa: fbb0 f2f3 udiv r2, r0, r3 80245ae: fb03 0012 mls r0, r3, r2, r0 hour = tick/360000; tick = tick%360000; 80245b2: fbb0 f3f5 udiv r3, r0, r5 80245b6: fb05 0013 mls r0, r5, r3, r0 min = tick/6000; 80245ba: f241 7170 movw r1, #6000 ; 0x1770 day = tick/8640000; tick = tick%8640000; hour = tick/360000; tick = tick%360000; 80245be: 9003 str r0, [sp, #12] min = tick/6000; 80245c0: fbb0 f0f1 udiv r0, r0, r1 sprintf(str, "%d дн. %d ч. %d мин.", day, hour, min); 80245c4: 9000 str r0, [sp, #0] 80245c6: 4906 ldr r1, [pc, #24] ; (80245e0 ) 80245c8: 4620 mov r0, r4 80245ca: f7ff ff9b bl 8024504 *len = strlen(str); 80245ce: 4620 mov r0, r4 80245d0: f7fd fa6e bl 8021ab0 80245d4: 7030 strb r0, [r6, #0] } 80245d6: bd7f pop {r0, r1, r2, r3, r4, r5, r6, pc} 80245d8: 0083d600 .word 0x0083d600 80245dc: 00057e40 .word 0x00057e40 80245e0: 08030d21 .word 0x08030d21 080245e4 : /** * @brief Модель устройства */ void GetModelStr(char *str, uint8_t *len) { 80245e4: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sSnmp.sysName); 80245e6: 4c07 ldr r4, [pc, #28] ; (8024604 ) /** * @brief Модель устройства */ void GetModelStr(char *str, uint8_t *len) { 80245e8: 4605 mov r5, r0 *len = strlen(sSettings.sSnmp.sysName); 80245ea: 4620 mov r0, r4 /** * @brief Модель устройства */ void GetModelStr(char *str, uint8_t *len) { 80245ec: 460e mov r6, r1 *len = strlen(sSettings.sSnmp.sysName); 80245ee: f7fd fa5f bl 8021ab0 80245f2: 4602 mov r2, r0 80245f4: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sSnmp.sysName, *len); 80245f6: 4621 mov r1, r4 80245f8: 4628 mov r0, r5 80245fa: b2d2 uxtb r2, r2 } 80245fc: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Модель устройства */ void GetModelStr(char *str, uint8_t *len) { *len = strlen(sSettings.sSnmp.sysName); strncpy(str, sSettings.sSnmp.sysName, *len); 8024600: f7fd bb0e b.w 8021c20 8024604: 2000e118 .word 0x2000e118 08024608 : /** * @brief Дата производства */ void GetProductionDataStr(char *str, uint8_t *len) { 8024608: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.productionData); 802460a: 4c07 ldr r4, [pc, #28] ; (8024628 ) /** * @brief Дата производства */ void GetProductionDataStr(char *str, uint8_t *len) { 802460c: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.productionData); 802460e: 4620 mov r0, r4 /** * @brief Дата производства */ void GetProductionDataStr(char *str, uint8_t *len) { 8024610: 460e mov r6, r1 *len = strlen(sSettings.sInfo.productionData); 8024612: f7fd fa4d bl 8021ab0 8024616: 4602 mov r2, r0 8024618: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.productionData, *len); 802461a: 4621 mov r1, r4 802461c: 4628 mov r0, r5 802461e: b2d2 uxtb r2, r2 } 8024620: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Дата производства */ void GetProductionDataStr(char *str, uint8_t *len) { *len = strlen(sSettings.sInfo.productionData); strncpy(str, sSettings.sInfo.productionData, *len); 8024624: f7fd bafc b.w 8021c20 8024628: 2000e1d6 .word 0x2000e1d6 0802462c : /** * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { 802462c: b570 push {r4, r5, r6, lr} *len = strlen(VERSION); 802462e: 4c07 ldr r4, [pc, #28] ; (802464c ) /** * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { 8024630: 4605 mov r5, r0 *len = strlen(VERSION); 8024632: 4620 mov r0, r4 /** * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { 8024634: 460e mov r6, r1 *len = strlen(VERSION); 8024636: f7fd fa3b bl 8021ab0 802463a: 4602 mov r2, r0 802463c: 7030 strb r0, [r6, #0] strncpy(str, VERSION, *len); 802463e: 4621 mov r1, r4 8024640: 4628 mov r0, r5 8024642: b2d2 uxtb r2, r2 } 8024644: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Версия ПО */ void GetVersionStr(char *str, uint8_t *len) // + { *len = strlen(VERSION); strncpy(str, VERSION, *len); 8024648: f7fd baea b.w 8021c20 802464c: 08030d3c .word 0x08030d3c 08024650 : /** * @brief MAC адрес устройства */ void GetMacStr(char *str, uint8_t *len) { 8024650: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.mac); 8024652: 4c07 ldr r4, [pc, #28] ; (8024670 ) /** * @brief MAC адрес устройства */ void GetMacStr(char *str, uint8_t *len) { 8024654: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.mac); 8024656: 4620 mov r0, r4 /** * @brief MAC адрес устройства */ void GetMacStr(char *str, uint8_t *len) { 8024658: 460e mov r6, r1 *len = strlen(sSettings.sInfo.mac); 802465a: f7fd fa29 bl 8021ab0 802465e: 4602 mov r2, r0 8024660: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.mac, *len); 8024662: 4621 mov r1, r4 8024664: 4628 mov r0, r5 8024666: b2d2 uxtb r2, r2 } 8024668: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief MAC адрес устройства */ void GetMacStr(char *str, uint8_t *len) { *len = strlen(sSettings.sInfo.mac); strncpy(str, sSettings.sInfo.mac, *len); 802466c: f7fd bad8 b.w 8021c20 8024670: 2000e1fe .word 0x2000e1fe 08024674 : /** * @brief Серийный номер устройства */ void GetSerialNumberStr(char *str, uint8_t *len) { 8024674: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.serialNumber); 8024676: 4c07 ldr r4, [pc, #28] ; (8024694 ) /** * @brief Серийный номер устройства */ void GetSerialNumberStr(char *str, uint8_t *len) { 8024678: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.serialNumber); 802467a: 4620 mov r0, r4 /** * @brief Серийный номер устройства */ void GetSerialNumberStr(char *str, uint8_t *len) { 802467c: 460e mov r6, r1 *len = strlen(sSettings.sInfo.serialNumber); 802467e: f7fd fa17 bl 8021ab0 8024682: 4602 mov r2, r0 8024684: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.serialNumber, *len); 8024686: 4621 mov r1, r4 8024688: 4628 mov r0, r5 802468a: b2d2 uxtb r2, r2 } 802468c: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Серийный номер устройства */ void GetSerialNumberStr(char *str, uint8_t *len) { *len = strlen(sSettings.sInfo.serialNumber); strncpy(str, sSettings.sInfo.serialNumber, *len); 8024690: f7fd bac6 b.w 8021c20 8024694: 2000e210 .word 0x2000e210 08024698 : /** * @brief Владелец устройства */ void GetOwnerStr(char *str, uint8_t *len) { 8024698: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sSnmp.sysContact); 802469a: 4c07 ldr r4, [pc, #28] ; (80246b8 ) /** * @brief Владелец устройства */ void GetOwnerStr(char *str, uint8_t *len) { 802469c: 4605 mov r5, r0 *len = strlen(sSettings.sSnmp.sysContact); 802469e: 4620 mov r0, r4 /** * @brief Владелец устройства */ void GetOwnerStr(char *str, uint8_t *len) { 80246a0: 460e mov r6, r1 *len = strlen(sSettings.sSnmp.sysContact); 80246a2: f7fd fa05 bl 8021ab0 80246a6: 4602 mov r2, r0 80246a8: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sSnmp.sysContact, *len); 80246aa: 4621 mov r1, r4 80246ac: 4628 mov r0, r5 80246ae: b2d2 uxtb r2, r2 } 80246b0: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Владелец устройства */ void GetOwnerStr(char *str, uint8_t *len) { *len = strlen(sSettings.sSnmp.sysContact); strncpy(str, sSettings.sSnmp.sysContact, *len); 80246b4: f7fd bab4 b.w 8021c20 80246b8: 2000e0e6 .word 0x2000e0e6 080246bc : /** * @brief Местоположение устройства */ void GetLocationStr(char *str, uint8_t *len) { 80246bc: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sSnmp.sysLocation); 80246be: 4c07 ldr r4, [pc, #28] ; (80246dc ) /** * @brief Местоположение устройства */ void GetLocationStr(char *str, uint8_t *len) { 80246c0: 4605 mov r5, r0 *len = strlen(sSettings.sSnmp.sysLocation); 80246c2: 4620 mov r0, r4 /** * @brief Местоположение устройства */ void GetLocationStr(char *str, uint8_t *len) { 80246c4: 460e mov r6, r1 *len = strlen(sSettings.sSnmp.sysLocation); 80246c6: f7fd f9f3 bl 8021ab0 80246ca: 4602 mov r2, r0 80246cc: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sSnmp.sysLocation, *len); 80246ce: 4621 mov r1, r4 80246d0: 4628 mov r0, r5 80246d2: b2d2 uxtb r2, r2 } 80246d4: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Местоположение устройства */ void GetLocationStr(char *str, uint8_t *len) { *len = strlen(sSettings.sSnmp.sysLocation); strncpy(str, sSettings.sSnmp.sysLocation, *len); 80246d8: f7fd baa2 b.w 8021c20 80246dc: 2000e12c .word 0x2000e12c 080246e0 : /** * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { 80246e0: b570 push {r4, r5, r6, lr} *len = strlen(sSettings.sInfo.comments); 80246e2: 4c07 ldr r4, [pc, #28] ; (8024700 ) /** * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { 80246e4: 4605 mov r5, r0 *len = strlen(sSettings.sInfo.comments); 80246e6: 4620 mov r0, r4 /** * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { 80246e8: 460e mov r6, r1 *len = strlen(sSettings.sInfo.comments); 80246ea: f7fd f9e1 bl 8021ab0 80246ee: 4602 mov r2, r0 80246f0: 7030 strb r0, [r6, #0] strncpy(str, sSettings.sInfo.comments, *len); 80246f2: 4621 mov r1, r4 80246f4: 4628 mov r0, r5 80246f6: b2d2 uxtb r2, r2 } 80246f8: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Комментарии */ void GetCommentsStr(char *str, uint8_t *len) { *len = strlen(sSettings.sInfo.comments); strncpy(str, sSettings.sInfo.comments, *len); 80246fc: f7fd ba90 b.w 8021c20 8024700: 2000e220 .word 0x2000e220 08024704 : * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8024704: 4a08 ldr r2, [pc, #32] ; (8024728 ) /** * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { 8024706: b538 push {r3, r4, r5, lr} /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8024708: f892 32ce ldrb.w r3, [r2, #718] ; 0x2ce /** * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { 802470c: 460c mov r4, r1 802470e: 4605 mov r5, r0 /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) sprintf(str, "%s", sSettings.sWebTempParams.ip); 8024710: 4906 ldr r1, [pc, #24] ; (802472c ) * @brief Текущий IP адрес */ void GetIpStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8024712: b10b cbz r3, 8024718 sprintf(str, "%s", sSettings.sWebTempParams.ip); 8024714: 3230 adds r2, #48 ; 0x30 8024716: e000 b.n 802471a else sprintf(str, "%s", sSettings.sWebParams.ip); 8024718: 3202 adds r2, #2 802471a: f7ff fef3 bl 8024504 *len = strlen(str); 802471e: 4628 mov r0, r5 8024720: f7fd f9c6 bl 8021ab0 8024724: 7020 strb r0, [r4, #0] 8024726: bd38 pop {r3, r4, r5, pc} 8024728: 2000dfc0 .word 0x2000dfc0 802472c: 08030d40 .word 0x08030d40 08024730 : * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8024730: 4a08 ldr r2, [pc, #32] ; (8024754 ) /** * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { 8024732: b538 push {r3, r4, r5, lr} /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8024734: f892 32ce ldrb.w r3, [r2, #718] ; 0x2ce /** * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { 8024738: 460c mov r4, r1 802473a: 4605 mov r5, r0 /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) sprintf(str, "%s", sSettings.sWebTempParams.gate); 802473c: 4906 ldr r1, [pc, #24] ; (8024758 ) * @brief Текущий шлюз */ void GetGatewayStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 802473e: b10b cbz r3, 8024744 sprintf(str, "%s", sSettings.sWebTempParams.gate); 8024740: 323f adds r2, #63 ; 0x3f 8024742: e000 b.n 8024746 else sprintf(str, "%s", sSettings.sWebParams.gate); 8024744: 3211 adds r2, #17 8024746: f7ff fedd bl 8024504 *len = strlen(str); 802474a: 4628 mov r0, r5 802474c: f7fd f9b0 bl 8021ab0 8024750: 7020 strb r0, [r4, #0] 8024752: bd38 pop {r3, r4, r5, pc} 8024754: 2000dfc0 .word 0x2000dfc0 8024758: 08030d40 .word 0x08030d40 0802475c : * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 802475c: 4a08 ldr r2, [pc, #32] ; (8024780 ) /** * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { 802475e: b538 push {r3, r4, r5, lr} /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8024760: f892 32ce ldrb.w r3, [r2, #718] ; 0x2ce /** * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { 8024764: 460c mov r4, r1 8024766: 4605 mov r5, r0 /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) sprintf(str, "%s", sSettings.sWebTempParams.mask); 8024768: 4906 ldr r1, [pc, #24] ; (8024784 ) * @brief Текущая маска подсети */ void GetMaskStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 802476a: b10b cbz r3, 8024770 sprintf(str, "%s", sSettings.sWebTempParams.mask); 802476c: 324e adds r2, #78 ; 0x4e 802476e: e000 b.n 8024772 else sprintf(str, "%s", sSettings.sWebParams.mask); 8024770: 3220 adds r2, #32 8024772: f7ff fec7 bl 8024504 *len = strlen(str); 8024776: 4628 mov r0, r5 8024778: f7fd f99a bl 8021ab0 802477c: 7020 strb r0, [r4, #0] 802477e: bd38 pop {r3, r4, r5, pc} 8024780: 2000dfc0 .word 0x2000dfc0 8024784: 08030d40 .word 0x08030d40 08024788 : * @brief Настройка DHCP */ void GetDhcpStateStr(char *str, uint8_t *len) { /* Если сейчас временные настройки */ if (sSettings.sFlags.netsettingsChanged) 8024788: 4b08 ldr r3, [pc, #32] ; (80247ac ) 802478a: f893 22ce ldrb.w r2, [r3, #718] ; 0x2ce 802478e: b112 cbz r2, 8024796 { if (sSettings.sWebTempParams.dhcpEnable) 8024790: f893 305d ldrb.w r3, [r3, #93] ; 0x5d 8024794: e001 b.n 802479a else *str = '0'; } else { if (sSettings.sWebParams.dhcpEnable) 8024796: f893 302f ldrb.w r3, [r3, #47] ; 0x2f 802479a: b10b cbz r3, 80247a0 *str = '1'; 802479c: 2331 movs r3, #49 ; 0x31 802479e: e000 b.n 80247a2 else *str = '0'; 80247a0: 2330 movs r3, #48 ; 0x30 80247a2: 7003 strb r3, [r0, #0] } *len = 1; 80247a4: 2301 movs r3, #1 80247a6: 700b strb r3, [r1, #0] 80247a8: 4770 bx lr 80247aa: bf00 nop 80247ac: 2000dfc0 .word 0x2000dfc0 080247b0 : /** * @brief Текущее community для чтения */ void GetReadCommunity(char *str, uint8_t *len) { 80247b0: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.readCommunity); 80247b2: 4a05 ldr r2, [pc, #20] ; (80247c8 ) /** * @brief Текущее community для чтения */ void GetReadCommunity(char *str, uint8_t *len) { 80247b4: 4605 mov r5, r0 80247b6: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.readCommunity); 80247b8: 4904 ldr r1, [pc, #16] ; (80247cc ) 80247ba: f7ff fea3 bl 8024504 *len = strlen(str); 80247be: 4628 mov r0, r5 80247c0: f7fd f976 bl 8021ab0 80247c4: 7020 strb r0, [r4, #0] 80247c6: bd38 pop {r3, r4, r5, pc} 80247c8: 2000e0be .word 0x2000e0be 80247cc: 08030d40 .word 0x08030d40 080247d0 : /** * @brief Текущее community для записи */ void GetWriteCommunity(char *str, uint8_t *len) { 80247d0: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.writeCommunity); 80247d2: 4a05 ldr r2, [pc, #20] ; (80247e8 ) /** * @brief Текущее community для записи */ void GetWriteCommunity(char *str, uint8_t *len) { 80247d4: 4605 mov r5, r0 80247d6: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.writeCommunity); 80247d8: 4904 ldr r1, [pc, #16] ; (80247ec ) 80247da: f7ff fe93 bl 8024504 *len = strlen(str); 80247de: 4628 mov r0, r5 80247e0: f7fd f966 bl 8021ab0 80247e4: 7020 strb r0, [r4, #0] 80247e6: bd38 pop {r3, r4, r5, pc} 80247e8: 2000e0d2 .word 0x2000e0d2 80247ec: 08030d40 .word 0x08030d40 080247f0 : /** * @brief IP SNMP менеджера */ void GetManagerIp(char *str, uint8_t *len) { 80247f0: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP); 80247f2: 4a05 ldr r2, [pc, #20] ; (8024808 ) /** * @brief IP SNMP менеджера */ void GetManagerIp(char *str, uint8_t *len) { 80247f4: 4605 mov r5, r0 80247f6: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP); 80247f8: 4904 ldr r1, [pc, #16] ; (802480c ) 80247fa: f7ff fe83 bl 8024504 *len = strlen(str); 80247fe: 4628 mov r0, r5 8024800: f7fd f956 bl 8021ab0 8024804: 7020 strb r0, [r4, #0] 8024806: bd38 pop {r3, r4, r5, pc} 8024808: 2000e19a .word 0x2000e19a 802480c: 08030d40 .word 0x08030d40 08024810 : } void GetManagerIp2(char *str, uint8_t *len) { 8024810: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP2); 8024812: 4a05 ldr r2, [pc, #20] ; (8024828 ) sprintf(str, "%s", sSettings.sSnmp.managerIP); *len = strlen(str); } void GetManagerIp2(char *str, uint8_t *len) { 8024814: 4605 mov r5, r0 8024816: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP2); 8024818: 4904 ldr r1, [pc, #16] ; (802482c ) 802481a: f7ff fe73 bl 8024504 *len = strlen(str); 802481e: 4628 mov r0, r5 8024820: f7fd f946 bl 8021ab0 8024824: 7020 strb r0, [r4, #0] 8024826: bd38 pop {r3, r4, r5, pc} 8024828: 2000e1ae .word 0x2000e1ae 802482c: 08030d40 .word 0x08030d40 08024830 : } void GetManagerIp3(char *str, uint8_t *len) { 8024830: b538 push {r3, r4, r5, lr} sprintf(str, "%s", sSettings.sSnmp.managerIP3); 8024832: 4a05 ldr r2, [pc, #20] ; (8024848 ) sprintf(str, "%s", sSettings.sSnmp.managerIP2); *len = strlen(str); } void GetManagerIp3(char *str, uint8_t *len) { 8024834: 4605 mov r5, r0 8024836: 460c mov r4, r1 sprintf(str, "%s", sSettings.sSnmp.managerIP3); 8024838: 4904 ldr r1, [pc, #16] ; (802484c ) 802483a: f7ff fe63 bl 8024504 *len = strlen(str); 802483e: 4628 mov r0, r5 8024840: f7fd f936 bl 8021ab0 8024844: 7020 strb r0, [r4, #0] 8024846: bd38 pop {r3, r4, r5, pc} 8024848: 2000e1c2 .word 0x2000e1c2 802484c: 08030d40 .word 0x08030d40 08024850 : /** * @brief Произошел сброс настроек */ void GetRestore(char *str, uint8_t *len) // + { 8024850: b510 push {r4, lr} sprintf(str, "%s", "1"); 8024852: 4a04 ldr r2, [pc, #16] ; (8024864 ) /** * @brief Произошел сброс настроек */ void GetRestore(char *str, uint8_t *len) // + { 8024854: 460c mov r4, r1 sprintf(str, "%s", "1"); 8024856: 4904 ldr r1, [pc, #16] ; (8024868 ) 8024858: f7ff fe54 bl 8024504 *len = 1; 802485c: 2301 movs r3, #1 802485e: 7023 strb r3, [r4, #0] 8024860: bd10 pop {r4, pc} 8024862: bf00 nop 8024864: 08030d67 .word 0x08030d67 8024868: 08030d40 .word 0x08030d40 0802486c : /** * @brief Произошла перезагрузка */ void GetReboot(char *str, uint8_t *len) // + { 802486c: b510 push {r4, lr} sprintf(str, "%s", "1"); 802486e: 4a04 ldr r2, [pc, #16] ; (8024880 ) /** * @brief Произошла перезагрузка */ void GetReboot(char *str, uint8_t *len) // + { 8024870: 460c mov r4, r1 sprintf(str, "%s", "1"); 8024872: 4904 ldr r1, [pc, #16] ; (8024884 ) 8024874: f7ff fe46 bl 8024504 *len = 1; 8024878: 2301 movs r3, #1 802487a: 7023 strb r3, [r4, #0] 802487c: bd10 pop {r4, pc} 802487e: bf00 nop 8024880: 08030d67 .word 0x08030d67 8024884: 08030d40 .word 0x08030d40 08024888 : /** * @brief Вернуть признак изменения сетевых параметров */ void GetWebReinitFlag(char *str, uint8_t *len) { 8024888: b538 push {r3, r4, r5, lr} if (sSettings.sFlags.netsettingsChanged) 802488a: 4b08 ldr r3, [pc, #32] ; (80248ac ) 802488c: f893 32ce ldrb.w r3, [r3, #718] ; 0x2ce /** * @brief Вернуть признак изменения сетевых параметров */ void GetWebReinitFlag(char *str, uint8_t *len) { 8024890: 460c mov r4, r1 8024892: 4605 mov r5, r0 if (sSettings.sFlags.netsettingsChanged) { sprintf(str, "%s", "true"); 8024894: 4906 ldr r1, [pc, #24] ; (80248b0 ) /** * @brief Вернуть признак изменения сетевых параметров */ void GetWebReinitFlag(char *str, uint8_t *len) { if (sSettings.sFlags.netsettingsChanged) 8024896: b10b cbz r3, 802489c { sprintf(str, "%s", "true"); 8024898: 4a06 ldr r2, [pc, #24] ; (80248b4 ) 802489a: e000 b.n 802489e *len = strlen(str); } else { sprintf(str, "%s", "false"); 802489c: 4a06 ldr r2, [pc, #24] ; (80248b8 ) 802489e: f7ff fe31 bl 8024504 *len = strlen(str); 80248a2: 4628 mov r0, r5 80248a4: f7fd f904 bl 8021ab0 80248a8: 7020 strb r0, [r4, #0] 80248aa: bd38 pop {r3, r4, r5, pc} 80248ac: 2000dfc0 .word 0x2000dfc0 80248b0: 08030d40 .word 0x08030d40 80248b4: 08030d43 .word 0x08030d43 80248b8: 08030d48 .word 0x08030d48 080248bc : /** * @brief Установить признак обновления ПО. */ void SetLoadMode(void) { sSettings.bootParams.loadMode = 1; 80248bc: 4b01 ldr r3, [pc, #4] ; (80248c4 ) 80248be: 2201 movs r2, #1 80248c0: 701a strb r2, [r3, #0] 80248c2: 4770 bx lr 80248c4: 2000dfc0 .word 0x2000dfc0 080248c8 : /** * @brief Установить признак изменения сетевых параметров */ void SetWebReinitFlag(bool value) { sSettings.sFlags.netsettingsChanged = value; 80248c8: 4b01 ldr r3, [pc, #4] ; (80248d0 ) 80248ca: f883 02ce strb.w r0, [r3, #718] ; 0x2ce 80248ce: 4770 bx lr 80248d0: 2000dfc0 .word 0x2000dfc0 080248d4 : /** * @brief Установить флаг подтверждения сетевых настроек пользователем */ void SetConfirmWebParamsFlag(void) { fConfirmWebParams = true; 80248d4: 4b01 ldr r3, [pc, #4] ; (80248dc ) 80248d6: 2201 movs r2, #1 80248d8: 701a strb r2, [r3, #0] 80248da: 4770 bx lr 80248dc: 2000238c .word 0x2000238c 080248e0 : // Сетевые параметры /** * @brief IP адрес */ void SetIPStr(char *str) { 80248e0: 4601 mov r1, r0 //strcpy(sSettings.sWebParams.ip, str); strcpy(sSettings.sWebTempParams.ip, str); 80248e2: 4801 ldr r0, [pc, #4] ; (80248e8 ) 80248e4: f7fd b886 b.w 80219f4 80248e8: 2000dff0 .word 0x2000dff0 080248ec : /** * @brief Шлюз */ void SetGatewayStr(char *str) { 80248ec: 4601 mov r1, r0 //strcpy(sSettings.sWebParams.gate, str); strcpy(sSettings.sWebTempParams.gate, str); 80248ee: 4801 ldr r0, [pc, #4] ; (80248f4 ) 80248f0: f7fd b880 b.w 80219f4 80248f4: 2000dfff .word 0x2000dfff 080248f8 : /** * @brief Текущая маска подсети */ void SetMaskStr(char *str) { 80248f8: 4601 mov r1, r0 //strcpy(sSettings.sWebParams.mask, str); strcpy(sSettings.sWebTempParams.mask, str); 80248fa: 4801 ldr r0, [pc, #4] ; (8024900 ) 80248fc: f7fd b87a b.w 80219f4 8024900: 2000e00e .word 0x2000e00e 08024904 : /** * @brief Настройка DHCP */ void SetDhcpStateStr(char *str) { 8024904: b508 push {r3, lr} if (strncmp(str, "on", 2) == 0) 8024906: 4906 ldr r1, [pc, #24] ; (8024920 ) 8024908: 2202 movs r2, #2 802490a: f7fd f933 bl 8021b74 802490e: 4b05 ldr r3, [pc, #20] ; (8024924 ) 8024910: b908 cbnz r0, 8024916 //sSettings.sWebParams.dhcpEnable = 1; sSettings.sWebTempParams.dhcpEnable = 1; 8024912: 2201 movs r2, #1 8024914: e000 b.n 8024918 else //sSettings.sWebParams.dhcpEnable = 0; sSettings.sWebTempParams.dhcpEnable = 0; 8024916: 2200 movs r2, #0 8024918: f883 205d strb.w r2, [r3, #93] ; 0x5d 802491c: bd08 pop {r3, pc} 802491e: bf00 nop 8024920: 08030d4e .word 0x08030d4e 8024924: 2000dfc0 .word 0x2000dfc0 08024928 : /** * @brief Community для чтения */ void SetReadCommunity(char *str) { 8024928: 4601 mov r1, r0 strcpy(sSettings.sSnmp.readCommunity, str); 802492a: 4801 ldr r0, [pc, #4] ; (8024930 ) 802492c: f7fd b862 b.w 80219f4 8024930: 2000e0be .word 0x2000e0be 08024934 : /** * @brief Community для записи */ void SetWriteCommunity(char *str) { 8024934: 4601 mov r1, r0 strcpy(sSettings.sSnmp.writeCommunity, str); 8024936: 4801 ldr r0, [pc, #4] ; (802493c ) 8024938: f7fd b85c b.w 80219f4 802493c: 2000e0d2 .word 0x2000e0d2 08024940 : /** * @brief IP SNMP менеджера */ void SetManagerIp(char *str) { 8024940: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP, str); 8024942: 4c05 ldr r4, [pc, #20] ; (8024958 ) /** * @brief IP SNMP менеджера */ void SetManagerIp(char *str) { 8024944: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP, str); 8024946: 4620 mov r0, r4 8024948: f7fd f854 bl 80219f4 SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 802494c: 4620 mov r0, r4 } 802494e: e8bd 4010 ldmia.w sp!, {r4, lr} * @brief IP SNMP менеджера */ void SetManagerIp(char *str) { strcpy(sSettings.sSnmp.managerIP, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP); 8024952: f00b bc2d b.w 80301b0 8024956: bf00 nop 8024958: 2000e19a .word 0x2000e19a 0802495c : } void SetManagerIp2(char *str) { 802495c: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP2, str); 802495e: 4c05 ldr r4, [pc, #20] ; (8024974 ) strcpy(sSettings.sSnmp.managerIP, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP); } void SetManagerIp2(char *str) { 8024960: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP2, str); 8024962: 4620 mov r0, r4 8024964: f7fd f846 bl 80219f4 SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); 8024968: 4620 mov r0, r4 } 802496a: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp2(char *str) { strcpy(sSettings.sSnmp.managerIP2, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); 802496e: f00b bc1f b.w 80301b0 8024972: bf00 nop 8024974: 2000e1ae .word 0x2000e1ae 08024978 : } void SetManagerIp3(char *str) { 8024978: b510 push {r4, lr} strcpy(sSettings.sSnmp.managerIP3, str); 802497a: 4c05 ldr r4, [pc, #20] ; (8024990 ) strcpy(sSettings.sSnmp.managerIP2, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP2); } void SetManagerIp3(char *str) { 802497c: 4601 mov r1, r0 strcpy(sSettings.sSnmp.managerIP3, str); 802497e: 4620 mov r0, r4 8024980: f7fd f838 bl 80219f4 SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); 8024984: 4620 mov r0, r4 } 8024986: e8bd 4010 ldmia.w sp!, {r4, lr} } void SetManagerIp3(char *str) { strcpy(sSettings.sSnmp.managerIP3, str); SNMP_SetManagerIP(sSettings.sSnmp.managerIP3); 802498a: f00b bc11 b.w 80301b0 802498e: bf00 nop 8024990: 2000e1c2 .word 0x2000e1c2 08024994 : /** * @brief Установить владельца */ void SetOwner(char *str) { 8024994: b510 push {r4, lr} strcpy(sSettings.sSnmp.sysContact, str); 8024996: 4c06 ldr r4, [pc, #24] ; (80249b0 ) /** * @brief Установить владельца */ void SetOwner(char *str) { 8024998: 4601 mov r1, r0 strcpy(sSettings.sSnmp.sysContact, str); 802499a: 4620 mov r0, r4 802499c: f7fd f82a bl 80219f4 SNMP_SetSysContact(sSettings.sSnmp.sysContact); 80249a0: 4620 mov r0, r4 80249a2: f00b fbe9 bl 8030178 SNMP_SetObjDescr(); } 80249a6: e8bd 4010 ldmia.w sp!, {r4, lr} */ void SetOwner(char *str) { strcpy(sSettings.sSnmp.sysContact, str); SNMP_SetSysContact(sSettings.sSnmp.sysContact); SNMP_SetObjDescr(); 80249aa: f00b bbb1 b.w 8030110 80249ae: bf00 nop 80249b0: 2000e0e6 .word 0x2000e0e6 080249b4 : /** * @brief Установить местоположение */ void SetLocation(char *str) { 80249b4: b510 push {r4, lr} strcpy(sSettings.sSnmp.sysLocation, str); 80249b6: 4c05 ldr r4, [pc, #20] ; (80249cc ) /** * @brief Установить местоположение */ void SetLocation(char *str) { 80249b8: 4601 mov r1, r0 strcpy(sSettings.sSnmp.sysLocation, str); 80249ba: 4620 mov r0, r4 80249bc: f7fd f81a bl 80219f4 SNMP_SetSysLocation(sSettings.sSnmp.sysLocation); 80249c0: 4620 mov r0, r4 } 80249c2: e8bd 4010 ldmia.w sp!, {r4, lr} * @brief Установить местоположение */ void SetLocation(char *str) { strcpy(sSettings.sSnmp.sysLocation, str); SNMP_SetSysLocation(sSettings.sSnmp.sysLocation); 80249c6: f00b bbe5 b.w 8030194 80249ca: bf00 nop 80249cc: 2000e12c .word 0x2000e12c 080249d0 : /** * @brief Установить комментарий */ void SetComment(char *str) { 80249d0: 4601 mov r1, r0 strcpy(sSettings.sInfo.comments, str); 80249d2: 4801 ldr r0, [pc, #4] ; (80249d8 ) 80249d4: f7fd b80e b.w 80219f4 80249d8: 2000e220 .word 0x2000e220 080249dc : /** * @brief Установить параметры обновления ПО по умолчанию */ void SETTINGS_SetBootParamsDef(void) { sSettings.bootParams.loadMode = 1; 80249dc: 4b02 ldr r3, [pc, #8] ; (80249e8 ) 80249de: 2201 movs r2, #1 80249e0: 701a strb r2, [r3, #0] sSettings.bootParams.bootTry = 0; 80249e2: 2200 movs r2, #0 80249e4: 705a strb r2, [r3, #1] 80249e6: 4770 bx lr 80249e8: 2000dfc0 .word 0x2000dfc0 080249ec : /** * @brief Установить параметры сетевого подключения по умолчанию */ void SETTINGS_SetWebParamsDef(void) { 80249ec: b510 push {r4, lr} strcpy(sSettings.sWebParams.ip, "192.168.1.2"); 80249ee: 4c09 ldr r4, [pc, #36] ; (8024a14 ) 80249f0: 4909 ldr r1, [pc, #36] ; (8024a18 ) 80249f2: 4620 mov r0, r4 80249f4: f7fc fffe bl 80219f4 strcpy(sSettings.sWebParams.gate, "192.168.1.1"); 80249f8: 4908 ldr r1, [pc, #32] ; (8024a1c ) 80249fa: f104 000f add.w r0, r4, #15 80249fe: f7fc fff9 bl 80219f4 strcpy(sSettings.sWebParams.mask, "255.255.255.0"); 8024a02: f104 001e add.w r0, r4, #30 8024a06: 4906 ldr r1, [pc, #24] ; (8024a20 ) 8024a08: f7fc fff4 bl 80219f4 sSettings.sWebParams.dhcpEnable = 1; 8024a0c: 2201 movs r2, #1 8024a0e: f884 202d strb.w r2, [r4, #45] ; 0x2d 8024a12: bd10 pop {r4, pc} 8024a14: 2000dfc2 .word 0x2000dfc2 8024a18: 08030d51 .word 0x08030d51 8024a1c: 08030d5d .word 0x08030d5d 8024a20: 08030d69 .word 0x08030d69 08024a24 : /** * @brief Установить временные параметры сетевого подключения по умолчанию */ void SETTINGS_SetTempWebParamsDef(void) { 8024a24: b510 push {r4, lr} strcpy(sSettings.sWebParams.ip, "192.168.1.2"); 8024a26: 4c09 ldr r4, [pc, #36] ; (8024a4c ) 8024a28: 4909 ldr r1, [pc, #36] ; (8024a50 ) 8024a2a: 4620 mov r0, r4 8024a2c: f7fc ffe2 bl 80219f4 strcpy(sSettings.sWebParams.gate, "192.168.1.1"); 8024a30: 4908 ldr r1, [pc, #32] ; (8024a54 ) 8024a32: f104 000f add.w r0, r4, #15 8024a36: f7fc ffdd bl 80219f4 strcpy(sSettings.sWebParams.mask, "255.255.255.0"); 8024a3a: f104 001e add.w r0, r4, #30 8024a3e: 4906 ldr r1, [pc, #24] ; (8024a58 ) 8024a40: f7fc ffd8 bl 80219f4 sSettings.sWebParams.dhcpEnable = 1; 8024a44: 2201 movs r2, #1 8024a46: f884 202d strb.w r2, [r4, #45] ; 0x2d 8024a4a: bd10 pop {r4, pc} 8024a4c: 2000dfc2 .word 0x2000dfc2 8024a50: 08030d51 .word 0x08030d51 8024a54: 08030d5d .word 0x08030d5d 8024a58: 08030d69 .word 0x08030d69 08024a5c : /** * @brief Установить параметры SNMP по умолчанию */ void SETTINGS_SetSnmpDef(void) { 8024a5c: b570 push {r4, r5, r6, lr} strcpy(sSettings.sSnmp.sysDescr, ""); 8024a5e: 4c19 ldr r4, [pc, #100] ; (8024ac4 ) 8024a60: 4d19 ldr r5, [pc, #100] ; (8024ac8 ) strcpy(sSettings.sSnmp.readCommunity, "public"); 8024a62: 4e1a ldr r6, [pc, #104] ; (8024acc ) /** * @brief Установить параметры SNMP по умолчанию */ void SETTINGS_SetSnmpDef(void) { strcpy(sSettings.sSnmp.sysDescr, ""); 8024a64: 4629 mov r1, r5 8024a66: 4620 mov r0, r4 8024a68: f7fc ffc4 bl 80219f4 strcpy(sSettings.sSnmp.readCommunity, "public"); 8024a6c: 4631 mov r1, r6 8024a6e: f104 00a0 add.w r0, r4, #160 ; 0xa0 8024a72: f7fc ffbf bl 80219f4 strcpy(sSettings.sSnmp.writeCommunity, "public"); 8024a76: 4631 mov r1, r6 8024a78: f104 00b4 add.w r0, r4, #180 ; 0xb4 8024a7c: f7fc ffba bl 80219f4 strcpy(sSettings.sSnmp.sysContact, ""); 8024a80: 4629 mov r1, r5 8024a82: f104 00c8 add.w r0, r4, #200 ; 0xc8 8024a86: f7fc ffb5 bl 80219f4 strcpy(sSettings.sSnmp.sysName, "BT-6701"); 8024a8a: f104 00fa add.w r0, r4, #250 ; 0xfa 8024a8e: 4910 ldr r1, [pc, #64] ; (8024ad0 ) 8024a90: f7fc ffb0 bl 80219f4 strcpy(sSettings.sSnmp.sysLocation, ""); 8024a94: 4629 mov r1, r5 strcpy(sSettings.sSnmp.managerIP, "0.0.0.0"); 8024a96: 4d0f ldr r5, [pc, #60] ; (8024ad4 ) strcpy(sSettings.sSnmp.sysDescr, ""); strcpy(sSettings.sSnmp.readCommunity, "public"); strcpy(sSettings.sSnmp.writeCommunity, "public"); strcpy(sSettings.sSnmp.sysContact, ""); strcpy(sSettings.sSnmp.sysName, "BT-6701"); strcpy(sSettings.sSnmp.sysLocation, ""); 8024a98: f504 7087 add.w r0, r4, #270 ; 0x10e 8024a9c: f7fc ffaa bl 80219f4 strcpy(sSettings.sSnmp.managerIP, "0.0.0.0"); 8024aa0: 4629 mov r1, r5 8024aa2: f504 70be add.w r0, r4, #380 ; 0x17c 8024aa6: f7fc ffa5 bl 80219f4 strcpy(sSettings.sSnmp.managerIP2, "0.0.0.0"); 8024aaa: 4629 mov r1, r5 8024aac: f504 70c8 add.w r0, r4, #400 ; 0x190 8024ab0: f7fc ffa0 bl 80219f4 strcpy(sSettings.sSnmp.managerIP3, "0.0.0.0"); 8024ab4: f504 70d2 add.w r0, r4, #420 ; 0x1a4 8024ab8: 4629 mov r1, r5 } 8024aba: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} strcpy(sSettings.sSnmp.sysContact, ""); strcpy(sSettings.sSnmp.sysName, "BT-6701"); strcpy(sSettings.sSnmp.sysLocation, ""); strcpy(sSettings.sSnmp.managerIP, "0.0.0.0"); strcpy(sSettings.sSnmp.managerIP2, "0.0.0.0"); strcpy(sSettings.sSnmp.managerIP3, "0.0.0.0"); 8024abe: f7fc bf99 b.w 80219f4 8024ac2: bf00 nop 8024ac4: 2000e01e .word 0x2000e01e 8024ac8: 08037867 .word 0x08037867 8024acc: 08030d77 .word 0x08030d77 8024ad0: 08030d7e .word 0x08030d7e 8024ad4: 08030d86 .word 0x08030d86 08024ad8 : /** * @brief Установить Информацию об устройстве по умолчанию */ void SETTINGS_SetInfoDef(void) { 8024ad8: b510 push {r4, lr} strcpy(sSettings.sInfo.productionData, "08.07.2016"); 8024ada: 4c0b ldr r4, [pc, #44] ; (8024b08 ) 8024adc: 490b ldr r1, [pc, #44] ; (8024b0c ) 8024ade: 4620 mov r0, r4 8024ae0: f7fc ff88 bl 80219f4 //strcpy(sSettings.sInfo.mac, "EC-4C-4D-00-90-01"); strcpy(sSettings.sInfo.mac, "EC-4C-4D-00-00-0A"); 8024ae4: f104 0028 add.w r0, r4, #40 ; 0x28 8024ae8: 4909 ldr r1, [pc, #36] ; (8024b10 ) 8024aea: f7fc ff83 bl 80219f4 strcpy(sSettings.sInfo.serialNumber, "KN-03-00001"); 8024aee: f104 003a add.w r0, r4, #58 ; 0x3a 8024af2: 4908 ldr r1, [pc, #32] ; (8024b14 ) 8024af4: f7fc ff7e bl 80219f4 strcpy(sSettings.sInfo.comments, ""); 8024af8: 4907 ldr r1, [pc, #28] ; (8024b18 ) 8024afa: f104 004a add.w r0, r4, #74 ; 0x4a } 8024afe: e8bd 4010 ldmia.w sp!, {r4, lr} { strcpy(sSettings.sInfo.productionData, "08.07.2016"); //strcpy(sSettings.sInfo.mac, "EC-4C-4D-00-90-01"); strcpy(sSettings.sInfo.mac, "EC-4C-4D-00-00-0A"); strcpy(sSettings.sInfo.serialNumber, "KN-03-00001"); strcpy(sSettings.sInfo.comments, ""); 8024b02: f7fc bf77 b.w 80219f4 8024b06: bf00 nop 8024b08: 2000e1d6 .word 0x2000e1d6 8024b0c: 08030d8e .word 0x08030d8e 8024b10: 08030d99 .word 0x08030d99 8024b14: 08030dab .word 0x08030dab 8024b18: 08037867 .word 0x08037867 08024b1c : */ void SETTINGS_ReadFromFlash(uint8_t *data, uint32_t size) { uint32_t baseAddress = SETTINGS_SECTOR; for (uint32_t i = 0; i < size; i++) 8024b1c: 2300 movs r3, #0 8024b1e: e006 b.n 8024b2e *data++ = (*(uint32_t*)baseAddress++);; 8024b20: f103 6200 add.w r2, r3, #134217728 ; 0x8000000 8024b24: f502 4280 add.w r2, r2, #16384 ; 0x4000 8024b28: 6812 ldr r2, [r2, #0] 8024b2a: 54c2 strb r2, [r0, r3] */ void SETTINGS_ReadFromFlash(uint8_t *data, uint32_t size) { uint32_t baseAddress = SETTINGS_SECTOR; for (uint32_t i = 0; i < size; i++) 8024b2c: 3301 adds r3, #1 8024b2e: 428b cmp r3, r1 8024b30: d1f6 bne.n 8024b20 *data++ = (*(uint32_t*)baseAddress++);; } 8024b32: 4770 bx lr 08024b34 : */ void SETTINGS_EraseFlashSector(void) { FLASH_Status status; if ((status = FLASH_EraseSector(FLASH_Sector_1, VoltageRange_3)) != FLASH_COMPLETE) { 8024b34: 2008 movs r0, #8 8024b36: 2102 movs r1, #2 8024b38: f7fd bd9a b.w 8022670 08024b3c : /** * @brief * @retval */ uint32_t SETTINGS_GetCRC(void) { 8024b3c: b508 push {r3, lr} CRC_ResetDR(); 8024b3e: f7fd fd01 bl 8022544 return CRC_CalcBlockCRC((uint32_t*)&sSettings, sizeof(sSettings)/4); 8024b42: 4803 ldr r0, [pc, #12] ; (8024b50 ) 8024b44: 21b9 movs r1, #185 ; 0xb9 } 8024b46: e8bd 4008 ldmia.w sp!, {r3, lr} * @retval */ uint32_t SETTINGS_GetCRC(void) { CRC_ResetDR(); return CRC_CalcBlockCRC((uint32_t*)&sSettings, sizeof(sSettings)/4); 8024b4a: f7fd bd01 b.w 8022550 8024b4e: bf00 nop 8024b50: 2000dfc0 .word 0x2000dfc0 08024b54 : /** * @brief */ void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size) { 8024b54: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8024b58: 4606 mov r6, r0 8024b5a: 468a mov sl, r1 uint32_t baseAddress = SETTINGS_SECTOR; uint32_t checkCrc = 0; uint32_t crc = SETTINGS_GetCRC(); 8024b5c: f7ff ffee bl 8024b3c /** * @brief */ void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size) { uint32_t baseAddress = SETTINGS_SECTOR; 8024b60: 4c17 ldr r4, [pc, #92] ; (8024bc0 ) uint32_t checkCrc = 0; uint32_t crc = SETTINGS_GetCRC(); 8024b62: 4680 mov r8, r0 8024b64: 2703 movs r7, #3 FLASH_Status status; for (uint8_t i = 0; i < 3; i++) { fAlarm = 0; FLASH_Unlock(); 8024b66: f7fd fd03 bl 8022570 8024b6a: 4635 mov r5, r6 SETTINGS_EraseFlashSector(); 8024b6c: f7ff ffe2 bl 8024b34 } /** * @brief */ void SETTINGS_WriteToFlash(uint8_t *data, uint32_t size) 8024b70: eb04 0b0a add.w fp, r4, sl fAlarm = 0; FLASH_Unlock(); SETTINGS_EraseFlashSector(); for (uint32_t i = 0; i < size; i++) 8024b74: e00a b.n 8024b8c if ((status = FLASH_ProgramByte(baseAddress++, *data++)) != FLASH_COMPLETE) { 8024b76: f815 1b01 ldrb.w r1, [r5], #1 8024b7a: 4620 mov r0, r4 8024b7c: f7fd fd3e bl 80225fc 8024b80: f104 0901 add.w r9, r4, #1 8024b84: 2808 cmp r0, #8 8024b86: 462e mov r6, r5 8024b88: 464c mov r4, r9 8024b8a: d102 bne.n 8024b92 fAlarm = 0; FLASH_Unlock(); SETTINGS_EraseFlashSector(); for (uint32_t i = 0; i < size; i++) 8024b8c: 455c cmp r4, fp 8024b8e: 462e mov r6, r5 8024b90: d1f1 bne.n 8024b76 if ((status = FLASH_ProgramByte(baseAddress++, *data++)) != FLASH_COMPLETE) { DBG printf("FLASH_ProgramByte error: status = %d\r\n", status); break; } if ((status = FLASH_ProgramWord((uint32_t)CRC_ADDRESS, crc)) != FLASH_COMPLETE) { 8024b92: 4641 mov r1, r8 8024b94: 480b ldr r0, [pc, #44] ; (8024bc4 ) 8024b96: f7fd fd4d bl 8022634 DBG printf("FLASH_ProgramWord error: status = %d\r\n", status); } FLASH_Lock(); 8024b9a: f7fd fcf7 bl 802258c /* Считываем что записали */ SETTINGS_ReadFromFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8024b9e: 480a ldr r0, [pc, #40] ; (8024bc8 ) 8024ba0: f44f 7139 mov.w r1, #740 ; 0x2e4 8024ba4: f7ff ffba bl 8024b1c checkCrc = SETTINGS_GetCRC(); 8024ba8: f7ff ffc8 bl 8024b3c /* Проверяем CRC того что было записано */ if (checkCrc == crc) 8024bac: 4540 cmp r0, r8 8024bae: d004 beq.n 8024bba 8024bb0: 3f01 subs r7, #1 uint32_t checkCrc = 0; uint32_t crc = SETTINGS_GetCRC(); bool fAlarm = 0; FLASH_Status status; for (uint8_t i = 0; i < 3; i++) 8024bb2: f017 07ff ands.w r7, r7, #255 ; 0xff 8024bb6: d1d6 bne.n 8024b66 8024bb8: e7fe b.n 8024bb8 8024bba: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8024bbe: bf00 nop 8024bc0: 08004000 .word 0x08004000 8024bc4: 08007f9c .word 0x08007f9c 8024bc8: 2000dfc0 .word 0x2000dfc0 08024bcc : /** * @brief * @retval */ uint32_t SETTINGS_GetCritSecCRC(void) { 8024bcc: b508 push {r3, lr} CRC_ResetDR(); 8024bce: f7fd fcb9 bl 8022544 uint32_t critsec_len = (uint32_t)((uint8_t *)(&sSettings.CritSecCRC) - (uint8_t *)&sSettings) / 4; return CRC_CalcBlockCRC((uint32_t *)&sSettings, critsec_len); 8024bd2: 4803 ldr r0, [pc, #12] ; (8024be0 ) 8024bd4: 21b8 movs r1, #184 ; 0xb8 } 8024bd6: e8bd 4008 ldmia.w sp!, {r3, lr} */ uint32_t SETTINGS_GetCritSecCRC(void) { CRC_ResetDR(); uint32_t critsec_len = (uint32_t)((uint8_t *)(&sSettings.CritSecCRC) - (uint8_t *)&sSettings) / 4; return CRC_CalcBlockCRC((uint32_t *)&sSettings, critsec_len); 8024bda: f7fd bcb9 b.w 8022550 8024bde: bf00 nop 8024be0: 2000dfc0 .word 0x2000dfc0 08024be4 : /** * @brief Запись структуры настроек во flesh */ void SETTINGS_Save(void) { 8024be4: b508 push {r3, lr} /* Calc critical section CRC and store to the settings structure */ sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8024be6: f7ff fff1 bl 8024bcc 8024bea: 4b05 ldr r3, [pc, #20] ; (8024c00 ) SETTINGS_WriteToFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8024bec: f44f 7139 mov.w r1, #740 ; 0x2e4 * @brief Запись структуры настроек во flesh */ void SETTINGS_Save(void) { /* Calc critical section CRC and store to the settings structure */ sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8024bf0: f8c3 02e0 str.w r0, [r3, #736] ; 0x2e0 SETTINGS_WriteToFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8024bf4: 4618 mov r0, r3 } 8024bf6: e8bd 4008 ldmia.w sp!, {r3, lr} void SETTINGS_Save(void) { /* Calc critical section CRC and store to the settings structure */ sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); SETTINGS_WriteToFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8024bfa: f7ff bfab b.w 8024b54 8024bfe: bf00 nop 8024c00: 2000dfc0 .word 0x2000dfc0 08024c04 : /** * @brief Установка настроек для отладки */ void SETTINGS_SetDefaultDebug(void) { 8024c04: b510 push {r4, lr} /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8024c06: 4c08 ldr r4, [pc, #32] ; (8024c28 ) /** * @brief Установка настроек для отладки */ void SETTINGS_SetDefaultDebug(void) { SETTINGS_SetWebParamsDef(); 8024c08: f7ff fef0 bl 80249ec SETTINGS_SetTempWebParamsDef(); 8024c0c: f7ff ff0a bl 8024a24 SETTINGS_SetSnmpDef(); 8024c10: f7ff ff24 bl 8024a5c SETTINGS_SetBootParamsDef(); 8024c14: f7ff fee2 bl 80249dc /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8024c18: 2300 movs r3, #0 8024c1a: f884 32ce strb.w r3, [r4, #718] ; 0x2ce SETTINGS_SetSnmpDef(); SETTINGS_SetBootParamsDef(); SETTINGS_SetFlagsDef(); //SETTINGS_SetInfoDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8024c1e: f7ff ffd5 bl 8024bcc 8024c22: f8c4 02e0 str.w r0, [r4, #736] ; 0x2e0 8024c26: bd10 pop {r4, pc} 8024c28: 2000dfc0 .word 0x2000dfc0 08024c2c : /** * @brief Сброс всех настроек в значения по умолчанию */ void SETTINGS_SetAllDefault(void) { 8024c2c: b510 push {r4, lr} /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8024c2e: 4c09 ldr r4, [pc, #36] ; (8024c54 ) /** * @brief Сброс всех настроек в значения по умолчанию */ void SETTINGS_SetAllDefault(void) { SETTINGS_SetBootParamsDef(); 8024c30: f7ff fed4 bl 80249dc SETTINGS_SetWebParamsDef(); 8024c34: f7ff feda bl 80249ec SETTINGS_SetTempWebParamsDef(); 8024c38: f7ff fef4 bl 8024a24 SETTINGS_SetSnmpDef(); 8024c3c: f7ff ff0e bl 8024a5c SETTINGS_SetInfoDef(); 8024c40: f7ff ff4a bl 8024ad8 /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8024c44: 2300 movs r3, #0 8024c46: f884 32ce strb.w r3, [r4, #718] ; 0x2ce SETTINGS_SetTempWebParamsDef(); SETTINGS_SetSnmpDef(); SETTINGS_SetInfoDef(); SETTINGS_SetFlagsDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8024c4a: f7ff ffbf bl 8024bcc 8024c4e: f8c4 02e0 str.w r0, [r4, #736] ; 0x2e0 8024c52: bd10 pop {r4, pc} 8024c54: 2000dfc0 .word 0x2000dfc0 08024c58 : /** * @brief Загрузка структуры настроек из flesh */ void SETTINGS_Load(void) { 8024c58: b510 push {r4, lr} SETTINGS_ReadFromFlash((uint8_t*)&sSettings, sizeof(sSettings)); 8024c5a: 4c09 ldr r4, [pc, #36] ; (8024c80 ) 8024c5c: f44f 7139 mov.w r1, #740 ; 0x2e4 8024c60: 4620 mov r0, r4 8024c62: f7ff ff5b bl 8024b1c /* Проверка CRC критической секции сектора настроек. * Если CRC не совпадает, скорее всего настройки отсутствуют, * прошиваем значения по умолчанию */ uint32_t crc = SETTINGS_GetCritSecCRC(); 8024c66: f7ff ffb1 bl 8024bcc if (sSettings.CritSecCRC != crc) { 8024c6a: f8d4 32e0 ldr.w r3, [r4, #736] ; 0x2e0 8024c6e: 4283 cmp r3, r0 8024c70: d005 beq.n 8024c7e SETTINGS_SetAllDefault(); 8024c72: f7ff ffdb bl 8024c2c SETTINGS_Save(); } } 8024c76: e8bd 4010 ldmia.w sp!, {r4, lr} * прошиваем значения по умолчанию */ uint32_t crc = SETTINGS_GetCritSecCRC(); if (sSettings.CritSecCRC != crc) { SETTINGS_SetAllDefault(); SETTINGS_Save(); 8024c7a: f7ff bfb3 b.w 8024be4 8024c7e: bd10 pop {r4, pc} 8024c80: 2000dfc0 .word 0x2000dfc0 08024c84 : /** * @brief Сброс всех настроек в значения по умолчанию кроме сетевых настроек */ void SETTINGS_SetPartDefault(void) { 8024c84: b510 push {r4, lr} /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8024c86: 4c06 ldr r4, [pc, #24] ; (8024ca0 ) /** * @brief Сброс всех настроек в значения по умолчанию кроме сетевых настроек */ void SETTINGS_SetPartDefault(void) { SETTINGS_SetBootParamsDef(); 8024c88: f7ff fea8 bl 80249dc SETTINGS_SetSnmpDef(); 8024c8c: f7ff fee6 bl 8024a5c /** * @brief Установить флаги по умолчанию */ void SETTINGS_SetFlagsDef(void) { sSettings.sFlags.netsettingsChanged = false; 8024c90: 2300 movs r3, #0 8024c92: f884 32ce strb.w r3, [r4, #718] ; 0x2ce { SETTINGS_SetBootParamsDef(); SETTINGS_SetSnmpDef(); SETTINGS_SetFlagsDef(); sSettings.CritSecCRC = SETTINGS_GetCritSecCRC(); 8024c96: f7ff ff99 bl 8024bcc 8024c9a: f8c4 02e0 str.w r0, [r4, #736] ; 0x2e0 8024c9e: bd10 pop {r4, pc} 8024ca0: 2000dfc0 .word 0x2000dfc0 08024ca4 : /** * @brief Преобразует mac адрес строкового формата в массив uint8_t * @param mac - буфер для вывода mac адреса */ void SETTINGS_GetMac(uint8_t *mac) { 8024ca4: b573 push {r0, r1, r4, r5, r6, lr} char dummy[2]; char *macPtr = sSettings.sInfo.mac; for (uint8_t i = 0; i < 6; i++) { strncpy(dummy, macPtr+i*3, 2); 8024ca6: 4e0b ldr r6, [pc, #44] ; (8024cd4 ) /** * @brief Преобразует mac адрес строкового формата в массив uint8_t * @param mac - буфер для вывода mac адреса */ void SETTINGS_GetMac(uint8_t *mac) 8024ca8: 1e45 subs r5, r0, #1 8024caa: 2400 movs r4, #0 char dummy[2]; char *macPtr = sSettings.sInfo.mac; for (uint8_t i = 0; i < 6; i++) { strncpy(dummy, macPtr+i*3, 2); 8024cac: f504 710e add.w r1, r4, #568 ; 0x238 8024cb0: 1989 adds r1, r1, r6 8024cb2: 3106 adds r1, #6 8024cb4: 2202 movs r2, #2 8024cb6: a801 add r0, sp, #4 8024cb8: f7fc ffb2 bl 8021c20 mac[i] = (uint8_t)strtol(dummy, NULL, 16); 8024cbc: 2100 movs r1, #0 8024cbe: 2210 movs r2, #16 8024cc0: a801 add r0, sp, #4 8024cc2: f7fd fb1f bl 8022304 8024cc6: 3403 adds r4, #3 void SETTINGS_GetMac(uint8_t *mac) { char dummy[2]; char *macPtr = sSettings.sInfo.mac; for (uint8_t i = 0; i < 6; i++) 8024cc8: 2c12 cmp r4, #18 { strncpy(dummy, macPtr+i*3, 2); mac[i] = (uint8_t)strtol(dummy, NULL, 16); 8024cca: f805 0f01 strb.w r0, [r5, #1]! void SETTINGS_GetMac(uint8_t *mac) { char dummy[2]; char *macPtr = sSettings.sInfo.mac; for (uint8_t i = 0; i < 6; i++) 8024cce: d1ed bne.n 8024cac { strncpy(dummy, macPtr+i*3, 2); mac[i] = (uint8_t)strtol(dummy, NULL, 16); } } 8024cd0: bd7c pop {r2, r3, r4, r5, r6, pc} 8024cd2: bf00 nop 8024cd4: 2000dfc0 .word 0x2000dfc0 08024cd8 : /** * @brief Установить дату производства */ void SETTINGS_SetProDate(char *proDate, uint8_t len) { 8024cd8: b570 push {r4, r5, r6, lr} memset(sSettings.sInfo.productionData, 0, 40); 8024cda: 4c07 ldr r4, [pc, #28] ; (8024cf8 ) /** * @brief Установить дату производства */ void SETTINGS_SetProDate(char *proDate, uint8_t len) { 8024cdc: 4606 mov r6, r0 8024cde: 460d mov r5, r1 memset(sSettings.sInfo.productionData, 0, 40); 8024ce0: 2228 movs r2, #40 ; 0x28 8024ce2: 2100 movs r1, #0 8024ce4: 4620 mov r0, r4 8024ce6: f7fc fd0b bl 8021700 memcpy(sSettings.sInfo.productionData, proDate, len); 8024cea: 4620 mov r0, r4 8024cec: 4631 mov r1, r6 8024cee: 462a mov r2, r5 } 8024cf0: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} * @brief Установить дату производства */ void SETTINGS_SetProDate(char *proDate, uint8_t len) { memset(sSettings.sInfo.productionData, 0, 40); memcpy(sSettings.sInfo.productionData, proDate, len); 8024cf4: f7fc bc4a b.w 802158c 8024cf8: 2000e1d6 .word 0x2000e1d6 08024cfc : /** * @brief Задача простой мигалки */ void vTaskLedBlink(void *arg) { 8024cfc: b510 push {r4, lr} /* Просто отражает состояние контроллера - "живой" */ // LED_Toggle(LED_INIT_G); //LED_Toggle(LED_INIT_R); LED_Toggle(LED_MAJOR_R); // LED_Toggle(LED_MINOR_R); vTaskDelay(statusLedFreq); 8024cfe: 4c04 ldr r4, [pc, #16] ; (8024d10 ) /** * @brief Изменить состояние LED */ void LED_Toggle(gpio_t pin) { gpio_invert_output(pin); 8024d00: 200b movs r0, #11 8024d02: f7fe faa3 bl 802324c /* Просто отражает состояние контроллера - "живой" */ // LED_Toggle(LED_INIT_G); //LED_Toggle(LED_INIT_R); LED_Toggle(LED_MAJOR_R); // LED_Toggle(LED_MINOR_R); vTaskDelay(statusLedFreq); 8024d06: 8820 ldrh r0, [r4, #0] 8024d08: f000 fe68 bl 80259dc 8024d0c: e7f8 b.n 8024d00 8024d0e: bf00 nop 8024d10: 200010f6 .word 0x200010f6 08024d14 : /** * @brief */ void LED_Off(gpio_t pin) { gpio_set(pin, 0); 8024d14: 2100 movs r1, #0 8024d16: f7fe ba05 b.w 8023124 08024d1a : /** * @brief * @retval */ void LED_Init(void) { 8024d1a: b508 push {r3, lr} LED_Off(LED_INIT_R); 8024d1c: 2009 movs r0, #9 8024d1e: f7ff fff9 bl 8024d14 LED_Off(LED_INIT_G); 8024d22: 200a movs r0, #10 8024d24: f7ff fff6 bl 8024d14 LED_Off(LED_MAJOR_R); 8024d28: 200b movs r0, #11 8024d2a: f7ff fff3 bl 8024d14 LED_Off(LED_MINOR_G); 8024d2e: 200c movs r0, #12 8024d30: f7ff fff0 bl 8024d14 LED_Off(LED_MINOR_R); 8024d34: 200d movs r0, #13 } 8024d36: e8bd 4008 ldmia.w sp!, {r3, lr} { LED_Off(LED_INIT_R); LED_Off(LED_INIT_G); LED_Off(LED_MAJOR_R); LED_Off(LED_MINOR_G); LED_Off(LED_MINOR_R); 8024d3a: f7ff bfeb b.w 8024d14 8024d3e: 0000 movs r0, r0 08024d40 : /** * @brief */ void LED_SetStatusLedFreq(uint16_t freq) { statusLedFreq = freq; 8024d40: 4b01 ldr r3, [pc, #4] ; (8024d48 ) 8024d42: 8018 strh r0, [r3, #0] 8024d44: 4770 bx lr 8024d46: bf00 nop 8024d48: 200010f6 .word 0x200010f6 08024d4c : /** * @brief Заглушка */ void BUTTON_VoidHandler(void) { 8024d4c: 4770 bx lr 8024d4e: 0000 movs r0, r0 08024d50 : /** * @brief Хендлер кнопки DEFAULT. Сброс всех настроек, сохранение и перезагрузка */ void BUTTON_DEF_DownHandler(void) { 8024d50: b508 push {r3, lr} //taskENTER_CRITICAL(); SETTINGS_SetDefaultDebug(); 8024d52: f7ff ff57 bl 8024c04 SETTINGS_Save(); 8024d56: f7ff ff45 bl 8024be4 vTaskDelay(1010); 8024d5a: f240 30f2 movw r0, #1010 ; 0x3f2 8024d5e: f000 fe3d bl 80259dc This function acts as a special kind of Data Memory Barrier. It completes when all explicit memory accesses before this instruction complete. */ __attribute__( ( always_inline ) ) __STATIC_INLINE void __DSB(void) { __ASM volatile ("dsb"); 8024d62: f3bf 8f4f dsb sy //static inline void NVIC_SystemReset(void) { __DSB(); /* Ensure all outstanding memory accesses included buffered write are completed before reset */ SCB->AIRCR = ((0x5FA << SCB_AIRCR_VECTKEY_Pos) | (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | 8024d66: 4a05 ldr r2, [pc, #20] ; (8024d7c ) 8024d68: 4b05 ldr r3, [pc, #20] ; (8024d80 ) 8024d6a: 68d1 ldr r1, [r2, #12] 8024d6c: f401 61e0 and.w r1, r1, #1792 ; 0x700 8024d70: 430b orrs r3, r1 __STATIC_INLINE void NVIC_SystemReset(void) //static inline void NVIC_SystemReset(void) { __DSB(); /* Ensure all outstanding memory accesses included buffered write are completed before reset */ SCB->AIRCR = ((0x5FA << SCB_AIRCR_VECTKEY_Pos) | 8024d72: 60d3 str r3, [r2, #12] 8024d74: f3bf 8f4f dsb sy 8024d78: e7fe b.n 8024d78 8024d7a: bf00 nop 8024d7c: e000ed00 .word 0xe000ed00 8024d80: 05fa0004 .word 0x05fa0004 08024d84 : /** * @brief Возвращает сотояние ключа */ BUTTON_STATE_t BUTTON_GetState(BUTTON_NO_FIX_t *button) { return (BUTTON_STATE_t)gpio_get(button->id_pin); 8024d84: 7800 ldrb r0, [r0, #0] 8024d86: f7fe ba71 b.w 802326c 8024d8a: 0000 movs r0, r0 08024d8c : /** * @brief * @retval */ void BUTTON_Init(void) { 8024d8c: b510 push {r4, lr} defButton.id_pin = KEY_DEF; 8024d8e: 4c09 ldr r4, [pc, #36] ; (8024db4 ) 8024d90: 230f movs r3, #15 8024d92: 7023 strb r3, [r4, #0] defButton.timeDelay = 5; 8024d94: 2305 movs r3, #5 8024d96: 8063 strh r3, [r4, #2] defButton.pressHandler = BUTTON_VoidHandler; 8024d98: 4b07 ldr r3, [pc, #28] ; (8024db8 ) 8024d9a: 60a3 str r3, [r4, #8] defButton.unpressHandler = BUTTON_DEF_DownHandler; 8024d9c: 4b07 ldr r3, [pc, #28] ; (8024dbc ) defButton.counterActivation = 0; defButton.timeActivation = 40; 8024d9e: 2228 movs r2, #40 ; 0x28 void BUTTON_Init(void) { defButton.id_pin = KEY_DEF; defButton.timeDelay = 5; defButton.pressHandler = BUTTON_VoidHandler; defButton.unpressHandler = BUTTON_DEF_DownHandler; 8024da0: 60e3 str r3, [r4, #12] defButton.counterActivation = 0; defButton.timeActivation = 40; defButton.fActivation = false; defButton.stateOld = BUTTON_GetState(&defButton); 8024da2: 4620 mov r0, r4 { defButton.id_pin = KEY_DEF; defButton.timeDelay = 5; defButton.pressHandler = BUTTON_VoidHandler; defButton.unpressHandler = BUTTON_DEF_DownHandler; defButton.counterActivation = 0; 8024da4: 2300 movs r3, #0 8024da6: 6163 str r3, [r4, #20] defButton.timeActivation = 40; 8024da8: 8322 strh r2, [r4, #24] defButton.fActivation = false; 8024daa: 76a3 strb r3, [r4, #26] defButton.stateOld = BUTTON_GetState(&defButton); 8024dac: f7ff ffea bl 8024d84 8024db0: 71a0 strb r0, [r4, #6] 8024db2: bd10 pop {r4, pc} 8024db4: 2000e2a4 .word 0x2000e2a4 8024db8: 08024d4d .word 0x08024d4d 8024dbc: 08024d51 .word 0x08024d51 08024dc0 : время нажатия. * @param *button: указатель на структуру типа BUTTON_NO_FIX * @retval нет */ void BUTTON_DellayHandler(BUTTON_NO_FIX_t *button) { 8024dc0: b510 push {r4, lr} 8024dc2: 4604 mov r4, r0 /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки 8024dc4: 7800 ldrb r0, [r0, #0] 8024dc6: f7fe fa51 bl 802326c 8024dca: 6963 ldr r3, [r4, #20] 8024dcc: b950 cbnz r0, 8024de4 { button->counterActivation++; button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) 8024dce: 8b22 ldrh r2, [r4, #24] { /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки { button->counterActivation++; button->fActivation = false; 8024dd0: 76a0 strb r0, [r4, #26] void BUTTON_DellayHandler(BUTTON_NO_FIX_t *button) { /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки { button->counterActivation++; 8024dd2: 3301 adds r3, #1 button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) 8024dd4: 4293 cmp r3, r2 void BUTTON_DellayHandler(BUTTON_NO_FIX_t *button) { /* Кнопка нажата. Ведем отсчет времени удержания */ if (gpio_get(button->id_pin) == 0) // определяем текущее (новое) состояние кнопки { button->counterActivation++; 8024dd6: 6163 str r3, [r4, #20] button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) 8024dd8: d914 bls.n 8024e04 LED_SetStatusLedFreq(100); 8024dda: 2064 movs r0, #100 ; 0x64 } else button->counterActivation = 0; } } 8024ddc: e8bd 4010 ldmia.w sp!, {r4, lr} button->counterActivation++; button->fActivation = false; /* Кнопка нажата более необходимого времени - начинаем чаще мигать диодом */ if (button->counterActivation > button->timeActivation) LED_SetStatusLedFreq(100); 8024de0: f7ff bfae b.w 8024d40 } /* Кнопку отжата. Если до этого она была нажата нужное время - вызываем хендлер */ else { if ((button->counterActivation > button->timeActivation) 8024de4: 8b22 ldrh r2, [r4, #24] 8024de6: 4293 cmp r3, r2 8024de8: d90a bls.n 8024e00 && button->fActivation == false) 8024dea: 7ea3 ldrb r3, [r4, #26] 8024dec: b943 cbnz r3, 8024e00 { button->fActivation = true; 8024dee: 2301 movs r3, #1 8024df0: 76a3 strb r3, [r4, #26] LED_SetStatusLedFreq(1000); 8024df2: f44f 707a mov.w r0, #1000 ; 0x3e8 8024df6: f7ff ffa3 bl 8024d40 button->unpressHandler(); 8024dfa: 68e3 ldr r3, [r4, #12] 8024dfc: 4798 blx r3 8024dfe: bd10 pop {r4, pc} } else button->counterActivation = 0; 8024e00: 2300 movs r3, #0 8024e02: 6163 str r3, [r4, #20] 8024e04: bd10 pop {r4, pc} 8024e06: 0000 movs r0, r0 08024e08 : /** * @brief Опрос кнопок */ void vTaskButtons(void *pvParameters) { 8024e08: b508 push {r3, lr} for (;;) { BUTTON_DellayHandler(&defButton); 8024e0a: 4803 ldr r0, [pc, #12] ; (8024e18 ) 8024e0c: f7ff ffd8 bl 8024dc0 vTaskDelay(100); //20 8024e10: 2064 movs r0, #100 ; 0x64 8024e12: f000 fde3 bl 80259dc 8024e16: e7f8 b.n 8024e0a 8024e18: 2000e2a4 .word 0x2000e2a4 08024e1c : #include "gpio.h" bool value_jumper; void set_mode_jumper(void) { 8024e1c: b508 push {r3, lr} value_jumper = gpio_get(MODE_JUMPER); 8024e1e: 200e movs r0, #14 8024e20: f7fe fa24 bl 802326c 8024e24: 4b01 ldr r3, [pc, #4] ; (8024e2c ) 8024e26: 7018 strb r0, [r3, #0] 8024e28: bd08 pop {r3, pc} 8024e2a: bf00 nop 8024e2c: 2000e2c0 .word 0x2000e2c0 08024e30 : void vListInitialise( List_t * const pxList ) { /* The list structure contains a list item which is used to mark the end of the list. To initialise the list the list end is inserted as the only list entry. */ pxList->pxIndex = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */ 8024e30: f100 0308 add.w r3, r0, #8 8024e34: 6043 str r3, [r0, #4] /* The list end value is the highest possible value in the list to ensure it remains at the end of the list. */ pxList->xListEnd.xItemValue = portMAX_DELAY; 8024e36: f04f 32ff mov.w r2, #4294967295 /* The list end next and previous pointers point to itself so we know when the list is empty. */ pxList->xListEnd.pxNext = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */ 8024e3a: 60c3 str r3, [r0, #12] pxList->xListEnd.pxPrevious = ( ListItem_t * ) &( pxList->xListEnd );/*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */ 8024e3c: 6103 str r3, [r0, #16] pxList->uxNumberOfItems = ( UBaseType_t ) 0U; 8024e3e: 2300 movs r3, #0 as the only list entry. */ pxList->pxIndex = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */ /* The list end value is the highest possible value in the list to ensure it remains at the end of the list. */ pxList->xListEnd.xItemValue = portMAX_DELAY; 8024e40: 6082 str r2, [r0, #8] /* The list end next and previous pointers point to itself so we know when the list is empty. */ pxList->xListEnd.pxNext = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */ pxList->xListEnd.pxPrevious = ( ListItem_t * ) &( pxList->xListEnd );/*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */ pxList->uxNumberOfItems = ( UBaseType_t ) 0U; 8024e42: 6003 str r3, [r0, #0] 8024e44: 4770 bx lr 08024e46 : /*-----------------------------------------------------------*/ void vListInitialiseItem( ListItem_t * const pxItem ) { /* Make sure the list item is not recorded as being on a list. */ pxItem->pvContainer = NULL; 8024e46: 2300 movs r3, #0 8024e48: 6103 str r3, [r0, #16] 8024e4a: 4770 bx lr 08024e4c : } /*-----------------------------------------------------------*/ void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem ) { ListItem_t * const pxIndex = pxList->pxIndex; 8024e4c: 6843 ldr r3, [r0, #4] pxNewListItem->pxPrevious = pxIndex->pxPrevious; pxIndex->pxPrevious->pxNext = pxNewListItem; pxIndex->pxPrevious = pxNewListItem; /* Remember which list the item is in. */ pxNewListItem->pvContainer = ( void * ) pxList; 8024e4e: 6108 str r0, [r1, #16] /* Insert a new list item into pxList, but rather than sort the list, makes the new list item the last item to be removed by a call to listGET_OWNER_OF_NEXT_ENTRY(). */ pxNewListItem->pxNext = pxIndex; pxNewListItem->pxPrevious = pxIndex->pxPrevious; 8024e50: 689a ldr r2, [r3, #8] listTEST_LIST_ITEM_INTEGRITY( pxNewListItem ); /* Insert a new list item into pxList, but rather than sort the list, makes the new list item the last item to be removed by a call to listGET_OWNER_OF_NEXT_ENTRY(). */ pxNewListItem->pxNext = pxIndex; 8024e52: 604b str r3, [r1, #4] pxNewListItem->pxPrevious = pxIndex->pxPrevious; 8024e54: 608a str r2, [r1, #8] pxIndex->pxPrevious->pxNext = pxNewListItem; 8024e56: 689a ldr r2, [r3, #8] pxIndex->pxPrevious = pxNewListItem; 8024e58: 6099 str r1, [r3, #8] /* Remember which list the item is in. */ pxNewListItem->pvContainer = ( void * ) pxList; ( pxList->uxNumberOfItems )++; 8024e5a: 6803 ldr r3, [r0, #0] /* Insert a new list item into pxList, but rather than sort the list, makes the new list item the last item to be removed by a call to listGET_OWNER_OF_NEXT_ENTRY(). */ pxNewListItem->pxNext = pxIndex; pxNewListItem->pxPrevious = pxIndex->pxPrevious; pxIndex->pxPrevious->pxNext = pxNewListItem; 8024e5c: 6051 str r1, [r2, #4] pxIndex->pxPrevious = pxNewListItem; /* Remember which list the item is in. */ pxNewListItem->pvContainer = ( void * ) pxList; ( pxList->uxNumberOfItems )++; 8024e5e: 3301 adds r3, #1 8024e60: 6003 str r3, [r0, #0] 8024e62: 4770 bx lr 08024e64 : /*-----------------------------------------------------------*/ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) { ListItem_t *pxIterator; const TickType_t xValueOfInsertion = pxNewListItem->xItemValue; 8024e64: 680a ldr r2, [r1, #0] new list item should be placed after it. This ensures that TCB's which are stored in ready lists (all of which have the same xItemValue value) get a share of the CPU. However, if the xItemValue is the same as the back marker the iteration loop below will not end. Therefore the value is checked first, and the algorithm slightly modified if necessary. */ if( xValueOfInsertion == portMAX_DELAY ) 8024e66: 1c53 adds r3, r2, #1 ( pxList->uxNumberOfItems )++; } /*-----------------------------------------------------------*/ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) { 8024e68: b530 push {r4, r5, lr} new list item should be placed after it. This ensures that TCB's which are stored in ready lists (all of which have the same xItemValue value) get a share of the CPU. However, if the xItemValue is the same as the back marker the iteration loop below will not end. Therefore the value is checked first, and the algorithm slightly modified if necessary. */ if( xValueOfInsertion == portMAX_DELAY ) 8024e6a: d101 bne.n 8024e70 { pxIterator = pxList->xListEnd.pxPrevious; 8024e6c: 6903 ldr r3, [r0, #16] 8024e6e: e007 b.n 8024e80 4) Using a queue or semaphore before it has been initialised or before the scheduler has been started (are interrupts firing before vTaskStartScheduler() has been called?). **********************************************************************/ for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext ) /*lint !e826 !e740 The mini list structure is used as the list end to save RAM. This is checked and valid. */ 8024e70: f100 0308 add.w r3, r0, #8 8024e74: e000 b.n 8024e78 8024e76: 4623 mov r3, r4 8024e78: 685c ldr r4, [r3, #4] 8024e7a: 6825 ldr r5, [r4, #0] 8024e7c: 4295 cmp r5, r2 8024e7e: d9fa bls.n 8024e76 /* There is nothing to do here, just iterating to the wanted insertion position. */ } } pxNewListItem->pxNext = pxIterator->pxNext; 8024e80: 685a ldr r2, [r3, #4] pxNewListItem->pxPrevious = pxIterator; pxIterator->pxNext = pxNewListItem; /* Remember which list the item is in. This allows fast removal of the item later. */ pxNewListItem->pvContainer = ( void * ) pxList; 8024e82: 6108 str r0, [r1, #16] /* There is nothing to do here, just iterating to the wanted insertion position. */ } } pxNewListItem->pxNext = pxIterator->pxNext; 8024e84: 604a str r2, [r1, #4] pxNewListItem->pxNext->pxPrevious = pxNewListItem; 8024e86: 6091 str r1, [r2, #8] pxNewListItem->pxPrevious = pxIterator; pxIterator->pxNext = pxNewListItem; 8024e88: 6059 str r1, [r3, #4] } } pxNewListItem->pxNext = pxIterator->pxNext; pxNewListItem->pxNext->pxPrevious = pxNewListItem; pxNewListItem->pxPrevious = pxIterator; 8024e8a: 608b str r3, [r1, #8] /* Remember which list the item is in. This allows fast removal of the item later. */ pxNewListItem->pvContainer = ( void * ) pxList; ( pxList->uxNumberOfItems )++; 8024e8c: 6803 ldr r3, [r0, #0] 8024e8e: 3301 adds r3, #1 8024e90: 6003 str r3, [r0, #0] 8024e92: bd30 pop {r4, r5, pc} 08024e94 : { /* The list item knows which list it is in. Obtain the list from the list item. */ List_t * const pxList = ( List_t * ) pxItemToRemove->pvContainer; pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious; 8024e94: 6841 ldr r1, [r0, #4] 8024e96: 6882 ldr r2, [r0, #8] UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove ) { /* The list item knows which list it is in. Obtain the list from the list item. */ List_t * const pxList = ( List_t * ) pxItemToRemove->pvContainer; 8024e98: 6903 ldr r3, [r0, #16] pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious; 8024e9a: 608a str r2, [r1, #8] pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext; 8024e9c: 6882 ldr r2, [r0, #8] 8024e9e: 6051 str r1, [r2, #4] /* Make sure the index is left pointing to a valid item. */ if( pxList->pxIndex == pxItemToRemove ) 8024ea0: 6859 ldr r1, [r3, #4] 8024ea2: 4281 cmp r1, r0 { pxList->pxIndex = pxItemToRemove->pxPrevious; 8024ea4: bf08 it eq 8024ea6: 605a streq r2, [r3, #4] else { mtCOVERAGE_TEST_MARKER(); } pxItemToRemove->pvContainer = NULL; 8024ea8: 2200 movs r2, #0 8024eaa: 6102 str r2, [r0, #16] ( pxList->uxNumberOfItems )--; 8024eac: 6818 ldr r0, [r3, #0] 8024eae: 3801 subs r0, #1 8024eb0: 6018 str r0, [r3, #0] return pxList->uxNumberOfItems; } 8024eb2: 4770 bx lr 08024eb4 : } /*-----------------------------------------------------------*/ static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) 8024eb4: 6c02 ldr r2, [r0, #64] ; 0x40 return xReturn; } /*-----------------------------------------------------------*/ static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { 8024eb6: b530 push {r4, r5, lr} 8024eb8: 4603 mov r3, r0 if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) 8024eba: b16a cbz r2, 8024ed8 { pxQueue->u.pcReadFrom += pxQueue->uxItemSize; 8024ebc: 68c4 ldr r4, [r0, #12] if( pxQueue->u.pcReadFrom >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as use of the relational operator is the cleanest solutions. */ 8024ebe: 6845 ldr r5, [r0, #4] static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) { pxQueue->u.pcReadFrom += pxQueue->uxItemSize; 8024ec0: 18a4 adds r4, r4, r2 if( pxQueue->u.pcReadFrom >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as use of the relational operator is the cleanest solutions. */ 8024ec2: 42ac cmp r4, r5 static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) { pxQueue->u.pcReadFrom += pxQueue->uxItemSize; 8024ec4: 60c4 str r4, [r0, #12] if( pxQueue->u.pcReadFrom >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as use of the relational operator is the cleanest solutions. */ { pxQueue->u.pcReadFrom = pxQueue->pcHead; 8024ec6: bf24 itt cs 8024ec8: 6804 ldrcs r4, [r0, #0] 8024eca: 60c4 strcs r4, [r0, #12] } else { mtCOVERAGE_TEST_MARKER(); } ( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.pcReadFrom, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 MISRA exception as the casts are only redundant for some ports. Also previous logic ensures a null pointer can only be passed to memcpy() when the count is 0. */ 8024ecc: 4608 mov r0, r1 8024ece: 68d9 ldr r1, [r3, #12] } } 8024ed0: e8bd 4030 ldmia.w sp!, {r4, r5, lr} } else { mtCOVERAGE_TEST_MARKER(); } ( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.pcReadFrom, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 MISRA exception as the casts are only redundant for some ports. Also previous logic ensures a null pointer can only be passed to memcpy() when the count is 0. */ 8024ed4: f7fc bb5a b.w 802158c 8024ed8: bd30 pop {r4, r5, pc} 08024eda : } } /*-----------------------------------------------------------*/ static void prvUnlockQueue( Queue_t * const pxQueue ) { 8024eda: b538 push {r3, r4, r5, lr} 8024edc: 4604 mov r4, r0 { /* Tasks that are removed from the event list will get added to the pending ready list as the scheduler is still suspended. */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 8024ede: f104 0524 add.w r5, r4, #36 ; 0x24 /* The lock counts contains the number of extra data items placed or removed from the queue while the queue was locked. When a queue is locked items can be added or removed, but the event lists cannot be updated. */ taskENTER_CRITICAL(); 8024ee2: f000 ff6b bl 8025dbc { /* See if data was added to the queue while it was locked. */ while( pxQueue->xTxLock > queueLOCKED_UNMODIFIED ) 8024ee6: e00a b.n 8024efe } #else /* configUSE_QUEUE_SETS */ { /* Tasks that are removed from the event list will get added to the pending ready list as the scheduler is still suspended. */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 8024ee8: 6a63 ldr r3, [r4, #36] ; 0x24 8024eea: b15b cbz r3, 8024f04 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 8024eec: 4628 mov r0, r5 8024eee: f000 fe0b bl 8025b08 8024ef2: b108 cbz r0, 8024ef8 { /* The task waiting has a higher priority so record that a context switch is required. */ vTaskMissedYield(); 8024ef4: f000 fe82 bl 8025bfc break; } } #endif /* configUSE_QUEUE_SETS */ --( pxQueue->xTxLock ); 8024ef8: 6ca3 ldr r3, [r4, #72] ; 0x48 8024efa: 3b01 subs r3, #1 8024efc: 64a3 str r3, [r4, #72] ; 0x48 locked items can be added or removed, but the event lists cannot be updated. */ taskENTER_CRITICAL(); { /* See if data was added to the queue while it was locked. */ while( pxQueue->xTxLock > queueLOCKED_UNMODIFIED ) 8024efe: 6ca3 ldr r3, [r4, #72] ; 0x48 8024f00: 2b00 cmp r3, #0 8024f02: dcf1 bgt.n 8024ee8 #endif /* configUSE_QUEUE_SETS */ --( pxQueue->xTxLock ); } pxQueue->xTxLock = queueUNLOCKED; 8024f04: f04f 33ff mov.w r3, #4294967295 8024f08: 64a3 str r3, [r4, #72] ; 0x48 } taskEXIT_CRITICAL(); 8024f0a: f000 ff83 bl 8025e14 { while( pxQueue->xRxLock > queueLOCKED_UNMODIFIED ) { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 8024f0e: f104 0510 add.w r5, r4, #16 pxQueue->xTxLock = queueUNLOCKED; } taskEXIT_CRITICAL(); /* Do the same for the Rx lock. */ taskENTER_CRITICAL(); 8024f12: f000 ff53 bl 8025dbc { while( pxQueue->xRxLock > queueLOCKED_UNMODIFIED ) 8024f16: e00a b.n 8024f2e { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 8024f18: 6923 ldr r3, [r4, #16] 8024f1a: b15b cbz r3, 8024f34 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) 8024f1c: 4628 mov r0, r5 8024f1e: f000 fdf3 bl 8025b08 8024f22: b108 cbz r0, 8024f28 { vTaskMissedYield(); 8024f24: f000 fe6a bl 8025bfc else { mtCOVERAGE_TEST_MARKER(); } --( pxQueue->xRxLock ); 8024f28: 6c63 ldr r3, [r4, #68] ; 0x44 8024f2a: 3b01 subs r3, #1 8024f2c: 6463 str r3, [r4, #68] ; 0x44 taskEXIT_CRITICAL(); /* Do the same for the Rx lock. */ taskENTER_CRITICAL(); { while( pxQueue->xRxLock > queueLOCKED_UNMODIFIED ) 8024f2e: 6c63 ldr r3, [r4, #68] ; 0x44 8024f30: 2b00 cmp r3, #0 8024f32: dcf1 bgt.n 8024f18 { break; } } pxQueue->xRxLock = queueUNLOCKED; 8024f34: f04f 33ff mov.w r3, #4294967295 8024f38: 6463 str r3, [r4, #68] ; 0x44 } taskEXIT_CRITICAL(); } 8024f3a: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} } } pxQueue->xRxLock = queueUNLOCKED; } taskEXIT_CRITICAL(); 8024f3e: f000 bf69 b.w 8025e14 08024f42 : #endif /* configUSE_TRACE_FACILITY */ /*-----------------------------------------------------------*/ static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition ) { 8024f42: b538 push {r3, r4, r5, lr} 8024f44: 4615 mov r5, r2 BaseType_t xReturn = pdFALSE; if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) 8024f46: 6c02 ldr r2, [r0, #64] ; 0x40 #endif /* configUSE_TRACE_FACILITY */ /*-----------------------------------------------------------*/ static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition ) { 8024f48: 4604 mov r4, r0 BaseType_t xReturn = pdFALSE; if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) 8024f4a: b93a cbnz r2, 8024f5c { #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 8024f4c: 6805 ldr r5, [r0, #0] 8024f4e: b105 cbz r5, 8024f52 8024f50: e028 b.n 8024fa4 { /* The mutex is no longer being held. */ xReturn = xTaskPriorityDisinherit( ( void * ) pxQueue->pxMutexHolder ); 8024f52: 6840 ldr r0, [r0, #4] 8024f54: f000 fea4 bl 8025ca0 pxQueue->pxMutexHolder = NULL; 8024f58: 6065 str r5, [r4, #4] 8024f5a: e024 b.n 8024fa6 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_MUTEXES */ } else if( xPosition == queueSEND_TO_BACK ) 8024f5c: b96d cbnz r5, 8024f7a { ( void ) memcpy( ( void * ) pxQueue->pcWriteTo, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 MISRA exception as the casts are only redundant for some ports, plus previous logic ensures a null pointer can only be passed to memcpy() if the copy size is 0. */ 8024f5e: 6880 ldr r0, [r0, #8] 8024f60: f7fc fb14 bl 802158c pxQueue->pcWriteTo += pxQueue->uxItemSize; 8024f64: 68a2 ldr r2, [r4, #8] 8024f66: 6c23 ldr r3, [r4, #64] ; 0x40 8024f68: 18d3 adds r3, r2, r3 if( pxQueue->pcWriteTo >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 8024f6a: 6862 ldr r2, [r4, #4] #endif /* configUSE_MUTEXES */ } else if( xPosition == queueSEND_TO_BACK ) { ( void ) memcpy( ( void * ) pxQueue->pcWriteTo, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 MISRA exception as the casts are only redundant for some ports, plus previous logic ensures a null pointer can only be passed to memcpy() if the copy size is 0. */ pxQueue->pcWriteTo += pxQueue->uxItemSize; 8024f6c: 60a3 str r3, [r4, #8] if( pxQueue->pcWriteTo >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 8024f6e: 4293 cmp r3, r2 8024f70: d318 bcc.n 8024fa4 { pxQueue->pcWriteTo = pxQueue->pcHead; 8024f72: 6823 ldr r3, [r4, #0] #endif /* configUSE_TRACE_FACILITY */ /*-----------------------------------------------------------*/ static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition ) { BaseType_t xReturn = pdFALSE; 8024f74: 4628 mov r0, r5 { ( void ) memcpy( ( void * ) pxQueue->pcWriteTo, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 MISRA exception as the casts are only redundant for some ports, plus previous logic ensures a null pointer can only be passed to memcpy() if the copy size is 0. */ pxQueue->pcWriteTo += pxQueue->uxItemSize; if( pxQueue->pcWriteTo >= pxQueue->pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ { pxQueue->pcWriteTo = pxQueue->pcHead; 8024f76: 60a3 str r3, [r4, #8] 8024f78: e015 b.n 8024fa6 mtCOVERAGE_TEST_MARKER(); } } else { ( void ) memcpy( ( void * ) pxQueue->u.pcReadFrom, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 8024f7a: 68c0 ldr r0, [r0, #12] 8024f7c: f7fc fb06 bl 802158c pxQueue->u.pcReadFrom -= pxQueue->uxItemSize; 8024f80: 6c23 ldr r3, [r4, #64] ; 0x40 8024f82: 68e2 ldr r2, [r4, #12] if( pxQueue->u.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 8024f84: 6821 ldr r1, [r4, #0] } } else { ( void ) memcpy( ( void * ) pxQueue->u.pcReadFrom, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ pxQueue->u.pcReadFrom -= pxQueue->uxItemSize; 8024f86: 425b negs r3, r3 8024f88: 18d2 adds r2, r2, r3 if( pxQueue->u.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 8024f8a: 428a cmp r2, r1 } } else { ( void ) memcpy( ( void * ) pxQueue->u.pcReadFrom, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ pxQueue->u.pcReadFrom -= pxQueue->uxItemSize; 8024f8c: 60e2 str r2, [r4, #12] if( pxQueue->u.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ 8024f8e: d202 bcs.n 8024f96 { pxQueue->u.pcReadFrom = ( pxQueue->pcTail - pxQueue->uxItemSize ); 8024f90: 6862 ldr r2, [r4, #4] 8024f92: 18d3 adds r3, r2, r3 8024f94: 60e3 str r3, [r4, #12] else { mtCOVERAGE_TEST_MARKER(); } if( xPosition == queueOVERWRITE ) 8024f96: 2d02 cmp r5, #2 8024f98: d104 bne.n 8024fa4 { if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 ) 8024f9a: 6ba3 ldr r3, [r4, #56] ; 0x38 8024f9c: b113 cbz r3, 8024fa4 { /* An item is not being added but overwritten, so subtract one from the recorded number of items in the queue so when one is added again below the number of recorded items remains correct. */ --( pxQueue->uxMessagesWaiting ); 8024f9e: 6ba3 ldr r3, [r4, #56] ; 0x38 8024fa0: 3b01 subs r3, #1 8024fa2: 63a3 str r3, [r4, #56] ; 0x38 #endif /* configUSE_TRACE_FACILITY */ /*-----------------------------------------------------------*/ static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void *pvItemToQueue, const BaseType_t xPosition ) { BaseType_t xReturn = pdFALSE; 8024fa4: 2000 movs r0, #0 { mtCOVERAGE_TEST_MARKER(); } } ++( pxQueue->uxMessagesWaiting ); 8024fa6: 6ba3 ldr r3, [r4, #56] ; 0x38 8024fa8: 3301 adds r3, #1 8024faa: 63a3 str r3, [r4, #56] ; 0x38 return xReturn; } 8024fac: bd38 pop {r3, r4, r5, pc} 08024fae : } \ taskEXIT_CRITICAL() /*-----------------------------------------------------------*/ BaseType_t xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue ) { 8024fae: b538 push {r3, r4, r5, lr} 8024fb0: 460d mov r5, r1 Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 8024fb2: 4604 mov r4, r0 8024fb4: b910 cbnz r0, 8024fbc 8024fb6: f000 fef9 bl 8025dac 8024fba: e7fe b.n 8024fba taskENTER_CRITICAL(); 8024fbc: f000 fefe bl 8025dbc { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); 8024fc0: 6823 ldr r3, [r4, #0] 8024fc2: 6be0 ldr r0, [r4, #60] ; 0x3c 8024fc4: 6c22 ldr r2, [r4, #64] ; 0x40 pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxQueue->pcWriteTo = pxQueue->pcHead; 8024fc6: 60a3 str r3, [r4, #8] configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); 8024fc8: fb00 3102 mla r1, r0, r2, r3 pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxQueue->pcWriteTo = pxQueue->pcHead; pxQueue->u.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - ( UBaseType_t ) 1U ) * pxQueue->uxItemSize ); 8024fcc: 3801 subs r0, #1 8024fce: fb02 3300 mla r3, r2, r0, r3 configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); 8024fd2: 6061 str r1, [r4, #4] pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxQueue->pcWriteTo = pxQueue->pcHead; pxQueue->u.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - ( UBaseType_t ) 1U ) * pxQueue->uxItemSize ); 8024fd4: 60e3 str r3, [r4, #12] configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; 8024fd6: 2100 movs r1, #0 pxQueue->pcWriteTo = pxQueue->pcHead; pxQueue->u.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - ( UBaseType_t ) 1U ) * pxQueue->uxItemSize ); pxQueue->xRxLock = queueUNLOCKED; 8024fd8: f04f 33ff mov.w r3, #4294967295 configASSERT( pxQueue ); taskENTER_CRITICAL(); { pxQueue->pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; 8024fdc: 63a1 str r1, [r4, #56] ; 0x38 pxQueue->pcWriteTo = pxQueue->pcHead; pxQueue->u.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - ( UBaseType_t ) 1U ) * pxQueue->uxItemSize ); pxQueue->xRxLock = queueUNLOCKED; 8024fde: 6463 str r3, [r4, #68] ; 0x44 pxQueue->xTxLock = queueUNLOCKED; 8024fe0: 64a3 str r3, [r4, #72] ; 0x48 if( xNewQueue == pdFALSE ) 8024fe2: b955 cbnz r5, 8024ffa /* If there are tasks blocked waiting to read from the queue, then the tasks will remain blocked as after this function exits the queue will still be empty. If there are tasks blocked waiting to write to the queue, then one should be unblocked as after this function exits it will be possible to write to it. */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 8024fe4: 6923 ldr r3, [r4, #16] 8024fe6: b183 cbz r3, 802500a { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) == pdTRUE ) 8024fe8: f104 0010 add.w r0, r4, #16 8024fec: f000 fd8c bl 8025b08 8024ff0: 2801 cmp r0, #1 8024ff2: d10a bne.n 802500a { queueYIELD_IF_USING_PREEMPTION(); 8024ff4: f000 fece bl 8025d94 8024ff8: e007 b.n 802500a } } else { /* Ensure the event queues start in the correct state. */ vListInitialise( &( pxQueue->xTasksWaitingToSend ) ); 8024ffa: f104 0010 add.w r0, r4, #16 8024ffe: f7ff ff17 bl 8024e30 vListInitialise( &( pxQueue->xTasksWaitingToReceive ) ); 8025002: f104 0024 add.w r0, r4, #36 ; 0x24 8025006: f7ff ff13 bl 8024e30 } } taskEXIT_CRITICAL(); 802500a: f000 ff03 bl 8025e14 /* A value is returned for calling semantic consistency with previous versions. */ return pdPASS; } 802500e: 2001 movs r0, #1 8025010: bd38 pop {r3, r4, r5, pc} 08025012 : /*-----------------------------------------------------------*/ QueueHandle_t xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType ) { 8025012: b5f8 push {r3, r4, r5, r6, r7, lr} 8025014: 460d mov r5, r1 8025016: 4617 mov r7, r2 /* Remove compiler warnings about unused parameters should configUSE_TRACE_FACILITY not be set to 1. */ ( void ) ucQueueType; configASSERT( uxQueueLength > ( UBaseType_t ) 0 ); 8025018: 4606 mov r6, r0 802501a: b910 cbnz r0, 8025022 802501c: f000 fec6 bl 8025dac 8025020: e7fe b.n 8025020 if( uxItemSize == ( UBaseType_t ) 0 ) 8025022: b111 cbz r1, 802502a } else { /* The queue is one byte longer than asked for to make wrap checking easier/faster. */ xQueueSizeInBytes = ( size_t ) ( uxQueueLength * uxItemSize ) + ( size_t ) 1; /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 8025024: 4348 muls r0, r1 8025026: 3001 adds r0, #1 8025028: e000 b.n 802502c configASSERT( uxQueueLength > ( UBaseType_t ) 0 ); if( uxItemSize == ( UBaseType_t ) 0 ) { /* There is not going to be a queue storage area. */ xQueueSizeInBytes = ( size_t ) 0; 802502a: 4608 mov r0, r1 easier/faster. */ xQueueSizeInBytes = ( size_t ) ( uxQueueLength * uxItemSize ) + ( size_t ) 1; /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ } /* Allocate the new queue structure and storage area. */ pcAllocatedBuffer = ( int8_t * ) pvPortMalloc( sizeof( Queue_t ) + xQueueSizeInBytes ); 802502c: 3054 adds r0, #84 ; 0x54 802502e: f000 ffd3 bl 8025fd8 if( pcAllocatedBuffer != NULL ) 8025032: 4604 mov r4, r0 8025034: b138 cbz r0, 8025046 { pxNewQueue = ( Queue_t * ) pcAllocatedBuffer; /*lint !e826 MISRA The buffer cannot be to small because it was dimensioned by sizeof( Queue_t ) + xQueueSizeInBytes. */ if( uxItemSize == ( UBaseType_t ) 0 ) 8025036: b90d cbnz r5, 802503c { /* No RAM was allocated for the queue storage area, but PC head cannot be set to NULL because NULL is used as a key to say the queue is used as a mutex. Therefore just set pcHead to point to the queue as a benign value that is known to be within the memory map. */ pxNewQueue->pcHead = ( int8_t * ) pxNewQueue; 8025038: 6020 str r0, [r4, #0] 802503a: e007 b.n 802504c } else { /* Jump past the queue structure to find the location of the queue storage area - adding the padding bytes to get a better alignment. */ pxNewQueue->pcHead = pcAllocatedBuffer + sizeof( Queue_t ); 802503c: f100 0354 add.w r3, r0, #84 ; 0x54 8025040: 6003 str r3, [r0, #0] 8025042: e003 b.n 802504c 8025044: e7fe b.n 8025044 else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); 8025046: f000 feb1 bl 8025dac 802504a: e7fb b.n 8025044 pxNewQueue->pcHead = pcAllocatedBuffer + sizeof( Queue_t ); } /* Initialise the queue members as described above where the queue type is defined. */ pxNewQueue->uxLength = uxQueueLength; 802504c: 63e6 str r6, [r4, #60] ; 0x3c pxNewQueue->uxItemSize = uxItemSize; 802504e: 6425 str r5, [r4, #64] ; 0x40 ( void ) xQueueGenericReset( pxNewQueue, pdTRUE ); 8025050: 4620 mov r0, r4 8025052: 2101 movs r1, #1 8025054: f7ff ffab bl 8024fae #if ( configUSE_TRACE_FACILITY == 1 ) { pxNewQueue->ucQueueType = ucQueueType; 8025058: f884 7050 strb.w r7, [r4, #80] ; 0x50 } configASSERT( xReturn ); return xReturn; } 802505c: 4620 mov r0, r4 802505e: bdf8 pop {r3, r4, r5, r6, r7, pc} 08025060 : /*-----------------------------------------------------------*/ #if ( configUSE_COUNTING_SEMAPHORES == 1 ) QueueHandle_t xQueueCreateCountingSemaphore( const UBaseType_t uxMaxCount, const UBaseType_t uxInitialCount ) { 8025060: b510 push {r4, lr} 8025062: 460c mov r4, r1 QueueHandle_t xHandle; configASSERT( uxMaxCount != 0 ); 8025064: b910 cbnz r0, 802506c 8025066: f000 fea1 bl 8025dac 802506a: e7fe b.n 802506a configASSERT( uxInitialCount <= uxMaxCount ); 802506c: 4281 cmp r1, r0 802506e: d902 bls.n 8025076 8025070: f000 fe9c bl 8025dac 8025074: e7fe b.n 8025074 xHandle = xQueueGenericCreate( uxMaxCount, queueSEMAPHORE_QUEUE_ITEM_LENGTH, queueQUEUE_TYPE_COUNTING_SEMAPHORE ); 8025076: 2100 movs r1, #0 8025078: 2202 movs r2, #2 802507a: f7ff ffca bl 8025012 if( xHandle != NULL ) 802507e: b110 cbz r0, 8025086 { ( ( Queue_t * ) xHandle )->uxMessagesWaiting = uxInitialCount; 8025080: 6384 str r4, [r0, #56] ; 0x38 8025082: bd10 pop {r4, pc} 8025084: e7fe b.n 8025084 else { traceCREATE_COUNTING_SEMAPHORE_FAILED(); } configASSERT( xHandle ); 8025086: f000 fe91 bl 8025dac 802508a: e7fb b.n 8025084 0802508c : #endif /* configUSE_COUNTING_SEMAPHORES */ /*-----------------------------------------------------------*/ BaseType_t xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition ) { 802508c: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 8025090: b085 sub sp, #20 8025092: 460f mov r7, r1 8025094: 9201 str r2, [sp, #4] 8025096: 461d mov r5, r3 BaseType_t xEntryTimeSet = pdFALSE, xYieldRequired; TimeOut_t xTimeOut; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 8025098: 4604 mov r4, r0 802509a: b910 cbnz r0, 80250a2 802509c: f000 fe86 bl 8025dac 80250a0: e7fe b.n 80250a0 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 80250a2: 2900 cmp r1, #0 80250a4: d177 bne.n 8025196 80250a6: 6c03 ldr r3, [r0, #64] ; 0x40 80250a8: 2b00 cmp r3, #0 80250aa: d074 beq.n 8025196 80250ac: e070 b.n 8025190 80250ae: e7fe b.n 80250ae configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 80250b0: 6be3 ldr r3, [r4, #60] ; 0x3c 80250b2: 2b01 cmp r3, #1 80250b4: d172 bne.n 802519c 80250b6: e002 b.n 80250be 80250b8: e7fe b.n 80250b8 80250ba: 2601 movs r6, #1 80250bc: e002 b.n 80250c4 80250be: 2600 movs r6, #0 /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); prvLockQueue( pxQueue ); 80250c0: f04f 0800 mov.w r8, #0 /* This function relaxes the coding standard somewhat to allow return statements within the function itself. This is done in the interest of execution time efficiency. */ for( ;; ) { taskENTER_CRITICAL(); 80250c4: f000 fe7a bl 8025dbc { /* Is there room on the queue now? The running task must be the highest priority task wanting to access the queue. If the head item in the queue is to be overwritten then it does not matter if the queue is full. */ if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 80250c8: 6ba2 ldr r2, [r4, #56] ; 0x38 80250ca: 6be3 ldr r3, [r4, #60] ; 0x3c 80250cc: 429a cmp r2, r3 80250ce: d301 bcc.n 80250d4 80250d0: 2d02 cmp r5, #2 80250d2: d115 bne.n 8025100 { traceQUEUE_SEND( pxQueue ); xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); 80250d4: 4620 mov r0, r4 80250d6: 4639 mov r1, r7 80250d8: 462a mov r2, r5 80250da: f7ff ff32 bl 8024f42 } #else /* configUSE_QUEUE_SETS */ { /* If there was a task waiting for data to arrive on the queue then unblock it now. */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 80250de: 6a63 ldr r3, [r4, #36] ; 0x24 80250e0: b143 cbz r3, 80250f4 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) == pdTRUE ) 80250e2: f104 0024 add.w r0, r4, #36 ; 0x24 80250e6: f000 fd0f bl 8025b08 80250ea: 2801 cmp r0, #1 80250ec: d104 bne.n 80250f8 { /* The unblocked task has a priority higher than our own so yield immediately. Yes it is ok to do this from within the critical section - the kernel takes care of that. */ queueYIELD_IF_USING_PREEMPTION(); 80250ee: f000 fe51 bl 8025d94 80250f2: e001 b.n 80250f8 else { mtCOVERAGE_TEST_MARKER(); } } else if( xYieldRequired != pdFALSE ) 80250f4: 2800 cmp r0, #0 80250f6: d1fa bne.n 80250ee mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_QUEUE_SETS */ taskEXIT_CRITICAL(); 80250f8: f000 fe8c bl 8025e14 return pdPASS; 80250fc: 2001 movs r0, #1 80250fe: e050 b.n 80251a2 } else { if( xTicksToWait == ( TickType_t ) 0 ) 8025100: f8dd 9004 ldr.w r9, [sp, #4] 8025104: f1b9 0f00 cmp.w r9, #0 8025108: d102 bne.n 8025110 { /* The queue was full and no block time is specified (or the block time has expired) so leave now. */ taskEXIT_CRITICAL(); 802510a: f000 fe83 bl 8025e14 802510e: e03d b.n 802518c /* Return to the original privilege level before exiting the function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; } else if( xEntryTimeSet == pdFALSE ) 8025110: b916 cbnz r6, 8025118 { /* The queue was full and a block time was specified so configure the timeout structure. */ vTaskSetTimeOutState( &xTimeOut ); 8025112: a802 add r0, sp, #8 8025114: f000 fd34 bl 8025b80 /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 8025118: f000 fe7c bl 8025e14 /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); 802511c: f000 fb24 bl 8025768 prvLockQueue( pxQueue ); 8025120: f000 fe4c bl 8025dbc 8025124: 6c63 ldr r3, [r4, #68] ; 0x44 8025126: 3301 adds r3, #1 8025128: bf08 it eq 802512a: f8c4 8044 streq.w r8, [r4, #68] ; 0x44 802512e: 6ca3 ldr r3, [r4, #72] ; 0x48 8025130: 3301 adds r3, #1 8025132: bf08 it eq 8025134: f8c4 8048 streq.w r8, [r4, #72] ; 0x48 8025138: f000 fe6c bl 8025e14 /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 802513c: a802 add r0, sp, #8 802513e: a901 add r1, sp, #4 8025140: f000 fd2e bl 8025ba0 8025144: b9e8 cbnz r0, 8025182 static BaseType_t prvIsQueueFull( const Queue_t *pxQueue ) { BaseType_t xReturn; taskENTER_CRITICAL(); 8025146: f000 fe39 bl 8025dbc { if( pxQueue->uxMessagesWaiting == pxQueue->uxLength ) 802514a: f8d4 9038 ldr.w r9, [r4, #56] ; 0x38 802514e: 6be6 ldr r6, [r4, #60] ; 0x3c else { xReturn = pdFALSE; } } taskEXIT_CRITICAL(); 8025150: f000 fe60 bl 8025e14 prvLockQueue( pxQueue ); /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) { if( prvIsQueueFull( pxQueue ) != pdFALSE ) 8025154: 45b1 cmp r9, r6 8025156: d10e bne.n 8025176 { traceBLOCKING_ON_QUEUE_SEND( pxQueue ); vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait ); 8025158: f104 0010 add.w r0, r4, #16 802515c: 9901 ldr r1, [sp, #4] 802515e: f000 fc9f bl 8025aa0 /* Unlocking the queue means queue events can effect the event list. It is possible that interrupts occurring now remove this task from the event list again - but as the scheduler is suspended the task will go onto the pending ready last instead of the actual ready list. */ prvUnlockQueue( pxQueue ); 8025162: 4620 mov r0, r4 8025164: f7ff feb9 bl 8024eda /* Resuming the scheduler will move tasks from the pending ready list into the ready list - so it is feasible that this task is already in a ready list before it yields - in which case the yield will not cause a context switch unless there is also a higher priority task in the pending ready list. */ if( xTaskResumeAll() == pdFALSE ) 8025168: f000 fb9a bl 80258a0 802516c: 2800 cmp r0, #0 802516e: d1a4 bne.n 80250ba { portYIELD_WITHIN_API(); 8025170: f000 fe10 bl 8025d94 8025174: e7a1 b.n 80250ba } } else { /* Try again. */ prvUnlockQueue( pxQueue ); 8025176: 4620 mov r0, r4 8025178: f7ff feaf bl 8024eda ( void ) xTaskResumeAll(); 802517c: f000 fb90 bl 80258a0 8025180: e79b b.n 80250ba } } else { /* The timeout has expired. */ prvUnlockQueue( pxQueue ); 8025182: 4620 mov r0, r4 8025184: f7ff fea9 bl 8024eda ( void ) xTaskResumeAll(); 8025188: f000 fb8a bl 80258a0 /* Return to the original privilege level before exiting the function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; 802518c: 2000 movs r0, #0 802518e: e008 b.n 80251a2 BaseType_t xEntryTimeSet = pdFALSE, xYieldRequired; TimeOut_t xTimeOut; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8025190: f000 fe0c bl 8025dac 8025194: e78b b.n 80250ae configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 8025196: 2d02 cmp r5, #2 8025198: d191 bne.n 80250be 802519a: e789 b.n 80250b0 802519c: f000 fe06 bl 8025dac 80251a0: e78a b.n 80250b8 function. */ traceQUEUE_SEND_FAILED( pxQueue ); return errQUEUE_FULL; } } } 80251a2: b005 add sp, #20 80251a4: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 080251a8 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) QueueHandle_t xQueueCreateMutex( const uint8_t ucQueueType ) { 80251a8: b570 push {r4, r5, r6, lr} 80251aa: 4606 mov r6, r0 /* Prevent compiler warnings about unused parameters if configUSE_TRACE_FACILITY does not equal 1. */ ( void ) ucQueueType; /* Allocate the new queue structure. */ pxNewQueue = ( Queue_t * ) pvPortMalloc( sizeof( Queue_t ) ); 80251ac: 2054 movs r0, #84 ; 0x54 80251ae: f000 ff13 bl 8025fd8 if( pxNewQueue != NULL ) 80251b2: 4604 mov r4, r0 80251b4: b108 cbz r0, 80251ba 80251b6: e003 b.n 80251c0 80251b8: e7fe b.n 80251b8 else { traceCREATE_MUTEX_FAILED(); } configASSERT( pxNewQueue ); 80251ba: f000 fdf7 bl 8025dac 80251be: e7fb b.n 80251b8 /* Each mutex has a length of 1 (like a binary semaphore) and an item size of 0 as nothing is actually copied into or out of the mutex. */ pxNewQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxNewQueue->uxLength = ( UBaseType_t ) 1U; 80251c0: 2301 movs r3, #1 /* Allocate the new queue structure. */ pxNewQueue = ( Queue_t * ) pvPortMalloc( sizeof( Queue_t ) ); if( pxNewQueue != NULL ) { /* Information required for priority inheritance. */ pxNewQueue->pxMutexHolder = NULL; 80251c2: 2500 movs r5, #0 /* Each mutex has a length of 1 (like a binary semaphore) and an item size of 0 as nothing is actually copied into or out of the mutex. */ pxNewQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxNewQueue->uxLength = ( UBaseType_t ) 1U; 80251c4: 63c3 str r3, [r0, #60] ; 0x3c pxNewQueue->uxItemSize = ( UBaseType_t ) 0U; pxNewQueue->xRxLock = queueUNLOCKED; 80251c6: f04f 33ff mov.w r3, #4294967295 pxNewQueue->u.pcReadFrom = NULL; /* Each mutex has a length of 1 (like a binary semaphore) and an item size of 0 as nothing is actually copied into or out of the mutex. */ pxNewQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; 80251ca: 6385 str r5, [r0, #56] ; 0x38 /* Allocate the new queue structure. */ pxNewQueue = ( Queue_t * ) pvPortMalloc( sizeof( Queue_t ) ); if( pxNewQueue != NULL ) { /* Information required for priority inheritance. */ pxNewQueue->pxMutexHolder = NULL; 80251cc: 6045 str r5, [r0, #4] an item size of 0 as nothing is actually copied into or out of the mutex. */ pxNewQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxNewQueue->uxLength = ( UBaseType_t ) 1U; pxNewQueue->uxItemSize = ( UBaseType_t ) 0U; pxNewQueue->xRxLock = queueUNLOCKED; 80251ce: 6443 str r3, [r0, #68] ; 0x44 pxNewQueue = ( Queue_t * ) pvPortMalloc( sizeof( Queue_t ) ); if( pxNewQueue != NULL ) { /* Information required for priority inheritance. */ pxNewQueue->pxMutexHolder = NULL; pxNewQueue->uxQueueType = queueQUEUE_IS_MUTEX; 80251d0: 6005 str r5, [r0, #0] of the mutex. */ pxNewQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxNewQueue->uxLength = ( UBaseType_t ) 1U; pxNewQueue->uxItemSize = ( UBaseType_t ) 0U; pxNewQueue->xRxLock = queueUNLOCKED; pxNewQueue->xTxLock = queueUNLOCKED; 80251d2: 6483 str r3, [r0, #72] ; 0x48 pxNewQueue->pxMutexHolder = NULL; pxNewQueue->uxQueueType = queueQUEUE_IS_MUTEX; /* Queues used as a mutex no data is actually copied into or out of the queue. */ pxNewQueue->pcWriteTo = NULL; 80251d4: 6085 str r5, [r0, #8] pxNewQueue->u.pcReadFrom = NULL; 80251d6: 60c5 str r5, [r0, #12] /* Each mutex has a length of 1 (like a binary semaphore) and an item size of 0 as nothing is actually copied into or out of the mutex. */ pxNewQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; pxNewQueue->uxLength = ( UBaseType_t ) 1U; pxNewQueue->uxItemSize = ( UBaseType_t ) 0U; 80251d8: 6405 str r5, [r0, #64] ; 0x40 pxNewQueue->xRxLock = queueUNLOCKED; pxNewQueue->xTxLock = queueUNLOCKED; #if ( configUSE_TRACE_FACILITY == 1 ) { pxNewQueue->ucQueueType = ucQueueType; 80251da: f880 6050 strb.w r6, [r0, #80] ; 0x50 pxNewQueue->pxQueueSetContainer = NULL; } #endif /* Ensure the event queues start with the correct state. */ vListInitialise( &( pxNewQueue->xTasksWaitingToSend ) ); 80251de: 3010 adds r0, #16 80251e0: f7ff fe26 bl 8024e30 vListInitialise( &( pxNewQueue->xTasksWaitingToReceive ) ); 80251e4: f104 0024 add.w r0, r4, #36 ; 0x24 80251e8: f7ff fe22 bl 8024e30 traceCREATE_MUTEX( pxNewQueue ); /* Start with the semaphore in the expected state. */ ( void ) xQueueGenericSend( pxNewQueue, NULL, ( TickType_t ) 0U, queueSEND_TO_BACK ); 80251ec: 4620 mov r0, r4 80251ee: 4629 mov r1, r5 80251f0: 462a mov r2, r5 80251f2: 462b mov r3, r5 80251f4: f7ff ff4a bl 802508c traceCREATE_MUTEX_FAILED(); } configASSERT( pxNewQueue ); return pxNewQueue; } 80251f8: 4620 mov r0, r4 80251fa: bd70 pop {r4, r5, r6, pc} 080251fc : #endif /* configUSE_ALTERNATIVE_API */ /*-----------------------------------------------------------*/ BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition ) { 80251fc: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8025200: 460f mov r7, r1 8025202: 4616 mov r6, r2 8025204: 461d mov r5, r3 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 8025206: 4604 mov r4, r0 8025208: b910 cbnz r0, 8025210 802520a: f000 fdcf bl 8025dac 802520e: e7fe b.n 802520e configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8025210: bb41 cbnz r1, 8025264 8025212: 6c03 ldr r3, [r0, #64] ; 0x40 8025214: b333 cbz r3, 8025264 8025216: e022 b.n 802525e 8025218: e7fe b.n 8025218 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 802521a: 6be3 ldr r3, [r4, #60] ; 0x3c 802521c: 2b01 cmp r3, #1 802521e: d124 bne.n 802526a 8025220: e026 b.n 8025270 8025222: e7fe b.n 8025222 read, instead return a flag to say whether a context switch is required or not (i.e. has a task with a higher priority than us been woken by this post). */ uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); { if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 8025224: 2d02 cmp r5, #2 8025226: d118 bne.n 802525a /* A task can only have an inherited priority if it is a mutex holder - and if there is a mutex holder then the mutex cannot be given from an ISR. Therefore, unlike the xQueueGenericGive() function, there is no need to determine the need for priority disinheritance here or to clear the mutex holder TCB member. */ ( void ) prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); 8025228: 4620 mov r0, r4 802522a: 4639 mov r1, r7 802522c: 462a mov r2, r5 802522e: f7ff fe88 bl 8024f42 /* The event list is not altered if the queue is locked. This will be done when the queue is unlocked later. */ if( pxQueue->xTxLock == queueUNLOCKED ) 8025232: 6ca3 ldr r3, [r4, #72] ; 0x48 8025234: 3301 adds r3, #1 8025236: d10b bne.n 8025250 } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 8025238: 6a63 ldr r3, [r4, #36] ; 0x24 802523a: b903 cbnz r3, 802523e 802523c: e00b b.n 8025256 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 802523e: f104 0024 add.w r0, r4, #36 ; 0x24 8025242: f000 fc61 bl 8025b08 8025246: b130 cbz r0, 8025256 { /* The task waiting has a higher priority so record that a context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) 8025248: b12e cbz r6, 8025256 { *pxHigherPriorityTaskWoken = pdTRUE; 802524a: 2401 movs r4, #1 802524c: 6034 str r4, [r6, #0] 802524e: e019 b.n 8025284 } else { /* Increment the lock count so the task that unlocks the queue knows that data was posted while it was locked. */ ++( pxQueue->xTxLock ); 8025250: 6ca3 ldr r3, [r4, #72] ; 0x48 8025252: 3301 adds r3, #1 8025254: 64a3 str r3, [r4, #72] ; 0x48 } xReturn = pdPASS; 8025256: 2401 movs r4, #1 8025258: e014 b.n 8025284 } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; 802525a: 2400 movs r4, #0 802525c: e012 b.n 8025284 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802525e: f000 fda5 bl 8025dac 8025262: e7d9 b.n 8025218 configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); 8025264: 2d02 cmp r5, #2 8025266: d103 bne.n 8025270 8025268: e7d7 b.n 802521a 802526a: f000 fd9f bl 8025dac 802526e: e7d8 b.n 8025222 that have been assigned a priority at or (logically) below the maximum system call interrupt priority. FreeRTOS maintains a separate interrupt safe API to ensure interrupt entry is as fast and as simple as possible. More information (albeit Cortex-M specific) is provided on the following link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */ portASSERT_IF_INTERRUPT_PRIORITY_INVALID(); 8025270: f000 fe6c bl 8025f4c /* Similar to xQueueGenericSend, except without blocking if there is no room in the queue. Also don't directly wake a task that was blocked on a queue read, instead return a flag to say whether a context switch is required or not (i.e. has a task with a higher priority than us been woken by this post). */ uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 8025274: f000 fd9a bl 8025dac { if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 8025278: 6ba2 ldr r2, [r4, #56] ; 0x38 802527a: 6be3 ldr r3, [r4, #60] ; 0x3c 802527c: 429a cmp r2, r3 /* Similar to xQueueGenericSend, except without blocking if there is no room in the queue. Also don't directly wake a task that was blocked on a queue read, instead return a flag to say whether a context switch is required or not (i.e. has a task with a higher priority than us been woken by this post). */ uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 802527e: 4680 mov r8, r0 { if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) 8025280: d2d0 bcs.n 8025224 8025282: e7d1 b.n 8025228 { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); 8025284: 4640 mov r0, r8 8025286: f000 fdc1 bl 8025e0c return xReturn; } 802528a: 4620 mov r0, r4 802528c: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 08025290 : /*-----------------------------------------------------------*/ BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue, BaseType_t * const pxHigherPriorityTaskWoken ) { 8025290: b5f8 push {r3, r4, r5, r6, r7, lr} 8025292: 460d mov r5, r1 BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 8025294: 4604 mov r4, r0 8025296: b910 cbnz r0, 802529e 8025298: f000 fd88 bl 8025dac 802529c: e7fe b.n 802529c /* xQueueGenericSendFromISR() should be used in the item size is not 0. */ configASSERT( pxQueue->uxItemSize == 0 ); 802529e: 6c06 ldr r6, [r0, #64] ; 0x40 80252a0: b116 cbz r6, 80252a8 80252a2: f000 fd83 bl 8025dac 80252a6: e7fe b.n 80252a6 that have been assigned a priority at or (logically) below the maximum system call interrupt priority. FreeRTOS maintains a separate interrupt safe API to ensure interrupt entry is as fast and as simple as possible. More information (albeit Cortex-M specific) is provided on the following link: http://www.freertos.org/RTOS-Cortex-M3-M4.html */ portASSERT_IF_INTERRUPT_PRIORITY_INVALID(); 80252a8: f000 fe50 bl 8025f4c /* Similar to xQueueGenericSendFromISR() but used with semaphores where the item size is 0. Don't directly wake a task that was blocked on a queue read, instead return a flag to say whether a context switch is required or not (i.e. has a task with a higher priority than us been woken by this post). */ uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 80252ac: f000 fd7e bl 8025dac { /* When the queue is used to implement a semaphore no data is ever moved through the queue but it is still valid to see if the queue 'has space'. */ if( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) 80252b0: 6ba2 ldr r2, [r4, #56] ; 0x38 80252b2: 6be3 ldr r3, [r4, #60] ; 0x3c 80252b4: 429a cmp r2, r3 /* Similar to xQueueGenericSendFromISR() but used with semaphores where the item size is 0. Don't directly wake a task that was blocked on a queue read, instead return a flag to say whether a context switch is required or not (i.e. has a task with a higher priority than us been woken by this post). */ uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); 80252b6: 4607 mov r7, r0 { /* When the queue is used to implement a semaphore no data is ever moved through the queue but it is still valid to see if the queue 'has space'. */ if( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) 80252b8: d216 bcs.n 80252e8 holder - and if there is a mutex holder then the mutex cannot be given from an ISR. Therefore, unlike the xQueueGenericGive() function, there is no need to determine the need for priority disinheritance here or to clear the mutex holder TCB member. */ ++( pxQueue->uxMessagesWaiting ); 80252ba: 6ba3 ldr r3, [r4, #56] ; 0x38 80252bc: 3301 adds r3, #1 80252be: 63a3 str r3, [r4, #56] ; 0x38 /* The event list is not altered if the queue is locked. This will be done when the queue is unlocked later. */ if( pxQueue->xTxLock == queueUNLOCKED ) 80252c0: 6ca3 ldr r3, [r4, #72] ; 0x48 80252c2: 3301 adds r3, #1 80252c4: d10b bne.n 80252de } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 80252c6: 6a63 ldr r3, [r4, #36] ; 0x24 80252c8: b903 cbnz r3, 80252cc 80252ca: e00b b.n 80252e4 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 80252cc: f104 0024 add.w r0, r4, #36 ; 0x24 80252d0: f000 fc1a bl 8025b08 80252d4: b130 cbz r0, 80252e4 { /* The task waiting has a higher priority so record that a context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) 80252d6: b12d cbz r5, 80252e4 { *pxHigherPriorityTaskWoken = pdTRUE; 80252d8: 2401 movs r4, #1 80252da: 602c str r4, [r5, #0] 80252dc: e005 b.n 80252ea } else { /* Increment the lock count so the task that unlocks the queue knows that data was posted while it was locked. */ ++( pxQueue->xTxLock ); 80252de: 6ca3 ldr r3, [r4, #72] ; 0x48 80252e0: 3301 adds r3, #1 80252e2: 64a3 str r3, [r4, #72] ; 0x48 } xReturn = pdPASS; 80252e4: 2401 movs r4, #1 80252e6: e000 b.n 80252ea } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); xReturn = errQUEUE_FULL; 80252e8: 4634 mov r4, r6 } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); 80252ea: 4638 mov r0, r7 80252ec: f000 fd8e bl 8025e0c return xReturn; } 80252f0: 4620 mov r0, r4 80252f2: bdf8 pop {r3, r4, r5, r6, r7, pc} 080252f4 : /*-----------------------------------------------------------*/ BaseType_t xQueueGenericReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait, const BaseType_t xJustPeeking ) { 80252f4: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 80252f8: b085 sub sp, #20 80252fa: 460d mov r5, r1 80252fc: 9201 str r2, [sp, #4] 80252fe: 4699 mov r9, r3 BaseType_t xEntryTimeSet = pdFALSE; TimeOut_t xTimeOut; int8_t *pcOriginalReadPosition; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 8025300: 4604 mov r4, r0 8025302: b910 cbnz r0, 802530a 8025304: f000 fd52 bl 8025dac 8025308: e7fe b.n 8025308 configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 802530a: b929 cbnz r1, 8025318 802530c: 6c03 ldr r3, [r0, #64] ; 0x40 802530e: b12b cbz r3, 802531c 8025310: e07e b.n 8025410 8025312: e7fe b.n 8025312 8025314: 2601 movs r6, #1 8025316: e003 b.n 8025320 8025318: 2600 movs r6, #0 802531a: e000 b.n 802531e 802531c: 460e mov r6, r1 /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); prvLockQueue( pxQueue ); 802531e: 2700 movs r7, #0 statements within the function itself. This is done in the interest of execution time efficiency. */ for( ;; ) { taskENTER_CRITICAL(); 8025320: f000 fd4c bl 8025dbc { /* Is there data in the queue now? To be running the calling task must be the highest priority task wanting to access the queue. */ if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 ) 8025324: 6ba3 ldr r3, [r4, #56] ; 0x38 8025326: b33b cbz r3, 8025378 { /* Remember the read position in case the queue is only being peeked. */ pcOriginalReadPosition = pxQueue->u.pcReadFrom; prvCopyDataFromQueue( pxQueue, pvBuffer ); 8025328: 4620 mov r0, r4 802532a: 4629 mov r1, r5 must be the highest priority task wanting to access the queue. */ if( pxQueue->uxMessagesWaiting > ( UBaseType_t ) 0 ) { /* Remember the read position in case the queue is only being peeked. */ pcOriginalReadPosition = pxQueue->u.pcReadFrom; 802532c: 68e6 ldr r6, [r4, #12] prvCopyDataFromQueue( pxQueue, pvBuffer ); 802532e: f7ff fdc1 bl 8024eb4 if( xJustPeeking == pdFALSE ) 8025332: f1b9 0f00 cmp.w r9, #0 8025336: d112 bne.n 802535e { traceQUEUE_RECEIVE( pxQueue ); /* Actually removing data, not just peeking. */ --( pxQueue->uxMessagesWaiting ); 8025338: 6ba3 ldr r3, [r4, #56] ; 0x38 802533a: 3b01 subs r3, #1 802533c: 63a3 str r3, [r4, #56] ; 0x38 #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 802533e: 6823 ldr r3, [r4, #0] 8025340: b913 cbnz r3, 8025348 { /* Record the information required to implement priority inheritance should it become necessary. */ pxQueue->pxMutexHolder = ( int8_t * ) pvTaskIncrementMutexHeldCount(); /*lint !e961 Cast is not redundant as TaskHandle_t is a typedef. */ 8025342: f000 fceb bl 8025d1c 8025346: 6060 str r0, [r4, #4] mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_MUTEXES */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) 8025348: 6923 ldr r3, [r4, #16] 802534a: b18b cbz r3, 8025370 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) == pdTRUE ) 802534c: f104 0010 add.w r0, r4, #16 8025350: f000 fbda bl 8025b08 8025354: 2801 cmp r0, #1 8025356: d10b bne.n 8025370 { queueYIELD_IF_USING_PREEMPTION(); 8025358: f000 fd1c bl 8025d94 802535c: e008 b.n 8025370 pointer. */ pxQueue->u.pcReadFrom = pcOriginalReadPosition; /* The data is being left in the queue, so see if there are any other tasks waiting for the data. */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 802535e: 6a63 ldr r3, [r4, #36] ; 0x24 { traceQUEUE_PEEK( pxQueue ); /* The data is not being removed, so reset the read pointer. */ pxQueue->u.pcReadFrom = pcOriginalReadPosition; 8025360: 60e6 str r6, [r4, #12] /* The data is being left in the queue, so see if there are any other tasks waiting for the data. */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) 8025362: b12b cbz r3, 8025370 { /* Tasks that are removed from the event list will get added to the pending ready list as the scheduler is still suspended. */ if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) 8025364: f104 0024 add.w r0, r4, #36 ; 0x24 8025368: f000 fbce bl 8025b08 802536c: 2800 cmp r0, #0 802536e: d1f3 bne.n 8025358 { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 8025370: f000 fd50 bl 8025e14 return pdPASS; 8025374: 2001 movs r0, #1 8025376: e04e b.n 8025416 } else { if( xTicksToWait == ( TickType_t ) 0 ) 8025378: f8dd 8004 ldr.w r8, [sp, #4] 802537c: f1b8 0f00 cmp.w r8, #0 8025380: d102 bne.n 8025388 { /* The queue was empty and no block time is specified (or the block time has expired) so leave now. */ taskEXIT_CRITICAL(); 8025382: f000 fd47 bl 8025e14 8025386: e041 b.n 802540c traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; } else if( xEntryTimeSet == pdFALSE ) 8025388: b916 cbnz r6, 8025390 { /* The queue was empty and a block time was specified so configure the timeout structure. */ vTaskSetTimeOutState( &xTimeOut ); 802538a: a802 add r0, sp, #8 802538c: f000 fbf8 bl 8025b80 /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); 8025390: f000 fd40 bl 8025e14 /* Interrupts and other tasks can send to and receive from the queue now the critical section has been exited. */ vTaskSuspendAll(); 8025394: f000 f9e8 bl 8025768 prvLockQueue( pxQueue ); 8025398: f000 fd10 bl 8025dbc 802539c: 6c63 ldr r3, [r4, #68] ; 0x44 802539e: 3301 adds r3, #1 80253a0: bf08 it eq 80253a2: 6467 streq r7, [r4, #68] ; 0x44 80253a4: 6ca3 ldr r3, [r4, #72] ; 0x48 80253a6: 3301 adds r3, #1 80253a8: bf08 it eq 80253aa: 64a7 streq r7, [r4, #72] ; 0x48 80253ac: f000 fd32 bl 8025e14 /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) 80253b0: a802 add r0, sp, #8 80253b2: a901 add r1, sp, #4 80253b4: f000 fbf4 bl 8025ba0 80253b8: bb18 cbnz r0, 8025402 static BaseType_t prvIsQueueEmpty( const Queue_t *pxQueue ) { BaseType_t xReturn; taskENTER_CRITICAL(); 80253ba: f000 fcff bl 8025dbc { if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 ) 80253be: 6ba6 ldr r6, [r4, #56] ; 0x38 else { xReturn = pdFALSE; } } taskEXIT_CRITICAL(); 80253c0: f000 fd28 bl 8025e14 prvLockQueue( pxQueue ); /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) { if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) 80253c4: b9be cbnz r6, 80253f6 { traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ); #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) 80253c6: 6823 ldr r3, [r4, #0] 80253c8: b933 cbnz r3, 80253d8 { taskENTER_CRITICAL(); 80253ca: f000 fcf7 bl 8025dbc { vTaskPriorityInherit( ( void * ) pxQueue->pxMutexHolder ); 80253ce: 6860 ldr r0, [r4, #4] 80253d0: f000 fc1a bl 8025c08 } taskEXIT_CRITICAL(); 80253d4: f000 fd1e bl 8025e14 mtCOVERAGE_TEST_MARKER(); } } #endif vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); 80253d8: f104 0024 add.w r0, r4, #36 ; 0x24 80253dc: 9901 ldr r1, [sp, #4] 80253de: f000 fb5f bl 8025aa0 prvUnlockQueue( pxQueue ); 80253e2: 4620 mov r0, r4 80253e4: f7ff fd79 bl 8024eda if( xTaskResumeAll() == pdFALSE ) 80253e8: f000 fa5a bl 80258a0 80253ec: 2800 cmp r0, #0 80253ee: d191 bne.n 8025314 { portYIELD_WITHIN_API(); 80253f0: f000 fcd0 bl 8025d94 80253f4: e78e b.n 8025314 } } else { /* Try again. */ prvUnlockQueue( pxQueue ); 80253f6: 4620 mov r0, r4 80253f8: f7ff fd6f bl 8024eda ( void ) xTaskResumeAll(); 80253fc: f000 fa50 bl 80258a0 8025400: e788 b.n 8025314 } } else { prvUnlockQueue( pxQueue ); 8025402: 4620 mov r0, r4 8025404: f7ff fd69 bl 8024eda ( void ) xTaskResumeAll(); 8025408: f000 fa4a bl 80258a0 traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; 802540c: 2000 movs r0, #0 802540e: e002 b.n 8025416 TimeOut_t xTimeOut; int8_t *pcOriginalReadPosition; Queue_t * const pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); configASSERT( !( ( pvBuffer == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); 8025410: f000 fccc bl 8025dac 8025414: e77d b.n 8025312 ( void ) xTaskResumeAll(); traceQUEUE_RECEIVE_FAILED( pxQueue ); return errQUEUE_EMPTY; } } } 8025416: b005 add sp, #20 8025418: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 0802541c : return uxReturn; } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ /*-----------------------------------------------------------*/ UBaseType_t uxQueueSpacesAvailable( const QueueHandle_t xQueue ) { 802541c: b510 push {r4, lr} UBaseType_t uxReturn; Queue_t *pxQueue; pxQueue = ( Queue_t * ) xQueue; configASSERT( pxQueue ); 802541e: 4604 mov r4, r0 8025420: b910 cbnz r0, 8025428 8025422: f000 fcc3 bl 8025dac 8025426: e7fe b.n 8025426 taskENTER_CRITICAL(); 8025428: f000 fcc8 bl 8025dbc { uxReturn = pxQueue->uxLength - pxQueue->uxMessagesWaiting; 802542c: 6ba3 ldr r3, [r4, #56] ; 0x38 802542e: 6be4 ldr r4, [r4, #60] ; 0x3c 8025430: 1ae4 subs r4, r4, r3 } taskEXIT_CRITICAL(); 8025432: f000 fcef bl 8025e14 return uxReturn; } /*lint !e818 Pointer cannot be declared const as xQueue is a typedef not pointer. */ 8025436: 4620 mov r0, r4 8025438: bd10 pop {r4, pc} 802543a: 0000 movs r0, r0 0802543c : static void prvResetNextTaskUnblockTime( void ) { TCB_t *pxTCB; if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 802543c: 4a06 ldr r2, [pc, #24] ; (8025458 ) 802543e: 6813 ldr r3, [r2, #0] 8025440: 6819 ldr r1, [r3, #0] 8025442: 4b06 ldr r3, [pc, #24] ; (802545c ) 8025444: b911 cbnz r1, 802544c /* The new current delayed list is empty. Set xNextTaskUnblockTime to the maximum possible value so it is extremely unlikely that the if( xTickCount >= xNextTaskUnblockTime ) test will pass until there is an item in the delayed list. */ xNextTaskUnblockTime = portMAX_DELAY; 8025446: f04f 32ff mov.w r2, #4294967295 802544a: e003 b.n 8025454 { /* The new current delayed list is not empty, get the value of the item at the head of the delayed list. This is the time at which the task at the head of the delayed list should be removed from the Blocked state. */ ( pxTCB ) = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList ); 802544c: 6812 ldr r2, [r2, #0] 802544e: 68d2 ldr r2, [r2, #12] xNextTaskUnblockTime = listGET_LIST_ITEM_VALUE( &( ( pxTCB )->xGenericListItem ) ); 8025450: 68d2 ldr r2, [r2, #12] 8025452: 6852 ldr r2, [r2, #4] 8025454: 601a str r2, [r3, #0] 8025456: 4770 bx lr 8025458: 20002394 .word 0x20002394 802545c: 200010f8 .word 0x200010f8 08025460 : /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) { /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); 8025460: 4b0e ldr r3, [pc, #56] ; (802549c ) 8025462: 681a ldr r2, [r3, #0] #endif /* vTaskDelete */ } /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) { 8025464: b510 push {r4, lr} /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); 8025466: 6050 str r0, [r2, #4] if( xTimeToWake < xTickCount ) 8025468: 4a0d ldr r2, [pc, #52] ; (80254a0 ) 802546a: 6812 ldr r2, [r2, #0] 802546c: 4290 cmp r0, r2 #endif /* vTaskDelete */ } /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( const TickType_t xTimeToWake ) { 802546e: 4604 mov r4, r0 /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); if( xTimeToWake < xTickCount ) 8025470: d207 bcs.n 8025482 { /* Wake time has overflowed. Place this item in the overflow list. */ vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xGenericListItem ) ); 8025472: 4a0c ldr r2, [pc, #48] ; (80254a4 ) 8025474: 6810 ldr r0, [r2, #0] 8025476: 6819 ldr r1, [r3, #0] 8025478: 3104 adds r1, #4 else { mtCOVERAGE_TEST_MARKER(); } } } 802547a: e8bd 4010 ldmia.w sp!, {r4, lr} listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xGenericListItem ), xTimeToWake ); if( xTimeToWake < xTickCount ) { /* Wake time has overflowed. Place this item in the overflow list. */ vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xGenericListItem ) ); 802547e: f7ff bcf1 b.w 8024e64 } else { /* The wake time has not overflowed, so the current block list is used. */ vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xGenericListItem ) ); 8025482: 4a09 ldr r2, [pc, #36] ; (80254a8 ) 8025484: 6810 ldr r0, [r2, #0] 8025486: 6819 ldr r1, [r3, #0] 8025488: 3104 adds r1, #4 802548a: f7ff fceb bl 8024e64 /* If the task entering the blocked state was placed at the head of the list of blocked tasks then xNextTaskUnblockTime needs to be updated too. */ if( xTimeToWake < xNextTaskUnblockTime ) 802548e: 4b07 ldr r3, [pc, #28] ; (80254ac ) 8025490: 681a ldr r2, [r3, #0] 8025492: 4294 cmp r4, r2 { xNextTaskUnblockTime = xTimeToWake; 8025494: bf38 it cc 8025496: 601c strcc r4, [r3, #0] 8025498: bd10 pop {r4, pc} 802549a: bf00 nop 802549c: 20002444 .word 0x20002444 80254a0: 20002460 .word 0x20002460 80254a4: 20002464 .word 0x20002464 80254a8: 20002394 .word 0x20002394 80254ac: 200010f8 .word 0x200010f8 080254b0 : #endif /*-----------------------------------------------------------*/ BaseType_t xTaskGenericCreate( TaskFunction_t pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask, StackType_t * const puxStackBuffer, const MemoryRegion_t * const xRegions ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ { 80254b0: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 80254b4: 9d0a ldr r5, [sp, #40] ; 0x28 80254b6: f8dd 802c ldr.w r8, [sp, #44] ; 0x2c 80254ba: 9e0c ldr r6, [sp, #48] ; 0x30 80254bc: 460f mov r7, r1 80254be: 4693 mov fp, r2 80254c0: 469a mov sl, r3 BaseType_t xReturn; TCB_t * pxNewTCB; StackType_t *pxTopOfStack; configASSERT( pxTaskCode ); 80254c2: 4681 mov r9, r0 80254c4: b910 cbnz r0, 80254cc 80254c6: f000 fc71 bl 8025dac 80254ca: e7fe b.n 80254ca configASSERT( ( ( uxPriority & ( ~portPRIVILEGE_BIT ) ) < configMAX_PRIORITIES ) ); 80254cc: 2d04 cmp r5, #4 80254ce: d902 bls.n 80254d6 80254d0: f000 fc6c bl 8025dac 80254d4: e7fe b.n 80254d4 #else /* portSTACK_GROWTH */ { StackType_t *pxStack; /* Allocate space for the stack used by the task being created. */ pxStack = ( StackType_t * ) pvPortMallocAligned( ( ( ( size_t ) usStackDepth ) * sizeof( StackType_t ) ), puxStackBuffer ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 80254d6: b936 cbnz r6, 80254e6 80254d8: 0090 lsls r0, r2, #2 80254da: f000 fd7d bl 8025fd8 if( pxStack != NULL ) 80254de: 4606 mov r6, r0 80254e0: 2800 cmp r0, #0 80254e2: f000 809e beq.w 8025622 { /* Allocate space for the TCB. Where the memory comes from depends on the implementation of the port malloc function. */ pxNewTCB = ( TCB_t * ) pvPortMalloc( sizeof( TCB_t ) ); 80254e6: 205c movs r0, #92 ; 0x5c 80254e8: f000 fd76 bl 8025fd8 if( pxNewTCB != NULL ) 80254ec: 4604 mov r4, r0 80254ee: b178 cbz r0, 8025510 { /* Store the stack location in the TCB. */ pxNewTCB->pxStack = pxStack; 80254f0: 6306 str r6, [r0, #48] ; 0x30 { /* Avoid dependency on memset() if it is not required. */ #if( ( configCHECK_FOR_STACK_OVERFLOW > 1 ) || ( configUSE_TRACE_FACILITY == 1 ) || ( INCLUDE_uxTaskGetStackHighWaterMark == 1 ) ) { /* Just to help debugging. */ ( void ) memset( pxNewTCB->pxStack, ( int ) tskSTACK_FILL_BYTE, ( size_t ) usStackDepth * sizeof( StackType_t ) ); 80254f2: ea4f 028b mov.w r2, fp, lsl #2 80254f6: 4630 mov r0, r6 80254f8: 21a5 movs r1, #165 ; 0xa5 80254fa: f7fc f901 bl 8021700 stack grows from high memory to low (as per the 80x86) or vice versa. portSTACK_GROWTH is used to make the result positive or negative as required by the port. */ #if( portSTACK_GROWTH < 0 ) { pxTopOfStack = pxNewTCB->pxStack + ( usStackDepth - ( uint16_t ) 1 ); 80254fe: 6b23 ldr r3, [r4, #48] ; 0x30 8025500: f10b 3bff add.w fp, fp, #4294967295 8025504: eb03 0b8b add.w fp, r3, fp, lsl #2 pxTopOfStack = ( StackType_t * ) ( ( ( portPOINTER_SIZE_TYPE ) pxTopOfStack ) & ( ( portPOINTER_SIZE_TYPE ) ~portBYTE_ALIGNMENT_MASK ) ); /*lint !e923 MISRA exception. Avoiding casts between pointers and integers is not practical. Size differences accounted for using portPOINTER_SIZE_TYPE type. */ 8025508: f02b 0b07 bic.w fp, fp, #7 static void prvInitialiseTCBVariables( TCB_t * const pxTCB, const char * const pcName, UBaseType_t uxPriority, const MemoryRegion_t * const xRegions, const uint16_t usStackDepth ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ { UBaseType_t x; /* Store the task name in the TCB. */ for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ ) 802550c: 2600 movs r6, #0 802550e: e003 b.n 8025518 } else { /* The stack cannot be used as the TCB was not created. Free it again. */ vPortFree( pxStack ); 8025510: 4630 mov r0, r6 8025512: f000 fde7 bl 80260e4 8025516: e084 b.n 8025622 static char *prvWriteNameToBuffer( char *pcBuffer, const char *pcTaskName ); #endif /*-----------------------------------------------------------*/ BaseType_t xTaskGenericCreate( TaskFunction_t pxTaskCode, const char * const pcName, const uint16_t usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask, StackType_t * const puxStackBuffer, const MemoryRegion_t * const xRegions ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ 8025518: 19a3 adds r3, r4, r6 UBaseType_t x; /* Store the task name in the TCB. */ for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ ) { pxTCB->pcTaskName[ x ] = pcName[ x ]; 802551a: 5dba ldrb r2, [r7, r6] 802551c: f883 2034 strb.w r2, [r3, #52] ; 0x34 /* Don't copy all configMAX_TASK_NAME_LEN if the string is shorter than configMAX_TASK_NAME_LEN characters just in case the memory after the string is not accessible (extremely unlikely). */ if( pcName[ x ] == 0x00 ) 8025520: 5dbb ldrb r3, [r7, r6] 8025522: b113 cbz r3, 802552a static void prvInitialiseTCBVariables( TCB_t * const pxTCB, const char * const pcName, UBaseType_t uxPriority, const MemoryRegion_t * const xRegions, const uint16_t usStackDepth ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ { UBaseType_t x; /* Store the task name in the TCB. */ for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ ) 8025524: 3601 adds r6, #1 8025526: 2e10 cmp r6, #16 8025528: d1f6 bne.n 8025518 } } /* Ensure the name string is terminated in the case that the string length was greater or equal to configMAX_TASK_NAME_LEN. */ pxTCB->pcTaskName[ configMAX_TASK_NAME_LEN - 1 ] = '\0'; 802552a: 2600 movs r6, #0 pxTCB->uxBasePriority = uxPriority; pxTCB->uxMutexesHeld = 0; } #endif /* configUSE_MUTEXES */ vListInitialiseItem( &( pxTCB->xGenericListItem ) ); 802552c: 1d27 adds r7, r4, #4 802552e: 4638 mov r0, r7 } } /* Ensure the name string is terminated in the case that the string length was greater or equal to configMAX_TASK_NAME_LEN. */ pxTCB->pcTaskName[ configMAX_TASK_NAME_LEN - 1 ] = '\0'; 8025530: f884 6043 strb.w r6, [r4, #67] ; 0x43 else { mtCOVERAGE_TEST_MARKER(); } pxTCB->uxPriority = uxPriority; 8025534: 62e5 str r5, [r4, #44] ; 0x2c #if ( configUSE_MUTEXES == 1 ) { pxTCB->uxBasePriority = uxPriority; 8025536: 64e5 str r5, [r4, #76] ; 0x4c pxTCB->uxMutexesHeld = 0; 8025538: 6526 str r6, [r4, #80] ; 0x50 } #endif /* configUSE_MUTEXES */ vListInitialiseItem( &( pxTCB->xGenericListItem ) ); 802553a: f7ff fc84 bl 8024e46 vListInitialiseItem( &( pxTCB->xEventListItem ) ); 802553e: f104 0018 add.w r0, r4, #24 8025542: f7ff fc80 bl 8024e46 /* Set the pxTCB as a link back from the ListItem_t. This is so we can get back to the containing TCB from a generic item in a list. */ listSET_LIST_ITEM_OWNER( &( pxTCB->xGenericListItem ), pxTCB ); /* Event lists are always in priority order. */ listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 8025546: f1c5 0305 rsb r3, r5, #5 } #endif /* portUSING_MPU_WRAPPERS */ #if ( configUSE_TASK_NOTIFICATIONS == 1 ) { pxTCB->ulNotifiedValue = 0; 802554a: 6566 str r6, [r4, #84] ; 0x54 vListInitialiseItem( &( pxTCB->xGenericListItem ) ); vListInitialiseItem( &( pxTCB->xEventListItem ) ); /* Set the pxTCB as a link back from the ListItem_t. This is so we can get back to the containing TCB from a generic item in a list. */ listSET_LIST_ITEM_OWNER( &( pxTCB->xGenericListItem ), pxTCB ); 802554c: 6124 str r4, [r4, #16] /* Event lists are always in priority order. */ listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 802554e: 61a3 str r3, [r4, #24] listSET_LIST_ITEM_OWNER( &( pxTCB->xEventListItem ), pxTCB ); 8025550: 6264 str r4, [r4, #36] ; 0x24 #endif /* portUSING_MPU_WRAPPERS */ #if ( configUSE_TASK_NOTIFICATIONS == 1 ) { pxTCB->ulNotifiedValue = 0; pxTCB->eNotifyState = eNotWaitingNotification; 8025552: f884 6058 strb.w r6, [r4, #88] ; 0x58 { pxNewTCB->pxTopOfStack = pxPortInitialiseStack( pxTopOfStack, pxTaskCode, pvParameters, xRunPrivileged ); } #else /* portUSING_MPU_WRAPPERS */ { pxNewTCB->pxTopOfStack = pxPortInitialiseStack( pxTopOfStack, pxTaskCode, pvParameters ); 8025556: 4658 mov r0, fp 8025558: 4649 mov r1, r9 802555a: 4652 mov r2, sl 802555c: f000 fbfa bl 8025d54 8025560: 6020 str r0, [r4, #0] } #endif /* portUSING_MPU_WRAPPERS */ if( ( void * ) pxCreatedTask != NULL ) 8025562: f1b8 0f00 cmp.w r8, #0 8025566: d001 beq.n 802556c { /* Pass the TCB out - in an anonymous way. The calling function/ task can use this as a handle to delete the task later if required.*/ *pxCreatedTask = ( TaskHandle_t ) pxNewTCB; 8025568: f8c8 4000 str.w r4, [r8] mtCOVERAGE_TEST_MARKER(); } /* Ensure interrupts don't access the task lists while they are being updated. */ taskENTER_CRITICAL(); 802556c: f000 fc26 bl 8025dbc { uxCurrentNumberOfTasks++; 8025570: 4a2e ldr r2, [pc, #184] ; (802562c ) 8025572: 6813 ldr r3, [r2, #0] 8025574: 3301 adds r3, #1 8025576: 6013 str r3, [r2, #0] if( pxCurrentTCB == NULL ) 8025578: 4b2d ldr r3, [pc, #180] ; (8025630 ) 802557a: 681e ldr r6, [r3, #0] 802557c: bb36 cbnz r6, 80255cc { /* There are no other tasks, or all the other tasks are in the suspended state - make this the current task. */ pxCurrentTCB = pxNewTCB; 802557e: 601c str r4, [r3, #0] if( uxCurrentNumberOfTasks == ( UBaseType_t ) 1 ) 8025580: 6813 ldr r3, [r2, #0] 8025582: 2b01 cmp r3, #1 8025584: d12a bne.n 80255dc { UBaseType_t uxPriority; for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); 8025586: f8df 80d0 ldr.w r8, [pc, #208] ; 8025658 802558a: f04f 0914 mov.w r9, #20 802558e: fb09 8006 mla r0, r9, r6, r8 static void prvInitialiseTaskLists( void ) { UBaseType_t uxPriority; for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) 8025592: 3601 adds r6, #1 { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); 8025594: f7ff fc4c bl 8024e30 static void prvInitialiseTaskLists( void ) { UBaseType_t uxPriority; for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) 8025598: 2e05 cmp r6, #5 802559a: d1f8 bne.n 802558e { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); } vListInitialise( &xDelayedTaskList1 ); 802559c: f8df 80bc ldr.w r8, [pc, #188] ; 802565c vListInitialise( &xDelayedTaskList2 ); 80255a0: 4e24 ldr r6, [pc, #144] ; (8025634 ) for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); } vListInitialise( &xDelayedTaskList1 ); 80255a2: 4640 mov r0, r8 80255a4: f7ff fc44 bl 8024e30 vListInitialise( &xDelayedTaskList2 ); 80255a8: 4630 mov r0, r6 80255aa: f7ff fc41 bl 8024e30 vListInitialise( &xPendingReadyList ); 80255ae: 4822 ldr r0, [pc, #136] ; (8025638 ) 80255b0: f7ff fc3e bl 8024e30 #if ( INCLUDE_vTaskDelete == 1 ) { vListInitialise( &xTasksWaitingTermination ); 80255b4: 4821 ldr r0, [pc, #132] ; (802563c ) 80255b6: f7ff fc3b bl 8024e30 } #endif /* INCLUDE_vTaskDelete */ #if ( INCLUDE_vTaskSuspend == 1 ) { vListInitialise( &xSuspendedTaskList ); 80255ba: 4821 ldr r0, [pc, #132] ; (8025640 ) 80255bc: f7ff fc38 bl 8024e30 } #endif /* INCLUDE_vTaskSuspend */ /* Start with pxDelayedTaskList using list1 and the pxOverflowDelayedTaskList using list2. */ pxDelayedTaskList = &xDelayedTaskList1; 80255c0: 4b20 ldr r3, [pc, #128] ; (8025644 ) 80255c2: f8c3 8000 str.w r8, [r3] pxOverflowDelayedTaskList = &xDelayedTaskList2; 80255c6: 4b20 ldr r3, [pc, #128] ; (8025648 ) 80255c8: 601e str r6, [r3, #0] 80255ca: e007 b.n 80255dc else { /* If the scheduler is not already running, make this task the current task if it is the highest priority task to be created so far. */ if( xSchedulerRunning == pdFALSE ) 80255cc: 4a1f ldr r2, [pc, #124] ; (802564c ) 80255ce: 6812 ldr r2, [r2, #0] 80255d0: b922 cbnz r2, 80255dc { if( pxCurrentTCB->uxPriority <= uxPriority ) 80255d2: 681a ldr r2, [r3, #0] 80255d4: 6ad2 ldr r2, [r2, #44] ; 0x2c 80255d6: 42aa cmp r2, r5 { pxCurrentTCB = pxNewTCB; 80255d8: bf98 it ls 80255da: 601c strls r4, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } } uxTaskNumber++; 80255dc: 4a1c ldr r2, [pc, #112] ; (8025650 ) 80255de: 6813 ldr r3, [r2, #0] 80255e0: 3301 adds r3, #1 80255e2: 6013 str r3, [r2, #0] pxNewTCB->uxTCBNumber = uxTaskNumber; } #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); 80255e4: 4a1b ldr r2, [pc, #108] ; (8025654 ) uxTaskNumber++; #if ( configUSE_TRACE_FACILITY == 1 ) { /* Add a counter into the TCB for tracing only. */ pxNewTCB->uxTCBNumber = uxTaskNumber; 80255e6: 6463 str r3, [r4, #68] ; 0x44 } #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); 80255e8: 6ae3 ldr r3, [r4, #44] ; 0x2c 80255ea: 6811 ldr r1, [r2, #0] 80255ec: 2401 movs r4, #1 80255ee: fa04 f003 lsl.w r0, r4, r3 80255f2: 4301 orrs r1, r0 80255f4: 6011 str r1, [r2, #0] 80255f6: 4a18 ldr r2, [pc, #96] ; (8025658 ) 80255f8: 2014 movs r0, #20 80255fa: fb00 2003 mla r0, r0, r3, r2 80255fe: 4639 mov r1, r7 8025600: f7ff fc24 bl 8024e4c xReturn = pdPASS; portSETUP_TCB( pxNewTCB ); } taskEXIT_CRITICAL(); 8025604: f000 fc06 bl 8025e14 traceTASK_CREATE_FAILED(); } if( xReturn == pdPASS ) { if( xSchedulerRunning != pdFALSE ) 8025608: 4b10 ldr r3, [pc, #64] ; (802564c ) 802560a: 681b ldr r3, [r3, #0] 802560c: b133 cbz r3, 802561c { /* If the created task is of a higher priority than the current task then it should run now. */ if( pxCurrentTCB->uxPriority < uxPriority ) 802560e: 4b08 ldr r3, [pc, #32] ; (8025630 ) 8025610: 681b ldr r3, [r3, #0] 8025612: 6adb ldr r3, [r3, #44] ; 0x2c 8025614: 42ab cmp r3, r5 8025616: d201 bcs.n 802561c { taskYIELD_IF_USING_PREEMPTION(); 8025618: f000 fbbc bl 8025d94 #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); prvAddTaskToReadyList( pxNewTCB ); xReturn = pdPASS; 802561c: 4620 mov r0, r4 802561e: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} } taskEXIT_CRITICAL(); } else { xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY; 8025622: f04f 30ff mov.w r0, #4294967295 mtCOVERAGE_TEST_MARKER(); } } return xReturn; } 8025626: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 802562a: bf00 nop 802562c: 2000246c .word 0x2000246c 8025630: 20002444 .word 0x20002444 8025634: 200023b4 .word 0x200023b4 8025638: 20002448 .word 0x20002448 802563c: 20002430 .word 0x20002430 8025640: 20002470 .word 0x20002470 8025644: 20002394 .word 0x20002394 8025648: 20002464 .word 0x20002464 802564c: 20002398 .word 0x20002398 8025650: 20002468 .word 0x20002468 8025654: 20002484 .word 0x20002484 8025658: 200023cc .word 0x200023cc 802565c: 200023a0 .word 0x200023a0 08025660 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelete == 1 ) void vTaskDelete( TaskHandle_t xTaskToDelete ) { 8025660: b538 push {r3, r4, r5, lr} 8025662: 4604 mov r4, r0 TCB_t *pxTCB; taskENTER_CRITICAL(); 8025664: f000 fbaa bl 8025dbc { /* If null is passed in here then it is the calling task that is being deleted. */ pxTCB = prvGetTCBFromHandle( xTaskToDelete ); 8025668: b90c cbnz r4, 802566e 802566a: 4b22 ldr r3, [pc, #136] ; (80256f4 ) 802566c: 681c ldr r4, [r3, #0] /* Remove task from the ready list and place in the termination list. This will stop the task from be scheduled. The idle task will check the termination list and free up any memory allocated by the scheduler for the TCB and stack. */ if( uxListRemove( &( pxTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 ) 802566e: 1d25 adds r5, r4, #4 8025670: 4628 mov r0, r5 8025672: f7ff fc0f bl 8024e94 8025676: b968 cbnz r0, 8025694 { taskRESET_READY_PRIORITY( pxTCB->uxPriority ); 8025678: 6ae2 ldr r2, [r4, #44] ; 0x2c 802567a: 491f ldr r1, [pc, #124] ; (80256f8 ) 802567c: 2314 movs r3, #20 802567e: 4353 muls r3, r2 8025680: 58cb ldr r3, [r1, r3] 8025682: b93b cbnz r3, 8025694 8025684: 4b1d ldr r3, [pc, #116] ; (80256fc ) 8025686: 2001 movs r0, #1 8025688: 6819 ldr r1, [r3, #0] 802568a: fa00 f202 lsl.w r2, r0, r2 802568e: ea21 0202 bic.w r2, r1, r2 8025692: 601a str r2, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } /* Is the task waiting on an event also? */ if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) 8025694: 6aa3 ldr r3, [r4, #40] ; 0x28 8025696: b11b cbz r3, 80256a0 { ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 8025698: f104 0018 add.w r0, r4, #24 802569c: f7ff fbfa bl 8024e94 else { mtCOVERAGE_TEST_MARKER(); } vListInsertEnd( &xTasksWaitingTermination, &( pxTCB->xGenericListItem ) ); 80256a0: 4817 ldr r0, [pc, #92] ; (8025700 ) 80256a2: 4629 mov r1, r5 80256a4: f7ff fbd2 bl 8024e4c /* Increment the ucTasksDeleted variable so the idle task knows there is a task that has been deleted and that it should therefore check the xTasksWaitingTermination list. */ ++uxTasksDeleted; 80256a8: 4b16 ldr r3, [pc, #88] ; (8025704 ) 80256aa: 681a ldr r2, [r3, #0] 80256ac: 3201 adds r2, #1 80256ae: 601a str r2, [r3, #0] /* Increment the uxTaskNumberVariable also so kernel aware debuggers can detect that the task lists need re-generating. */ uxTaskNumber++; 80256b0: 4b15 ldr r3, [pc, #84] ; (8025708 ) 80256b2: 681a ldr r2, [r3, #0] 80256b4: 3201 adds r2, #1 80256b6: 601a str r2, [r3, #0] traceTASK_DELETE( pxTCB ); } taskEXIT_CRITICAL(); 80256b8: f000 fbac bl 8025e14 /* Force a reschedule if it is the currently running task that has just been deleted. */ if( xSchedulerRunning != pdFALSE ) 80256bc: 4b13 ldr r3, [pc, #76] ; (802570c ) 80256be: 681b ldr r3, [r3, #0] 80256c0: 2b00 cmp r3, #0 80256c2: d015 beq.n 80256f0 { if( pxTCB == pxCurrentTCB ) 80256c4: 4b0b ldr r3, [pc, #44] ; (80256f4 ) 80256c6: 681b ldr r3, [r3, #0] 80256c8: 429c cmp r4, r3 80256ca: d109 bne.n 80256e0 { configASSERT( uxSchedulerSuspended == 0 ); 80256cc: 4b10 ldr r3, [pc, #64] ; (8025710 ) 80256ce: 681b ldr r3, [r3, #0] 80256d0: b113 cbz r3, 80256d8 80256d2: f000 fb6b bl 8025dac 80256d6: e7fe b.n 80256d6 prvResetNextTaskUnblockTime(); } taskEXIT_CRITICAL(); } } } 80256d8: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} in which Windows specific clean up operations are performed, after which it is not possible to yield away from this task - hence xYieldPending is used to latch that a context switch is required. */ portPRE_TASK_DELETE_HOOK( pxTCB, &xYieldPending ); portYIELD_WITHIN_API(); 80256dc: f000 bb5a b.w 8025d94 } else { /* Reset the next expected unblock time in case it referred to the task that has just been deleted. */ taskENTER_CRITICAL(); 80256e0: f000 fb6c bl 8025dbc { prvResetNextTaskUnblockTime(); 80256e4: f7ff feaa bl 802543c } taskEXIT_CRITICAL(); } } } 80256e8: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} the task that has just been deleted. */ taskENTER_CRITICAL(); { prvResetNextTaskUnblockTime(); } taskEXIT_CRITICAL(); 80256ec: f000 bb92 b.w 8025e14 80256f0: bd38 pop {r3, r4, r5, pc} 80256f2: bf00 nop 80256f4: 20002444 .word 0x20002444 80256f8: 200023cc .word 0x200023cc 80256fc: 20002484 .word 0x20002484 8025700: 20002430 .word 0x20002430 8025704: 2000239c .word 0x2000239c 8025708: 20002468 .word 0x20002468 802570c: 20002398 .word 0x20002398 8025710: 2000245c .word 0x2000245c 08025714 : #endif /* ( ( INCLUDE_xTaskResumeFromISR == 1 ) && ( INCLUDE_vTaskSuspend == 1 ) ) */ /*-----------------------------------------------------------*/ void vTaskStartScheduler( void ) { 8025714: b530 push {r4, r5, lr} 8025716: b085 sub sp, #20 xReturn = xTaskCreate( prvIdleTask, "IDLE", tskIDLE_STACK_SIZE, ( void * ) NULL, ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), &xIdleTaskHandle ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */ } #else { /* Create the idle task without storing its handle. */ xReturn = xTaskCreate( prvIdleTask, "IDLE", tskIDLE_STACK_SIZE, ( void * ) NULL, ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), NULL ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */ 8025718: 2400 movs r4, #0 802571a: 2280 movs r2, #128 ; 0x80 802571c: 9400 str r4, [sp, #0] 802571e: 9401 str r4, [sp, #4] 8025720: 9402 str r4, [sp, #8] 8025722: 9403 str r4, [sp, #12] 8025724: 480c ldr r0, [pc, #48] ; (8025758 ) 8025726: 490d ldr r1, [pc, #52] ; (802575c ) 8025728: 4623 mov r3, r4 802572a: f7ff fec1 bl 80254b0 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_TIMERS */ if( xReturn == pdPASS ) 802572e: 2801 cmp r0, #1 xReturn = xTaskCreate( prvIdleTask, "IDLE", tskIDLE_STACK_SIZE, ( void * ) NULL, ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), &xIdleTaskHandle ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */ } #else { /* Create the idle task without storing its handle. */ xReturn = xTaskCreate( prvIdleTask, "IDLE", tskIDLE_STACK_SIZE, ( void * ) NULL, ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), NULL ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */ 8025730: 4605 mov r5, r0 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_TIMERS */ if( xReturn == pdPASS ) 8025732: d10a bne.n 802574a /* Interrupts are turned off here, to ensure a tick does not occur before or during the call to xPortStartScheduler(). The stacks of the created tasks contain a status word with interrupts switched on so interrupts will automatically get re-enabled when the first task starts to run. */ portDISABLE_INTERRUPTS(); 8025734: f000 fb3a bl 8025dac structure specific to the task that will run first. */ _impure_ptr = &( pxCurrentTCB->xNewLib_reent ); } #endif /* configUSE_NEWLIB_REENTRANT */ xSchedulerRunning = pdTRUE; 8025738: 4b09 ldr r3, [pc, #36] ; (8025760 ) 802573a: 601d str r5, [r3, #0] xTickCount = ( TickType_t ) 0U; 802573c: 4b09 ldr r3, [pc, #36] ; (8025764 ) 802573e: 601c str r4, [r3, #0] /* This line will only be reached if the kernel could not be started, because there was not enough FreeRTOS heap to create the idle task or the timer task. */ configASSERT( xReturn ); } } 8025740: b005 add sp, #20 8025742: e8bd 4030 ldmia.w sp!, {r4, r5, lr} the run time counter time base. */ portCONFIGURE_TIMER_FOR_RUN_TIME_STATS(); /* Setting up the timer tick is hardware specific and thus in the portable interface. */ if( xPortStartScheduler() != pdFALSE ) 8025746: f000 bbbd b.w 8025ec4 else { /* This line will only be reached if the kernel could not be started, because there was not enough FreeRTOS heap to create the idle task or the timer task. */ configASSERT( xReturn ); 802574a: b910 cbnz r0, 8025752 802574c: f000 fb2e bl 8025dac 8025750: e7fe b.n 8025750 } } 8025752: b005 add sp, #20 8025754: bd30 pop {r4, r5, pc} 8025756: bf00 nop 8025758: 08025979 .word 0x08025979 802575c: 08030dbc .word 0x08030dbc 8025760: 20002398 .word 0x20002398 8025764: 20002460 .word 0x20002460 08025768 : { /* A critical section is not required as the variable is of type BaseType_t. Please read Richard Barry's reply in the following link to a post in the FreeRTOS support forum before reporting this as a bug! - http://goo.gl/wu4acr */ ++uxSchedulerSuspended; 8025768: 4b02 ldr r3, [pc, #8] ; (8025774 ) 802576a: 681a ldr r2, [r3, #0] 802576c: 3201 adds r2, #1 802576e: 601a str r2, [r3, #0] 8025770: 4770 bx lr 8025772: bf00 nop 8025774: 2000245c .word 0x2000245c 08025778 : TickType_t xTicks; /* Critical section required if running on a 16 bit processor. */ portTICK_TYPE_ENTER_CRITICAL(); { xTicks = xTickCount; 8025778: 4b01 ldr r3, [pc, #4] ; (8025780 ) 802577a: 6818 ldr r0, [r3, #0] } portTICK_TYPE_EXIT_CRITICAL(); return xTicks; } 802577c: 4770 bx lr 802577e: bf00 nop 8025780: 20002460 .word 0x20002460 08025784 : /* Called by the portable layer each time a tick interrupt occurs. Increments the tick then checks to see if the new tick value will cause any tasks to be unblocked. */ traceTASK_INCREMENT_TICK( xTickCount ); if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 8025784: 4b3b ldr r3, [pc, #236] ; (8025874 ) 8025786: 681b ldr r3, [r3, #0] #endif /* configUSE_TICKLESS_IDLE */ /*----------------------------------------------------------*/ BaseType_t xTaskIncrementTick( void ) { 8025788: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} /* Called by the portable layer each time a tick interrupt occurs. Increments the tick then checks to see if the new tick value will cause any tasks to be unblocked. */ traceTASK_INCREMENT_TICK( xTickCount ); if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 802578c: 2b00 cmp r3, #0 802578e: d15b bne.n 8025848 { /* Increment the RTOS tick, switching the delayed and overflowed delayed lists if it wraps to 0. */ ++xTickCount; 8025790: 4b39 ldr r3, [pc, #228] ; (8025878 ) 8025792: 681a ldr r2, [r3, #0] 8025794: 3201 adds r2, #1 8025796: 601a str r2, [r3, #0] { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 8025798: 681e ldr r6, [r3, #0] if( xConstTickCount == ( TickType_t ) 0U ) 802579a: b98e cbnz r6, 80257c0 { taskSWITCH_DELAYED_LISTS(); 802579c: 4b37 ldr r3, [pc, #220] ; (802587c ) 802579e: 681a ldr r2, [r3, #0] 80257a0: 6812 ldr r2, [r2, #0] 80257a2: b112 cbz r2, 80257aa 80257a4: f000 fb02 bl 8025dac 80257a8: e7fe b.n 80257a8 80257aa: 4a35 ldr r2, [pc, #212] ; (8025880 ) 80257ac: 6819 ldr r1, [r3, #0] 80257ae: 6810 ldr r0, [r2, #0] 80257b0: 6018 str r0, [r3, #0] 80257b2: 4b34 ldr r3, [pc, #208] ; (8025884 ) 80257b4: 6011 str r1, [r2, #0] 80257b6: 681a ldr r2, [r3, #0] 80257b8: 3201 adds r2, #1 80257ba: 601a str r2, [r3, #0] 80257bc: f7ff fe3e bl 802543c /* See if this tick has made a timeout expire. Tasks are stored in the queue in the order of their wake time - meaning once one task has been found whose block time has not expired there is no need to look any further down the list. */ if( xConstTickCount >= xNextTaskUnblockTime ) 80257c0: 4b31 ldr r3, [pc, #196] ; (8025888 ) 80257c2: 681b ldr r3, [r3, #0] 80257c4: 2400 movs r4, #0 80257c6: 429e cmp r6, r3 80257c8: d200 bcs.n 80257cc 80257ca: e032 b.n 8025832 { for( ;; ) { if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 80257cc: 4f2b ldr r7, [pc, #172] ; (802587c ) mtCOVERAGE_TEST_MARKER(); } /* Place the unblocked task into the appropriate ready list. */ prvAddTaskToReadyList( pxTCB ); 80257ce: f8df 80cc ldr.w r8, [pc, #204] ; 802589c 80257d2: f8df a0bc ldr.w sl, [pc, #188] ; 8025890 look any further down the list. */ if( xConstTickCount >= xNextTaskUnblockTime ) { for( ;; ) { if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) 80257d6: 683b ldr r3, [r7, #0] 80257d8: 681b ldr r3, [r3, #0] 80257da: 2b00 cmp r3, #0 80257dc: d13a bne.n 8025854 /* The delayed list is empty. Set xNextTaskUnblockTime to the maximum possible value so it is extremely unlikely that the if( xTickCount >= xNextTaskUnblockTime ) test will pass next time through. */ xNextTaskUnblockTime = portMAX_DELAY; 80257de: 4b2a ldr r3, [pc, #168] ; (8025888 ) 80257e0: f04f 32ff mov.w r2, #4294967295 80257e4: 601a str r2, [r3, #0] break; 80257e6: e024 b.n 8025832 /* It is not time to unblock this item yet, but the item value is the time at which the task at the head of the blocked list must be removed from the Blocked state - so record the item value in xNextTaskUnblockTime. */ xNextTaskUnblockTime = xItemValue; 80257e8: 4a27 ldr r2, [pc, #156] ; (8025888 ) 80257ea: 6013 str r3, [r2, #0] break; 80257ec: e021 b.n 8025832 { mtCOVERAGE_TEST_MARKER(); } /* It is time to remove the item from the Blocked state. */ ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 80257ee: f105 0904 add.w r9, r5, #4 80257f2: 4648 mov r0, r9 80257f4: f7ff fb4e bl 8024e94 /* Is the task waiting on an event also? If so remove it from the event list. */ if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) 80257f8: 6aab ldr r3, [r5, #40] ; 0x28 80257fa: b11b cbz r3, 8025804 { ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 80257fc: f105 0018 add.w r0, r5, #24 8025800: f7ff fb48 bl 8024e94 mtCOVERAGE_TEST_MARKER(); } /* Place the unblocked task into the appropriate ready list. */ prvAddTaskToReadyList( pxTCB ); 8025804: 6aeb ldr r3, [r5, #44] ; 0x2c 8025806: f8d8 1000 ldr.w r1, [r8] 802580a: 2201 movs r2, #1 802580c: fa02 f203 lsl.w r2, r2, r3 8025810: 2014 movs r0, #20 8025812: 430a orrs r2, r1 8025814: fb00 a003 mla r0, r0, r3, sl 8025818: 4649 mov r1, r9 802581a: f8c8 2000 str.w r2, [r8] 802581e: f7ff fb15 bl 8024e4c { /* Preemption is on, but a context switch should only be performed if the unblocked task has a priority that is equal to or higher than the currently executing task. */ if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority ) 8025822: 4b1a ldr r3, [pc, #104] ; (802588c ) 8025824: 6aea ldr r2, [r5, #44] ; 0x2c 8025826: 681b ldr r3, [r3, #0] 8025828: 6adb ldr r3, [r3, #44] ; 0x2c { xSwitchRequired = pdTRUE; 802582a: 429a cmp r2, r3 802582c: bf28 it cs 802582e: 2401 movcs r4, #1 8025830: e7d1 b.n 80257d6 /* Tasks of equal priority to the currently running task will share processing time (time slice) if preemption is on, and the application writer has not explicitly turned time slicing off. */ #if ( ( configUSE_PREEMPTION == 1 ) && ( configUSE_TIME_SLICING == 1 ) ) { if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ pxCurrentTCB->uxPriority ] ) ) > ( UBaseType_t ) 1 ) 8025832: 4b16 ldr r3, [pc, #88] ; (802588c ) 8025834: 681b ldr r3, [r3, #0] 8025836: 6adb ldr r3, [r3, #44] ; 0x2c 8025838: 2214 movs r2, #20 802583a: 4353 muls r3, r2 802583c: 4a14 ldr r2, [pc, #80] ; (8025890 ) 802583e: 58d3 ldr r3, [r2, r3] { xSwitchRequired = pdTRUE; 8025840: 2b01 cmp r3, #1 8025842: bf88 it hi 8025844: 2401 movhi r4, #1 8025846: e00c b.n 8025862 } #endif /* configUSE_TICK_HOOK */ } else { ++uxPendedTicks; 8025848: 4b12 ldr r3, [pc, #72] ; (8025894 ) 802584a: 681a ldr r2, [r3, #0] 802584c: 3201 adds r2, #1 802584e: 601a str r2, [r3, #0] BaseType_t xTaskIncrementTick( void ) { TCB_t * pxTCB; TickType_t xItemValue; BaseType_t xSwitchRequired = pdFALSE; 8025850: 2400 movs r4, #0 8025852: e006 b.n 8025862 { /* The delayed list is not empty, get the value of the item at the head of the delayed list. This is the time at which the task at the head of the delayed list must be removed from the Blocked state. */ pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList ); 8025854: 683b ldr r3, [r7, #0] 8025856: 68db ldr r3, [r3, #12] 8025858: 68dd ldr r5, [r3, #12] xItemValue = listGET_LIST_ITEM_VALUE( &( pxTCB->xGenericListItem ) ); 802585a: 686b ldr r3, [r5, #4] if( xConstTickCount < xItemValue ) 802585c: 429e cmp r6, r3 802585e: d2c6 bcs.n 80257ee 8025860: e7c2 b.n 80257e8 #endif } #if ( configUSE_PREEMPTION == 1 ) { if( xYieldPending != pdFALSE ) 8025862: 4b0d ldr r3, [pc, #52] ; (8025898 ) 8025864: 681b ldr r3, [r3, #0] { xSwitchRequired = pdTRUE; 8025866: 2b00 cmp r3, #0 8025868: bf18 it ne 802586a: 2401 movne r4, #1 } } #endif /* configUSE_PREEMPTION */ return xSwitchRequired; } 802586c: 4620 mov r0, r4 802586e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8025872: bf00 nop 8025874: 2000245c .word 0x2000245c 8025878: 20002460 .word 0x20002460 802587c: 20002394 .word 0x20002394 8025880: 20002464 .word 0x20002464 8025884: 20002390 .word 0x20002390 8025888: 200010f8 .word 0x200010f8 802588c: 20002444 .word 0x20002444 8025890: 200023cc .word 0x200023cc 8025894: 200023c8 .word 0x200023c8 8025898: 20002488 .word 0x20002488 802589c: 20002484 .word 0x20002484 080258a0 : #endif /* configUSE_TICKLESS_IDLE */ /*----------------------------------------------------------*/ BaseType_t xTaskResumeAll( void ) { 80258a0: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} TCB_t *pxTCB; BaseType_t xAlreadyYielded = pdFALSE; /* If uxSchedulerSuspended is zero then this function does not match a previous call to vTaskSuspendAll(). */ configASSERT( uxSchedulerSuspended ); 80258a4: 4c2c ldr r4, [pc, #176] ; (8025958 ) 80258a6: 6823 ldr r3, [r4, #0] 80258a8: b913 cbnz r3, 80258b0 80258aa: f000 fa7f bl 8025dac 80258ae: e7fe b.n 80258ae /* It is possible that an ISR caused a task to be removed from an event list while the scheduler was suspended. If this was the case then the removed task will have been added to the xPendingReadyList. Once the scheduler has been resumed it is safe to move all the pending ready tasks from this list into their appropriate ready list. */ taskENTER_CRITICAL(); 80258b0: f000 fa84 bl 8025dbc { --uxSchedulerSuspended; 80258b4: 6823 ldr r3, [r4, #0] 80258b6: 3b01 subs r3, #1 80258b8: 6023 str r3, [r4, #0] if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 80258ba: 6823 ldr r3, [r4, #0] 80258bc: b10b cbz r3, 80258c2 /*----------------------------------------------------------*/ BaseType_t xTaskResumeAll( void ) { TCB_t *pxTCB; BaseType_t xAlreadyYielded = pdFALSE; 80258be: 2400 movs r4, #0 80258c0: e044 b.n 802594c { --uxSchedulerSuspended; if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) 80258c2: 4b26 ldr r3, [pc, #152] ; (802595c ) 80258c4: 681b ldr r3, [r3, #0] 80258c6: bb0b cbnz r3, 802590c 80258c8: e7f9 b.n 80258be { /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xPendingReadyList ) ); 80258ca: 68f3 ldr r3, [r6, #12] 80258cc: 68dc ldr r4, [r3, #12] ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 80258ce: f104 0804 add.w r8, r4, #4 /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xPendingReadyList ) ); ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); 80258d2: f104 0018 add.w r0, r4, #24 80258d6: f7ff fadd bl 8024e94 ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 80258da: 4640 mov r0, r8 80258dc: f7ff fada bl 8024e94 prvAddTaskToReadyList( pxTCB ); 80258e0: 6ae3 ldr r3, [r4, #44] ; 0x2c 80258e2: 682a ldr r2, [r5, #0] 80258e4: 2701 movs r7, #1 80258e6: fa07 f103 lsl.w r1, r7, r3 80258ea: 2014 movs r0, #20 80258ec: 430a orrs r2, r1 80258ee: fb00 9003 mla r0, r0, r3, r9 80258f2: 4641 mov r1, r8 80258f4: 602a str r2, [r5, #0] 80258f6: f7ff faa9 bl 8024e4c /* If the moved task has a priority higher than the current task then a yield must be performed. */ if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority ) 80258fa: 4b19 ldr r3, [pc, #100] ; (8025960 ) 80258fc: 6ae2 ldr r2, [r4, #44] ; 0x2c 80258fe: 681b ldr r3, [r3, #0] 8025900: 6adb ldr r3, [r3, #44] ; 0x2c 8025902: 429a cmp r2, r3 8025904: d306 bcc.n 8025914 { xYieldPending = pdTRUE; 8025906: 4b17 ldr r3, [pc, #92] ; (8025964 ) 8025908: 601f str r7, [r3, #0] 802590a: e003 b.n 8025914 { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) { /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 802590c: 4e16 ldr r6, [pc, #88] ; (8025968 ) { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xPendingReadyList ) ); ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); prvAddTaskToReadyList( pxTCB ); 802590e: 4d17 ldr r5, [pc, #92] ; (802596c ) 8025910: f8df 9060 ldr.w r9, [pc, #96] ; 8025974 { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) { /* Move any readied tasks from the pending list into the appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) 8025914: 6833 ldr r3, [r6, #0] 8025916: 2b00 cmp r3, #0 8025918: d1d7 bne.n 80258ca /* If any ticks occurred while the scheduler was suspended then they should be processed now. This ensures the tick count does not slip, and that any delayed tasks are resumed at the correct time. */ if( uxPendedTicks > ( UBaseType_t ) 0U ) 802591a: 4c15 ldr r4, [pc, #84] ; (8025970 ) 802591c: 6823 ldr r3, [r4, #0] 802591e: b96b cbnz r3, 802593c else { mtCOVERAGE_TEST_MARKER(); } if( xYieldPending == pdTRUE ) 8025920: 4b10 ldr r3, [pc, #64] ; (8025964 ) 8025922: 681c ldr r4, [r3, #0] 8025924: 2c01 cmp r4, #1 8025926: d1ca bne.n 80258be 8025928: e00e b.n 8025948 time. */ if( uxPendedTicks > ( UBaseType_t ) 0U ) { while( uxPendedTicks > ( UBaseType_t ) 0U ) { if( xTaskIncrementTick() != pdFALSE ) 802592a: f7ff ff2b bl 8025784 802592e: b108 cbz r0, 8025934 { xYieldPending = pdTRUE; 8025930: 2301 movs r3, #1 8025932: 6033 str r3, [r6, #0] } else { mtCOVERAGE_TEST_MARKER(); } --uxPendedTicks; 8025934: 682b ldr r3, [r5, #0] 8025936: 3b01 subs r3, #1 8025938: 602b str r3, [r5, #0] 802593a: e001 b.n 8025940 { while( uxPendedTicks > ( UBaseType_t ) 0U ) { if( xTaskIncrementTick() != pdFALSE ) { xYieldPending = pdTRUE; 802593c: 4e09 ldr r6, [pc, #36] ; (8025964 ) 802593e: 4625 mov r5, r4 they should be processed now. This ensures the tick count does not slip, and that any delayed tasks are resumed at the correct time. */ if( uxPendedTicks > ( UBaseType_t ) 0U ) { while( uxPendedTicks > ( UBaseType_t ) 0U ) 8025940: 6823 ldr r3, [r4, #0] 8025942: 2b00 cmp r3, #0 8025944: d1f1 bne.n 802592a 8025946: e7eb b.n 8025920 #if( configUSE_PREEMPTION != 0 ) { xAlreadyYielded = pdTRUE; } #endif taskYIELD_IF_USING_PREEMPTION(); 8025948: f000 fa24 bl 8025d94 else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); 802594c: f000 fa62 bl 8025e14 return xAlreadyYielded; } 8025950: 4620 mov r0, r4 8025952: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8025956: bf00 nop 8025958: 2000245c .word 0x2000245c 802595c: 2000246c .word 0x2000246c 8025960: 20002444 .word 0x20002444 8025964: 20002488 .word 0x20002488 8025968: 20002448 .word 0x20002448 802596c: 20002484 .word 0x20002484 8025970: 200023c8 .word 0x200023c8 8025974: 200023cc .word 0x200023cc 08025978 : * * void prvIdleTask( void *pvParameters ); * */ static portTASK_FUNCTION( prvIdleTask, pvParameters ) { 8025978: b5f8 push {r3, r4, r5, r6, r7, lr} { BaseType_t xListIsEmpty; /* ucTasksDeleted is used to prevent vTaskSuspendAll() being called too often in the idle task. */ while( uxTasksDeleted > ( UBaseType_t ) 0U ) 802597a: 4c14 ldr r4, [pc, #80] ; (80259cc ) { vTaskSuspendAll(); { xListIsEmpty = listLIST_IS_EMPTY( &xTasksWaitingTermination ); 802597c: 4e14 ldr r6, [pc, #80] ; (80259d0 ) taskENTER_CRITICAL(); { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xTasksWaitingTermination ) ); ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); --uxCurrentNumberOfTasks; 802597e: 4f15 ldr r7, [pc, #84] ; (80259d4 ) { BaseType_t xListIsEmpty; /* ucTasksDeleted is used to prevent vTaskSuspendAll() being called too often in the idle task. */ while( uxTasksDeleted > ( UBaseType_t ) 0U ) 8025980: 6823 ldr r3, [r4, #0] 8025982: b1e3 cbz r3, 80259be { vTaskSuspendAll(); 8025984: f7ff fef0 bl 8025768 { xListIsEmpty = listLIST_IS_EMPTY( &xTasksWaitingTermination ); 8025988: 6835 ldr r5, [r6, #0] } ( void ) xTaskResumeAll(); 802598a: f7ff ff89 bl 80258a0 if( xListIsEmpty == pdFALSE ) 802598e: 2d00 cmp r5, #0 8025990: d0f6 beq.n 8025980 { TCB_t *pxTCB; taskENTER_CRITICAL(); 8025992: f000 fa13 bl 8025dbc { pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xTasksWaitingTermination ) ); 8025996: 68f3 ldr r3, [r6, #12] 8025998: 68dd ldr r5, [r3, #12] ( void ) uxListRemove( &( pxTCB->xGenericListItem ) ); 802599a: 1d28 adds r0, r5, #4 802599c: f7ff fa7a bl 8024e94 --uxCurrentNumberOfTasks; 80259a0: 683b ldr r3, [r7, #0] 80259a2: 3b01 subs r3, #1 80259a4: 603b str r3, [r7, #0] --uxTasksDeleted; 80259a6: 6823 ldr r3, [r4, #0] 80259a8: 3b01 subs r3, #1 80259aa: 6023 str r3, [r4, #0] } taskEXIT_CRITICAL(); 80259ac: f000 fa32 bl 8025e14 vPortFreeAligned( pxTCB->pxStack ); } } #else { vPortFreeAligned( pxTCB->pxStack ); 80259b0: 6b28 ldr r0, [r5, #48] ; 0x30 80259b2: f000 fb97 bl 80260e4 } #endif vPortFree( pxTCB ); 80259b6: 4628 mov r0, r5 80259b8: f000 fb94 bl 80260e4 80259bc: e7e0 b.n 8025980 A critical region is not required here as we are just reading from the list, and an occasional incorrect value will not matter. If the ready list at the idle priority contains more than one task then a task other than the idle task is ready to execute. */ if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ tskIDLE_PRIORITY ] ) ) > ( UBaseType_t ) 1 ) 80259be: 4b06 ldr r3, [pc, #24] ; (80259d8 ) 80259c0: 681b ldr r3, [r3, #0] 80259c2: 2b01 cmp r3, #1 80259c4: d9dc bls.n 8025980 { taskYIELD(); 80259c6: f000 f9e5 bl 8025d94 80259ca: e7d9 b.n 8025980 80259cc: 2000239c .word 0x2000239c 80259d0: 20002430 .word 0x20002430 80259d4: 2000246c .word 0x2000246c 80259d8: 200023cc .word 0x200023cc 080259dc : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelay == 1 ) void vTaskDelay( const TickType_t xTicksToDelay ) { 80259dc: b538 push {r3, r4, r5, lr} TickType_t xTimeToWake; BaseType_t xAlreadyYielded = pdFALSE; /* A delay time of zero just forces a reschedule. */ if( xTicksToDelay > ( TickType_t ) 0U ) 80259de: 4604 mov r4, r0 80259e0: b918 cbnz r0, 80259ea } else { mtCOVERAGE_TEST_MARKER(); } } 80259e2: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} /* Force a reschedule if xTaskResumeAll has not already done so, we may have put ourselves to sleep. */ if( xAlreadyYielded == pdFALSE ) { portYIELD_WITHIN_API(); 80259e6: f000 b9d5 b.w 8025d94 /* A delay time of zero just forces a reschedule. */ if( xTicksToDelay > ( TickType_t ) 0U ) { configASSERT( uxSchedulerSuspended == 0 ); 80259ea: 4b11 ldr r3, [pc, #68] ; (8025a30 ) 80259ec: 681b ldr r3, [r3, #0] 80259ee: b113 cbz r3, 80259f6 80259f0: f000 f9dc bl 8025dac 80259f4: e7fe b.n 80259f4 vTaskSuspendAll(); 80259f6: f7ff feb7 bl 8025768 This task cannot be in an event list as it is the currently executing task. */ /* Calculate the time to wake - this may overflow but this is not a problem. */ xTimeToWake = xTickCount + xTicksToDelay; 80259fa: 4b0e ldr r3, [pc, #56] ; (8025a34 ) 80259fc: 681d ldr r5, [r3, #0] 80259fe: 1965 adds r5, r4, r5 /* We must remove ourselves from the ready list before adding ourselves to the blocked list as the same list item is used for both lists. */ if( uxListRemove( &( pxCurrentTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 ) 8025a00: 4c0d ldr r4, [pc, #52] ; (8025a38 ) 8025a02: 6820 ldr r0, [r4, #0] 8025a04: 3004 adds r0, #4 8025a06: f7ff fa45 bl 8024e94 8025a0a: b948 cbnz r0, 8025a20 { /* The current task must be in a ready list, so there is no need to check, and the port reset macro can be called directly. */ portRESET_READY_PRIORITY( pxCurrentTCB->uxPriority, uxTopReadyPriority ); 8025a0c: 4b0b ldr r3, [pc, #44] ; (8025a3c ) 8025a0e: 6819 ldr r1, [r3, #0] 8025a10: 6822 ldr r2, [r4, #0] 8025a12: 6ad2 ldr r2, [r2, #44] ; 0x2c 8025a14: 2001 movs r0, #1 8025a16: fa00 f202 lsl.w r2, r0, r2 8025a1a: ea21 0202 bic.w r2, r1, r2 8025a1e: 601a str r2, [r3, #0] } else { mtCOVERAGE_TEST_MARKER(); } prvAddCurrentTaskToDelayedList( xTimeToWake ); 8025a20: 4628 mov r0, r5 8025a22: f7ff fd1d bl 8025460 } xAlreadyYielded = xTaskResumeAll(); 8025a26: f7ff ff3b bl 80258a0 mtCOVERAGE_TEST_MARKER(); } /* Force a reschedule if xTaskResumeAll has not already done so, we may have put ourselves to sleep. */ if( xAlreadyYielded == pdFALSE ) 8025a2a: 2800 cmp r0, #0 8025a2c: d0d9 beq.n 80259e2 } else { mtCOVERAGE_TEST_MARKER(); } } 8025a2e: bd38 pop {r3, r4, r5, pc} 8025a30: 2000245c .word 0x2000245c 8025a34: 20002460 .word 0x20002460 8025a38: 20002444 .word 0x20002444 8025a3c: 20002484 .word 0x20002484 08025a40 : #endif /* configUSE_APPLICATION_TASK_TAG */ /*-----------------------------------------------------------*/ void vTaskSwitchContext( void ) { 8025a40: b508 push {r3, lr} if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE ) 8025a42: 4b12 ldr r3, [pc, #72] ; (8025a8c ) 8025a44: 681a ldr r2, [r3, #0] 8025a46: 4b12 ldr r3, [pc, #72] ; (8025a90 ) 8025a48: b10a cbz r2, 8025a4e { /* The scheduler is currently suspended - do not allow a context switch. */ xYieldPending = pdTRUE; 8025a4a: 2201 movs r2, #1 8025a4c: e01c b.n 8025a88 } else { xYieldPending = pdFALSE; 8025a4e: 601a str r2, [r3, #0] taskFIRST_CHECK_FOR_STACK_OVERFLOW(); taskSECOND_CHECK_FOR_STACK_OVERFLOW(); /* Select a new task to run using either the generic C or port optimised asm code. */ taskSELECT_HIGHEST_PRIORITY_TASK(); 8025a50: 4b10 ldr r3, [pc, #64] ; (8025a94 ) 8025a52: 681a ldr r2, [r3, #0] /* Generic helper function. */ __attribute__( ( always_inline ) ) static inline uint8_t ucPortCountLeadingZeros( uint32_t ulBitmap ) { uint8_t ucReturn; __asm volatile ( "clz %0, %1" : "=r" ( ucReturn ) : "r" ( ulBitmap ) ); 8025a54: fab2 f282 clz r2, r2 8025a58: b2d2 uxtb r2, r2 8025a5a: 2314 movs r3, #20 8025a5c: f1c2 021f rsb r2, r2, #31 8025a60: 490d ldr r1, [pc, #52] ; (8025a98 ) 8025a62: 435a muls r2, r3 8025a64: 188b adds r3, r1, r2 8025a66: 588a ldr r2, [r1, r2] 8025a68: b912 cbnz r2, 8025a70 8025a6a: f000 f99f bl 8025dac 8025a6e: e7fe b.n 8025a6e 8025a70: 685a ldr r2, [r3, #4] 8025a72: 6852 ldr r2, [r2, #4] 8025a74: f103 0108 add.w r1, r3, #8 8025a78: 428a cmp r2, r1 8025a7a: 605a str r2, [r3, #4] 8025a7c: bf04 itt eq 8025a7e: 6852 ldreq r2, [r2, #4] 8025a80: 605a streq r2, [r3, #4] 8025a82: 685b ldr r3, [r3, #4] 8025a84: 68da ldr r2, [r3, #12] 8025a86: 4b05 ldr r3, [pc, #20] ; (8025a9c ) 8025a88: 601a str r2, [r3, #0] 8025a8a: bd08 pop {r3, pc} 8025a8c: 2000245c .word 0x2000245c 8025a90: 20002488 .word 0x20002488 8025a94: 20002484 .word 0x20002484 8025a98: 200023cc .word 0x200023cc 8025a9c: 20002444 .word 0x20002444 08025aa0 : } } /*-----------------------------------------------------------*/ void vTaskPlaceOnEventList( List_t * const pxEventList, const TickType_t xTicksToWait ) { 8025aa0: b538 push {r3, r4, r5, lr} 8025aa2: 460d mov r5, r1 TickType_t xTimeToWake; configASSERT( pxEventList ); 8025aa4: b910 cbnz r0, 8025aac 8025aa6: f000 f981 bl 8025dac 8025aaa: e7fe b.n 8025aaa /* Place the event list item of the TCB in the appropriate event list. This is placed in the list in priority order so the highest priority task is the first to be woken by the event. The queue that contains the event list is locked, preventing simultaneous access from interrupts. */ vListInsert( pxEventList, &( pxCurrentTCB->xEventListItem ) ); 8025aac: 4c12 ldr r4, [pc, #72] ; (8025af8 ) 8025aae: 6821 ldr r1, [r4, #0] 8025ab0: 3118 adds r1, #24 8025ab2: f7ff f9d7 bl 8024e64 /* The task must be removed from from the ready list before it is added to the blocked list as the same list item is used for both lists. Exclusive access to the ready lists guaranteed because the scheduler is locked. */ if( uxListRemove( &( pxCurrentTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 ) 8025ab6: 6820 ldr r0, [r4, #0] 8025ab8: 3004 adds r0, #4 8025aba: f7ff f9eb bl 8024e94 8025abe: b948 cbnz r0, 8025ad4 { /* The current task must be in a ready list, so there is no need to check, and the port reset macro can be called directly. */ portRESET_READY_PRIORITY( pxCurrentTCB->uxPriority, uxTopReadyPriority ); 8025ac0: 4b0e ldr r3, [pc, #56] ; (8025afc ) 8025ac2: 6819 ldr r1, [r3, #0] 8025ac4: 6822 ldr r2, [r4, #0] 8025ac6: 6ad2 ldr r2, [r2, #44] ; 0x2c 8025ac8: 2001 movs r0, #1 8025aca: fa00 f202 lsl.w r2, r0, r2 8025ace: ea21 0202 bic.w r2, r1, r2 8025ad2: 601a str r2, [r3, #0] mtCOVERAGE_TEST_MARKER(); } #if ( INCLUDE_vTaskSuspend == 1 ) { if( xTicksToWait == portMAX_DELAY ) 8025ad4: 1c69 adds r1, r5, #1 8025ad6: d107 bne.n 8025ae8 { /* Add the task to the suspended task list instead of a delayed task list to ensure the task is not woken by a timing event. It will block indefinitely. */ vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xGenericListItem ) ); 8025ad8: 4b07 ldr r3, [pc, #28] ; (8025af8 ) 8025ada: 4809 ldr r0, [pc, #36] ; (8025b00 ) 8025adc: 6819 ldr r1, [r3, #0] 8025ade: 3104 adds r1, #4 will handle it. */ xTimeToWake = xTickCount + xTicksToWait; prvAddCurrentTaskToDelayedList( xTimeToWake ); } #endif /* INCLUDE_vTaskSuspend */ } 8025ae0: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} if( xTicksToWait == portMAX_DELAY ) { /* Add the task to the suspended task list instead of a delayed task list to ensure the task is not woken by a timing event. It will block indefinitely. */ vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xGenericListItem ) ); 8025ae4: f7ff b9b2 b.w 8024e4c else { /* Calculate the time at which the task should be woken if the event does not occur. This may overflow but this doesn't matter, the scheduler will handle it. */ xTimeToWake = xTickCount + xTicksToWait; 8025ae8: 4b06 ldr r3, [pc, #24] ; (8025b04 ) 8025aea: 6818 ldr r0, [r3, #0] prvAddCurrentTaskToDelayedList( xTimeToWake ); 8025aec: 1828 adds r0, r5, r0 will handle it. */ xTimeToWake = xTickCount + xTicksToWait; prvAddCurrentTaskToDelayedList( xTimeToWake ); } #endif /* INCLUDE_vTaskSuspend */ } 8025aee: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} { /* Calculate the time at which the task should be woken if the event does not occur. This may overflow but this doesn't matter, the scheduler will handle it. */ xTimeToWake = xTickCount + xTicksToWait; prvAddCurrentTaskToDelayedList( xTimeToWake ); 8025af2: f7ff bcb5 b.w 8025460 8025af6: bf00 nop 8025af8: 20002444 .word 0x20002444 8025afc: 20002484 .word 0x20002484 8025b00: 20002470 .word 0x20002470 8025b04: 20002460 .word 0x20002460 08025b08 : #endif /* configUSE_TIMERS */ /*-----------------------------------------------------------*/ BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList ) { 8025b08: b538 push {r3, r4, r5, lr} get called - the lock count on the queue will get modified instead. This means exclusive access to the event list is guaranteed here. This function assumes that a check has already been made to ensure that pxEventList is not empty. */ pxUnblockedTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxEventList ); 8025b0a: 68c3 ldr r3, [r0, #12] 8025b0c: 68dc ldr r4, [r3, #12] configASSERT( pxUnblockedTCB ); 8025b0e: b914 cbnz r4, 8025b16 8025b10: f000 f94c bl 8025dac 8025b14: e7fe b.n 8025b14 ( void ) uxListRemove( &( pxUnblockedTCB->xEventListItem ) ); 8025b16: f104 0518 add.w r5, r4, #24 8025b1a: 4628 mov r0, r5 8025b1c: f7ff f9ba bl 8024e94 if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) 8025b20: 4b11 ldr r3, [pc, #68] ; (8025b68 ) 8025b22: 681b ldr r3, [r3, #0] 8025b24: b983 cbnz r3, 8025b48 { ( void ) uxListRemove( &( pxUnblockedTCB->xGenericListItem ) ); 8025b26: 1d25 adds r5, r4, #4 8025b28: 4628 mov r0, r5 8025b2a: f7ff f9b3 bl 8024e94 prvAddTaskToReadyList( pxUnblockedTCB ); 8025b2e: 4a0f ldr r2, [pc, #60] ; (8025b6c ) 8025b30: 6ae3 ldr r3, [r4, #44] ; 0x2c 8025b32: 6810 ldr r0, [r2, #0] 8025b34: 2101 movs r1, #1 8025b36: fa01 f103 lsl.w r1, r1, r3 8025b3a: 4301 orrs r1, r0 8025b3c: 6011 str r1, [r2, #0] 8025b3e: 4a0c ldr r2, [pc, #48] ; (8025b70 ) 8025b40: 2014 movs r0, #20 8025b42: fb00 2003 mla r0, r0, r3, r2 8025b46: e000 b.n 8025b4a } else { /* The delayed and ready lists cannot be accessed, so hold this task pending until the scheduler is resumed. */ vListInsertEnd( &( xPendingReadyList ), &( pxUnblockedTCB->xEventListItem ) ); 8025b48: 480a ldr r0, [pc, #40] ; (8025b74 ) 8025b4a: 4629 mov r1, r5 8025b4c: f7ff f97e bl 8024e4c } if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority ) 8025b50: 4b09 ldr r3, [pc, #36] ; (8025b78 ) 8025b52: 6ae2 ldr r2, [r4, #44] ; 0x2c 8025b54: 681b ldr r3, [r3, #0] 8025b56: 6adb ldr r3, [r3, #44] ; 0x2c 8025b58: 429a cmp r2, r3 8025b5a: d903 bls.n 8025b64 it should force a context switch now. */ xReturn = pdTRUE; /* Mark that a yield is pending in case the user is not using the "xHigherPriorityTaskWoken" parameter to an ISR safe FreeRTOS function. */ xYieldPending = pdTRUE; 8025b5c: 4b07 ldr r3, [pc, #28] ; (8025b7c ) 8025b5e: 2001 movs r0, #1 8025b60: 6018 str r0, [r3, #0] 8025b62: bd38 pop {r3, r4, r5, pc} } else { xReturn = pdFALSE; 8025b64: 2000 movs r0, #0 prvResetNextTaskUnblockTime(); } #endif return xReturn; } 8025b66: bd38 pop {r3, r4, r5, pc} 8025b68: 2000245c .word 0x2000245c 8025b6c: 20002484 .word 0x20002484 8025b70: 200023cc .word 0x200023cc 8025b74: 20002448 .word 0x20002448 8025b78: 20002444 .word 0x20002444 8025b7c: 20002488 .word 0x20002488 08025b80 : return xReturn; } /*-----------------------------------------------------------*/ void vTaskSetTimeOutState( TimeOut_t * const pxTimeOut ) { 8025b80: b508 push {r3, lr} configASSERT( pxTimeOut ); 8025b82: b910 cbnz r0, 8025b8a 8025b84: f000 f912 bl 8025dac 8025b88: e7fe b.n 8025b88 pxTimeOut->xOverflowCount = xNumOfOverflows; 8025b8a: 4b03 ldr r3, [pc, #12] ; (8025b98 ) 8025b8c: 681b ldr r3, [r3, #0] 8025b8e: 6003 str r3, [r0, #0] pxTimeOut->xTimeOnEntering = xTickCount; 8025b90: 4b02 ldr r3, [pc, #8] ; (8025b9c ) 8025b92: 681b ldr r3, [r3, #0] 8025b94: 6043 str r3, [r0, #4] 8025b96: bd08 pop {r3, pc} 8025b98: 20002390 .word 0x20002390 8025b9c: 20002460 .word 0x20002460 08025ba0 : } /*-----------------------------------------------------------*/ BaseType_t xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait ) { 8025ba0: b538 push {r3, r4, r5, lr} 8025ba2: 460d mov r5, r1 BaseType_t xReturn; configASSERT( pxTimeOut ); 8025ba4: 4604 mov r4, r0 8025ba6: b910 cbnz r0, 8025bae 8025ba8: f000 f900 bl 8025dac 8025bac: e7fe b.n 8025bac configASSERT( pxTicksToWait ); 8025bae: b911 cbnz r1, 8025bb6 8025bb0: f000 f8fc bl 8025dac 8025bb4: e7fe b.n 8025bb4 taskENTER_CRITICAL(); 8025bb6: f000 f901 bl 8025dbc { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; 8025bba: 4b0e ldr r3, [pc, #56] ; (8025bf4 ) 8025bbc: 681a ldr r2, [r3, #0] #if ( INCLUDE_vTaskSuspend == 1 ) /* If INCLUDE_vTaskSuspend is set to 1 and the block time specified is the maximum block time then the task should block indefinitely, and therefore never time out. */ if( *pxTicksToWait == portMAX_DELAY ) 8025bbe: 682b ldr r3, [r5, #0] 8025bc0: 1c59 adds r1, r3, #1 8025bc2: d010 beq.n 8025be6 xReturn = pdFALSE; } else /* We are not blocking indefinitely, perform the checks below. */ #endif if( ( xNumOfOverflows != pxTimeOut->xOverflowCount ) && ( xConstTickCount >= pxTimeOut->xTimeOnEntering ) ) /*lint !e525 Indentation preferred as is to make code within pre-processor directives clearer. */ 8025bc4: 490c ldr r1, [pc, #48] ; (8025bf8 ) 8025bc6: 6808 ldr r0, [r1, #0] 8025bc8: 6821 ldr r1, [r4, #0] 8025bca: 4288 cmp r0, r1 8025bcc: 6861 ldr r1, [r4, #4] 8025bce: d001 beq.n 8025bd4 8025bd0: 428a cmp r2, r1 8025bd2: d20a bcs.n 8025bea was called, but has also overflowed since vTaskSetTimeOut() was called. It must have wrapped all the way around and gone past us again. This passed since vTaskSetTimeout() was called. */ xReturn = pdTRUE; } else if( ( xConstTickCount - pxTimeOut->xTimeOnEntering ) < *pxTicksToWait ) 8025bd4: 1a50 subs r0, r2, r1 8025bd6: 4298 cmp r0, r3 8025bd8: d207 bcs.n 8025bea { /* Not a genuine timeout. Adjust parameters for time remaining. */ *pxTicksToWait -= ( xConstTickCount - pxTimeOut->xTimeOnEntering ); 8025bda: 1a8a subs r2, r1, r2 8025bdc: 18d3 adds r3, r2, r3 8025bde: 602b str r3, [r5, #0] vTaskSetTimeOutState( pxTimeOut ); 8025be0: 4620 mov r0, r4 8025be2: f7ff ffcd bl 8025b80 /* If INCLUDE_vTaskSuspend is set to 1 and the block time specified is the maximum block time then the task should block indefinitely, and therefore never time out. */ if( *pxTicksToWait == portMAX_DELAY ) { xReturn = pdFALSE; 8025be6: 2400 movs r4, #0 8025be8: e000 b.n 8025bec { /* The tick count is greater than the time at which vTaskSetTimeout() was called, but has also overflowed since vTaskSetTimeOut() was called. It must have wrapped all the way around and gone past us again. This passed since vTaskSetTimeout() was called. */ xReturn = pdTRUE; 8025bea: 2401 movs r4, #1 else { xReturn = pdTRUE; } } taskEXIT_CRITICAL(); 8025bec: f000 f912 bl 8025e14 return xReturn; } 8025bf0: 4620 mov r0, r4 8025bf2: bd38 pop {r3, r4, r5, pc} 8025bf4: 20002460 .word 0x20002460 8025bf8: 20002390 .word 0x20002390 08025bfc : /*-----------------------------------------------------------*/ void vTaskMissedYield( void ) { xYieldPending = pdTRUE; 8025bfc: 4b01 ldr r3, [pc, #4] ; (8025c04 ) 8025bfe: 2201 movs r2, #1 8025c00: 601a str r2, [r3, #0] 8025c02: 4770 bx lr 8025c04: 20002488 .word 0x20002488 08025c08 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) void vTaskPriorityInherit( TaskHandle_t const pxMutexHolder ) { 8025c08: b5f8 push {r3, r4, r5, r6, r7, lr} TCB_t * const pxTCB = ( TCB_t * ) pxMutexHolder; /* If the mutex was given back by an interrupt while the queue was locked then the mutex holder might now be NULL. */ if( pxMutexHolder != NULL ) 8025c0a: 4604 mov r4, r0 8025c0c: 2800 cmp r0, #0 8025c0e: d040 beq.n 8025c92 { if( pxTCB->uxPriority < pxCurrentTCB->uxPriority ) 8025c10: 4a20 ldr r2, [pc, #128] ; (8025c94 ) 8025c12: 6ac3 ldr r3, [r0, #44] ; 0x2c 8025c14: 6811 ldr r1, [r2, #0] 8025c16: 6ac9 ldr r1, [r1, #44] ; 0x2c 8025c18: 428b cmp r3, r1 8025c1a: d23a bcs.n 8025c92 { /* Adjust the mutex holder state to account for its new priority. Only reset the event list item value if the value is not being used for anything else. */ if( ( listGET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ) ) & taskEVENT_LIST_ITEM_VALUE_IN_USE ) == 0UL ) 8025c1c: 6981 ldr r1, [r0, #24] 8025c1e: 2900 cmp r1, #0 8025c20: db04 blt.n 8025c2c { listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxCurrentTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 8025c22: 6812 ldr r2, [r2, #0] 8025c24: 6ad2 ldr r2, [r2, #44] ; 0x2c 8025c26: f1c2 0205 rsb r2, r2, #5 8025c2a: 6182 str r2, [r0, #24] mtCOVERAGE_TEST_MARKER(); } /* If the task being modified is in the ready state it will need to be moved into a new list. */ if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ pxTCB->uxPriority ] ), &( pxTCB->xGenericListItem ) ) != pdFALSE ) 8025c2c: 4e1a ldr r6, [pc, #104] ; (8025c98 ) 8025c2e: 6962 ldr r2, [r4, #20] 8025c30: 2714 movs r7, #20 8025c32: fb07 6303 mla r3, r7, r3, r6 8025c36: 429a cmp r2, r3 8025c38: d127 bne.n 8025c8a 8025c3a: e01f b.n 8025c7c { if( uxListRemove( &( pxTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 ) { taskRESET_READY_PRIORITY( pxTCB->uxPriority ); 8025c3c: 6ae2 ldr r2, [r4, #44] ; 0x2c 8025c3e: 4357 muls r7, r2 8025c40: 59f3 ldr r3, [r6, r7] 8025c42: b93b cbnz r3, 8025c54 8025c44: 4b15 ldr r3, [pc, #84] ; (8025c9c ) 8025c46: 2001 movs r0, #1 8025c48: 6819 ldr r1, [r3, #0] 8025c4a: fa00 f202 lsl.w r2, r0, r2 8025c4e: ea21 0202 bic.w r2, r1, r2 8025c52: 601a str r2, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 8025c54: 4b0f ldr r3, [pc, #60] ; (8025c94 ) prvAddTaskToReadyList( pxTCB ); 8025c56: 4a11 ldr r2, [pc, #68] ; (8025c9c ) { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 8025c58: 681b ldr r3, [r3, #0] prvAddTaskToReadyList( pxTCB ); 8025c5a: 6810 ldr r0, [r2, #0] { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 8025c5c: 6adb ldr r3, [r3, #44] ; 0x2c prvAddTaskToReadyList( pxTCB ); 8025c5e: 2101 movs r1, #1 8025c60: fa01 f103 lsl.w r1, r1, r3 8025c64: 4301 orrs r1, r0 8025c66: 6011 str r1, [r2, #0] 8025c68: 4a0b ldr r2, [pc, #44] ; (8025c98 ) { mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 8025c6a: 62e3 str r3, [r4, #44] ; 0x2c prvAddTaskToReadyList( pxTCB ); 8025c6c: 2014 movs r0, #20 8025c6e: fb00 2003 mla r0, r0, r3, r2 8025c72: 4629 mov r1, r5 } else { mtCOVERAGE_TEST_MARKER(); } } 8025c74: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr} mtCOVERAGE_TEST_MARKER(); } /* Inherit the priority before being moved into the new list. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; prvAddTaskToReadyList( pxTCB ); 8025c78: f7ff b8e8 b.w 8024e4c /* If the task being modified is in the ready state it will need to be moved into a new list. */ if( listIS_CONTAINED_WITHIN( &( pxReadyTasksLists[ pxTCB->uxPriority ] ), &( pxTCB->xGenericListItem ) ) != pdFALSE ) { if( uxListRemove( &( pxTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 ) 8025c7c: 1d25 adds r5, r4, #4 8025c7e: 4628 mov r0, r5 8025c80: f7ff f908 bl 8024e94 8025c84: 2800 cmp r0, #0 8025c86: d0d9 beq.n 8025c3c 8025c88: e7e4 b.n 8025c54 prvAddTaskToReadyList( pxTCB ); } else { /* Just inherit the priority. */ pxTCB->uxPriority = pxCurrentTCB->uxPriority; 8025c8a: 4b02 ldr r3, [pc, #8] ; (8025c94 ) 8025c8c: 681b ldr r3, [r3, #0] 8025c8e: 6adb ldr r3, [r3, #44] ; 0x2c 8025c90: 62e3 str r3, [r4, #44] ; 0x2c 8025c92: bdf8 pop {r3, r4, r5, r6, r7, pc} 8025c94: 20002444 .word 0x20002444 8025c98: 200023cc .word 0x200023cc 8025c9c: 20002484 .word 0x20002484 08025ca0 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) { 8025ca0: b538 push {r3, r4, r5, lr} TCB_t * const pxTCB = ( TCB_t * ) pxMutexHolder; BaseType_t xReturn = pdFALSE; if( pxMutexHolder != NULL ) 8025ca2: 4604 mov r4, r0 8025ca4: b908 cbnz r0, 8025caa #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) { TCB_t * const pxTCB = ( TCB_t * ) pxMutexHolder; BaseType_t xReturn = pdFALSE; 8025ca6: 2000 movs r0, #0 8025ca8: bd38 pop {r3, r4, r5, pc} if( pxMutexHolder != NULL ) { configASSERT( pxTCB->uxMutexesHeld ); 8025caa: 6d03 ldr r3, [r0, #80] ; 0x50 8025cac: b913 cbnz r3, 8025cb4 8025cae: f000 f87d bl 8025dac 8025cb2: e7fe b.n 8025cb2 ( pxTCB->uxMutexesHeld )--; if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 8025cb4: 6ac1 ldr r1, [r0, #44] ; 0x2c 8025cb6: 6cc2 ldr r2, [r0, #76] ; 0x4c BaseType_t xReturn = pdFALSE; if( pxMutexHolder != NULL ) { configASSERT( pxTCB->uxMutexesHeld ); ( pxTCB->uxMutexesHeld )--; 8025cb8: 3b01 subs r3, #1 if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 8025cba: 4291 cmp r1, r2 BaseType_t xReturn = pdFALSE; if( pxMutexHolder != NULL ) { configASSERT( pxTCB->uxMutexesHeld ); ( pxTCB->uxMutexesHeld )--; 8025cbc: 6503 str r3, [r0, #80] ; 0x50 if( pxTCB->uxPriority != pxTCB->uxBasePriority ) 8025cbe: d0f2 beq.n 8025ca6 { /* Only disinherit if no other mutexes are held. */ if( pxTCB->uxMutexesHeld == ( UBaseType_t ) 0 ) 8025cc0: 2b00 cmp r3, #0 8025cc2: d1f0 bne.n 8025ca6 /* A task can only have an inhertied priority if it holds the mutex. If the mutex is held by a task then it cannot be given from an interrupt, and if a mutex is given by the holding task then it must be the running state task. Remove the holding task from the ready list. */ if( uxListRemove( &( pxTCB->xGenericListItem ) ) == ( UBaseType_t ) 0 ) 8025cc4: 1d05 adds r5, r0, #4 8025cc6: 4628 mov r0, r5 8025cc8: f7ff f8e4 bl 8024e94 8025ccc: b968 cbnz r0, 8025cea { taskRESET_READY_PRIORITY( pxTCB->uxPriority ); 8025cce: 6ae2 ldr r2, [r4, #44] ; 0x2c 8025cd0: 4910 ldr r1, [pc, #64] ; (8025d14 ) 8025cd2: 2314 movs r3, #20 8025cd4: 4353 muls r3, r2 8025cd6: 58cb ldr r3, [r1, r3] 8025cd8: b93b cbnz r3, 8025cea 8025cda: 4b0f ldr r3, [pc, #60] ; (8025d18 ) 8025cdc: 2001 movs r0, #1 8025cde: 6819 ldr r1, [r3, #0] 8025ce0: fa00 f202 lsl.w r2, r0, r2 8025ce4: ea21 0202 bic.w r2, r1, r2 8025ce8: 601a str r2, [r3, #0] } /* Disinherit the priority before adding the task into the new ready list. */ traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority ); pxTCB->uxPriority = pxTCB->uxBasePriority; 8025cea: 6ce3 ldr r3, [r4, #76] ; 0x4c /* Reset the event list item value. It cannot be in use for any other purpose if this task is running, and it must be running to give back the mutex. */ listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ 8025cec: f1c3 0205 rsb r2, r3, #5 8025cf0: 61a2 str r2, [r4, #24] prvAddTaskToReadyList( pxTCB ); 8025cf2: 4a09 ldr r2, [pc, #36] ; (8025d18 ) } /* Disinherit the priority before adding the task into the new ready list. */ traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority ); pxTCB->uxPriority = pxTCB->uxBasePriority; 8025cf4: 62e3 str r3, [r4, #44] ; 0x2c /* Reset the event list item value. It cannot be in use for any other purpose if this task is running, and it must be running to give back the mutex. */ listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ prvAddTaskToReadyList( pxTCB ); 8025cf6: 6811 ldr r1, [r2, #0] 8025cf8: 2401 movs r4, #1 8025cfa: fa04 f003 lsl.w r0, r4, r3 8025cfe: 4301 orrs r1, r0 8025d00: 6011 str r1, [r2, #0] 8025d02: 4a04 ldr r2, [pc, #16] ; (8025d14 ) 8025d04: 2014 movs r0, #20 8025d06: fb00 2003 mla r0, r0, r3, r2 8025d0a: 4629 mov r1, r5 8025d0c: f7ff f89e bl 8024e4c in an order different to that in which they were taken. If a context switch did not occur when the first mutex was returned, even if a task was waiting on it, then a context switch should occur when the last mutex is returned whether a task is waiting on it or not. */ xReturn = pdTRUE; 8025d10: 4620 mov r0, r4 { mtCOVERAGE_TEST_MARKER(); } return xReturn; } 8025d12: bd38 pop {r3, r4, r5, pc} 8025d14: 200023cc .word 0x200023cc 8025d18: 20002484 .word 0x20002484 08025d1c : void *pvTaskIncrementMutexHeldCount( void ) { /* If xSemaphoreCreateMutex() is called before any tasks have been created then pxCurrentTCB will be NULL. */ if( pxCurrentTCB != NULL ) 8025d1c: 4b04 ldr r3, [pc, #16] ; (8025d30 ) 8025d1e: 681a ldr r2, [r3, #0] 8025d20: b11a cbz r2, 8025d2a { ( pxCurrentTCB->uxMutexesHeld )++; 8025d22: 681a ldr r2, [r3, #0] 8025d24: 6d11 ldr r1, [r2, #80] ; 0x50 8025d26: 3101 adds r1, #1 8025d28: 6511 str r1, [r2, #80] ; 0x50 } return pxCurrentTCB; 8025d2a: 6818 ldr r0, [r3, #0] } 8025d2c: 4770 bx lr 8025d2e: bf00 nop 8025d30: 20002444 .word 0x20002444 08025d34 : } /*-----------------------------------------------------------*/ static void prvPortStartFirstTask( void ) { __asm volatile( 8025d34: 4806 ldr r0, [pc, #24] ; (8025d50 ) 8025d36: 6800 ldr r0, [r0, #0] 8025d38: 6800 ldr r0, [r0, #0] 8025d3a: f380 8808 msr MSP, r0 8025d3e: b662 cpsie i 8025d40: b661 cpsie f 8025d42: f3bf 8f4f dsb sy 8025d46: f3bf 8f6f isb sy 8025d4a: df00 svc 0 8025d4c: bf00 nop 8025d4e: 0000 .short 0x0000 8025d50: e000ed08 .word 0xe000ed08 08025d54 : StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters ) { /* Simulate the stack frame as it would be created by a context switch interrupt. */ pxTopOfStack--; /* Offset added to account for the way the MCU uses the stack on entry/exit of interrupts. */ *pxTopOfStack = portINITIAL_XPSR; /* xPSR */ 8025d54: f04f 7380 mov.w r3, #16777216 ; 0x1000000 pxTopOfStack--; *pxTopOfStack = ( StackType_t ) pxCode; /* PC */ 8025d58: e900 000a stmdb r0, {r1, r3} pxTopOfStack--; *pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */ 8025d5c: 4b03 ldr r3, [pc, #12] ; (8025d6c ) pxTopOfStack -= 5; /* R12, R3, R2 and R1. */ *pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */ 8025d5e: f840 2c20 str.w r2, [r0, #-32] pxTopOfStack--; /* Offset added to account for the way the MCU uses the stack on entry/exit of interrupts. */ *pxTopOfStack = portINITIAL_XPSR; /* xPSR */ pxTopOfStack--; *pxTopOfStack = ( StackType_t ) pxCode; /* PC */ pxTopOfStack--; *pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */ 8025d62: f840 3c0c str.w r3, [r0, #-12] pxTopOfStack -= 5; /* R12, R3, R2 and R1. */ *pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */ pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */ return pxTopOfStack; } 8025d66: 3840 subs r0, #64 ; 0x40 8025d68: 4770 bx lr 8025d6a: bf00 nop 8025d6c: 08025df1 .word 0x08025df1 08025d70 : } /*-----------------------------------------------------------*/ void vPortSVCHandler( void ) { __asm volatile ( 8025d70: 4b07 ldr r3, [pc, #28] ; (8025d90 ) 8025d72: 6819 ldr r1, [r3, #0] 8025d74: 6808 ldr r0, [r1, #0] 8025d76: e8b0 0ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp} 8025d7a: f380 8809 msr PSP, r0 8025d7e: f3bf 8f6f isb sy 8025d82: f04f 0000 mov.w r0, #0 8025d86: f380 8811 msr BASEPRI, r0 8025d8a: f04e 0e0d orr.w lr, lr, #13 8025d8e: 4770 bx lr 08025d90 : 8025d90: 20002444 .word 0x20002444 08025d94 : /*-----------------------------------------------------------*/ void vPortYield( void ) { /* Set a PendSV to request a context switch. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; 8025d94: 4b04 ldr r3, [pc, #16] ; (8025da8 ) 8025d96: f04f 5280 mov.w r2, #268435456 ; 0x10000000 8025d9a: 601a str r2, [r3, #0] /* Barriers are normally not required but do ensure the code is completely within the specified behaviour for the architecture. */ __asm volatile( "dsb" ); 8025d9c: f3bf 8f4f dsb sy __asm volatile( "isb" ); 8025da0: f3bf 8f6f isb sy 8025da4: 4770 bx lr 8025da6: bf00 nop 8025da8: e000ed04 .word 0xe000ed04 08025dac : } /*-----------------------------------------------------------*/ __attribute__(( naked )) uint32_t ulPortSetInterruptMask( void ) { __asm volatile \ 8025dac: f3ef 8011 mrs r0, BASEPRI 8025db0: f04f 0150 mov.w r1, #80 ; 0x50 8025db4: f381 8811 msr BASEPRI, r1 8025db8: 4770 bx lr ); /* This return will not be reached but is necessary to prevent compiler warnings. */ return 0; } 8025dba: 2000 movs r0, #0 08025dbc : __asm volatile( "isb" ); } /*-----------------------------------------------------------*/ void vPortEnterCritical( void ) { 8025dbc: b508 push {r3, lr} portDISABLE_INTERRUPTS(); 8025dbe: f7ff fff5 bl 8025dac uxCriticalNesting++; 8025dc2: 4a09 ldr r2, [pc, #36] ; (8025de8 ) 8025dc4: 6813 ldr r3, [r2, #0] 8025dc6: 3301 adds r3, #1 8025dc8: 6013 str r3, [r2, #0] __asm volatile( "dsb" ); 8025dca: f3bf 8f4f dsb sy __asm volatile( "isb" ); 8025dce: f3bf 8f6f isb sy /* This is not the interrupt safe version of the enter critical function so assert() if it is being called from an interrupt context. Only API functions that end in "FromISR" can be used in an interrupt. Only assert if the critical nesting count is 1 to protect against recursive calls if the assert function also uses a critical section. */ if( uxCriticalNesting == 1 ) 8025dd2: 2b01 cmp r3, #1 8025dd4: d107 bne.n 8025de6 { configASSERT( ( portNVIC_INT_CTRL_REG & portVECTACTIVE_MASK ) == 0 ); 8025dd6: 4b05 ldr r3, [pc, #20] ; (8025dec ) 8025dd8: 681b ldr r3, [r3, #0] 8025dda: f013 0fff tst.w r3, #255 ; 0xff 8025dde: d002 beq.n 8025de6 8025de0: f7ff ffe4 bl 8025dac 8025de4: e7fe b.n 8025de4 8025de6: bd08 pop {r3, pc} 8025de8: 200010fc .word 0x200010fc 8025dec: e000ed04 .word 0xe000ed04 08025df0 : return pxTopOfStack; } /*-----------------------------------------------------------*/ static void prvTaskExitError( void ) { 8025df0: b508 push {r3, lr} its caller as there is nothing to return to. If a task wants to exit it should instead call vTaskDelete( NULL ). Artificially force an assert() to be triggered if configASSERT() is defined, then stop here so application writers can catch the error. */ configASSERT( uxCriticalNesting == ~0UL ); 8025df2: 4b05 ldr r3, [pc, #20] ; (8025e08 ) 8025df4: 681b ldr r3, [r3, #0] 8025df6: 3301 adds r3, #1 8025df8: d002 beq.n 8025e00 8025dfa: f7ff ffd7 bl 8025dac 8025dfe: e7fe b.n 8025dfe portDISABLE_INTERRUPTS(); 8025e00: f7ff ffd4 bl 8025dac 8025e04: e7fe b.n 8025e04 8025e06: bf00 nop 8025e08: 200010fc .word 0x200010fc 08025e0c : } /*-----------------------------------------------------------*/ __attribute__(( naked )) void vPortClearInterruptMask( uint32_t ulNewMaskValue ) { __asm volatile \ 8025e0c: f380 8811 msr BASEPRI, r0 8025e10: 4770 bx lr 8025e12: 0000 movs r0, r0 08025e14 : } } /*-----------------------------------------------------------*/ void vPortExitCritical( void ) { 8025e14: b508 push {r3, lr} configASSERT( uxCriticalNesting ); 8025e16: 4b07 ldr r3, [pc, #28] ; (8025e34 ) 8025e18: 6818 ldr r0, [r3, #0] 8025e1a: b910 cbnz r0, 8025e22 8025e1c: f7ff ffc6 bl 8025dac 8025e20: e7fe b.n 8025e20 uxCriticalNesting--; 8025e22: 3801 subs r0, #1 8025e24: 6018 str r0, [r3, #0] if( uxCriticalNesting == 0 ) 8025e26: b918 cbnz r0, 8025e30 { portENABLE_INTERRUPTS(); } } 8025e28: e8bd 4008 ldmia.w sp!, {r3, lr} { configASSERT( uxCriticalNesting ); uxCriticalNesting--; if( uxCriticalNesting == 0 ) { portENABLE_INTERRUPTS(); 8025e2c: f7ff bfee b.w 8025e0c 8025e30: bd08 pop {r3, pc} 8025e32: bf00 nop 8025e34: 200010fc .word 0x200010fc 08025e38 : void xPortPendSVHandler( void ) { /* This is a naked function. */ __asm volatile 8025e38: f3ef 8009 mrs r0, PSP 8025e3c: f3bf 8f6f isb sy 8025e40: 4b0d ldr r3, [pc, #52] ; (8025e78 ) 8025e42: 681a ldr r2, [r3, #0] 8025e44: e920 0ff0 stmdb r0!, {r4, r5, r6, r7, r8, r9, sl, fp} 8025e48: 6010 str r0, [r2, #0] 8025e4a: e92d 4008 stmdb sp!, {r3, lr} 8025e4e: f04f 0050 mov.w r0, #80 ; 0x50 8025e52: f380 8811 msr BASEPRI, r0 8025e56: f7ff fdf3 bl 8025a40 8025e5a: f04f 0000 mov.w r0, #0 8025e5e: f380 8811 msr BASEPRI, r0 8025e62: e8bd 4008 ldmia.w sp!, {r3, lr} 8025e66: 6819 ldr r1, [r3, #0] 8025e68: 6808 ldr r0, [r1, #0] 8025e6a: e8b0 0ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp} 8025e6e: f380 8809 msr PSP, r0 8025e72: f3bf 8f6f isb sy 8025e76: 4770 bx lr 08025e78 : 8025e78: 20002444 .word 0x20002444 08025e7c : ); } /*-----------------------------------------------------------*/ void xPortSysTickHandler( void ) { 8025e7c: b508 push {r3, lr} /* The SysTick runs at the lowest interrupt priority, so when this interrupt executes all interrupts must be unmasked. There is therefore no need to save and then restore the interrupt mask value as its value is already known. */ ( void ) portSET_INTERRUPT_MASK_FROM_ISR(); 8025e7e: f7ff ff95 bl 8025dac { /* Increment the RTOS tick. */ if( xTaskIncrementTick() != pdFALSE ) 8025e82: f7ff fc7f bl 8025784 8025e86: b118 cbz r0, 8025e90 { /* A context switch is required. Context switching is performed in the PendSV interrupt. Pend the PendSV interrupt. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; 8025e88: 4b04 ldr r3, [pc, #16] ; (8025e9c ) 8025e8a: f04f 5280 mov.w r2, #268435456 ; 0x10000000 8025e8e: 601a str r2, [r3, #0] } } portCLEAR_INTERRUPT_MASK_FROM_ISR( 0 ); 8025e90: 2000 movs r0, #0 } 8025e92: e8bd 4008 ldmia.w sp!, {r3, lr} /* A context switch is required. Context switching is performed in the PendSV interrupt. Pend the PendSV interrupt. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; } } portCLEAR_INTERRUPT_MASK_FROM_ISR( 0 ); 8025e96: f7ff bfb9 b.w 8025e0c 8025e9a: bf00 nop 8025e9c: e000ed04 .word 0xe000ed04 08025ea0 : ulStoppedTimerCompensation = portMISSED_COUNTS_FACTOR / ( configCPU_CLOCK_HZ / configSYSTICK_CLOCK_HZ ); } #endif /* configUSE_TICKLESS_IDLE */ /* Configure SysTick to interrupt at the requested rate. */ portNVIC_SYSTICK_LOAD_REG = ( configSYSTICK_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL; 8025ea0: 4b06 ldr r3, [pc, #24] ; (8025ebc ) 8025ea2: 681a ldr r2, [r3, #0] 8025ea4: f44f 737a mov.w r3, #1000 ; 0x3e8 8025ea8: fbb2 f2f3 udiv r2, r2, r3 8025eac: 4b04 ldr r3, [pc, #16] ; (8025ec0 ) 8025eae: 3a01 subs r2, #1 8025eb0: 601a str r2, [r3, #0] portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT ); 8025eb2: 2207 movs r2, #7 8025eb4: f843 2c04 str.w r2, [r3, #-4] 8025eb8: 4770 bx lr 8025eba: bf00 nop 8025ebc: 20000108 .word 0x20000108 8025ec0: e000e014 .word 0xe000e014 08025ec4 : /* * See header file for description. */ BaseType_t xPortStartScheduler( void ) { 8025ec4: b507 push {r0, r1, r2, lr} functions can be called. ISR safe functions are those that end in "FromISR". FreeRTOS maintains separate thread and ISR API functions to ensure interrupt entry is as fast and simple as possible. Save the interrupt priority value that is about to be clobbered. */ ulOriginalPriority = *pucFirstUserPriorityRegister; 8025ec6: 4b1d ldr r3, [pc, #116] ; (8025f3c ) 8025ec8: 781a ldrb r2, [r3, #0] 8025eca: 9201 str r2, [sp, #4] /* Determine the number of priority bits available. First write to all possible bits. */ *pucFirstUserPriorityRegister = portMAX_8_BIT_VALUE; 8025ecc: 22ff movs r2, #255 ; 0xff 8025ece: 701a strb r2, [r3, #0] /* Read the value back to see how many bits stuck. */ ucMaxPriorityValue = *pucFirstUserPriorityRegister; 8025ed0: 781b ldrb r3, [r3, #0] 8025ed2: f88d 3003 strb.w r3, [sp, #3] /* Use the same mask on the maximum system call priority. */ ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue; 8025ed6: f89d 2003 ldrb.w r2, [sp, #3] 8025eda: 4b19 ldr r3, [pc, #100] ; (8025f40 ) 8025edc: f002 0250 and.w r2, r2, #80 ; 0x50 8025ee0: 701a strb r2, [r3, #0] /* Calculate the maximum acceptable priority group value for the number of bits read back. */ ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS; 8025ee2: 4a18 ldr r2, [pc, #96] ; (8025f44 ) 8025ee4: 2307 movs r3, #7 8025ee6: 6013 str r3, [r2, #0] while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE ) 8025ee8: e005 b.n 8025ef6 { ulMaxPRIGROUPValue--; ucMaxPriorityValue <<= ( uint8_t ) 0x01; 8025eea: f89d 3003 ldrb.w r3, [sp, #3] 8025eee: 005b lsls r3, r3, #1 8025ef0: f88d 3003 strb.w r3, [sp, #3] 8025ef4: 460b mov r3, r1 ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue; /* Calculate the maximum acceptable priority group value for the number of bits read back. */ ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS; while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE ) 8025ef6: f89d 2003 ldrb.w r2, [sp, #3] 8025efa: 1e59 subs r1, r3, #1 8025efc: 0612 lsls r2, r2, #24 8025efe: d4f4 bmi.n 8025eea } /* Shift the priority group value back to its position within the AIRCR register. */ ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT; ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK; 8025f00: 4a10 ldr r2, [pc, #64] ; (8025f44 ) ucMaxPriorityValue <<= ( uint8_t ) 0x01; } /* Shift the priority group value back to its position within the AIRCR register. */ ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT; 8025f02: 021b lsls r3, r3, #8 ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK; 8025f04: f403 63e0 and.w r3, r3, #1792 ; 0x700 8025f08: 6013 str r3, [r2, #0] /* Restore the clobbered interrupt priority register to its original value. */ *pucFirstUserPriorityRegister = ulOriginalPriority; 8025f0a: 4b0c ldr r3, [pc, #48] ; (8025f3c ) 8025f0c: 9a01 ldr r2, [sp, #4] 8025f0e: 701a strb r2, [r3, #0] } #endif /* conifgASSERT_DEFINED */ /* Make PendSV and SysTick the lowest priority interrupts. */ portNVIC_SYSPRI2_REG |= portNVIC_PENDSV_PRI; 8025f10: f8d3 2920 ldr.w r2, [r3, #2336] ; 0x920 8025f14: f442 0270 orr.w r2, r2, #15728640 ; 0xf00000 8025f18: f8c3 2920 str.w r2, [r3, #2336] ; 0x920 portNVIC_SYSPRI2_REG |= portNVIC_SYSTICK_PRI; 8025f1c: f8d3 2920 ldr.w r2, [r3, #2336] ; 0x920 8025f20: f042 4270 orr.w r2, r2, #4026531840 ; 0xf0000000 8025f24: f8c3 2920 str.w r2, [r3, #2336] ; 0x920 /* Start the timer that generates the tick ISR. Interrupts are disabled here already. */ vPortSetupTimerInterrupt(); 8025f28: f7ff ffba bl 8025ea0 /* Initialise the critical nesting count ready for the first task. */ uxCriticalNesting = 0; 8025f2c: 4b06 ldr r3, [pc, #24] ; (8025f48 ) 8025f2e: 2200 movs r2, #0 8025f30: 601a str r2, [r3, #0] /* Start the first task. */ prvPortStartFirstTask(); 8025f32: f7ff feff bl 8025d34 /* Should never get here as the tasks will now be executing! Call the task exit error function to prevent compiler warnings about a static function not being called in the case that the application writer overrides this functionality by defining configTASK_RETURN_ADDRESS. */ prvTaskExitError(); 8025f36: f7ff ff5b bl 8025df0 8025f3a: bf00 nop 8025f3c: e000e400 .word 0xe000e400 8025f40: 2000248c .word 0x2000248c 8025f44: 20002490 .word 0x20002490 8025f48: 200010fc .word 0x200010fc 08025f4c : /*-----------------------------------------------------------*/ #if( configASSERT_DEFINED == 1 ) void vPortValidateInterruptPriority( void ) { 8025f4c: b508 push {r3, lr} uint32_t ulCurrentInterrupt; uint8_t ucCurrentPriority; /* Obtain the number of the currently executing interrupt. */ __asm volatile( "mrs %0, ipsr" : "=r"( ulCurrentInterrupt ) ); 8025f4e: f3ef 8305 mrs r3, IPSR /* Is the interrupt number a user defined interrupt? */ if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER ) 8025f52: 2b0f cmp r3, #15 8025f54: d908 bls.n 8025f68 { /* Look up the interrupt's priority. */ ucCurrentPriority = pcInterruptPriorityRegisters[ ulCurrentInterrupt ]; 8025f56: 4a0a ldr r2, [pc, #40] ; (8025f80 ) 8025f58: 5c9b ldrb r3, [r3, r2] interrupt entry is as fast and simple as possible. The following links provide detailed information: http://www.freertos.org/RTOS-Cortex-M3-M4.html http://www.freertos.org/FAQHelp.html */ configASSERT( ucCurrentPriority >= ucMaxSysCallPriority ); 8025f5a: 4a0a ldr r2, [pc, #40] ; (8025f84 ) 8025f5c: 7812 ldrb r2, [r2, #0] 8025f5e: 429a cmp r2, r3 8025f60: d902 bls.n 8025f68 8025f62: f7ff ff23 bl 8025dac 8025f66: e7fe b.n 8025f66 configuration then the correct setting can be achieved on all Cortex-M devices by calling NVIC_SetPriorityGrouping( 0 ); before starting the scheduler. Note however that some vendor specific peripheral libraries assume a non-zero priority group setting, in which cases using a value of zero will result in unpredicable behaviour. */ configASSERT( ( portAIRCR_REG & portPRIORITY_GROUP_MASK ) <= ulMaxPRIGROUPValue ); 8025f68: 4b07 ldr r3, [pc, #28] ; (8025f88 ) 8025f6a: 681a ldr r2, [r3, #0] 8025f6c: 4b07 ldr r3, [pc, #28] ; (8025f8c ) 8025f6e: 681b ldr r3, [r3, #0] 8025f70: f402 62e0 and.w r2, r2, #1792 ; 0x700 8025f74: 429a cmp r2, r3 8025f76: d902 bls.n 8025f7e 8025f78: f7ff ff18 bl 8025dac 8025f7c: e7fe b.n 8025f7c 8025f7e: bd08 pop {r3, pc} 8025f80: e000e3f0 .word 0xe000e3f0 8025f84: 2000248c .word 0x2000248c 8025f88: e000ed0c .word 0xe000ed0c 8025f8c: 20002490 .word 0x20002490 08025f90 : xBlockAllocatedBit = ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 ); } /*-----------------------------------------------------------*/ static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert ) { 8025f90: b510 push {r4, lr} BlockLink_t *pxIterator; uint8_t *puc; /* Iterate through the list until a block is found that has a higher address than the block being inserted. */ for( pxIterator = &xStart; pxIterator->pxNextFreeBlock < pxBlockToInsert; pxIterator = pxIterator->pxNextFreeBlock ) 8025f92: 4b0f ldr r3, [pc, #60] ; (8025fd0 ) 8025f94: e000 b.n 8025f98 8025f96: 4613 mov r3, r2 8025f98: 681a ldr r2, [r3, #0] 8025f9a: 4282 cmp r2, r0 8025f9c: d3fb bcc.n 8025f96 } /* Do the block being inserted, and the block it is being inserted after make a contiguous block of memory? */ puc = ( uint8_t * ) pxIterator; if( ( puc + pxIterator->xBlockSize ) == ( uint8_t * ) pxBlockToInsert ) 8025f9e: 6859 ldr r1, [r3, #4] 8025fa0: 185c adds r4, r3, r1 8025fa2: 4284 cmp r4, r0 8025fa4: d103 bne.n 8025fae { pxIterator->xBlockSize += pxBlockToInsert->xBlockSize; 8025fa6: 6840 ldr r0, [r0, #4] 8025fa8: 1841 adds r1, r0, r1 8025faa: 6059 str r1, [r3, #4] 8025fac: 4618 mov r0, r3 } /* Do the block being inserted, and the block it is being inserted before make a contiguous block of memory? */ puc = ( uint8_t * ) pxBlockToInsert; if( ( puc + pxBlockToInsert->xBlockSize ) == ( uint8_t * ) pxIterator->pxNextFreeBlock ) 8025fae: 6841 ldr r1, [r0, #4] 8025fb0: 1844 adds r4, r0, r1 8025fb2: 4294 cmp r4, r2 8025fb4: d106 bne.n 8025fc4 { if( pxIterator->pxNextFreeBlock != pxEnd ) 8025fb6: 4c07 ldr r4, [pc, #28] ; (8025fd4 ) 8025fb8: 6824 ldr r4, [r4, #0] 8025fba: 42a2 cmp r2, r4 8025fbc: d002 beq.n 8025fc4 { /* Form one big block from the two blocks. */ pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize; pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock; 8025fbe: ca14 ldmia r2, {r2, r4} if( ( puc + pxBlockToInsert->xBlockSize ) == ( uint8_t * ) pxIterator->pxNextFreeBlock ) { if( pxIterator->pxNextFreeBlock != pxEnd ) { /* Form one big block from the two blocks. */ pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize; 8025fc0: 1861 adds r1, r4, r1 8025fc2: 6041 str r1, [r0, #4] /* If the block being inserted plugged a gab, so was merged with the block before and the block after, then it's pxNextFreeBlock pointer will have already been set, and should not be set here as that would make it point to itself. */ if( pxIterator != pxBlockToInsert ) 8025fc4: 4283 cmp r3, r0 pxBlockToInsert->pxNextFreeBlock = pxEnd; } } else { pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock; 8025fc6: 6002 str r2, [r0, #0] before and the block after, then it's pxNextFreeBlock pointer will have already been set, and should not be set here as that would make it point to itself. */ if( pxIterator != pxBlockToInsert ) { pxIterator->pxNextFreeBlock = pxBlockToInsert; 8025fc8: bf18 it ne 8025fca: 6018 strne r0, [r3, #0] 8025fcc: bd10 pop {r4, pc} 8025fce: bf00 nop 8025fd0: 2000249c .word 0x2000249c 8025fd4: 20002498 .word 0x20002498 08025fd8 : static size_t xBlockAllocatedBit = 0; /*-----------------------------------------------------------*/ void *pvPortMalloc( size_t xWantedSize ) { 8025fd8: b5f8 push {r3, r4, r5, r6, r7, lr} 8025fda: 4605 mov r5, r0 BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink; void *pvReturn = NULL; vTaskSuspendAll(); 8025fdc: f7ff fbc4 bl 8025768 { /* If this is the first call to malloc then the heap will require initialisation to setup the list of free blocks. */ if( pxEnd == NULL ) 8025fe0: 4b3a ldr r3, [pc, #232] ; (80260cc ) 8025fe2: 681b ldr r3, [r3, #0] 8025fe4: bb1b cbnz r3, 802602e uint8_t *pucAlignedHeap; uint32_t ulAddress; size_t xTotalHeapSize = configTOTAL_HEAP_SIZE; /* Ensure the heap starts on a correctly aligned boundary. */ ulAddress = ( uint32_t ) ucHeap; 8025fe6: 4a3a ldr r2, [pc, #232] ; (80260d0 ) if( ( ulAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) 8025fe8: 0756 lsls r6, r2, #29 8025fea: d007 beq.n 8025ffc { ulAddress += ( portBYTE_ALIGNMENT - 1 ); 8025fec: 1dd3 adds r3, r2, #7 ulAddress &= ~portBYTE_ALIGNMENT_MASK; 8025fee: f023 0307 bic.w r3, r3, #7 xTotalHeapSize -= ulAddress - ( uint32_t ) ucHeap; 8025ff2: f502 4270 add.w r2, r2, #61440 ; 0xf000 8025ff6: 1ad1 subs r1, r2, r3 ulAddress = ( uint32_t ) ucHeap; if( ( ulAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) { ulAddress += ( portBYTE_ALIGNMENT - 1 ); ulAddress &= ~portBYTE_ALIGNMENT_MASK; 8025ff8: 461a mov r2, r3 8025ffa: e001 b.n 8026000 static void prvHeapInit( void ) { BlockLink_t *pxFirstFreeBlock; uint8_t *pucAlignedHeap; uint32_t ulAddress; size_t xTotalHeapSize = configTOTAL_HEAP_SIZE; 8025ffc: f44f 4170 mov.w r1, #61440 ; 0xf000 xStart.pxNextFreeBlock = ( void * ) pucAlignedHeap; xStart.xBlockSize = ( size_t ) 0; /* pxEnd is used to mark the end of the list of free blocks and is inserted at the end of the heap space. */ ulAddress = ( ( uint32_t ) pucAlignedHeap ) + xTotalHeapSize; 8026000: 1851 adds r1, r2, r1 ulAddress -= xHeapStructSize; 8026002: 3908 subs r1, #8 ulAddress &= ~portBYTE_ALIGNMENT_MASK; 8026004: f021 0107 bic.w r1, r1, #7 pucAlignedHeap = ( uint8_t * ) ulAddress; /* xStart is used to hold a pointer to the first item in the list of free blocks. The void cast is used to prevent compiler warnings. */ xStart.pxNextFreeBlock = ( void * ) pucAlignedHeap; 8026008: 4832 ldr r0, [pc, #200] ; (80260d4 ) xStart.xBlockSize = ( size_t ) 0; 802600a: 2300 movs r3, #0 802600c: e880 000c stmia.w r0, {r2, r3} ulAddress = ( ( uint32_t ) pucAlignedHeap ) + xTotalHeapSize; ulAddress -= xHeapStructSize; ulAddress &= ~portBYTE_ALIGNMENT_MASK; pxEnd = ( void * ) ulAddress; pxEnd->xBlockSize = 0; pxEnd->pxNextFreeBlock = NULL; 8026010: 600b str r3, [r1, #0] at the end of the heap space. */ ulAddress = ( ( uint32_t ) pucAlignedHeap ) + xTotalHeapSize; ulAddress -= xHeapStructSize; ulAddress &= ~portBYTE_ALIGNMENT_MASK; pxEnd = ( void * ) ulAddress; pxEnd->xBlockSize = 0; 8026012: 604b str r3, [r1, #4] pxEnd->pxNextFreeBlock = NULL; /* To start with there is a single free block that is sized to take up the entire heap space, minus the space taken by pxEnd. */ pxFirstFreeBlock = ( void * ) pucAlignedHeap; pxFirstFreeBlock->xBlockSize = ulAddress - ( uint32_t ) pxFirstFreeBlock; 8026014: 1a8b subs r3, r1, r2 pxFirstFreeBlock->pxNextFreeBlock = pxEnd; 8026016: e882 000a stmia.w r2, {r1, r3} /* Only one block exists - and it covers the entire usable heap space. */ xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 802601a: 4a2f ldr r2, [pc, #188] ; (80260d8 ) /* pxEnd is used to mark the end of the list of free blocks and is inserted at the end of the heap space. */ ulAddress = ( ( uint32_t ) pucAlignedHeap ) + xTotalHeapSize; ulAddress -= xHeapStructSize; ulAddress &= ~portBYTE_ALIGNMENT_MASK; pxEnd = ( void * ) ulAddress; 802601c: 482b ldr r0, [pc, #172] ; (80260cc ) pxFirstFreeBlock = ( void * ) pucAlignedHeap; pxFirstFreeBlock->xBlockSize = ulAddress - ( uint32_t ) pxFirstFreeBlock; pxFirstFreeBlock->pxNextFreeBlock = pxEnd; /* Only one block exists - and it covers the entire usable heap space. */ xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 802601e: 6013 str r3, [r2, #0] xFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 8026020: 4a2e ldr r2, [pc, #184] ; (80260dc ) /* pxEnd is used to mark the end of the list of free blocks and is inserted at the end of the heap space. */ ulAddress = ( ( uint32_t ) pucAlignedHeap ) + xTotalHeapSize; ulAddress -= xHeapStructSize; ulAddress &= ~portBYTE_ALIGNMENT_MASK; pxEnd = ( void * ) ulAddress; 8026022: 6001 str r1, [r0, #0] pxFirstFreeBlock->xBlockSize = ulAddress - ( uint32_t ) pxFirstFreeBlock; pxFirstFreeBlock->pxNextFreeBlock = pxEnd; /* Only one block exists - and it covers the entire usable heap space. */ xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; xFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; 8026024: 6013 str r3, [r2, #0] /* Work out the position of the top bit in a size_t variable. */ xBlockAllocatedBit = ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 ); 8026026: 4b2e ldr r3, [pc, #184] ; (80260e0 ) 8026028: f04f 4200 mov.w r2, #2147483648 ; 0x80000000 802602c: 601a str r2, [r3, #0] /* Check the requested block size is not so large that the top bit is set. The top bit of the block size member of the BlockLink_t structure is used to determine who owns the block - the application or the kernel, so it must be free. */ if( ( xWantedSize & xBlockAllocatedBit ) == 0 ) 802602e: 4b2c ldr r3, [pc, #176] ; (80260e0 ) 8026030: 681e ldr r6, [r3, #0] 8026032: 4235 tst r5, r6 8026034: d140 bne.n 80260b8 { /* The wanted size is increased so it can contain a BlockLink_t structure in addition to the requested amount of bytes. */ if( xWantedSize > 0 ) 8026036: 2d00 cmp r5, #0 8026038: d03f beq.n 80260ba { xWantedSize += xHeapStructSize; 802603a: f105 0308 add.w r3, r5, #8 /* Ensure that blocks are always aligned to the required number of bytes. */ if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 ) 802603e: 0758 lsls r0, r3, #29 { /* Byte alignment required. */ xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) ); 8026040: bf1c itt ne 8026042: f023 0307 bicne.w r3, r3, #7 8026046: 3308 addne r3, #8 else { mtCOVERAGE_TEST_MARKER(); } if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) ) 8026048: 2b00 cmp r3, #0 802604a: d033 beq.n 80260b4 802604c: 4a23 ldr r2, [pc, #140] ; (80260dc ) 802604e: 6817 ldr r7, [r2, #0] 8026050: 42bb cmp r3, r7 8026052: d831 bhi.n 80260b8 { /* Traverse the list from the start (lowest address) block until one of adequate size is found. */ pxPreviousBlock = &xStart; pxBlock = xStart.pxNextFreeBlock; 8026054: 4a1f ldr r2, [pc, #124] ; (80260d4 ) 8026056: 6814 ldr r4, [r2, #0] while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) 8026058: e001 b.n 802605e 802605a: 4622 mov r2, r4 { pxPreviousBlock = pxBlock; pxBlock = pxBlock->pxNextFreeBlock; 802605c: 4604 mov r4, r0 { /* Traverse the list from the start (lowest address) block until one of adequate size is found. */ pxPreviousBlock = &xStart; pxBlock = xStart.pxNextFreeBlock; while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) 802605e: 6861 ldr r1, [r4, #4] 8026060: 4299 cmp r1, r3 8026062: d304 bcc.n 802606e pxBlock = pxBlock->pxNextFreeBlock; } /* If the end marker was reached then a block of adequate size was not found. */ if( pxBlock != pxEnd ) 8026064: 4819 ldr r0, [pc, #100] ; (80260cc ) 8026066: 6800 ldr r0, [r0, #0] 8026068: 4284 cmp r4, r0 802606a: d104 bne.n 8026076 802606c: e024 b.n 80260b8 { /* Traverse the list from the start (lowest address) block until one of adequate size is found. */ pxPreviousBlock = &xStart; pxBlock = xStart.pxNextFreeBlock; while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) 802606e: 6820 ldr r0, [r4, #0] 8026070: 2800 cmp r0, #0 8026072: d1f2 bne.n 802605a 8026074: e7f6 b.n 8026064 BlockLink_t structure at its start. */ pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize ); /* This block is being returned for use so must be taken out of the list of free blocks. */ pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock; 8026076: 6820 ldr r0, [r4, #0] was not found. */ if( pxBlock != pxEnd ) { /* Return the memory space pointed to - jumping over the BlockLink_t structure at its start. */ pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize ); 8026078: 6815 ldr r5, [r2, #0] /* This block is being returned for use so must be taken out of the list of free blocks. */ pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock; 802607a: 6010 str r0, [r2, #0] /* If the block is larger than required it can be split into two. */ if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE ) 802607c: 1aca subs r2, r1, r3 was not found. */ if( pxBlock != pxEnd ) { /* Return the memory space pointed to - jumping over the BlockLink_t structure at its start. */ pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize ); 802607e: 3508 adds r5, #8 of the list of free blocks. */ pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock; /* If the block is larger than required it can be split into two. */ if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE ) 8026080: 2a10 cmp r2, #16 8026082: d909 bls.n 8026098 { /* This block is to be split into two. Create a new block following the number of bytes requested. The void cast is used to prevent byte alignment warnings from the compiler. */ pxNewBlockLink = ( void * ) ( ( ( uint8_t * ) pxBlock ) + xWantedSize ); 8026084: 18e0 adds r0, r4, r3 configASSERT( ( ( ( uint32_t ) pxNewBlockLink ) & portBYTE_ALIGNMENT_MASK ) == 0 ); 8026086: 0741 lsls r1, r0, #29 8026088: d002 beq.n 8026090 802608a: f7ff fe8f bl 8025dac 802608e: e7fe b.n 802608e /* Calculate the sizes of two blocks split from the single block. */ pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize; 8026090: 6042 str r2, [r0, #4] pxBlock->xBlockSize = xWantedSize; 8026092: 6063 str r3, [r4, #4] /* Insert the new block into the list of free blocks. */ prvInsertBlockIntoFreeList( ( pxNewBlockLink ) ); 8026094: f7ff ff7c bl 8025f90 else { mtCOVERAGE_TEST_MARKER(); } xFreeBytesRemaining -= pxBlock->xBlockSize; 8026098: 6862 ldr r2, [r4, #4] 802609a: 4910 ldr r1, [pc, #64] ; (80260dc ) 802609c: 1abb subs r3, r7, r2 802609e: 600b str r3, [r1, #0] if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining ) 80260a0: 490d ldr r1, [pc, #52] ; (80260d8 ) 80260a2: 6808 ldr r0, [r1, #0] 80260a4: 4283 cmp r3, r0 { xMinimumEverFreeBytesRemaining = xFreeBytesRemaining; 80260a6: bf38 it cc 80260a8: 600b strcc r3, [r1, #0] mtCOVERAGE_TEST_MARKER(); } /* The block is being returned - it is allocated and owned by the application and has no "next" block. */ pxBlock->xBlockSize |= xBlockAllocatedBit; 80260aa: 4316 orrs r6, r2 pxBlock->pxNextFreeBlock = NULL; 80260ac: 2300 movs r3, #0 80260ae: e884 0048 stmia.w r4, {r3, r6} 80260b2: e002 b.n 80260ba /*-----------------------------------------------------------*/ void *pvPortMalloc( size_t xWantedSize ) { BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink; void *pvReturn = NULL; 80260b4: 461d mov r5, r3 80260b6: e000 b.n 80260ba 80260b8: 2500 movs r5, #0 mtCOVERAGE_TEST_MARKER(); } traceMALLOC( pvReturn, xWantedSize ); } ( void ) xTaskResumeAll(); 80260ba: f7ff fbf1 bl 80258a0 mtCOVERAGE_TEST_MARKER(); } } #endif configASSERT( ( ( ( uint32_t ) pvReturn ) & portBYTE_ALIGNMENT_MASK ) == 0 ); 80260be: 076b lsls r3, r5, #29 80260c0: d002 beq.n 80260c8 80260c2: f7ff fe73 bl 8025dac 80260c6: e7fe b.n 80260c6 return pvReturn; } 80260c8: 4628 mov r0, r5 80260ca: bdf8 pop {r3, r4, r5, r6, r7, pc} 80260cc: 20002498 .word 0x20002498 80260d0: 10000000 .word 0x10000000 80260d4: 2000249c .word 0x2000249c 80260d8: 200024a4 .word 0x200024a4 80260dc: 20002494 .word 0x20002494 80260e0: 200024a8 .word 0x200024a8 080260e4 : /*-----------------------------------------------------------*/ void vPortFree( void *pv ) { 80260e4: b510 push {r4, lr} uint8_t *puc = ( uint8_t * ) pv; BlockLink_t *pxLink; if( pv != NULL ) 80260e6: 4604 mov r4, r0 80260e8: b310 cbz r0, 8026130 /* This casting is to keep the compiler from issuing warnings. */ pxLink = ( void * ) puc; /* Check the block is actually allocated. */ configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 ); 80260ea: 4a12 ldr r2, [pc, #72] ; (8026134 ) 80260ec: f850 3c04 ldr.w r3, [r0, #-4] 80260f0: 6812 ldr r2, [r2, #0] 80260f2: 421a tst r2, r3 80260f4: d102 bne.n 80260fc 80260f6: f7ff fe59 bl 8025dac 80260fa: e7fe b.n 80260fa configASSERT( pxLink->pxNextFreeBlock == NULL ); 80260fc: f850 1c08 ldr.w r1, [r0, #-8] 8026100: b111 cbz r1, 8026108 8026102: f7ff fe53 bl 8025dac 8026106: e7fe b.n 8026106 { if( pxLink->pxNextFreeBlock == NULL ) { /* The block is being returned to the heap - it is no longer allocated. */ pxLink->xBlockSize &= ~xBlockAllocatedBit; 8026108: ea23 0302 bic.w r3, r3, r2 802610c: f840 3c04 str.w r3, [r0, #-4] vTaskSuspendAll(); 8026110: f7ff fb2a bl 8025768 { /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; 8026114: 4b08 ldr r3, [pc, #32] ; (8026138 ) 8026116: f854 1c04 ldr.w r1, [r4, #-4] 802611a: 681a ldr r2, [r3, #0] traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); 802611c: f1a4 0008 sub.w r0, r4, #8 pxLink->xBlockSize &= ~xBlockAllocatedBit; vTaskSuspendAll(); { /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; 8026120: 188a adds r2, r1, r2 8026122: 601a str r2, [r3, #0] traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); 8026124: f7ff ff34 bl 8025f90 else { mtCOVERAGE_TEST_MARKER(); } } } 8026128: e8bd 4010 ldmia.w sp!, {r4, lr} /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); } ( void ) xTaskResumeAll(); 802612c: f7ff bbb8 b.w 80258a0 8026130: bd10 pop {r4, pc} 8026132: bf00 nop 8026134: 200024a8 .word 0x200024a8 8026138: 20002494 .word 0x20002494 0802613c : * @param name : pointer to a file name * @param file : pointer to a fs_file structure * @retval 1 if success, 0 if fail */ static int fs_open(char *name, struct fs_file *file) { 802613c: b570 push {r4, r5, r6, lr} struct fsdata_file_noconst *f; for (f = (struct fsdata_file_noconst *)FS_ROOT; f != NULL; f = (struct fsdata_file_noconst *)f->next) 802613e: 4c09 ldr r4, [pc, #36] ; (8026164 ) * @param name : pointer to a file name * @param file : pointer to a fs_file structure * @retval 1 if success, 0 if fail */ static int fs_open(char *name, struct fs_file *file) { 8026140: 4606 mov r6, r0 8026142: 460d mov r5, r1 struct fsdata_file_noconst *f; for (f = (struct fsdata_file_noconst *)FS_ROOT; f != NULL; f = (struct fsdata_file_noconst *)f->next) { if (!strcmp(name, f->name)) 8026144: 4630 mov r0, r6 8026146: 6861 ldr r1, [r4, #4] 8026148: f7fb fb66 bl 8021818 802614c: b928 cbnz r0, 802615a { file->data = f->data; 802614e: 68a3 ldr r3, [r4, #8] 8026150: 602b str r3, [r5, #0] file->len = f->len; 8026152: 68e3 ldr r3, [r4, #12] return 1; 8026154: 2001 movs r0, #1 for (f = (struct fsdata_file_noconst *)FS_ROOT; f != NULL; f = (struct fsdata_file_noconst *)f->next) { if (!strcmp(name, f->name)) { file->data = f->data; file->len = f->len; 8026156: 606b str r3, [r5, #4] return 1; 8026158: bd70 pop {r4, r5, r6, pc} */ static int fs_open(char *name, struct fs_file *file) { struct fsdata_file_noconst *f; for (f = (struct fsdata_file_noconst *)FS_ROOT; f != NULL; f = (struct fsdata_file_noconst *)f->next) 802615a: 6824 ldr r4, [r4, #0] 802615c: 2c00 cmp r4, #0 802615e: d1f1 bne.n 8026144 file->data = f->data; file->len = f->len; return 1; } } return 0; 8026160: 4620 mov r0, r4 } 8026162: bd70 pop {r4, r5, r6, pc} 8026164: 08034144 .word 0x08034144 08026168 : * @param pcb: pointer to a tcp_pcb structure * ¶m err: Lwip stack error code * @retval err */ static err_t http_accept(void *arg, struct tcp_pcb *pcb, err_t err) { 8026168: b538 push {r3, r4, r5, lr} struct http_state *hs; /* Allocate memory for the structure that holds the state of the connection */ hs = mem_malloc(sizeof(struct http_state)); 802616a: 2008 movs r0, #8 * @param pcb: pointer to a tcp_pcb structure * ¶m err: Lwip stack error code * @retval err */ static err_t http_accept(void *arg, struct tcp_pcb *pcb, err_t err) { 802616c: 460c mov r4, r1 struct http_state *hs; /* Allocate memory for the structure that holds the state of the connection */ hs = mem_malloc(sizeof(struct http_state)); 802616e: f001 ff09 bl 8027f84 if (hs == NULL) 8026172: 4601 mov r1, r0 8026174: b1a0 cbz r0, 80261a0 { return ERR_MEM; } /* Initialize the structure. */ hs->file = NULL; 8026176: 2500 movs r5, #0 8026178: 6005 str r5, [r0, #0] hs->left = 0; 802617a: 6045 str r5, [r0, #4] /* Tell TCP that this is the structure we wish to be passed for our callbacks. */ tcp_arg(pcb, hs); 802617c: 4620 mov r0, r4 802617e: f002 fb6f bl 8028860 /* Tell TCP that we wish to be informed of incoming data by a call to the http_recv() function. */ tcp_recv(pcb, http_recv); 8026182: 4620 mov r0, r4 8026184: 4908 ldr r1, [pc, #32] ; (80261a8 ) 8026186: f002 fb6d bl 8028864 tcp_err(pcb, conn_err); 802618a: 4620 mov r0, r4 802618c: 4907 ldr r1, [pc, #28] ; (80261ac ) 802618e: f002 fb6d bl 802886c tcp_poll(pcb, http_poll, 10); 8026192: 4620 mov r0, r4 8026194: 4906 ldr r1, [pc, #24] ; (80261b0 ) 8026196: 220a movs r2, #10 8026198: f002 fb6d bl 8028876 return ERR_OK; 802619c: 4628 mov r0, r5 802619e: e000 b.n 80261a2 /* Allocate memory for the structure that holds the state of the connection */ hs = mem_malloc(sizeof(struct http_state)); if (hs == NULL) { return ERR_MEM; 80261a0: 20ff movs r0, #255 ; 0xff tcp_err(pcb, conn_err); tcp_poll(pcb, http_poll, 10); return ERR_OK; } 80261a2: b240 sxtb r0, r0 80261a4: bd38 pop {r3, r4, r5, pc} 80261a6: bf00 nop 80261a8: 080266fd .word 0x080266fd 80261ac: 080261f7 .word 0x080261f7 80261b0: 080261df .word 0x080261df 080261b4 : * @param pcb: pointer to a tcp_pcb struct * @param hs: pointer to a http_state struct * @retval none */ static void send_data(struct tcp_pcb *pcb, struct http_state *hs) { 80261b4: b538 push {r3, r4, r5, lr} err_t err; u16_t len; /* We cannot send more data than space available in the send buffer */ if (tcp_sndbuf(pcb) < hs->left) 80261b6: 684b ldr r3, [r1, #4] 80261b8: f8b0 5066 ldrh.w r5, [r0, #102] ; 0x66 80261bc: 429d cmp r5, r3 { len = tcp_sndbuf(pcb); } else { len = hs->left; 80261be: bf28 it cs 80261c0: b29d uxthcs r5, r3 * @param pcb: pointer to a tcp_pcb struct * @param hs: pointer to a http_state struct * @retval none */ static void send_data(struct tcp_pcb *pcb, struct http_state *hs) { 80261c2: 460c mov r4, r1 } else { len = hs->left; } err = tcp_write(pcb, hs->file, len, 0); 80261c4: 462a mov r2, r5 80261c6: 6809 ldr r1, [r1, #0] 80261c8: 2300 movs r3, #0 80261ca: f003 feae bl 8029f2a if (err == ERR_OK) 80261ce: b928 cbnz r0, 80261dc { hs->file += len; 80261d0: 6823 ldr r3, [r4, #0] 80261d2: 195b adds r3, r3, r5 80261d4: 6023 str r3, [r4, #0] hs->left -= len; 80261d6: 6863 ldr r3, [r4, #4] 80261d8: 1b5d subs r5, r3, r5 80261da: 6065 str r5, [r4, #4] 80261dc: bd38 pop {r3, r4, r5, pc} 080261de : * @param arg: pointer to an argument to be passed to callback function * @param pcb: pointer on tcp_pcb structure * @retval err_t */ static err_t http_poll(void *arg, struct tcp_pcb *pcb) { 80261de: b508 push {r3, lr} if (arg == NULL) 80261e0: 4603 mov r3, r0 { tcp_close(pcb); 80261e2: 4608 mov r0, r1 * @param pcb: pointer on tcp_pcb structure * @retval err_t */ static err_t http_poll(void *arg, struct tcp_pcb *pcb) { if (arg == NULL) 80261e4: b913 cbnz r3, 80261ec { tcp_close(pcb); 80261e6: f002 fdd9 bl 8028d9c 80261ea: e002 b.n 80261f2 } else { send_data(pcb, (struct http_state *)arg); 80261ec: 4619 mov r1, r3 80261ee: f7ff ffe1 bl 80261b4 } return ERR_OK; } 80261f2: 2000 movs r0, #0 80261f4: bd08 pop {r3, pc} 080261f6 : static void conn_err(void *arg, err_t err) { struct http_state *hs; hs = arg; mem_free(hs); 80261f6: f001 bdfd b.w 8027df4 080261fa : * @param pcb: pointer to a tcp_pcb struct * @param hs: pointer to a http_state struct * @retval */ static void close_conn(struct tcp_pcb *pcb, struct http_state *hs) { 80261fa: b538 push {r3, r4, r5, lr} 80261fc: 4604 mov r4, r0 80261fe: 460d mov r5, r1 tcp_arg(pcb, NULL); 8026200: 2100 movs r1, #0 8026202: f002 fb2d bl 8028860 tcp_sent(pcb, NULL); 8026206: 4620 mov r0, r4 8026208: 2100 movs r1, #0 802620a: f002 fb2d bl 8028868 tcp_recv(pcb, NULL); 802620e: 4620 mov r0, r4 8026210: 2100 movs r1, #0 8026212: f002 fb27 bl 8028864 mem_free(hs); 8026216: 4628 mov r0, r5 8026218: f001 fdec bl 8027df4 tcp_close(pcb); 802621c: 4620 mov r0, r4 } 802621e: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} { tcp_arg(pcb, NULL); tcp_sent(pcb, NULL); tcp_recv(pcb, NULL); mem_free(hs); tcp_close(pcb); 8026222: f002 bdbb b.w 8028d9c 08026226 : * @param pcb: pointer on tcp_pcb structure * @param len * @retval err : LwIP error code */ static err_t http_sent(void *arg, struct tcp_pcb *pcb, u16_t len) { 8026226: b508 push {r3, lr} 8026228: 4603 mov r3, r0 802622a: 4608 mov r0, r1 struct http_state *hs; hs = arg; if (hs->left > 0) 802622c: 685a ldr r2, [r3, #4] { send_data(pcb, hs); 802622e: 4619 mov r1, r3 { struct http_state *hs; hs = arg; if (hs->left > 0) 8026230: b112 cbz r2, 8026238 { send_data(pcb, hs); 8026232: f7ff ffbf bl 80261b4 8026236: e001 b.n 802623c } else { close_conn(pcb, hs); 8026238: f7ff ffdf bl 80261fa } return ERR_OK; } 802623c: 2000 movs r0, #0 802623e: bd08 pop {r3, pc} 08026240 : * @brief Initialize the HTTP server (start its thread) * @param none * @retval None */ void HTTP_Init() { 8026240: b510 push {r4, lr} //sys_thread_new("HTTP", http_server_netconn_thread, NULL, 3000, 2); struct tcp_pcb *pcb; /*create new pcb*/ pcb = tcp_new(); 8026242: f002 fed9 bl 8028ff8 /* bind HTTP traffic to pcb */ tcp_bind(pcb, IP_ADDR_ANY, 80); 8026246: 2250 movs r2, #80 ; 0x50 void HTTP_Init() { //sys_thread_new("HTTP", http_server_netconn_thread, NULL, 3000, 2); struct tcp_pcb *pcb; /*create new pcb*/ pcb = tcp_new(); 8026248: 4604 mov r4, r0 /* bind HTTP traffic to pcb */ tcp_bind(pcb, IP_ADDR_ANY, 80); 802624a: 4906 ldr r1, [pc, #24] ; (8026264 ) 802624c: f002 fa36 bl 80286bc /* start listening on port 80 */ pcb = tcp_listen(pcb); 8026250: 21ff movs r1, #255 ; 0xff 8026252: 4620 mov r0, r4 8026254: f002 fa6a bl 802872c /* define callback function for TCP connection setup */ tcp_accept(pcb, http_accept); 8026258: 4903 ldr r1, [pc, #12] ; (8026268 ) } 802625a: e8bd 4010 ldmia.w sp!, {r4, lr} /* bind HTTP traffic to pcb */ tcp_bind(pcb, IP_ADDR_ANY, 80); /* start listening on port 80 */ pcb = tcp_listen(pcb); /* define callback function for TCP connection setup */ tcp_accept(pcb, http_accept); 802625e: f002 bb08 b.w 8028872 8026262: bf00 nop 8026264: 08037acc .word 0x08037acc 8026268: 08026169 .word 0x08026169 0802626c : /** * @brief Возвращает uptime, freq, dutycicle */ void HTTP_Progon(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802626c: b538 push {r3, r4, r5, lr} memset(bufOut, 0, SEND_BUF_MAX_LEN); 802626e: f44f 62fa mov.w r2, #2000 ; 0x7d0 /** * @brief Возвращает uptime, freq, dutycicle */ void HTTP_Progon(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 8026272: 460c mov r4, r1 memset(bufOut, 0, SEND_BUF_MAX_LEN); 8026274: 4608 mov r0, r1 8026276: 2100 movs r1, #0 /** * @brief Возвращает uptime, freq, dutycicle */ void HTTP_Progon(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 8026278: 461d mov r5, r3 memset(bufOut, 0, SEND_BUF_MAX_LEN); 802627a: f7fb fa41 bl 8021700 HTTP_GetProgonParams(bufOut); 802627e: 4620 mov r0, r4 8026280: f000 fe0c bl 8026e9c *lenBufOut = strlen(bufOut); 8026284: 4620 mov r0, r4 8026286: f7fb fc13 bl 8021ab0 802628a: 8028 strh r0, [r5, #0] 802628c: bd38 pop {r3, r4, r5, pc} 802628e: 0000 movs r0, r0 08026290 : /** * @brief * @retval None */ uint8_t GetParamValue(char *inStr, char *paramName, char *paramValue, uint8_t *paramLen) { 8026290: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8026294: 4690 mov r8, r2 8026296: 461f mov r7, r3 char *beginValue = 0; char *endValue = 0; int len = 0; char *strPtr = 0; strPtr = strstr(inStr, paramName); 8026298: f7fb fe8a bl 8021fb0 if (strPtr != 0) 802629c: 4605 mov r5, r0 802629e: b1e0 cbz r0, 80262da { beginValue = strpbrk(strPtr,"="); 80262a0: 490f ldr r1, [pc, #60] ; (80262e0 ) 80262a2: f7fb fcef bl 8021c84 endValue = strpbrk(strPtr,"&"); 80262a6: 490f ldr r1, [pc, #60] ; (80262e4 ) strPtr = strstr(inStr, paramName); if (strPtr != 0) { beginValue = strpbrk(strPtr,"="); 80262a8: 4606 mov r6, r0 endValue = strpbrk(strPtr,"&"); 80262aa: 4628 mov r0, r5 80262ac: f7fb fcea bl 8021c84 if (endValue == 0) 80262b0: 4604 mov r4, r0 80262b2: b920 cbnz r0, 80262be endValue = strpbrk(strPtr," "); 80262b4: 4628 mov r0, r5 80262b6: 490c ldr r1, [pc, #48] ; (80262e8 ) 80262b8: f7fb fce4 bl 8021c84 80262bc: 4604 mov r4, r0 len = endValue - beginValue - 1; 80262be: 1ba5 subs r5, r4, r6 80262c0: 3d01 subs r5, #1 strncpy(paramValue, beginValue + 1, len); 80262c2: 4640 mov r0, r8 80262c4: 1c71 adds r1, r6, #1 80262c6: 462a mov r2, r5 80262c8: f7fb fcaa bl 8021c20 *endValue = '0'; 80262cc: 2330 movs r3, #48 ; 0x30 80262ce: 7023 strb r3, [r4, #0] *beginValue = '0'; *paramLen = len; return 1; 80262d0: 2001 movs r0, #1 if (endValue == 0) endValue = strpbrk(strPtr," "); len = endValue - beginValue - 1; strncpy(paramValue, beginValue + 1, len); *endValue = '0'; *beginValue = '0'; 80262d2: 7033 strb r3, [r6, #0] *paramLen = len; 80262d4: 703d strb r5, [r7, #0] return 1; 80262d6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } else { *paramLen = 0; 80262da: 7038 strb r0, [r7, #0] return 0; } } 80262dc: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80262e0: 08033faf .word 0x08033faf 80262e4: 08033f5d .word 0x08033f5d 80262e8: 08033f5f .word 0x08033f5f 080262ec : /** * @brief Проверка пароля для перехода в режим bootloader * @retval None */ void HTTP_ConfirmBootPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 80262ec: b530 push {r4, r5, lr} 80262ee: 4602 mov r2, r0 80262f0: b095 sub sp, #84 ; 0x54 80262f2: 460c mov r4, r1 char tempStr[50]; strncpy(tempStr, bufIn, 50); 80262f4: a807 add r0, sp, #28 80262f6: 4611 mov r1, r2 80262f8: 2232 movs r2, #50 ; 0x32 /** * @brief Проверка пароля для перехода в режим bootloader * @retval None */ void HTTP_ConfirmBootPwd(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 80262fa: 461d mov r5, r3 char tempStr[50]; strncpy(tempStr, bufIn, 50); 80262fc: f7fb fc90 bl 8021c20 char value[20]; uint8_t valueLen; memset(value, 0, 20); 8026300: 2100 movs r1, #0 8026302: 2214 movs r2, #20 8026304: a802 add r0, sp, #8 8026306: f7fb f9fb bl 8021700 if (GetParamValue(tempStr, "password=", value, &valueLen)) 802630a: a807 add r0, sp, #28 802630c: 490b ldr r1, [pc, #44] ; (802633c ) 802630e: aa02 add r2, sp, #8 8026310: f10d 0307 add.w r3, sp, #7 8026314: f7ff ffbc bl 8026290 8026318: b170 cbz r0, 8026338 { if (strcmp(BOOTLOADER_PASWORD, value) == 0) 802631a: 4809 ldr r0, [pc, #36] ; (8026340 ) 802631c: a902 add r1, sp, #8 802631e: f7fb fa7b bl 8021818 8026322: b928 cbnz r0, 8026330 { *bufOut = '1'; 8026324: 2331 movs r3, #49 ; 0x31 8026326: 7023 strb r3, [r4, #0] /* Запускаем задачу отложенной перезагрузки. Контроллер должен успеть отправить ответ серверу о статусе пароля */ HTTP_StartResetTask(true); 8026328: 2001 movs r0, #1 802632a: f000 fdfb bl 8026f24 802632e: e001 b.n 8026334 } else *bufOut = '0'; 8026330: 2330 movs r3, #48 ; 0x30 8026332: 7023 strb r3, [r4, #0] *lenBufOut = 1; 8026334: 2301 movs r3, #1 8026336: 802b strh r3, [r5, #0] } } 8026338: b015 add sp, #84 ; 0x54 802633a: bd30 pop {r4, r5, pc} 802633c: 08033f61 .word 0x08033f61 8026340: 08033f6b .word 0x08033f6b 08026344 : } } */ void ClearParamString(char *inBuf) { 8026344: b510 push {r4, lr} uint16_t len; char *str; str = strstr(inBuf, "HTTP"); 8026346: 4908 ldr r1, [pc, #32] ; (8026368 ) } } */ void ClearParamString(char *inBuf) { 8026348: 4604 mov r4, r0 uint16_t len; char *str; str = strstr(inBuf, "HTTP"); 802634a: f7fb fe31 bl 8021fb0 if (str != 0) 802634e: b148 cbz r0, 8026364 { len = str - inBuf; 8026350: 1b02 subs r2, r0, r4 memset(str, 0, RECIVE_BUF_MAX_LEN - len - 1); 8026352: b292 uxth r2, r2 8026354: f5c2 62bb rsb r2, r2, #1496 ; 0x5d8 8026358: 2100 movs r1, #0 802635a: 3203 adds r2, #3 } } 802635c: e8bd 4010 ldmia.w sp!, {r4, lr} str = strstr(inBuf, "HTTP"); if (str != 0) { len = str - inBuf; memset(str, 0, RECIVE_BUF_MAX_LEN - len - 1); 8026360: f7fb b9ce b.w 8021700 8026364: bd10 pop {r4, pc} 8026366: bf00 nop 8026368: 08033f74 .word 0x08033f74 0802636c : /** * @brief * @retval None */ void HTTP_SetSettings(char *buf, uint16_t lenBuf) { 802636c: b530 push {r4, r5, lr} 802636e: b087 sub sp, #28 uint8_t valueLen = 0; 8026370: 2400 movs r4, #0 /** * @brief * @retval None */ void HTTP_SetSettings(char *buf, uint16_t lenBuf) { 8026372: 4605 mov r5, r0 uint8_t valueLen = 0; 8026374: f88d 4003 strb.w r4, [sp, #3] const uint8_t len = 20; char value[20]; //printf(buf); ClearParamString(buf); 8026378: f7ff ffe4 bl 8026344 memset(value, 0, len); 802637c: 4621 mov r1, r4 802637e: 2214 movs r2, #20 8026380: a801 add r0, sp, #4 8026382: f7fb f9bd bl 8021700 /* SNMP */ GetParamValue(buf, "read_community=", value, &valueLen); 8026386: f10d 0303 add.w r3, sp, #3 802638a: 4956 ldr r1, [pc, #344] ; (80264e4 ) 802638c: aa01 add r2, sp, #4 802638e: 4628 mov r0, r5 8026390: f7ff ff7e bl 8026290 SetReadCommunity(value); 8026394: a801 add r0, sp, #4 8026396: f7fe fac7 bl 8024928 memset(value, 0, len); 802639a: 4621 mov r1, r4 802639c: 2214 movs r2, #20 802639e: a801 add r0, sp, #4 80263a0: f7fb f9ae bl 8021700 GetParamValue(buf, "write_community=", value, &valueLen); 80263a4: f10d 0303 add.w r3, sp, #3 80263a8: 494f ldr r1, [pc, #316] ; (80264e8 ) 80263aa: aa01 add r2, sp, #4 80263ac: 4628 mov r0, r5 80263ae: f7ff ff6f bl 8026290 SetWriteCommunity(value); 80263b2: a801 add r0, sp, #4 80263b4: f7fe fabe bl 8024934 memset(value, 0, len); 80263b8: 4621 mov r1, r4 80263ba: 2214 movs r2, #20 80263bc: a801 add r0, sp, #4 80263be: f7fb f99f bl 8021700 GetParamValue(buf, "managerIP=", value, &valueLen); 80263c2: f10d 0303 add.w r3, sp, #3 80263c6: 4949 ldr r1, [pc, #292] ; (80264ec ) 80263c8: aa01 add r2, sp, #4 80263ca: 4628 mov r0, r5 80263cc: f7ff ff60 bl 8026290 SetManagerIp(value); 80263d0: a801 add r0, sp, #4 80263d2: f7fe fab5 bl 8024940 memset(value, 0, len); 80263d6: 4621 mov r1, r4 80263d8: 2214 movs r2, #20 80263da: a801 add r0, sp, #4 80263dc: f7fb f990 bl 8021700 GetParamValue(buf, "managerIP2=", value, &valueLen); 80263e0: f10d 0303 add.w r3, sp, #3 80263e4: 4942 ldr r1, [pc, #264] ; (80264f0 ) 80263e6: aa01 add r2, sp, #4 80263e8: 4628 mov r0, r5 80263ea: f7ff ff51 bl 8026290 SetManagerIp2(value); 80263ee: a801 add r0, sp, #4 80263f0: f7fe fab4 bl 802495c memset(value, 0, len); 80263f4: 4621 mov r1, r4 80263f6: 2214 movs r2, #20 80263f8: a801 add r0, sp, #4 80263fa: f7fb f981 bl 8021700 GetParamValue(buf, "managerIP3=", value, &valueLen); 80263fe: f10d 0303 add.w r3, sp, #3 8026402: 493c ldr r1, [pc, #240] ; (80264f4 ) 8026404: aa01 add r2, sp, #4 8026406: 4628 mov r0, r5 8026408: f7ff ff42 bl 8026290 SetManagerIp3(value); 802640c: a801 add r0, sp, #4 802640e: f7fe fab3 bl 8024978 memset(value, 0, len); 8026412: 4621 mov r1, r4 8026414: 2214 movs r2, #20 8026416: a801 add r0, sp, #4 8026418: f7fb f972 bl 8021700 /* Сетевые параметры */ GetParamValue(buf, "dhcp=", value, &valueLen); 802641c: 4936 ldr r1, [pc, #216] ; (80264f8 ) 802641e: aa01 add r2, sp, #4 8026420: f10d 0303 add.w r3, sp, #3 8026424: 4628 mov r0, r5 8026426: f7ff ff33 bl 8026290 SetDhcpStateStr(value); 802642a: a801 add r0, sp, #4 802642c: f7fe fa6a bl 8024904 if (strncmp(value, "on", 2) != 0) // Если dhcp off устанавливаем параметры 8026430: a801 add r0, sp, #4 8026432: 4932 ldr r1, [pc, #200] ; (80264fc ) 8026434: 2202 movs r2, #2 8026436: f7fb fb9d bl 8021b74 802643a: 2800 cmp r0, #0 802643c: d031 beq.n 80264a2 { memset(value, 0, len); 802643e: 4621 mov r1, r4 8026440: 2214 movs r2, #20 8026442: a801 add r0, sp, #4 8026444: f7fb f95c bl 8021700 GetParamValue(buf, "ipaddr=", value, &valueLen); 8026448: f10d 0303 add.w r3, sp, #3 802644c: 492c ldr r1, [pc, #176] ; (8026500 ) 802644e: aa01 add r2, sp, #4 8026450: 4628 mov r0, r5 8026452: f7ff ff1d bl 8026290 SetIPStr(value); 8026456: a801 add r0, sp, #4 8026458: f7fe fa42 bl 80248e0 memset(value, 0, len); 802645c: 4621 mov r1, r4 802645e: 2214 movs r2, #20 8026460: a801 add r0, sp, #4 8026462: f7fb f94d bl 8021700 GetParamValue(buf, "gw=", value, &valueLen); 8026466: f10d 0303 add.w r3, sp, #3 802646a: 4926 ldr r1, [pc, #152] ; (8026504 ) 802646c: aa01 add r2, sp, #4 802646e: 4628 mov r0, r5 8026470: f7ff ff0e bl 8026290 SetGatewayStr(value); 8026474: a801 add r0, sp, #4 8026476: f7fe fa39 bl 80248ec memset(value, 0, len); 802647a: 4621 mov r1, r4 802647c: 2214 movs r2, #20 802647e: a801 add r0, sp, #4 8026480: f7fb f93e bl 8021700 GetParamValue(buf, "mask=", value, &valueLen); 8026484: 4920 ldr r1, [pc, #128] ; (8026508 ) 8026486: aa01 add r2, sp, #4 8026488: f10d 0303 add.w r3, sp, #3 802648c: 4628 mov r0, r5 802648e: f7ff feff bl 8026290 SetMaskStr(value); 8026492: a801 add r0, sp, #4 8026494: f7fe fa30 bl 80248f8 memset(value, 0, len); 8026498: a801 add r0, sp, #4 802649a: 4621 mov r1, r4 802649c: 2214 movs r2, #20 802649e: f7fb f92f bl 8021700 } memset(value, 0, len); 80264a2: 2100 movs r1, #0 80264a4: 2214 movs r2, #20 80264a6: a801 add r0, sp, #4 80264a8: f7fb f92a bl 8021700 /* Если параметры WEB изменились выставляем флаг, сохраняем настройки и перезагружаемся */ if (GetStateWebReinit() == true) 80264ac: f009 fd2c bl 802ff08 80264b0: b1a0 cbz r0, 80264dc { SetWebReinitFlag(true); 80264b2: 2001 movs r0, #1 80264b4: f7fe fa08 bl 80248c8 HTTP_SaveSettings(); 80264b8: f000 fd2b bl 8026f12 /* Блокируем управление ключем на тау секунд*/ //IO_KeyBlockOn(); vTaskDelay(1010); 80264bc: f240 30f2 movw r0, #1010 ; 0x3f2 80264c0: f7ff fa8c bl 80259dc 80264c4: f3bf 8f4f dsb sy (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | 80264c8: 4a10 ldr r2, [pc, #64] ; (802650c ) 80264ca: 4b11 ldr r3, [pc, #68] ; (8026510 ) 80264cc: 68d1 ldr r1, [r2, #12] 80264ce: f401 61e0 and.w r1, r1, #1792 ; 0x700 80264d2: 430b orrs r3, r1 __STATIC_INLINE void NVIC_SystemReset(void) //static inline void NVIC_SystemReset(void) { __DSB(); /* Ensure all outstanding memory accesses included buffered write are completed before reset */ SCB->AIRCR = ((0x5FA << SCB_AIRCR_VECTKEY_Pos) | 80264d4: 60d3 str r3, [r2, #12] 80264d6: f3bf 8f4f dsb sy 80264da: e7fe b.n 80264da NVIC_SystemReset(); } HTTP_SaveSettings(); 80264dc: f000 fd19 bl 8026f12 } 80264e0: b007 add sp, #28 80264e2: bd30 pop {r4, r5, pc} 80264e4: 08033f79 .word 0x08033f79 80264e8: 08033f89 .word 0x08033f89 80264ec: 08033f9a .word 0x08033f9a 80264f0: 08033fa5 .word 0x08033fa5 80264f4: 08033fb1 .word 0x08033fb1 80264f8: 08033fbd .word 0x08033fbd 80264fc: 08030d4e .word 0x08030d4e 8026500: 08033fc3 .word 0x08033fc3 8026504: 08033fcb .word 0x08033fcb 8026508: 08033fcf .word 0x08033fcf 802650c: e000ed00 .word 0xe000ed00 8026510: 05fa0004 .word 0x05fa0004 08026514 : /** * @brief * @retval None */ int HTTP_SettingsPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 8026514: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8026518: 4606 mov r6, r0 802651a: b088 sub sp, #32 802651c: 460c mov r4, r1 802651e: 4690 mov r8, r2 char tempStr[30]; strncpy(tempStr, bufIn, 30); 8026520: 4631 mov r1, r6 8026522: 221e movs r2, #30 8026524: 4668 mov r0, sp /** * @brief * @retval None */ int HTTP_SettingsPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 8026526: 461f mov r7, r3 char tempStr[30]; strncpy(tempStr, bufIn, 30); 8026528: f7fb fb7a bl 8021c20 /* В запросе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 802652c: 4668 mov r0, sp 802652e: 490e ldr r1, [pc, #56] ; (8026568 ) 8026530: f7fb fba8 bl 8021c84 8026534: 4605 mov r5, r0 8026536: b970 cbnz r0, 8026556 { memset(bufOut, 0, SEND_BUF_MAX_LEN); 8026538: 4629 mov r1, r5 802653a: f44f 62fa mov.w r2, #2000 ; 0x7d0 802653e: 4620 mov r0, r4 8026540: f7fb f8de bl 8021700 HTTP_GetSettings(bufOut); 8026544: 4620 mov r0, r4 8026546: f000 fb31 bl 8026bac //printf(bufOut); *lenBufOut = strlen(bufOut); 802654a: 4620 mov r0, r4 802654c: f7fb fab0 bl 8021ab0 8026550: 8038 strh r0, [r7, #0] return SEND_REQUIRED_YES; 8026552: 4628 mov r0, r5 8026554: e004 b.n 8026560 } /* В запросе есть параметры, нужно парсить и сохранять настройки */ else { HTTP_SetSettings(bufIn, lenBufIn); 8026556: 4630 mov r0, r6 8026558: 4641 mov r1, r8 802655a: f7ff ff07 bl 802636c return SEND_REQUIRED_NO; 802655e: 2001 movs r0, #1 } } 8026560: b008 add sp, #32 8026562: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8026566: bf00 nop 8026568: 08033fd5 .word 0x08033fd5 0802656c : /** * @brief Установка даты производства */ // TODO Убрать заглушку! void HTTP_Prodate(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802656c: b5f0 push {r4, r5, r6, r7, lr} uint8_t valueLen = 0; 802656e: 2500 movs r5, #0 /** * @brief Установка даты производства */ // TODO Убрать заглушку! void HTTP_Prodate(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 8026570: b087 sub sp, #28 8026572: 4606 mov r6, r0 8026574: 460c mov r4, r1 uint8_t valueLen = 0; char value[20]; memset(bufOut, 0, SEND_BUF_MAX_LEN); 8026576: f44f 62fa mov.w r2, #2000 ; 0x7d0 802657a: 4608 mov r0, r1 802657c: 4629 mov r1, r5 /** * @brief Установка даты производства */ // TODO Убрать заглушку! void HTTP_Prodate(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 802657e: 461f mov r7, r3 uint8_t valueLen = 0; 8026580: f88d 5003 strb.w r5, [sp, #3] char value[20]; memset(bufOut, 0, SEND_BUF_MAX_LEN); 8026584: f7fb f8bc bl 8021700 ClearParamString(bufIn); 8026588: 4630 mov r0, r6 802658a: f7ff fedb bl 8026344 memset(value, 0, 20); 802658e: 4629 mov r1, r5 8026590: 2214 movs r2, #20 8026592: a801 add r0, sp, #4 8026594: f7fb f8b4 bl 8021700 GetParamValue(bufIn, "prodate=", value, &valueLen); 8026598: aa01 add r2, sp, #4 802659a: f10d 0303 add.w r3, sp, #3 802659e: 490b ldr r1, [pc, #44] ; (80265cc ) 80265a0: 4630 mov r0, r6 80265a2: f7ff fe75 bl 8026290 printf(value); printf("\r\n"); */ /* Устанавливаем дату производства */ SETTINGS_SetProDate(value, valueLen); 80265a6: f89d 1003 ldrb.w r1, [sp, #3] 80265aa: a801 add r0, sp, #4 80265ac: f7fe fb94 bl 8024cd8 /* Устанавливаем дату следующей профилактики +1 год */ RTC_SetProfTime(value); 80265b0: a801 add r0, sp, #4 80265b2: f7fd f88f bl 80236d4 /* Пока отправляем true */ strcpy(bufOut, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\nTrue"); 80265b6: 4906 ldr r1, [pc, #24] ; (80265d0 ) 80265b8: 4620 mov r0, r4 80265ba: f7fb fa1b bl 80219f4 *lenBufOut = strlen(bufOut); 80265be: 4620 mov r0, r4 80265c0: f7fb fa76 bl 8021ab0 80265c4: 8038 strh r0, [r7, #0] // TEST_SetServerFlag(); } 80265c6: b007 add sp, #28 80265c8: bdf0 pop {r4, r5, r6, r7, pc} 80265ca: bf00 nop 80265cc: 08033fd7 .word 0x08033fd7 80265d0: 08033fe0 .word 0x08033fe0 080265d4 : * @param *str - входная строка * @param sim1 - символ который надо заменить * @param sim2 - символ на который надо заменить */ void HTTP_ReplaceSimbol(char *str, char sim1, char sim2) { 80265d4: b570 push {r4, r5, r6, lr} 80265d6: 4604 mov r4, r0 80265d8: 460d mov r5, r1 80265da: 4616 mov r6, r2 uint16_t len = strlen(str); 80265dc: f7fb fa68 bl 8021ab0 for (uint16_t i = 0; i < len; i++) 80265e0: 4623 mov r3, r4 * @param sim1 - символ который надо заменить * @param sim2 - символ на который надо заменить */ void HTTP_ReplaceSimbol(char *str, char sim1, char sim2) { uint16_t len = strlen(str); 80265e2: b280 uxth r0, r0 for (uint16_t i = 0; i < len; i++) 80265e4: e005 b.n 80265f2 { if (*str == sim1) 80265e6: f813 2b01 ldrb.w r2, [r3], #1 80265ea: 42aa cmp r2, r5 *str = sim2; 80265ec: bf08 it eq 80265ee: f803 6c01 strbeq.w r6, [r3, #-1] */ void HTTP_ReplaceSimbol(char *str, char sim1, char sim2) { uint16_t len = strlen(str); for (uint16_t i = 0; i < len; i++) 80265f2: 1b1a subs r2, r3, r4 80265f4: b292 uxth r2, r2 80265f6: 4282 cmp r2, r0 80265f8: d3f5 bcc.n 80265e6 { if (*str == sim1) *str = sim2; str++; } } 80265fa: bd70 pop {r4, r5, r6, pc} 080265fc : /** * @brief * @retval None */ void HTTP_SetInfo(char *buf, uint16_t lenBuf) { 80265fc: b530 push {r4, r5, lr} 80265fe: b09f sub sp, #124 ; 0x7c uint8_t valueLen = 0; 8026600: 2400 movs r4, #0 /** * @brief * @retval None */ void HTTP_SetInfo(char *buf, uint16_t lenBuf) { 8026602: 4605 mov r5, r0 uint8_t valueLen = 0; 8026604: f88d 4007 strb.w r4, [sp, #7] const uint8_t len = 110; char value[110]; ClearParamString(buf); 8026608: f7ff fe9c bl 8026344 memset(value, 0, len); 802660c: 4621 mov r1, r4 802660e: 226e movs r2, #110 ; 0x6e 8026610: a802 add r0, sp, #8 8026612: f7fb f875 bl 8021700 /* Владелец */ GetParamValue(buf, "owner=", value, &valueLen); 8026616: f10d 0307 add.w r3, sp, #7 802661a: aa02 add r2, sp, #8 802661c: 4628 mov r0, r5 802661e: 491e ldr r1, [pc, #120] ; (8026698 ) 8026620: f7ff fe36 bl 8026290 HTTP_ReplaceSimbol(value, '+', ' '); 8026624: 212b movs r1, #43 ; 0x2b 8026626: 2220 movs r2, #32 8026628: a802 add r0, sp, #8 802662a: f7ff ffd3 bl 80265d4 SetOwner(value); 802662e: a802 add r0, sp, #8 8026630: f7fe f9b0 bl 8024994 memset(value, 0, len); 8026634: 4621 mov r1, r4 8026636: 226e movs r2, #110 ; 0x6e 8026638: a802 add r0, sp, #8 802663a: f7fb f861 bl 8021700 /* Владелец */ GetParamValue(buf, "sysLocation=", value, &valueLen); 802663e: f10d 0307 add.w r3, sp, #7 8026642: aa02 add r2, sp, #8 8026644: 4628 mov r0, r5 8026646: 4915 ldr r1, [pc, #84] ; (802669c ) 8026648: f7ff fe22 bl 8026290 HTTP_ReplaceSimbol(value, '+', ' '); 802664c: 212b movs r1, #43 ; 0x2b 802664e: 2220 movs r2, #32 8026650: a802 add r0, sp, #8 8026652: f7ff ffbf bl 80265d4 SetLocation(value); 8026656: a802 add r0, sp, #8 8026658: f7fe f9ac bl 80249b4 memset(value, 0, len); 802665c: 4621 mov r1, r4 802665e: 226e movs r2, #110 ; 0x6e 8026660: a802 add r0, sp, #8 8026662: f7fb f84d bl 8021700 /* Комментарий */ GetParamValue(buf, "comment=", value, &valueLen); 8026666: f10d 0307 add.w r3, sp, #7 802666a: aa02 add r2, sp, #8 802666c: 4628 mov r0, r5 802666e: 490c ldr r1, [pc, #48] ; (80266a0 ) 8026670: f7ff fe0e bl 8026290 HTTP_ReplaceSimbol(value, '+', ' '); 8026674: 212b movs r1, #43 ; 0x2b 8026676: 2220 movs r2, #32 8026678: a802 add r0, sp, #8 802667a: f7ff ffab bl 80265d4 SetComment(value); 802667e: a802 add r0, sp, #8 8026680: f7fe f9a6 bl 80249d0 memset(value, 0, len); 8026684: 4621 mov r1, r4 8026686: 226e movs r2, #110 ; 0x6e 8026688: a802 add r0, sp, #8 802668a: f7fb f839 bl 8021700 HTTP_SaveSettings(); 802668e: f000 fc40 bl 8026f12 } 8026692: b01f add sp, #124 ; 0x7c 8026694: bd30 pop {r4, r5, pc} 8026696: bf00 nop 8026698: 08034010 .word 0x08034010 802669c: 08034017 .word 0x08034017 80266a0: 08034024 .word 0x08034024 080266a4 : /** * @brief * @retval None */ int HTTP_InfoPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 80266a4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80266a8: 4606 mov r6, r0 80266aa: b088 sub sp, #32 80266ac: 460c mov r4, r1 80266ae: 4690 mov r8, r2 char tempStr[30]; strncpy(tempStr, bufIn, 30); 80266b0: 4631 mov r1, r6 80266b2: 221e movs r2, #30 80266b4: 4668 mov r0, sp /** * @brief * @retval None */ int HTTP_InfoPage(char *bufIn, char *bufOut, uint16_t lenBufIn, uint16_t *lenBufOut) { 80266b6: 461f mov r7, r3 char tempStr[30]; strncpy(tempStr, bufIn, 30); 80266b8: f7fb fab2 bl 8021c20 /* В запросе нет параметров, нужно формировать JSON ответ */ if (strpbrk(tempStr,"?") == 0) 80266bc: 4668 mov r0, sp 80266be: 490e ldr r1, [pc, #56] ; (80266f8 ) 80266c0: f7fb fae0 bl 8021c84 80266c4: 4605 mov r5, r0 80266c6: b970 cbnz r0, 80266e6 { memset(bufOut, 0, SEND_BUF_MAX_LEN); 80266c8: 4629 mov r1, r5 80266ca: f44f 62fa mov.w r2, #2000 ; 0x7d0 80266ce: 4620 mov r0, r4 80266d0: f7fb f816 bl 8021700 HTTP_GetInfo(bufOut); 80266d4: 4620 mov r0, r4 80266d6: f000 fb25 bl 8026d24 *lenBufOut = strlen(bufOut); 80266da: 4620 mov r0, r4 80266dc: f7fb f9e8 bl 8021ab0 80266e0: 8038 strh r0, [r7, #0] return SEND_REQUIRED_YES; 80266e2: 4628 mov r0, r5 80266e4: e004 b.n 80266f0 } /* В запросе есть параметры, нужно парсить и сохранять настройки */ else { HTTP_SetInfo(bufIn, lenBufIn); 80266e6: 4630 mov r0, r6 80266e8: 4641 mov r1, r8 80266ea: f7ff ff87 bl 80265fc return SEND_REQUIRED_NO; 80266ee: 2001 movs r0, #1 /* HTTP_SetSettings(bufIn, lenBufIn); return SEND_REQUIRED_NO; */ } } 80266f0: b008 add sp, #32 80266f2: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 80266f6: bf00 nop 80266f8: 08033fd5 .word 0x08033fd5 080266fc : * @param p: pointer to a packet buffer * @param err: LwIP error code * @retval err */ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) { 80266fc: e92d 41f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, lr} 8026700: 4617 mov r7, r2 char *data; struct http_state *hs; struct fs_file file = {0, 0}; 8026702: 2200 movs r2, #0 * @param p: pointer to a packet buffer * @param err: LwIP error code * @retval err */ static err_t http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) { 8026704: 4604 mov r4, r0 8026706: 460d mov r5, r1 char *data; struct http_state *hs; struct fs_file file = {0, 0}; 8026708: 9200 str r2, [sp, #0] 802670a: 9201 str r2, [sp, #4] hs = arg; if (err == ERR_OK && p != NULL) 802670c: 2b00 cmp r3, #0 802670e: f040 80e7 bne.w 80268e0 { tcp_recved(pcb, p->tot_len); 8026712: 4608 mov r0, r1 struct http_state *hs; struct fs_file file = {0, 0}; hs = arg; if (err == ERR_OK && p != NULL) 8026714: 2f00 cmp r7, #0 8026716: f000 80e0 beq.w 80268da { tcp_recved(pcb, p->tot_len); 802671a: 8939 ldrh r1, [r7, #8] 802671c: f002 f86e bl 80287fc if (hs->file == NULL) 8026720: 6823 ldr r3, [r4, #0] 8026722: 2b00 cmp r3, #0 8026724: f040 80d5 bne.w 80268d2 { data = p->payload; 8026728: 687e ldr r6, [r7, #4] /* printLen = p->tot_len; memcpy(printBuf, p->payload , printLen); printf(printBuf); */ receivedBufLen = p->tot_len; 802672a: 893a ldrh r2, [r7, #8] 802672c: 4b6e ldr r3, [pc, #440] ; (80268e8 ) memcpy(receiveBuf, p->payload , receivedBufLen); 802672e: 486f ldr r0, [pc, #444] ; (80268ec ) /* printLen = p->tot_len; memcpy(printBuf, p->payload , printLen); printf(printBuf); */ receivedBufLen = p->tot_len; 8026730: 801a strh r2, [r3, #0] memcpy(receiveBuf, p->payload , receivedBufLen); 8026732: 4631 mov r1, r6 8026734: f7fa ff2a bl 802158c if (strncmp(data, "GET /main.css", 13) == 0) // + 8026738: 4630 mov r0, r6 802673a: 496d ldr r1, [pc, #436] ; (80268f0 ) 802673c: 220d movs r2, #13 802673e: f7fb fa19 bl 8021b74 8026742: b908 cbnz r0, 8026748 { fs_open("/main.css", &file); 8026744: 486b ldr r0, [pc, #428] ; (80268f4 ) 8026746: e0b5 b.n 80268b4 hs->file = file.data; hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /rotek.png", 14) == 0) // + 8026748: 4630 mov r0, r6 802674a: 496b ldr r1, [pc, #428] ; (80268f8 ) 802674c: 220e movs r2, #14 802674e: f7fb fa11 bl 8021b74 8026752: b908 cbnz r0, 8026758 { fs_open("/rotek.png", &file); 8026754: 4869 ldr r0, [pc, #420] ; (80268fc ) 8026756: e0ad b.n 80268b4 hs->file = file.data; hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /favicon.ico", 16) == 0) // ? 8026758: 4630 mov r0, r6 802675a: 4969 ldr r1, [pc, #420] ; (8026900 ) 802675c: 2210 movs r2, #16 802675e: f7fb fa09 bl 8021b74 8026762: b908 cbnz r0, 8026768 { fs_open("/favicon.ico", &file); 8026764: 4867 ldr r0, [pc, #412] ; (8026904 ) 8026766: e0a5 b.n 80268b4 hs->file = file.data; hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /main.js", 12) == 0) // + 8026768: 4630 mov r0, r6 802676a: 4967 ldr r1, [pc, #412] ; (8026908 ) 802676c: 220c movs r2, #12 802676e: f7fb fa01 bl 8021b74 8026772: b908 cbnz r0, 8026778 { fs_open("/main.js", &file); 8026774: 4865 ldr r0, [pc, #404] ; (802690c ) 8026776: e09d b.n 80268b4 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /settings.html", 18) == 0) // + 8026778: 4630 mov r0, r6 802677a: 4965 ldr r1, [pc, #404] ; (8026910 ) 802677c: 2212 movs r2, #18 802677e: f7fb f9f9 bl 8021b74 8026782: b900 cbnz r0, 8026786 8026784: e049 b.n 802681a hs->file = file.data; hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /info.html", 14) == 0) // + 8026786: 4630 mov r0, r6 8026788: 4962 ldr r1, [pc, #392] ; (8026914 ) 802678a: 220e movs r2, #14 802678c: f7fb f9f2 bl 8021b74 8026790: b900 cbnz r0, 8026794 8026792: e036 b.n 8026802 hs->file = file.data; hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /getJson.cgi", 16) == 0) // + 8026794: 4630 mov r0, r6 8026796: 4960 ldr r1, [pc, #384] ; (8026918 ) 8026798: 2210 movs r2, #16 802679a: f7fb f9eb bl 8021b74 802679e: b948 cbnz r0, 80267b4 { HTTP_GetParamsPage1(sendBuf); 80267a0: 4e5e ldr r6, [pc, #376] ; (802691c ) 80267a2: 4630 mov r0, r6 80267a4: f000 f8fc bl 80269a0 hs->file = sendBuf; 80267a8: 6026 str r6, [r4, #0] hs->left = strlen(sendBuf); 80267aa: 4630 mov r0, r6 80267ac: f7fb f980 bl 8021ab0 80267b0: 6060 str r0, [r4, #4] 80267b2: e086 b.n 80268c2 send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /settings.cgi", 17) == 0) // + 80267b4: 4630 mov r0, r6 80267b6: 495a ldr r1, [pc, #360] ; (8026920 ) 80267b8: 2211 movs r2, #17 80267ba: f7fb f9db bl 8021b74 80267be: b970 cbnz r0, 80267de { SET_PAGE = SET_PAGE_PAGE2; 80267c0: 4b58 ldr r3, [pc, #352] ; (8026924 ) if (HTTP_SettingsPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen) == SEND_REQUIRED_YES) 80267c2: f8df 8158 ldr.w r8, [pc, #344] ; 802691c 80267c6: 4e58 ldr r6, [pc, #352] ; (8026928 ) 80267c8: 4848 ldr r0, [pc, #288] ; (80268ec ) send_data(pcb, hs); tcp_sent(pcb, http_sent); } else if (strncmp(data, "GET /settings.cgi", 17) == 0) // + { SET_PAGE = SET_PAGE_PAGE2; 80267ca: 2202 movs r2, #2 80267cc: 701a strb r2, [r3, #0] if (HTTP_SettingsPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen) == SEND_REQUIRED_YES) 80267ce: 4b46 ldr r3, [pc, #280] ; (80268e8 ) 80267d0: 4641 mov r1, r8 80267d2: 881a ldrh r2, [r3, #0] 80267d4: 4633 mov r3, r6 80267d6: f7ff fe9d bl 8026514 80267da: b9f0 cbnz r0, 802681a 80267dc: e065 b.n 80268aa hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } } else if (strncmp(data, "GET /info.cgi", 13) == 0) // + 80267de: 4630 mov r0, r6 80267e0: 4952 ldr r1, [pc, #328] ; (802692c ) 80267e2: 220d movs r2, #13 80267e4: f7fb f9c6 bl 8021b74 80267e8: b968 cbnz r0, 8026806 { if (HTTP_InfoPage(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen) == SEND_REQUIRED_YES) 80267ea: 4b3f ldr r3, [pc, #252] ; (80268e8 ) 80267ec: f8df 812c ldr.w r8, [pc, #300] ; 802691c 80267f0: 4e4d ldr r6, [pc, #308] ; (8026928 ) 80267f2: 881a ldrh r2, [r3, #0] 80267f4: 483d ldr r0, [pc, #244] ; (80268ec ) 80267f6: 4641 mov r1, r8 80267f8: 4633 mov r3, r6 80267fa: f7ff ff53 bl 80266a4 80267fe: b900 cbnz r0, 8026802 8026800: e053 b.n 80268aa send_data(pcb, hs); tcp_sent(pcb, http_sent); } else { fs_open("/info.html", &file); 8026802: 484b ldr r0, [pc, #300] ; (8026930 ) 8026804: e056 b.n 80268b4 send_data(pcb, hs); tcp_sent(pcb, http_sent); } } /* Сброс настроек и сохранине */ else if (strncmp(data, "GET /reset.cgi", 14) == 0) 8026806: 4630 mov r0, r6 8026808: 494a ldr r1, [pc, #296] ; (8026934 ) 802680a: 220e movs r2, #14 802680c: f7fb f9b2 bl 8021b74 8026810: b928 cbnz r0, 802681e { HTTP_ResetSettings(); 8026812: f000 fb77 bl 8026f04 HTTP_SaveSettings(); 8026816: f000 fb7c bl 8026f12 fs_open("/settings.html", &file); 802681a: 4847 ldr r0, [pc, #284] ; (8026938 ) 802681c: e04a b.n 80268b4 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Перезагрузка контроллера */ else if (strncmp(data, "GET /reboot.cgi", 15) == 0) 802681e: 4630 mov r0, r6 8026820: 4946 ldr r1, [pc, #280] ; (802693c ) 8026822: 220f movs r2, #15 8026824: f7fb f9a6 bl 8021b74 8026828: b910 cbnz r0, 8026830 { HTTP_Reboot(); 802682a: f000 fb74 bl 8026f16 802682e: e050 b.n 80268d2 } /* Подтверждение новых сетевых настроек */ else if (strncmp(data, "GET /confirm.cgi", 16) == 0) 8026830: 4630 mov r0, r6 8026832: 4943 ldr r1, [pc, #268] ; (8026940 ) 8026834: 2210 movs r2, #16 8026836: f7fb f99d bl 8021b74 802683a: b920 cbnz r0, 8026846 { SetWebReinitFlag(false); 802683c: f7fe f844 bl 80248c8 SetConfirmWebParamsFlag(); 8026840: f7fe f848 bl 80248d4 8026844: e035 b.n 80268b2 hs->left = file.len; send_data(pcb, hs); tcp_sent(pcb, http_sent); } /* Проверка пароля, переход в bootloader */ else if (strncmp(data, "POST /checkpwd.cgi", 18) == 0) 8026846: 4630 mov r0, r6 8026848: 493e ldr r1, [pc, #248] ; (8026944 ) 802684a: 2212 movs r2, #18 802684c: f7fb f992 bl 8021b74 8026850: b950 cbnz r0, 8026868 { HTTP_ConfirmBootPwd(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 8026852: f8df 80c8 ldr.w r8, [pc, #200] ; 802691c 8026856: 4e34 ldr r6, [pc, #208] ; (8026928 ) 8026858: 4b23 ldr r3, [pc, #140] ; (80268e8 ) 802685a: 4824 ldr r0, [pc, #144] ; (80268ec ) 802685c: 881a ldrh r2, [r3, #0] 802685e: 4641 mov r1, r8 8026860: 4633 mov r3, r6 8026862: f7ff fd43 bl 80262ec 8026866: e020 b.n 80268aa hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } // На производстве else if (strncmp(data, "GET /setProdate.cgi", 19) == 0) 8026868: 4630 mov r0, r6 802686a: 4937 ldr r1, [pc, #220] ; (8026948 ) 802686c: 2213 movs r2, #19 802686e: f7fb f981 bl 8021b74 8026872: b950 cbnz r0, 802688a { HTTP_Prodate(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 8026874: f8df 80a4 ldr.w r8, [pc, #164] ; 802691c 8026878: 4e2b ldr r6, [pc, #172] ; (8026928 ) 802687a: 4b1b ldr r3, [pc, #108] ; (80268e8 ) 802687c: 481b ldr r0, [pc, #108] ; (80268ec ) 802687e: 881a ldrh r2, [r3, #0] 8026880: 4641 mov r1, r8 8026882: 4633 mov r3, r6 8026884: f7ff fe72 bl 802656c 8026888: e00f b.n 80268aa hs->left = sendBufLoadLen; send_data(pcb, hs); tcp_sent(pcb, http_sent); } // На производстве else if (strncmp(data, "GET /progon.cgi", 15) == 0) 802688a: 4630 mov r0, r6 802688c: 492f ldr r1, [pc, #188] ; (802694c ) 802688e: 220f movs r2, #15 8026890: f7fb f970 bl 8021b74 8026894: b968 cbnz r0, 80268b2 { HTTP_Progon(receiveBuf, sendBuf, receivedBufLen, &sendBufLoadLen); 8026896: 4b14 ldr r3, [pc, #80] ; (80268e8 ) 8026898: f8df 8080 ldr.w r8, [pc, #128] ; 802691c 802689c: 4e22 ldr r6, [pc, #136] ; (8026928 ) 802689e: 881a ldrh r2, [r3, #0] 80268a0: 4812 ldr r0, [pc, #72] ; (80268ec ) 80268a2: 4641 mov r1, r8 80268a4: 4633 mov r3, r6 80268a6: f7ff fce1 bl 802626c hs->file = sendBuf; 80268aa: f8c4 8000 str.w r8, [r4] hs->left = sendBufLoadLen; 80268ae: 8833 ldrh r3, [r6, #0] 80268b0: e006 b.n 80268c0 send_data(pcb, hs); tcp_sent(pcb, http_sent); } else { fs_open("/index.html", &file); // + 80268b2: 4827 ldr r0, [pc, #156] ; (8026950 ) 80268b4: 4669 mov r1, sp 80268b6: f7ff fc41 bl 802613c hs->file = file.data; 80268ba: 9b00 ldr r3, [sp, #0] 80268bc: 6023 str r3, [r4, #0] hs->left = file.len; 80268be: 9b01 ldr r3, [sp, #4] 80268c0: 6063 str r3, [r4, #4] send_data(pcb, hs); 80268c2: 4628 mov r0, r5 80268c4: 4621 mov r1, r4 80268c6: f7ff fc75 bl 80261b4 tcp_sent(pcb, http_sent); 80268ca: 4628 mov r0, r5 80268cc: 4921 ldr r1, [pc, #132] ; (8026954 ) 80268ce: f001 ffcb bl 8028868 } } pbuf_free(p); 80268d2: 4638 mov r0, r7 80268d4: f001 fd00 bl 80282d8 close_conn(pcb,hs); 80268d8: 4628 mov r0, r5 } if (err == ERR_OK && p == NULL) { close_conn(pcb, hs); 80268da: 4621 mov r1, r4 80268dc: f7ff fc8d bl 80261fa } return ERR_OK; } 80268e0: 2000 movs r0, #0 80268e2: e8bd 81fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, pc} 80268e6: bf00 nop 80268e8: 200024ae .word 0x200024ae 80268ec: 2000ea91 .word 0x2000ea91 80268f0: 0803402d .word 0x0803402d 80268f4: 08034031 .word 0x08034031 80268f8: 0803403b .word 0x0803403b 80268fc: 0803403f .word 0x0803403f 8026900: 0803404a .word 0x0803404a 8026904: 0803404e .word 0x0803404e 8026908: 0803405b .word 0x0803405b 802690c: 0803405f .word 0x0803405f 8026910: 08034068 .word 0x08034068 8026914: 0803407b .word 0x0803407b 8026918: 0803408a .word 0x0803408a 802691c: 2000e2c1 .word 0x2000e2c1 8026920: 0803409b .word 0x0803409b 8026924: 200024ac .word 0x200024ac 8026928: 200024b0 .word 0x200024b0 802692c: 080340ad .word 0x080340ad 8026930: 0803407f .word 0x0803407f 8026934: 080340bb .word 0x080340bb 8026938: 0803406c .word 0x0803406c 802693c: 080340ca .word 0x080340ca 8026940: 080340da .word 0x080340da 8026944: 080340f7 .word 0x080340f7 8026948: 0803410a .word 0x0803410a 802694c: 0803411e .word 0x0803411e 8026950: 080340eb .word 0x080340eb 8026954: 08026227 .word 0x08026227 08026958 : 8026958: f3bf 8f4f dsb sy (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | 802695c: 4a04 ldr r2, [pc, #16] ; (8026970 ) 802695e: 4b05 ldr r3, [pc, #20] ; (8026974 ) 8026960: 68d1 ldr r1, [r2, #12] 8026962: f401 61e0 and.w r1, r1, #1792 ; 0x700 8026966: 430b orrs r3, r1 __STATIC_INLINE void NVIC_SystemReset(void) //static inline void NVIC_SystemReset(void) { __DSB(); /* Ensure all outstanding memory accesses included buffered write are completed before reset */ SCB->AIRCR = ((0x5FA << SCB_AIRCR_VECTKEY_Pos) | 8026968: 60d3 str r3, [r2, #12] 802696a: f3bf 8f4f dsb sy 802696e: e7fe b.n 802696e 8026970: e000ed00 .word 0xe000ed00 8026974: 05fa0004 .word 0x05fa0004 08026978 : /** * @brief */ void vTaskReboot(void * pvParameters) { 8026978: b508 push {r3, lr} for (;;) { mode = *(bool*)pvParameters; if (mode) 802697a: 7803 ldrb r3, [r0, #0] 802697c: b133 cbz r3, 802698c { SetLoadMode(); 802697e: f7fd ff9d bl 80248bc */ void HTTP_SaveSettings(void) { // taskENTER_CRITICAL(); SETTINGS_Save(); 8026982: f7fe f92f bl 8024be4 if (mode) { SetLoadMode(); HTTP_SaveSettings(); SNMP_SendUserTrap(FW_VERSION_UPDATE); 8026986: 2001 movs r0, #1 8026988: f009 fba2 bl 80300d0 vTaskDelay(1010); NVIC_SystemReset(); } else { vTaskDelay(1000); 802698c: f44f 707a mov.w r0, #1000 ; 0x3e8 8026990: f7ff f824 bl 80259dc /* Блокируем управление ключем на тау секунд*/ //IO_KeyBlockOn(); vTaskDelay(1010); 8026994: f240 30f2 movw r0, #1010 ; 0x3f2 8026998: f7ff f820 bl 80259dc NVIC_SystemReset(); 802699c: f7ff ffdc bl 8026958 080269a0 : /** * @brief Возвращяет строку с настройками на первой странице * @retval None */ void HTTP_GetParamsPage1(char *buf) { 80269a0: b510 push {r4, lr} char str[40]; uint8_t len; memset(buf, 0, 1000); 80269a2: f44f 727a mov.w r2, #1000 ; 0x3e8 /** * @brief Возвращяет строку с настройками на первой странице * @retval None */ void HTTP_GetParamsPage1(char *buf) { 80269a6: b08c sub sp, #48 ; 0x30 80269a8: 4604 mov r4, r0 char str[40]; uint8_t len; memset(buf, 0, 1000); 80269aa: 2100 movs r1, #0 80269ac: f7fa fea8 bl 8021700 // Headers для поддержки saffari strcpy(buf, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n"); 80269b0: 4620 mov r0, r4 80269b2: 496e ldr r1, [pc, #440] ; (8026b6c ) 80269b4: f7fb f81e bl 80219f4 // Параметры UPS GetInputVoltageStr(str, &len); 80269b8: a802 add r0, sp, #8 80269ba: f10d 0107 add.w r1, sp, #7 80269be: f7fd fdbd bl 802453c strcat(buf, "{\"AC\":\""); 80269c2: 4620 mov r0, r4 80269c4: 496a ldr r1, [pc, #424] ; (8026b70 ) 80269c6: f7fa ff01 bl 80217cc strncat(buf, str, len); 80269ca: f89d 2007 ldrb.w r2, [sp, #7] 80269ce: a902 add r1, sp, #8 80269d0: 4620 mov r0, r4 80269d2: f7fb f89d bl 8021b10 GetOutputVoltageStr(str, &len); 80269d6: a802 add r0, sp, #8 80269d8: f10d 0107 add.w r1, sp, #7 80269dc: f7fd fdb4 bl 8024548 strcat(buf, "\",\"DC\":\""); 80269e0: 4620 mov r0, r4 80269e2: 4964 ldr r1, [pc, #400] ; (8026b74 ) 80269e4: f7fa fef2 bl 80217cc strncat(buf, str, len); 80269e8: f89d 2007 ldrb.w r2, [sp, #7] 80269ec: a902 add r1, sp, #8 80269ee: 4620 mov r0, r4 80269f0: f7fb f88e bl 8021b10 GetInputFreqStr(str, &len); 80269f4: a802 add r0, sp, #8 80269f6: f10d 0107 add.w r1, sp, #7 80269fa: f7fd fd93 bl 8024524 strcat(buf, "\",\"in_freq\":\""); 80269fe: 4620 mov r0, r4 8026a00: 495d ldr r1, [pc, #372] ; (8026b78 ) 8026a02: f7fa fee3 bl 80217cc strncat(buf, str, len); 8026a06: f89d 2007 ldrb.w r2, [sp, #7] 8026a0a: a902 add r1, sp, #8 8026a0c: 4620 mov r0, r4 8026a0e: f7fb f87f bl 8021b10 GetOutputFreqStr(str, &len); 8026a12: a802 add r0, sp, #8 8026a14: f10d 0107 add.w r1, sp, #7 8026a18: f7fd fd8a bl 8024530 strcat(buf, "\",\"out_freq\":\""); 8026a1c: 4620 mov r0, r4 8026a1e: 4957 ldr r1, [pc, #348] ; (8026b7c ) 8026a20: f7fa fed4 bl 80217cc strncat(buf, str, len); 8026a24: f89d 2007 ldrb.w r2, [sp, #7] 8026a28: a902 add r1, sp, #8 8026a2a: 4620 mov r0, r4 8026a2c: f7fb f870 bl 8021b10 GetPowerStr(str, &len); 8026a30: a802 add r0, sp, #8 8026a32: f10d 0107 add.w r1, sp, #7 8026a36: f7fd fd8d bl 8024554 strcat(buf, "\",\"pwr\":\""); 8026a3a: 4620 mov r0, r4 8026a3c: 4950 ldr r1, [pc, #320] ; (8026b80 ) 8026a3e: f7fa fec5 bl 80217cc strncat(buf, str, len); 8026a42: f89d 2007 ldrb.w r2, [sp, #7] 8026a46: a902 add r1, sp, #8 8026a48: 4620 mov r0, r4 8026a4a: f7fb f861 bl 8021b10 GetLineFailBitStr(str, &len); 8026a4e: a802 add r0, sp, #8 8026a50: f10d 0107 add.w r1, sp, #7 8026a54: f7fd fd62 bl 802451c strcat(buf, "\",\"line_fail\":"); 8026a58: 4620 mov r0, r4 8026a5a: 494a ldr r1, [pc, #296] ; (8026b84 ) 8026a5c: f7fa feb6 bl 80217cc strncat(buf, str, len); 8026a60: f89d 2007 ldrb.w r2, [sp, #7] 8026a64: a902 add r1, sp, #8 8026a66: 4620 mov r0, r4 8026a68: f7fb f852 bl 8021b10 GetLowBatteryBitStr(str, &len); 8026a6c: a802 add r0, sp, #8 8026a6e: f10d 0107 add.w r1, sp, #7 8026a72: f7fd fd56 bl 8024522 strcat(buf, ",\"low_battery\":"); 8026a76: 4620 mov r0, r4 8026a78: 4943 ldr r1, [pc, #268] ; (8026b88 ) 8026a7a: f7fa fea7 bl 80217cc strncat(buf, str, len); 8026a7e: f89d 2007 ldrb.w r2, [sp, #7] 8026a82: a902 add r1, sp, #8 8026a84: 4620 mov r0, r4 8026a86: f7fb f843 bl 8021b10 GetBatCapacityStr(str, &len); 8026a8a: a802 add r0, sp, #8 8026a8c: f10d 0107 add.w r1, sp, #7 8026a90: f7fd fd66 bl 8024560 strcat(buf, ",\"bat_cap\":\""); 8026a94: 4620 mov r0, r4 8026a96: 493d ldr r1, [pc, #244] ; (8026b8c ) 8026a98: f7fa fe98 bl 80217cc strncat(buf, str, len); 8026a9c: f89d 2007 ldrb.w r2, [sp, #7] 8026aa0: a902 add r1, sp, #8 8026aa2: 4620 mov r0, r4 8026aa4: f7fb f834 bl 8021b10 GetInternalTempStr(str, &len); 8026aa8: a802 add r0, sp, #8 8026aaa: f10d 0107 add.w r1, sp, #7 8026aae: f7fd fd63 bl 8024578 strcat(buf, "\",\"inner_temp\":\""); 8026ab2: 4620 mov r0, r4 8026ab4: 4936 ldr r1, [pc, #216] ; (8026b90 ) 8026ab6: f7fa fe89 bl 80217cc strncat(buf, str, len); 8026aba: f89d 2007 ldrb.w r2, [sp, #7] 8026abe: a902 add r1, sp, #8 8026ac0: 4620 mov r0, r4 8026ac2: f7fb f825 bl 8021b10 GetRuntimeStr(str, &len); 8026ac6: a802 add r0, sp, #8 8026ac8: f10d 0107 add.w r1, sp, #7 8026acc: f7fd fd4e bl 802456c strcat(buf, "\",\"bat_time_left\":\""); 8026ad0: 4620 mov r0, r4 8026ad2: 4930 ldr r1, [pc, #192] ; (8026b94 ) 8026ad4: f7fa fe7a bl 80217cc strncat(buf, str, len); 8026ad8: f89d 2007 ldrb.w r2, [sp, #7] 8026adc: a902 add r1, sp, #8 8026ade: 4620 mov r0, r4 8026ae0: f7fb f816 bl 8021b10 // Мониторинг // load_monitor (нагрузка, 0 - норма, 1 - fail) // temp_monitor (внутренняя температура, 0 - норма, 1 - fail) // connect_monitor (связь с UPSом, 0 - норма, 1 - fail) GetLoadMonitorStr(str, &len); 8026ae4: a802 add r0, sp, #8 8026ae6: f10d 0107 add.w r1, sp, #7 8026aea: f7fd fd4b bl 8024584 strcat(buf, "\",\"load_monitor\":"); 8026aee: 4620 mov r0, r4 8026af0: 4929 ldr r1, [pc, #164] ; (8026b98 ) 8026af2: f7fa fe6b bl 80217cc strncat(buf, str, len); 8026af6: f89d 2007 ldrb.w r2, [sp, #7] 8026afa: a902 add r1, sp, #8 8026afc: 4620 mov r0, r4 8026afe: f7fb f807 bl 8021b10 GetTempMonitorStr(str, &len); 8026b02: a802 add r0, sp, #8 8026b04: f10d 0107 add.w r1, sp, #7 8026b08: f7fd fd3f bl 802458a strcat(buf, ",\"temp_monitor\":"); 8026b0c: 4620 mov r0, r4 8026b0e: 4923 ldr r1, [pc, #140] ; (8026b9c ) 8026b10: f7fa fe5c bl 80217cc strncat(buf, str, len); 8026b14: f89d 2007 ldrb.w r2, [sp, #7] 8026b18: a902 add r1, sp, #8 8026b1a: 4620 mov r0, r4 8026b1c: f7fa fff8 bl 8021b10 GetConnectMonitorStr(str, &len); 8026b20: a802 add r0, sp, #8 8026b22: f10d 0107 add.w r1, sp, #7 8026b26: f7fd fd33 bl 8024590 strcat(buf, ",\"connect_monitor\":"); 8026b2a: 4620 mov r0, r4 8026b2c: 491c ldr r1, [pc, #112] ; (8026ba0 ) 8026b2e: f7fa fe4d bl 80217cc strncat(buf, str, len); 8026b32: f89d 2007 ldrb.w r2, [sp, #7] 8026b36: a902 add r1, sp, #8 8026b38: 4620 mov r0, r4 8026b3a: f7fa ffe9 bl 8021b10 // Признак изменения сетевых настроек GetWebReinitFlag(str, &len); 8026b3e: a802 add r0, sp, #8 8026b40: f10d 0107 add.w r1, sp, #7 8026b44: f7fd fea0 bl 8024888 strcat(buf, ",\"netsettings_changed\":\""); 8026b48: 4620 mov r0, r4 8026b4a: 4916 ldr r1, [pc, #88] ; (8026ba4 ) 8026b4c: f7fa fe3e bl 80217cc strncat(buf, str, len); 8026b50: a902 add r1, sp, #8 8026b52: f89d 2007 ldrb.w r2, [sp, #7] 8026b56: 4620 mov r0, r4 8026b58: f7fa ffda bl 8021b10 strncat(buf, "\"}", 2); 8026b5c: 4620 mov r0, r4 8026b5e: 4912 ldr r1, [pc, #72] ; (8026ba8 ) 8026b60: 2202 movs r2, #2 8026b62: f7fa ffd5 bl 8021b10 //printf(buf); } 8026b66: b00c add sp, #48 ; 0x30 8026b68: bd10 pop {r4, pc} 8026b6a: bf00 nop 8026b6c: 0803783c .word 0x0803783c 8026b70: 08037868 .word 0x08037868 8026b74: 08037870 .word 0x08037870 8026b78: 08037879 .word 0x08037879 8026b7c: 08037887 .word 0x08037887 8026b80: 08037896 .word 0x08037896 8026b84: 080378a0 .word 0x080378a0 8026b88: 080378af .word 0x080378af 8026b8c: 080378bf .word 0x080378bf 8026b90: 080378cc .word 0x080378cc 8026b94: 080378dd .word 0x080378dd 8026b98: 080378f1 .word 0x080378f1 8026b9c: 08037903 .word 0x08037903 8026ba0: 08037914 .word 0x08037914 8026ba4: 08037a2f .word 0x08037a2f 8026ba8: 08037928 .word 0x08037928 08026bac : /** * @brief Возвращяет строку с настройками на второй странице * @retval None */ void HTTP_GetSettings(char *buf) { 8026bac: b510 push {r4, lr} char str[30]; uint8_t len; /* Headers для поддержки saffari */ strcpy(buf, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n"); 8026bae: 4951 ldr r1, [pc, #324] ; (8026cf4 ) /** * @brief Возвращяет строку с настройками на второй странице * @retval None */ void HTTP_GetSettings(char *buf) { 8026bb0: b08a sub sp, #40 ; 0x28 8026bb2: 4604 mov r4, r0 char str[30]; uint8_t len; /* Headers для поддержки saffari */ strcpy(buf, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n"); 8026bb4: f7fa ff1e bl 80219f4 /* SNMP */ GetReadCommunity(str, &len); 8026bb8: a802 add r0, sp, #8 8026bba: f10d 0107 add.w r1, sp, #7 8026bbe: f7fd fdf7 bl 80247b0 strcat(buf, "{\"read_community\":\""); 8026bc2: 4620 mov r0, r4 8026bc4: 494c ldr r1, [pc, #304] ; (8026cf8 ) 8026bc6: f7fa fe01 bl 80217cc strncat(buf, str, len); 8026bca: f89d 2007 ldrb.w r2, [sp, #7] 8026bce: a902 add r1, sp, #8 8026bd0: 4620 mov r0, r4 8026bd2: f7fa ff9d bl 8021b10 GetWriteCommunity(str, &len); 8026bd6: a802 add r0, sp, #8 8026bd8: f10d 0107 add.w r1, sp, #7 8026bdc: f7fd fdf8 bl 80247d0 strcat(buf, "\",\"write_community\":\""); 8026be0: 4620 mov r0, r4 8026be2: 4946 ldr r1, [pc, #280] ; (8026cfc ) 8026be4: f7fa fdf2 bl 80217cc strncat(buf, str, len); 8026be8: f89d 2007 ldrb.w r2, [sp, #7] 8026bec: a902 add r1, sp, #8 8026bee: 4620 mov r0, r4 8026bf0: f7fa ff8e bl 8021b10 GetManagerIp(str, &len); 8026bf4: a802 add r0, sp, #8 8026bf6: f10d 0107 add.w r1, sp, #7 8026bfa: f7fd fdf9 bl 80247f0 strcat(buf, "\",\"managerIP\":\""); 8026bfe: 4620 mov r0, r4 8026c00: 493f ldr r1, [pc, #252] ; (8026d00 ) 8026c02: f7fa fde3 bl 80217cc strncat(buf, str, len); 8026c06: f89d 2007 ldrb.w r2, [sp, #7] 8026c0a: a902 add r1, sp, #8 8026c0c: 4620 mov r0, r4 8026c0e: f7fa ff7f bl 8021b10 GetManagerIp2(str, &len); 8026c12: a802 add r0, sp, #8 8026c14: f10d 0107 add.w r1, sp, #7 8026c18: f7fd fdfa bl 8024810 strcat(buf, "\",\"managerIP2\":\""); 8026c1c: 4620 mov r0, r4 8026c1e: 4939 ldr r1, [pc, #228] ; (8026d04 ) 8026c20: f7fa fdd4 bl 80217cc strncat(buf, str, len); 8026c24: f89d 2007 ldrb.w r2, [sp, #7] 8026c28: a902 add r1, sp, #8 8026c2a: 4620 mov r0, r4 8026c2c: f7fa ff70 bl 8021b10 GetManagerIp3(str, &len); 8026c30: a802 add r0, sp, #8 8026c32: f10d 0107 add.w r1, sp, #7 8026c36: f7fd fdfb bl 8024830 strcat(buf, "\",\"managerIP3\":\""); 8026c3a: 4620 mov r0, r4 8026c3c: 4932 ldr r1, [pc, #200] ; (8026d08 ) 8026c3e: f7fa fdc5 bl 80217cc strncat(buf, str, len); 8026c42: f89d 2007 ldrb.w r2, [sp, #7] 8026c46: a902 add r1, sp, #8 8026c48: 4620 mov r0, r4 8026c4a: f7fa ff61 bl 8021b10 /* WEB */ GetIpStr(str, &len); 8026c4e: a802 add r0, sp, #8 8026c50: f10d 0107 add.w r1, sp, #7 8026c54: f7fd fd56 bl 8024704 strcat(buf, "\",\"ipaddr\":\""); 8026c58: 4620 mov r0, r4 8026c5a: 492c ldr r1, [pc, #176] ; (8026d0c ) 8026c5c: f7fa fdb6 bl 80217cc strncat(buf, str, len); 8026c60: f89d 2007 ldrb.w r2, [sp, #7] 8026c64: a902 add r1, sp, #8 8026c66: 4620 mov r0, r4 8026c68: f7fa ff52 bl 8021b10 GetGatewayStr(str, &len); 8026c6c: a802 add r0, sp, #8 8026c6e: f10d 0107 add.w r1, sp, #7 8026c72: f7fd fd5d bl 8024730 strcat(buf, "\",\"gw\":\""); 8026c76: 4620 mov r0, r4 8026c78: 4925 ldr r1, [pc, #148] ; (8026d10 ) 8026c7a: f7fa fda7 bl 80217cc strncat(buf, str, len); 8026c7e: f89d 2007 ldrb.w r2, [sp, #7] 8026c82: a902 add r1, sp, #8 8026c84: 4620 mov r0, r4 8026c86: f7fa ff43 bl 8021b10 GetMaskStr(str, &len); 8026c8a: a802 add r0, sp, #8 8026c8c: f10d 0107 add.w r1, sp, #7 8026c90: f7fd fd64 bl 802475c strcat(buf, "\",\"mask\":\""); 8026c94: 4620 mov r0, r4 8026c96: 491f ldr r1, [pc, #124] ; (8026d14 ) 8026c98: f7fa fd98 bl 80217cc strncat(buf, str, len); 8026c9c: f89d 2007 ldrb.w r2, [sp, #7] 8026ca0: a902 add r1, sp, #8 8026ca2: 4620 mov r0, r4 8026ca4: f7fa ff34 bl 8021b10 GetDhcpStateStr(str, &len); 8026ca8: a802 add r0, sp, #8 8026caa: f10d 0107 add.w r1, sp, #7 8026cae: f7fd fd6b bl 8024788 strcat(buf, "\",\"dhcp\":"); 8026cb2: 4620 mov r0, r4 8026cb4: 4918 ldr r1, [pc, #96] ; (8026d18 ) 8026cb6: f7fa fd89 bl 80217cc strncat(buf, str, len); 8026cba: f89d 2007 ldrb.w r2, [sp, #7] 8026cbe: a902 add r1, sp, #8 8026cc0: 4620 mov r0, r4 8026cc2: f7fa ff25 bl 8021b10 /* Признак изменения сетевых настроек */ GetWebReinitFlag(str, &len); 8026cc6: a802 add r0, sp, #8 8026cc8: f10d 0107 add.w r1, sp, #7 8026ccc: f7fd fddc bl 8024888 strcat(buf, ",\"netsettings_changed\":\""); 8026cd0: 4620 mov r0, r4 8026cd2: 4912 ldr r1, [pc, #72] ; (8026d1c ) 8026cd4: f7fa fd7a bl 80217cc strncat(buf, str, len); 8026cd8: a902 add r1, sp, #8 8026cda: f89d 2007 ldrb.w r2, [sp, #7] 8026cde: 4620 mov r0, r4 8026ce0: f7fa ff16 bl 8021b10 strncat(buf, "\"}", 2); 8026ce4: 4620 mov r0, r4 8026ce6: 490e ldr r1, [pc, #56] ; (8026d20 ) 8026ce8: 2202 movs r2, #2 8026cea: f7fa ff11 bl 8021b10 //printf(buf); } 8026cee: b00a add sp, #40 ; 0x28 8026cf0: bd10 pop {r4, pc} 8026cf2: bf00 nop 8026cf4: 0803783c .word 0x0803783c 8026cf8: 0803792b .word 0x0803792b 8026cfc: 0803793f .word 0x0803793f 8026d00: 08037955 .word 0x08037955 8026d04: 08037965 .word 0x08037965 8026d08: 08037976 .word 0x08037976 8026d0c: 08037987 .word 0x08037987 8026d10: 08037994 .word 0x08037994 8026d14: 0803799d .word 0x0803799d 8026d18: 080379a8 .word 0x080379a8 8026d1c: 08037a2f .word 0x08037a2f 8026d20: 08037928 .word 0x08037928 08026d24 : * @brief Возвращяет строку с информацией об устройстве * @retval None */ // TODO Согласовать максимальную длину строк void HTTP_GetInfo(char *buf) { 8026d24: b510 push {r4, lr} char str[40]; uint8_t len; /* Headers для поддержки saffari */ strcpy(buf, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n"); 8026d26: 4951 ldr r1, [pc, #324] ; (8026e6c ) * @brief Возвращяет строку с информацией об устройстве * @retval None */ // TODO Согласовать максимальную длину строк void HTTP_GetInfo(char *buf) { 8026d28: b08c sub sp, #48 ; 0x30 8026d2a: 4604 mov r4, r0 char str[40]; uint8_t len; /* Headers для поддержки saffari */ strcpy(buf, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n"); 8026d2c: f7fa fe62 bl 80219f4 GetWorkTimeStr(str, &len); 8026d30: a802 add r0, sp, #8 8026d32: f10d 0107 add.w r1, sp, #7 8026d36: f7fd fc2f bl 8024598 strcat(buf, "{\"uptime\":\""); 8026d3a: 4620 mov r0, r4 8026d3c: 494c ldr r1, [pc, #304] ; (8026e70 ) 8026d3e: f7fa fd45 bl 80217cc strncat(buf, str, len); 8026d42: f89d 2007 ldrb.w r2, [sp, #7] 8026d46: a902 add r1, sp, #8 8026d48: 4620 mov r0, r4 8026d4a: f7fa fee1 bl 8021b10 GetModelStr(str, &len); 8026d4e: a802 add r0, sp, #8 8026d50: f10d 0107 add.w r1, sp, #7 8026d54: f7fd fc46 bl 80245e4 strcat(buf, "\",\"model\":\""); 8026d58: 4620 mov r0, r4 8026d5a: 4946 ldr r1, [pc, #280] ; (8026e74 ) 8026d5c: f7fa fd36 bl 80217cc strncat(buf, str, len); 8026d60: f89d 2007 ldrb.w r2, [sp, #7] 8026d64: a902 add r1, sp, #8 8026d66: 4620 mov r0, r4 8026d68: f7fa fed2 bl 8021b10 GetProductionDataStr(str, &len); 8026d6c: a802 add r0, sp, #8 8026d6e: f10d 0107 add.w r1, sp, #7 8026d72: f7fd fc49 bl 8024608 strcat(buf, "\",\"prodate\":\""); 8026d76: 4620 mov r0, r4 8026d78: 493f ldr r1, [pc, #252] ; (8026e78 ) 8026d7a: f7fa fd27 bl 80217cc strncat(buf, str, len); 8026d7e: f89d 2007 ldrb.w r2, [sp, #7] 8026d82: a902 add r1, sp, #8 8026d84: 4620 mov r0, r4 8026d86: f7fa fec3 bl 8021b10 GetVersionStr(str, &len); 8026d8a: a802 add r0, sp, #8 8026d8c: f10d 0107 add.w r1, sp, #7 8026d90: f7fd fc4c bl 802462c strcat(buf, "\",\"fwversion\":\""); 8026d94: 4620 mov r0, r4 8026d96: 4939 ldr r1, [pc, #228] ; (8026e7c ) 8026d98: f7fa fd18 bl 80217cc strncat(buf, str, len); 8026d9c: f89d 2007 ldrb.w r2, [sp, #7] 8026da0: a902 add r1, sp, #8 8026da2: 4620 mov r0, r4 8026da4: f7fa feb4 bl 8021b10 GetMacStr(str, &len); 8026da8: a802 add r0, sp, #8 8026daa: f10d 0107 add.w r1, sp, #7 8026dae: f7fd fc4f bl 8024650 strcat(buf, "\",\"macaddr\":\""); 8026db2: 4620 mov r0, r4 8026db4: 4932 ldr r1, [pc, #200] ; (8026e80 ) 8026db6: f7fa fd09 bl 80217cc strncat(buf, str, len); 8026dba: f89d 2007 ldrb.w r2, [sp, #7] 8026dbe: a902 add r1, sp, #8 8026dc0: 4620 mov r0, r4 8026dc2: f7fa fea5 bl 8021b10 GetSerialNumberStr(str, &len); 8026dc6: a802 add r0, sp, #8 8026dc8: f10d 0107 add.w r1, sp, #7 8026dcc: f7fd fc52 bl 8024674 strcat(buf, "\",\"serno\":\""); 8026dd0: 4620 mov r0, r4 8026dd2: 492c ldr r1, [pc, #176] ; (8026e84 ) 8026dd4: f7fa fcfa bl 80217cc strncat(buf, str, len); 8026dd8: f89d 2007 ldrb.w r2, [sp, #7] 8026ddc: a902 add r1, sp, #8 8026dde: 4620 mov r0, r4 8026de0: f7fa fe96 bl 8021b10 GetOwnerStr(str, &len); 8026de4: a802 add r0, sp, #8 8026de6: f10d 0107 add.w r1, sp, #7 8026dea: f7fd fc55 bl 8024698 strcat(buf, "\",\"owner\":\""); 8026dee: 4620 mov r0, r4 8026df0: 4925 ldr r1, [pc, #148] ; (8026e88 ) 8026df2: f7fa fceb bl 80217cc strncat(buf, str, len); 8026df6: f89d 2007 ldrb.w r2, [sp, #7] 8026dfa: a902 add r1, sp, #8 8026dfc: 4620 mov r0, r4 8026dfe: f7fa fe87 bl 8021b10 GetLocationStr(str, &len); 8026e02: a802 add r0, sp, #8 8026e04: f10d 0107 add.w r1, sp, #7 8026e08: f7fd fc58 bl 80246bc strcat(buf, "\",\"sysLocation\":\""); 8026e0c: 4620 mov r0, r4 8026e0e: 491f ldr r1, [pc, #124] ; (8026e8c ) 8026e10: f7fa fcdc bl 80217cc strncat(buf, str, len); 8026e14: f89d 2007 ldrb.w r2, [sp, #7] 8026e18: a902 add r1, sp, #8 8026e1a: 4620 mov r0, r4 8026e1c: f7fa fe78 bl 8021b10 GetCommentsStr(str, &len); 8026e20: a802 add r0, sp, #8 8026e22: f10d 0107 add.w r1, sp, #7 8026e26: f7fd fc5b bl 80246e0 strcat(buf, "\",\"comment\":\""); 8026e2a: 4620 mov r0, r4 8026e2c: 4918 ldr r1, [pc, #96] ; (8026e90 ) 8026e2e: f7fa fccd bl 80217cc strncat(buf, str, len); 8026e32: f89d 2007 ldrb.w r2, [sp, #7] 8026e36: a902 add r1, sp, #8 8026e38: 4620 mov r0, r4 8026e3a: f7fa fe69 bl 8021b10 /* Признак изменения сетевых настроек */ GetWebReinitFlag(str, &len); 8026e3e: a802 add r0, sp, #8 8026e40: f10d 0107 add.w r1, sp, #7 8026e44: f7fd fd20 bl 8024888 strcat(buf, "\",\"netsettings_changed\":\""); 8026e48: 4620 mov r0, r4 8026e4a: 4912 ldr r1, [pc, #72] ; (8026e94 ) 8026e4c: f7fa fcbe bl 80217cc strncat(buf, str, len); 8026e50: a902 add r1, sp, #8 8026e52: f89d 2007 ldrb.w r2, [sp, #7] 8026e56: 4620 mov r0, r4 8026e58: f7fa fe5a bl 8021b10 strncat(buf, "\"}", 2); 8026e5c: 4620 mov r0, r4 8026e5e: 490e ldr r1, [pc, #56] ; (8026e98 ) 8026e60: 2202 movs r2, #2 8026e62: f7fa fe55 bl 8021b10 } 8026e66: b00c add sp, #48 ; 0x30 8026e68: bd10 pop {r4, pc} 8026e6a: bf00 nop 8026e6c: 0803783c .word 0x0803783c 8026e70: 080379b2 .word 0x080379b2 8026e74: 080379be .word 0x080379be 8026e78: 080379ca .word 0x080379ca 8026e7c: 080379d8 .word 0x080379d8 8026e80: 080379e8 .word 0x080379e8 8026e84: 080379f6 .word 0x080379f6 8026e88: 08037a02 .word 0x08037a02 8026e8c: 08037a0e .word 0x08037a0e 8026e90: 08037a20 .word 0x08037a20 8026e94: 08037a2e .word 0x08037a2e 8026e98: 08037928 .word 0x08037928 08026e9c : /** * @brief Возвращает uptime, freq, dutycicle */ void HTTP_GetProgonParams(char *buf) { 8026e9c: b510 push {r4, lr} char str[20]; u32_t tick; strcpy(buf, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n"); 8026e9e: 4915 ldr r1, [pc, #84] ; (8026ef4 ) /** * @brief Возвращает uptime, freq, dutycicle */ void HTTP_GetProgonParams(char *buf) { 8026ea0: b086 sub sp, #24 8026ea2: 4604 mov r4, r0 char str[20]; u32_t tick; strcpy(buf, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n"); 8026ea4: f7fa fda6 bl 80219f4 strcat(buf, "{\"uptime\":\""); 8026ea8: 4913 ldr r1, [pc, #76] ; (8026ef8 ) 8026eaa: 4620 mov r0, r4 8026eac: f7fa fc8e bl 80217cc snmp_get_sysuptime(&tick); 8026eb0: 4668 mov r0, sp 8026eb2: f005 fd03 bl 802c8bc tick = tick/100; 8026eb6: 9b00 ldr r3, [sp, #0] 8026eb8: 2264 movs r2, #100 ; 0x64 8026eba: fbb3 f3f2 udiv r3, r3, r2 memset(str, 0, 20); 8026ebe: 2100 movs r1, #0 8026ec0: 2214 movs r2, #20 8026ec2: a801 add r0, sp, #4 strcpy(buf, "HTTP/1.0 200 OK\r\nContent-Type:text/html\r\n\r\n"); strcat(buf, "{\"uptime\":\""); snmp_get_sysuptime(&tick); tick = tick/100; 8026ec4: 9300 str r3, [sp, #0] memset(str, 0, 20); 8026ec6: f7fa fc1b bl 8021700 sprintf(str, "%d", tick); 8026eca: 9a00 ldr r2, [sp, #0] 8026ecc: 490b ldr r1, [pc, #44] ; (8026efc ) 8026ece: a801 add r0, sp, #4 8026ed0: f7fd fb18 bl 8024504 strncat(buf, str, strlen(str)); 8026ed4: a801 add r0, sp, #4 8026ed6: f7fa fdeb bl 8021ab0 8026eda: a901 add r1, sp, #4 8026edc: 4602 mov r2, r0 8026ede: 4620 mov r0, r4 8026ee0: f7fa fe16 bl 8021b10 strncat(buf, "\"}", 2); 8026ee4: 4620 mov r0, r4 8026ee6: 4906 ldr r1, [pc, #24] ; (8026f00 ) 8026ee8: 2202 movs r2, #2 8026eea: f7fa fe11 bl 8021b10 } 8026eee: b006 add sp, #24 8026ef0: bd10 pop {r4, pc} 8026ef2: bf00 nop 8026ef4: 0803783c .word 0x0803783c 8026ef8: 080379b2 .word 0x080379b2 8026efc: 08037a48 .word 0x08037a48 8026f00: 08037928 .word 0x08037928 08026f04 : /** * @brief Сброс настроек (всё кроме сетевых параметров) */ void HTTP_ResetSettings(void) { 8026f04: b508 push {r3, lr} //taskENTER_CRITICAL(); SETTINGS_SetPartDefault(); 8026f06: f7fd febd bl 8024c84 SETTINGS_Save(); //taskEXIT_CRITICAL(); } 8026f0a: e8bd 4008 ldmia.w sp!, {r3, lr} void HTTP_ResetSettings(void) { //taskENTER_CRITICAL(); SETTINGS_SetPartDefault(); SETTINGS_Save(); 8026f0e: f7fd be69 b.w 8024be4 08026f12 : */ void HTTP_SaveSettings(void) { // taskENTER_CRITICAL(); SETTINGS_Save(); 8026f12: f7fd be67 b.w 8024be4 08026f16 : /** * @brief Перезагрузка контроллера */ void HTTP_Reboot(void) { 8026f16: b508 push {r3, lr} vTaskDelay(1010); 8026f18: f240 30f2 movw r0, #1010 ; 0x3f2 8026f1c: f7fe fd5e bl 80259dc NVIC_SystemReset(); 8026f20: f7ff fd1a bl 8026958 08026f24 : * bootloader и перезаписаны настройки * * false - обычная перезагрузка */ void HTTP_StartResetTask(bool fBootMode) { 8026f24: b51f push {r0, r1, r2, r3, r4, lr} static bool temp; temp = fBootMode; 8026f26: 4b07 ldr r3, [pc, #28] ; (8026f44 ) xTaskCreate(vTaskReboot, "RebootTask", configMINIMAL_STACK_SIZE, 8026f28: 4907 ldr r1, [pc, #28] ; (8026f48 ) */ void HTTP_StartResetTask(bool fBootMode) { static bool temp; temp = fBootMode; 8026f2a: 7018 strb r0, [r3, #0] xTaskCreate(vTaskReboot, "RebootTask", configMINIMAL_STACK_SIZE, 8026f2c: 2200 movs r2, #0 8026f2e: 9200 str r2, [sp, #0] 8026f30: 9201 str r2, [sp, #4] 8026f32: 9202 str r2, [sp, #8] 8026f34: 9203 str r2, [sp, #12] 8026f36: 4805 ldr r0, [pc, #20] ; (8026f4c ) 8026f38: 2280 movs r2, #128 ; 0x80 8026f3a: f7fe fab9 bl 80254b0 (void*)&temp, tskIDLE_PRIORITY, NULL); } 8026f3e: b005 add sp, #20 8026f40: bd00 pop {pc} 8026f42: bf00 nop 8026f44: 200024b2 .word 0x200024b2 8026f48: 08037a4b .word 0x08037a4b 8026f4c: 08026979 .word 0x08026979 08026f50 : tcpip_thread(void *arg) { struct tcpip_msg *msg; LWIP_UNUSED_ARG(arg); if (tcpip_init_done != NULL) { 8026f50: 4b1e ldr r3, [pc, #120] ; (8026fcc ) 8026f52: 681b ldr r3, [r3, #0] * * @param arg unused argument */ static void tcpip_thread(void *arg) { 8026f54: b507 push {r0, r1, r2, lr} struct tcpip_msg *msg; LWIP_UNUSED_ARG(arg); if (tcpip_init_done != NULL) { 8026f56: b113 cbz r3, 8026f5e tcpip_init_done(tcpip_init_done_arg); 8026f58: 4a1d ldr r2, [pc, #116] ; (8026fd0 ) 8026f5a: 6810 ldr r0, [r2, #0] 8026f5c: 4798 blx r3 LOCK_TCPIP_CORE(); while (1) { /* MAIN Loop */ UNLOCK_TCPIP_CORE(); LWIP_TCPIP_THREAD_ALIVE(); /* wait for a message, timeouts are processed while waiting */ sys_timeouts_mbox_fetch(&mbox, (void **)&msg); 8026f5e: 481d ldr r0, [pc, #116] ; (8026fd4 ) 8026f60: a901 add r1, sp, #4 8026f62: f003 fd0d bl 802a980 LOCK_TCPIP_CORE(); switch (msg->type) { 8026f66: 9b01 ldr r3, [sp, #4] 8026f68: 781a ldrb r2, [r3, #0] 8026f6a: 2a05 cmp r2, #5 8026f6c: d8f7 bhi.n 8026f5e 8026f6e: e8df f002 tbb [pc, r2] 8026f72: 0703 .short 0x0703 8026f74: 28201b15 .word 0x28201b15 #if LWIP_NETCONN case TCPIP_MSG_API: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: API message %p\n", (void *)msg)); msg->msg.apimsg->function(&(msg->msg.apimsg->msg)); 8026f78: 6898 ldr r0, [r3, #8] 8026f7a: 6803 ldr r3, [r0, #0] 8026f7c: 3004 adds r0, #4 8026f7e: e7ed b.n 8026f5c #if !LWIP_TCPIP_CORE_LOCKING_INPUT case TCPIP_MSG_INPKT: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: PACKET %p\n", (void *)msg)); #if LWIP_ETHERNET if (msg->msg.inp.netif->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) { 8026f80: 68d9 ldr r1, [r3, #12] ethernet_input(msg->msg.inp.p, msg->msg.inp.netif); 8026f82: 6898 ldr r0, [r3, #8] #if !LWIP_TCPIP_CORE_LOCKING_INPUT case TCPIP_MSG_INPKT: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: PACKET %p\n", (void *)msg)); #if LWIP_ETHERNET if (msg->msg.inp.netif->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) { 8026f84: f891 202d ldrb.w r2, [r1, #45] ; 0x2d 8026f88: f012 0f60 tst.w r2, #96 ; 0x60 8026f8c: d002 beq.n 8026f94 ethernet_input(msg->msg.inp.p, msg->msg.inp.netif); 8026f8e: f008 fb51 bl 802f634 8026f92: e001 b.n 8026f98 } else #endif /* LWIP_ETHERNET */ { ip_input(msg->msg.inp.p, msg->msg.inp.netif); 8026f94: f004 f94e bl 802b234 } memp_free(MEMP_TCPIP_MSG_INPKT, msg); 8026f98: 2008 movs r0, #8 8026f9a: e00e b.n 8026fba #endif /* LWIP_NETIF_API */ #if LWIP_TCPIP_TIMEOUT case TCPIP_MSG_TIMEOUT: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: TIMEOUT %p\n", (void *)msg)); sys_timeout(msg->msg.tmo.msecs, msg->msg.tmo.h, msg->msg.tmo.arg); 8026f9c: f103 0008 add.w r0, r3, #8 8026fa0: c807 ldmia r0, {r0, r1, r2} 8026fa2: f003 fc1f bl 802a7e4 8026fa6: e007 b.n 8026fb8 memp_free(MEMP_TCPIP_MSG_API, msg); break; case TCPIP_MSG_UNTIMEOUT: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: UNTIMEOUT %p\n", (void *)msg)); sys_untimeout(msg->msg.tmo.h, msg->msg.tmo.arg); 8026fa8: 68d8 ldr r0, [r3, #12] 8026faa: 6919 ldr r1, [r3, #16] 8026fac: f003 fcc4 bl 802a938 8026fb0: e002 b.n 8026fb8 break; #endif /* LWIP_TCPIP_TIMEOUT */ case TCPIP_MSG_CALLBACK: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: CALLBACK %p\n", (void *)msg)); msg->msg.cb.function(msg->msg.cb.ctx); 8026fb2: 689a ldr r2, [r3, #8] 8026fb4: 68d8 ldr r0, [r3, #12] 8026fb6: 4790 blx r2 memp_free(MEMP_TCPIP_MSG_API, msg); 8026fb8: 2007 movs r0, #7 8026fba: 9901 ldr r1, [sp, #4] 8026fbc: f001 f882 bl 80280c4 break; 8026fc0: e7cd b.n 8026f5e case TCPIP_MSG_CALLBACK_STATIC: LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: CALLBACK_STATIC %p\n", (void *)msg)); msg->msg.cb.function(msg->msg.cb.ctx); 8026fc2: 689a ldr r2, [r3, #8] 8026fc4: 68d8 ldr r0, [r3, #12] 8026fc6: 4790 blx r2 break; 8026fc8: e7c9 b.n 8026f5e 8026fca: bf00 nop 8026fcc: 200024bc .word 0x200024bc 8026fd0: 200024b8 .word 0x200024b8 8026fd4: 200024b4 .word 0x200024b4 08026fd8 : * NETIF_FLAG_ETHERNET flags) * @param inp the network interface on which the packet was received */ err_t tcpip_input(struct pbuf *p, struct netif *inp) { 8026fd8: b5f8 push {r3, r4, r5, r6, r7, lr} UNLOCK_TCPIP_CORE(); return ret; #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ struct tcpip_msg *msg; if (!sys_mbox_valid(&mbox)) { 8026fda: 4d0e ldr r5, [pc, #56] ; (8027014 ) 8026fdc: 682b ldr r3, [r5, #0] * NETIF_FLAG_ETHERNET flags) * @param inp the network interface on which the packet was received */ err_t tcpip_input(struct pbuf *p, struct netif *inp) { 8026fde: 4606 mov r6, r0 8026fe0: 460f mov r7, r1 UNLOCK_TCPIP_CORE(); return ret; #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ struct tcpip_msg *msg; if (!sys_mbox_valid(&mbox)) { 8026fe2: b193 cbz r3, 802700a return ERR_VAL; } msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); 8026fe4: 2008 movs r0, #8 8026fe6: f001 f857 bl 8028098 if (msg == NULL) { 8026fea: 4604 mov r4, r0 8026fec: b178 cbz r0, 802700e return ERR_MEM; } msg->type = TCPIP_MSG_INPKT; 8026fee: 2301 movs r3, #1 8026ff0: 7003 strb r3, [r0, #0] msg->msg.inp.p = p; 8026ff2: 6086 str r6, [r0, #8] msg->msg.inp.netif = inp; 8026ff4: 60c7 str r7, [r0, #12] if (sys_mbox_trypost(&mbox, msg) != ERR_OK) { 8026ff6: 4621 mov r1, r4 8026ff8: 4628 mov r0, r5 8026ffa: f008 fd69 bl 802fad0 8026ffe: b138 cbz r0, 8027010 memp_free(MEMP_TCPIP_MSG_INPKT, msg); 8027000: 2008 movs r0, #8 8027002: 4621 mov r1, r4 8027004: f001 f85e bl 80280c4 8027008: e001 b.n 802700e return ret; #else /* LWIP_TCPIP_CORE_LOCKING_INPUT */ struct tcpip_msg *msg; if (!sys_mbox_valid(&mbox)) { return ERR_VAL; 802700a: 20fa movs r0, #250 ; 0xfa 802700c: e000 b.n 8027010 } msg = (struct tcpip_msg *)memp_malloc(MEMP_TCPIP_MSG_INPKT); if (msg == NULL) { return ERR_MEM; 802700e: 20ff movs r0, #255 ; 0xff memp_free(MEMP_TCPIP_MSG_INPKT, msg); return ERR_MEM; } return ERR_OK; #endif /* LWIP_TCPIP_CORE_LOCKING_INPUT */ } 8027010: b240 sxtb r0, r0 8027012: bdf8 pop {r3, r4, r5, r6, r7, pc} 8027014: 200024b4 .word 0x200024b4 08027018 : * @param initfunc a function to call when tcpip_thread is running and finished initializing * @param arg argument to pass to initfunc */ void tcpip_init(tcpip_init_done_fn initfunc, void *arg) { 8027018: b537 push {r0, r1, r2, r4, r5, lr} 802701a: 4604 mov r4, r0 802701c: 460d mov r5, r1 lwip_init(); 802701e: f000 feb3 bl 8027d88 tcpip_init_done = initfunc; 8027022: 4b09 ldr r3, [pc, #36] ; (8027048 ) tcpip_init_done_arg = arg; if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 8027024: 4809 ldr r0, [pc, #36] ; (802704c ) void tcpip_init(tcpip_init_done_fn initfunc, void *arg) { lwip_init(); tcpip_init_done = initfunc; 8027026: 601c str r4, [r3, #0] tcpip_init_done_arg = arg; 8027028: 4b09 ldr r3, [pc, #36] ; (8027050 ) if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 802702a: 2132 movs r1, #50 ; 0x32 tcpip_init(tcpip_init_done_fn initfunc, void *arg) { lwip_init(); tcpip_init_done = initfunc; tcpip_init_done_arg = arg; 802702c: 601d str r5, [r3, #0] if(sys_mbox_new(&mbox, TCPIP_MBOX_SIZE) != ERR_OK) { 802702e: f008 fd41 bl 802fab4 if(sys_mutex_new(&lock_tcpip_core) != ERR_OK) { LWIP_ASSERT("failed to create lock_tcpip_core", 0); } #endif /* LWIP_TCPIP_CORE_LOCKING */ sys_thread_new(TCPIP_THREAD_NAME, tcpip_thread, NULL, TCPIP_THREAD_STACKSIZE, TCPIP_THREAD_PRIO); 8027032: 2303 movs r3, #3 8027034: 9300 str r3, [sp, #0] 8027036: 4907 ldr r1, [pc, #28] ; (8027054 ) 8027038: 4807 ldr r0, [pc, #28] ; (8027058 ) 802703a: 2200 movs r2, #0 802703c: f44f 73c8 mov.w r3, #400 ; 0x190 8027040: f008 fdb7 bl 802fbb2 } 8027044: bd3e pop {r1, r2, r3, r4, r5, pc} 8027046: bf00 nop 8027048: 200024bc .word 0x200024bc 802704c: 200024b4 .word 0x200024b4 8027050: 200024b8 .word 0x200024b8 8027054: 08026f51 .word 0x08026f51 8027058: 08037a56 .word 0x08037a56 0802705c : * @return n in network byte order */ u16_t lwip_htons(u16_t n) { return ((n & 0xff) << 8) | ((n & 0xff00) >> 8); 802705c: 0a03 lsrs r3, r0, #8 802705e: ea43 2000 orr.w r0, r3, r0, lsl #8 } 8027062: b280 uxth r0, r0 8027064: 4770 bx lr 08027066 : * @return n in network byte order */ u16_t lwip_htons(u16_t n) { return ((n & 0xff) << 8) | ((n & 0xff00) >> 8); 8027066: 0a03 lsrs r3, r0, #8 8027068: ea43 2000 orr.w r0, r3, r0, lsl #8 */ u16_t lwip_ntohs(u16_t n) { return lwip_htons(n); } 802706c: b280 uxth r0, r0 802706e: 4770 bx lr 08027070 : { return ((n & 0xff) << 24) | ((n & 0xff00) << 8) | ((n & 0xff0000UL) >> 8) | ((n & 0xff000000UL) >> 24); } 8027070: ba00 rev r0, r0 8027072: 4770 bx lr 08027074 : * @return n in host byte order */ u32_t lwip_ntohl(u32_t n) { return lwip_htonl(n); 8027074: f7ff bffc b.w 8027070 08027078 : * If the state changed, reset the number of tries. */ static void dhcp_set_state(struct dhcp *dhcp, u8_t new_state) { if (new_state != dhcp->state) { 8027078: 7b03 ldrb r3, [r0, #12] 802707a: 428b cmp r3, r1 802707c: d003 beq.n 8027086 dhcp->state = new_state; dhcp->tries = 0; 802707e: 2300 movs r3, #0 */ static void dhcp_set_state(struct dhcp *dhcp, u8_t new_state) { if (new_state != dhcp->state) { dhcp->state = new_state; 8027080: 7301 strb r1, [r0, #12] dhcp->tries = 0; 8027082: 7343 strb r3, [r0, #13] dhcp->request_timeout = 0; 8027084: 8343 strh r3, [r0, #26] 8027086: 4770 bx lr 08027088 : */ static void dhcp_option(struct dhcp *dhcp, u8_t option_type, u8_t option_len) { LWIP_ASSERT("dhcp_option: dhcp->options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = option_type; 8027088: 8b03 ldrh r3, [r0, #24] * DHCP message. * */ static void dhcp_option(struct dhcp *dhcp, u8_t option_type, u8_t option_len) { 802708a: b510 push {r4, lr} LWIP_ASSERT("dhcp_option: dhcp->options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = option_type; 802708c: 6944 ldr r4, [r0, #20] 802708e: 18e4 adds r4, r4, r3 8027090: f884 10f0 strb.w r1, [r4, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = option_len; 8027094: 6941 ldr r1, [r0, #20] */ static void dhcp_option(struct dhcp *dhcp, u8_t option_type, u8_t option_len) { LWIP_ASSERT("dhcp_option: dhcp->options_out_len + 2 + option_len <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U + option_len <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = option_type; 8027096: 1c5c adds r4, r3, #1 dhcp->msg_out->options[dhcp->options_out_len++] = option_len; 8027098: fa11 f184 uxtah r1, r1, r4 802709c: 3302 adds r3, #2 802709e: f881 20f0 strb.w r2, [r1, #240] ; 0xf0 80270a2: 8303 strh r3, [r0, #24] 80270a4: bd10 pop {r4, pc} 080270a6 : */ static void dhcp_option_byte(struct dhcp *dhcp, u8_t value) { LWIP_ASSERT("dhcp_option_byte: dhcp->options_out_len < DHCP_OPTIONS_LEN", dhcp->options_out_len < DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = value; 80270a6: 8b03 ldrh r3, [r0, #24] 80270a8: 6942 ldr r2, [r0, #20] 80270aa: 18d2 adds r2, r2, r3 80270ac: 3301 adds r3, #1 80270ae: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 80270b2: 8303 strh r3, [r0, #24] 80270b4: 4770 bx lr 080270b6 : static void dhcp_option_short(struct dhcp *dhcp, u16_t value) { LWIP_ASSERT("dhcp_option_short: dhcp->options_out_len + 2 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff00U) >> 8); 80270b6: 8b03 ldrh r3, [r0, #24] 80270b8: 6942 ldr r2, [r0, #20] 80270ba: 18d2 adds r2, r2, r3 dhcp->msg_out->options[dhcp->options_out_len++] = value; } static void dhcp_option_short(struct dhcp *dhcp, u16_t value) { 80270bc: b510 push {r4, lr} LWIP_ASSERT("dhcp_option_short: dhcp->options_out_len + 2 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff00U) >> 8); 80270be: 0a0c lsrs r4, r1, #8 80270c0: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); 80270c4: 6942 ldr r2, [r0, #20] static void dhcp_option_short(struct dhcp *dhcp, u16_t value) { LWIP_ASSERT("dhcp_option_short: dhcp->options_out_len + 2 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 2U <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff00U) >> 8); 80270c6: 1c5c adds r4, r3, #1 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); 80270c8: fa12 f284 uxtah r2, r2, r4 80270cc: 3302 adds r3, #2 80270ce: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 80270d2: 8303 strh r3, [r0, #24] 80270d4: bd10 pop {r4, pc} 080270d6 : static void dhcp_option_long(struct dhcp *dhcp, u32_t value) { LWIP_ASSERT("dhcp_option_long: dhcp->options_out_len + 4 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 4U <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); 80270d6: 8b03 ldrh r3, [r0, #24] 80270d8: 6942 ldr r2, [r0, #20] 80270da: 18d2 adds r2, r2, r3 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t) (value & 0x00ffU); } static void dhcp_option_long(struct dhcp *dhcp, u32_t value) { 80270dc: b510 push {r4, lr} LWIP_ASSERT("dhcp_option_long: dhcp->options_out_len + 4 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 4U <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); 80270de: 0e0c lsrs r4, r1, #24 80270e0: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); 80270e4: 6942 ldr r2, [r0, #20] static void dhcp_option_long(struct dhcp *dhcp, u32_t value) { LWIP_ASSERT("dhcp_option_long: dhcp->options_out_len + 4 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 4U <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); 80270e6: 1c5c adds r4, r3, #1 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); 80270e8: fa12 f284 uxtah r2, r2, r4 80270ec: f3c1 4407 ubfx r4, r1, #16, #8 80270f0: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); 80270f4: 6942 ldr r2, [r0, #20] static void dhcp_option_long(struct dhcp *dhcp, u32_t value) { LWIP_ASSERT("dhcp_option_long: dhcp->options_out_len + 4 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 4U <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); 80270f6: 1c9c adds r4, r3, #2 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); 80270f8: fa12 f284 uxtah r2, r2, r4 80270fc: f3c1 2407 ubfx r4, r1, #8, #8 8027100: f882 40f0 strb.w r4, [r2, #240] ; 0xf0 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x000000ffUL)); 8027104: 6942 ldr r2, [r0, #20] dhcp_option_long(struct dhcp *dhcp, u32_t value) { LWIP_ASSERT("dhcp_option_long: dhcp->options_out_len + 4 <= DHCP_OPTIONS_LEN", dhcp->options_out_len + 4U <= DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0xff000000UL) >> 24); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x00ff0000UL) >> 16); dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x0000ff00UL) >> 8); 8027106: 1cdc adds r4, r3, #3 dhcp->msg_out->options[dhcp->options_out_len++] = (u8_t)((value & 0x000000ffUL)); 8027108: fa12 f284 uxtah r2, r2, r4 802710c: 3304 adds r3, #4 802710e: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 8027112: 8303 strh r3, [r0, #24] 8027114: bd10 pop {r4, pc} 08027116 : * @param dhcp DHCP state structure */ static void dhcp_option_trailer(struct dhcp *dhcp) { LWIP_ERROR("dhcp_option_trailer: dhcp != NULL", (dhcp != NULL), return;); 8027116: b190 cbz r0, 802713e LWIP_ASSERT("dhcp_option_trailer: dhcp->msg_out != NULL\n", dhcp->msg_out != NULL); LWIP_ASSERT("dhcp_option_trailer: dhcp->options_out_len < DHCP_OPTIONS_LEN\n", dhcp->options_out_len < DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = DHCP_OPTION_END; 8027118: 8b03 ldrh r3, [r0, #24] 802711a: 6942 ldr r2, [r0, #20] 802711c: 18d2 adds r2, r2, r3 802711e: 21ff movs r1, #255 ; 0xff 8027120: 3301 adds r3, #1 8027122: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 8027126: 8303 strh r3, [r0, #24] /* packet is too small, or not 4 byte aligned? */ while (((dhcp->options_out_len < DHCP_MIN_OPTIONS_LEN) || (dhcp->options_out_len & 3)) && (dhcp->options_out_len < DHCP_OPTIONS_LEN)) { /* add a fill/padding byte */ dhcp->msg_out->options[dhcp->options_out_len++] = 0; 8027128: 2100 movs r1, #0 LWIP_ERROR("dhcp_option_trailer: dhcp != NULL", (dhcp != NULL), return;); LWIP_ASSERT("dhcp_option_trailer: dhcp->msg_out != NULL\n", dhcp->msg_out != NULL); LWIP_ASSERT("dhcp_option_trailer: dhcp->options_out_len < DHCP_OPTIONS_LEN\n", dhcp->options_out_len < DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = DHCP_OPTION_END; /* packet is too small, or not 4 byte aligned? */ while (((dhcp->options_out_len < DHCP_MIN_OPTIONS_LEN) || (dhcp->options_out_len & 3)) && 802712a: e005 b.n 8027138 (dhcp->options_out_len < DHCP_OPTIONS_LEN)) { /* add a fill/padding byte */ dhcp->msg_out->options[dhcp->options_out_len++] = 0; 802712c: 6942 ldr r2, [r0, #20] 802712e: 18d2 adds r2, r2, r3 8027130: 3301 adds r3, #1 8027132: f882 10f0 strb.w r1, [r2, #240] ; 0xf0 8027136: 8303 strh r3, [r0, #24] LWIP_ERROR("dhcp_option_trailer: dhcp != NULL", (dhcp != NULL), return;); LWIP_ASSERT("dhcp_option_trailer: dhcp->msg_out != NULL\n", dhcp->msg_out != NULL); LWIP_ASSERT("dhcp_option_trailer: dhcp->options_out_len < DHCP_OPTIONS_LEN\n", dhcp->options_out_len < DHCP_OPTIONS_LEN); dhcp->msg_out->options[dhcp->options_out_len++] = DHCP_OPTION_END; /* packet is too small, or not 4 byte aligned? */ while (((dhcp->options_out_len < DHCP_MIN_OPTIONS_LEN) || (dhcp->options_out_len & 3)) && 8027138: 8b03 ldrh r3, [r0, #24] 802713a: 2b43 cmp r3, #67 ; 0x43 802713c: d9f6 bls.n 802712c 802713e: 4770 bx lr 08027140 : * @param dhcp dhcp control struct * @param message_type message type of the request */ static err_t dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type) { 8027140: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 8027144: 460c mov r4, r1 8027146: 4617 mov r7, r2 if (!xid_initialised) { xid = DHCP_GLOBAL_XID; xid_initialised = !xid_initialised; } #endif LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return ERR_ARG;); 8027148: 4606 mov r6, r0 802714a: 2800 cmp r0, #0 802714c: f000 808e beq.w 802726c LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); 8027150: 2900 cmp r1, #0 8027152: f000 808d beq.w 8027270 LWIP_ASSERT("dhcp_create_msg: dhcp->p_out == NULL", dhcp->p_out == NULL); LWIP_ASSERT("dhcp_create_msg: dhcp->msg_out == NULL", dhcp->msg_out == NULL); dhcp->p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM); 8027156: 2000 movs r0, #0 8027158: f44f 719a mov.w r1, #308 ; 0x134 802715c: 4602 mov r2, r0 802715e: f001 f908 bl 8028372 8027162: 6120 str r0, [r4, #16] if (dhcp->p_out == NULL) { 8027164: 2800 cmp r0, #0 8027166: f000 8085 beq.w 8027274 } LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg", (dhcp->p_out->len >= sizeof(struct dhcp_msg))); /* reuse transaction identifier in retransmissions */ if (dhcp->tries == 0) { 802716a: 7b62 ldrb r2, [r4, #13] 802716c: 4b43 ldr r3, [pc, #268] ; (802727c ) 802716e: b912 cbnz r2, 8027176 #if DHCP_CREATE_RAND_XID && defined(LWIP_RAND) xid = LWIP_RAND(); #else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ xid++; 8027170: 681a ldr r2, [r3, #0] 8027172: 3201 adds r2, #1 8027174: 601a str r2, [r3, #0] #endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ } dhcp->xid = xid; 8027176: 681b ldr r3, [r3, #0] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("transaction id xid(%"X32_F")\n", xid)); dhcp->msg_out = (struct dhcp_msg *)dhcp->p_out->payload; 8027178: 6842 ldr r2, [r0, #4] xid = LWIP_RAND(); #else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ xid++; #endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */ } dhcp->xid = xid; 802717a: 6023 str r3, [r4, #0] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("transaction id xid(%"X32_F")\n", xid)); dhcp->msg_out = (struct dhcp_msg *)dhcp->p_out->payload; dhcp->msg_out->op = DHCP_BOOTREQUEST; 802717c: 2301 movs r3, #1 } dhcp->xid = xid; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("transaction id xid(%"X32_F")\n", xid)); dhcp->msg_out = (struct dhcp_msg *)dhcp->p_out->payload; 802717e: 6162 str r2, [r4, #20] dhcp->msg_out->op = DHCP_BOOTREQUEST; 8027180: 7013 strb r3, [r2, #0] /* TODO: make link layer independent */ dhcp->msg_out->htype = DHCP_HTYPE_ETH; 8027182: 6962 ldr r2, [r4, #20] 8027184: 7053 strb r3, [r2, #1] dhcp->msg_out->hlen = netif->hwaddr_len; 8027186: 6963 ldr r3, [r4, #20] 8027188: f896 2026 ldrb.w r2, [r6, #38] ; 0x26 802718c: 709a strb r2, [r3, #2] dhcp->msg_out->hops = 0; 802718e: 6963 ldr r3, [r4, #20] 8027190: 2500 movs r5, #0 8027192: 70dd strb r5, [r3, #3] dhcp->msg_out->xid = htonl(dhcp->xid); 8027194: 6820 ldr r0, [r4, #0] 8027196: f8d4 8014 ldr.w r8, [r4, #20] 802719a: f7ff ff69 bl 8027070 802719e: f8c8 0004 str.w r0, [r8, #4] dhcp->msg_out->secs = 0; 80271a2: 6963 ldr r3, [r4, #20] /* we don't need the broadcast flag since we can receive unicast traffic before being fully configured! */ dhcp->msg_out->flags = 0; ip_addr_set_zero(&dhcp->msg_out->ciaddr); /* set ciaddr to netif->ip_addr based on message_type and state */ if ((message_type == DHCP_INFORM) || (message_type == DHCP_DECLINE) || 80271a4: 2f08 cmp r7, #8 /* TODO: make link layer independent */ dhcp->msg_out->htype = DHCP_HTYPE_ETH; dhcp->msg_out->hlen = netif->hwaddr_len; dhcp->msg_out->hops = 0; dhcp->msg_out->xid = htonl(dhcp->xid); dhcp->msg_out->secs = 0; 80271a6: 721d strb r5, [r3, #8] 80271a8: 725d strb r5, [r3, #9] /* we don't need the broadcast flag since we can receive unicast traffic before being fully configured! */ dhcp->msg_out->flags = 0; 80271aa: 729d strb r5, [r3, #10] 80271ac: 72dd strb r5, [r3, #11] ip_addr_set_zero(&dhcp->msg_out->ciaddr); 80271ae: 731d strb r5, [r3, #12] 80271b0: 735d strb r5, [r3, #13] 80271b2: 739d strb r5, [r3, #14] 80271b4: 73dd strb r5, [r3, #15] /* set ciaddr to netif->ip_addr based on message_type and state */ if ((message_type == DHCP_INFORM) || (message_type == DHCP_DECLINE) || 80271b6: d007 beq.n 80271c8 80271b8: 2f04 cmp r7, #4 80271ba: d005 beq.n 80271c8 80271bc: 2f03 cmp r7, #3 80271be: d105 bne.n 80271cc ((message_type == DHCP_REQUEST) && /* DHCP_BOUND not used for sending! */ ((dhcp->state==DHCP_RENEWING) || dhcp->state==DHCP_REBINDING))) { 80271c0: 7b22 ldrb r2, [r4, #12] before being fully configured! */ dhcp->msg_out->flags = 0; ip_addr_set_zero(&dhcp->msg_out->ciaddr); /* set ciaddr to netif->ip_addr based on message_type and state */ if ((message_type == DHCP_INFORM) || (message_type == DHCP_DECLINE) || ((message_type == DHCP_REQUEST) && /* DHCP_BOUND not used for sending! */ 80271c2: 3a04 subs r2, #4 80271c4: 2a01 cmp r2, #1 80271c6: d801 bhi.n 80271cc ((dhcp->state==DHCP_RENEWING) || dhcp->state==DHCP_REBINDING))) { ip_addr_copy(dhcp->msg_out->ciaddr, netif->ip_addr); 80271c8: 6872 ldr r2, [r6, #4] 80271ca: 60da str r2, [r3, #12] } ip_addr_set_zero(&dhcp->msg_out->yiaddr); 80271cc: 2500 movs r5, #0 80271ce: 741d strb r5, [r3, #16] 80271d0: 745d strb r5, [r3, #17] 80271d2: 749d strb r5, [r3, #18] 80271d4: 74dd strb r5, [r3, #19] ip_addr_set_zero(&dhcp->msg_out->siaddr); 80271d6: 751d strb r5, [r3, #20] 80271d8: 755d strb r5, [r3, #21] 80271da: 759d strb r5, [r3, #22] 80271dc: 75dd strb r5, [r3, #23] ip_addr_set_zero(&dhcp->msg_out->giaddr); 80271de: 761d strb r5, [r3, #24] 80271e0: 765d strb r5, [r3, #25] 80271e2: 769d strb r5, [r3, #26] 80271e4: 76dd strb r5, [r3, #27] for (i = 0; i < DHCP_CHADDR_LEN; i++) { /* copy netif hardware address, pad with zeroes */ dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; 80271e6: f896 1026 ldrb.w r1, [r6, #38] ; 0x26 80271ea: 6962 ldr r2, [r4, #20] 80271ec: b2ab uxth r3, r5 80271ee: 4299 cmp r1, r3 * @param netif the netif under DHCP control * @param dhcp dhcp control struct * @param message_type message type of the request */ static err_t dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type) 80271f0: bf88 it hi 80271f2: 1973 addhi r3, r6, r5 ip_addr_set_zero(&dhcp->msg_out->yiaddr); ip_addr_set_zero(&dhcp->msg_out->siaddr); ip_addr_set_zero(&dhcp->msg_out->giaddr); for (i = 0; i < DHCP_CHADDR_LEN; i++) { /* copy netif hardware address, pad with zeroes */ dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; 80271f4: 442a add r2, r5 80271f6: bf8c ite hi 80271f8: f893 3027 ldrbhi.w r3, [r3, #39] ; 0x27 80271fc: 2300 movls r3, #0 80271fe: 3501 adds r5, #1 ip_addr_copy(dhcp->msg_out->ciaddr, netif->ip_addr); } ip_addr_set_zero(&dhcp->msg_out->yiaddr); ip_addr_set_zero(&dhcp->msg_out->siaddr); ip_addr_set_zero(&dhcp->msg_out->giaddr); for (i = 0; i < DHCP_CHADDR_LEN; i++) { 8027200: 2d10 cmp r5, #16 /* copy netif hardware address, pad with zeroes */ dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; 8027202: 7713 strb r3, [r2, #28] ip_addr_copy(dhcp->msg_out->ciaddr, netif->ip_addr); } ip_addr_set_zero(&dhcp->msg_out->yiaddr); ip_addr_set_zero(&dhcp->msg_out->siaddr); ip_addr_set_zero(&dhcp->msg_out->giaddr); for (i = 0; i < DHCP_CHADDR_LEN; i++) { 8027204: d1ef bne.n 80271e6 8027206: 2300 movs r3, #0 /* copy netif hardware address, pad with zeroes */ dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; } for (i = 0; i < DHCP_SNAME_LEN; i++) { dhcp->msg_out->sname[i] = 0; 8027208: 4619 mov r1, r3 802720a: 6962 ldr r2, [r4, #20] 802720c: 18d2 adds r2, r2, r3 802720e: 3301 adds r3, #1 ip_addr_set_zero(&dhcp->msg_out->giaddr); for (i = 0; i < DHCP_CHADDR_LEN; i++) { /* copy netif hardware address, pad with zeroes */ dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; } for (i = 0; i < DHCP_SNAME_LEN; i++) { 8027210: 2b40 cmp r3, #64 ; 0x40 dhcp->msg_out->sname[i] = 0; 8027212: f882 102c strb.w r1, [r2, #44] ; 0x2c ip_addr_set_zero(&dhcp->msg_out->giaddr); for (i = 0; i < DHCP_CHADDR_LEN; i++) { /* copy netif hardware address, pad with zeroes */ dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; } for (i = 0; i < DHCP_SNAME_LEN; i++) { 8027216: d1f8 bne.n 802720a 8027218: 2200 movs r2, #0 dhcp->msg_out->sname[i] = 0; } for (i = 0; i < DHCP_FILE_LEN; i++) { dhcp->msg_out->file[i] = 0; 802721a: 4610 mov r0, r2 802721c: 6963 ldr r3, [r4, #20] 802721e: 1899 adds r1, r3, r2 8027220: 3201 adds r2, #1 8027222: 2300 movs r3, #0 dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; } for (i = 0; i < DHCP_SNAME_LEN; i++) { dhcp->msg_out->sname[i] = 0; } for (i = 0; i < DHCP_FILE_LEN; i++) { 8027224: 2a80 cmp r2, #128 ; 0x80 dhcp->msg_out->file[i] = 0; 8027226: f881 006c strb.w r0, [r1, #108] ; 0x6c dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; } for (i = 0; i < DHCP_SNAME_LEN; i++) { dhcp->msg_out->sname[i] = 0; } for (i = 0; i < DHCP_FILE_LEN; i++) { 802722a: d1f7 bne.n 802721c dhcp->msg_out->file[i] = 0; } dhcp->msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE); 802722c: 6962 ldr r2, [r4, #20] 802722e: f06f 007d mvn.w r0, #125 ; 0x7d 8027232: 2163 movs r1, #99 ; 0x63 8027234: f882 00ed strb.w r0, [r2, #237] ; 0xed 8027238: 2053 movs r0, #83 ; 0x53 802723a: f882 10ec strb.w r1, [r2, #236] ; 0xec 802723e: f882 00ee strb.w r0, [r2, #238] ; 0xee 8027242: f882 10ef strb.w r1, [r2, #239] ; 0xef dhcp->options_out_len = 0; 8027246: 8323 strh r3, [r4, #24] /* fill options field with an incrementing array (for debugging purposes) */ for (i = 0; i < DHCP_OPTIONS_LEN; i++) { dhcp->msg_out->options[i] = (u8_t)i; /* for debugging only, no matter if truncated */ 8027248: 6962 ldr r2, [r4, #20] 802724a: 18d2 adds r2, r2, r3 802724c: f882 30f0 strb.w r3, [r2, #240] ; 0xf0 8027250: 3301 adds r3, #1 dhcp->msg_out->file[i] = 0; } dhcp->msg_out->cookie = PP_HTONL(DHCP_MAGIC_COOKIE); dhcp->options_out_len = 0; /* fill options field with an incrementing array (for debugging purposes) */ for (i = 0; i < DHCP_OPTIONS_LEN; i++) { 8027252: 2b44 cmp r3, #68 ; 0x44 8027254: d1f8 bne.n 8027248 dhcp->msg_out->options[i] = (u8_t)i; /* for debugging only, no matter if truncated */ } /* Add option MESSAGE_TYPE */ dhcp_option(dhcp, DHCP_OPTION_MESSAGE_TYPE, DHCP_OPTION_MESSAGE_TYPE_LEN); 8027256: 4620 mov r0, r4 8027258: 2135 movs r1, #53 ; 0x35 802725a: 2201 movs r2, #1 802725c: f7ff ff14 bl 8027088 dhcp_option_byte(dhcp, message_type); 8027260: 4620 mov r0, r4 8027262: 4639 mov r1, r7 8027264: f7ff ff1f bl 80270a6 return ERR_OK; 8027268: 2000 movs r0, #0 802726a: e004 b.n 8027276 if (!xid_initialised) { xid = DHCP_GLOBAL_XID; xid_initialised = !xid_initialised; } #endif LWIP_ERROR("dhcp_create_msg: netif != NULL", (netif != NULL), return ERR_ARG;); 802726c: 20f2 movs r0, #242 ; 0xf2 802726e: e002 b.n 8027276 LWIP_ERROR("dhcp_create_msg: dhcp != NULL", (dhcp != NULL), return ERR_VAL;); 8027270: 20fa movs r0, #250 ; 0xfa 8027272: e000 b.n 8027276 LWIP_ASSERT("dhcp_create_msg: dhcp->msg_out == NULL", dhcp->msg_out == NULL); dhcp->p_out = pbuf_alloc(PBUF_TRANSPORT, sizeof(struct dhcp_msg), PBUF_RAM); if (dhcp->p_out == NULL) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_create_msg(): could not allocate pbuf\n")); return ERR_MEM; 8027274: 20ff movs r0, #255 ; 0xff } /* Add option MESSAGE_TYPE */ dhcp_option(dhcp, DHCP_OPTION_MESSAGE_TYPE, DHCP_OPTION_MESSAGE_TYPE_LEN); dhcp_option_byte(dhcp, message_type); return ERR_OK; } 8027276: b240 sxtb r0, r0 8027278: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802727c: 20001100 .word 0x20001100 08027280 : * * @param dhcp the dhcp struct to free the request from */ static void dhcp_delete_msg(struct dhcp *dhcp) { 8027280: b510 push {r4, lr} LWIP_ERROR("dhcp_delete_msg: dhcp != NULL", (dhcp != NULL), return;); 8027282: 4604 mov r4, r0 8027284: b130 cbz r0, 8027294 LWIP_ASSERT("dhcp_delete_msg: dhcp->p_out != NULL", dhcp->p_out != NULL); LWIP_ASSERT("dhcp_delete_msg: dhcp->msg_out != NULL", dhcp->msg_out != NULL); if (dhcp->p_out != NULL) { 8027286: 6900 ldr r0, [r0, #16] 8027288: b108 cbz r0, 802728e pbuf_free(dhcp->p_out); 802728a: f001 f825 bl 80282d8 } dhcp->p_out = NULL; 802728e: 2300 movs r3, #0 8027290: 6123 str r3, [r4, #16] dhcp->msg_out = NULL; 8027292: 6163 str r3, [r4, #20] 8027294: bd10 pop {r4, pc} 8027296: 0000 movs r0, r0 08027298 : * * @param netif the netif under DHCP control */ static err_t dhcp_discover(struct netif *netif) { 8027298: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 802729a: 6a04 ldr r4, [r0, #32] err_t result = ERR_OK; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover()\n")); ip_addr_set_any(&dhcp->offered_ip_addr); 802729c: 2300 movs r3, #0 * * @param netif the netif under DHCP control */ static err_t dhcp_discover(struct netif *netif) { 802729e: 4605 mov r5, r0 struct dhcp *dhcp = netif->dhcp; err_t result = ERR_OK; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover()\n")); ip_addr_set_any(&dhcp->offered_ip_addr); 80272a0: 6263 str r3, [r4, #36] ; 0x24 dhcp_set_state(dhcp, DHCP_SELECTING); 80272a2: 4620 mov r0, r4 80272a4: 2106 movs r1, #6 80272a6: f7ff fee7 bl 8027078 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_DISCOVER); 80272aa: 4628 mov r0, r5 80272ac: 4621 mov r1, r4 80272ae: 2201 movs r2, #1 80272b0: f7ff ff46 bl 8027140 if (result == ERR_OK) { 80272b4: 4606 mov r6, r0 80272b6: 2800 cmp r0, #0 80272b8: d130 bne.n 802731c LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: making request\n")); dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 80272ba: 2202 movs r2, #2 80272bc: 4620 mov r0, r4 80272be: 2139 movs r1, #57 ; 0x39 80272c0: f7ff fee2 bl 8027088 dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 80272c4: 4620 mov r0, r4 80272c6: 8ca9 ldrh r1, [r5, #36] ; 0x24 80272c8: f7ff fef5 bl 80270b6 dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, 4/*num options*/); 80272cc: 2204 movs r2, #4 80272ce: 4620 mov r0, r4 80272d0: 2137 movs r1, #55 ; 0x37 80272d2: f7ff fed9 bl 8027088 dhcp_option_byte(dhcp, DHCP_OPTION_SUBNET_MASK); 80272d6: 4620 mov r0, r4 80272d8: 2101 movs r1, #1 80272da: f7ff fee4 bl 80270a6 dhcp_option_byte(dhcp, DHCP_OPTION_ROUTER); 80272de: 4620 mov r0, r4 80272e0: 2103 movs r1, #3 80272e2: f7ff fee0 bl 80270a6 dhcp_option_byte(dhcp, DHCP_OPTION_BROADCAST); 80272e6: 4620 mov r0, r4 80272e8: 211c movs r1, #28 80272ea: f7ff fedc bl 80270a6 dhcp_option_byte(dhcp, DHCP_OPTION_DNS_SERVER); 80272ee: 2106 movs r1, #6 80272f0: 4620 mov r0, r4 80272f2: f7ff fed8 bl 80270a6 dhcp_option_trailer(dhcp); 80272f6: 4620 mov r0, r4 80272f8: f7ff ff0d bl 8027116 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: realloc()ing\n")); pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 80272fc: 8b21 ldrh r1, [r4, #24] 80272fe: 6920 ldr r0, [r4, #16] 8027300: 31f0 adds r1, #240 ; 0xf0 8027302: b289 uxth r1, r1 8027304: f001 f80f bl 8028326 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: sendto(DISCOVER, IP_ADDR_BROADCAST, DHCP_SERVER_PORT)\n")); udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 8027308: 9500 str r5, [sp, #0] 802730a: 6860 ldr r0, [r4, #4] 802730c: 6921 ldr r1, [r4, #16] 802730e: 4a0f ldr r2, [pc, #60] ; (802734c ) 8027310: 2343 movs r3, #67 ; 0x43 8027312: f003 fc81 bl 802ac18 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_discover: deleting()ing\n")); dhcp_delete_msg(dhcp); 8027316: 4620 mov r0, r4 8027318: f7ff ffb2 bl 8027280 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover: SELECTING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_discover: could not allocate DHCP request\n")); } dhcp->tries++; 802731c: 7b63 ldrb r3, [r4, #13] 802731e: 3301 adds r3, #1 8027320: b2db uxtb r3, r3 if(dhcp->tries >= LWIP_DHCP_AUTOIP_COOP_TRIES && dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_OFF) { dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_ON; autoip_start(netif); } #endif /* LWIP_DHCP_AUTOIP_COOP */ msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; 8027322: 2b05 cmp r3, #5 8027324: bf98 it ls 8027326: f44f 727a movls.w r2, #1000 ; 0x3e8 dhcp_delete_msg(dhcp); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover: SELECTING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_discover: could not allocate DHCP request\n")); } dhcp->tries++; 802732a: 7363 strb r3, [r4, #13] if(dhcp->tries >= LWIP_DHCP_AUTOIP_COOP_TRIES && dhcp->autoip_coop_state == DHCP_AUTOIP_COOP_STATE_OFF) { dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_ON; autoip_start(netif); } #endif /* LWIP_DHCP_AUTOIP_COOP */ msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; 802732c: bf9a itte ls 802732e: fa02 f303 lslls.w r3, r2, r3 8027332: b29b uxthls r3, r3 8027334: f64e 2360 movwhi r3, #60000 ; 0xea60 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 8027338: f44f 72fa mov.w r2, #500 ; 0x1f4 802733c: f203 13f3 addw r3, r3, #499 ; 0x1f3 8027340: fb93 f3f2 sdiv r3, r3, r2 8027344: 8363 strh r3, [r4, #26] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_discover(): set request timeout %"U16_F" msecs\n", msecs)); return result; } 8027346: 4630 mov r0, r6 8027348: bd7c pop {r2, r3, r4, r5, r6, pc} 802734a: bf00 nop 802734c: 08037ac8 .word 0x08037ac8 08027350 : * * @param netif network interface which must rebind with a DHCP server */ static err_t dhcp_rebind(struct netif *netif) { 8027350: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 8027352: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must rebind with a DHCP server */ static err_t dhcp_rebind(struct netif *netif) { 8027354: 4605 mov r5, r0 struct dhcp *dhcp = netif->dhcp; err_t result; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind()\n")); dhcp_set_state(dhcp, DHCP_REBINDING); 8027356: 2104 movs r1, #4 8027358: 4620 mov r0, r4 802735a: f7ff fe8d bl 8027078 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 802735e: 4628 mov r0, r5 8027360: 4621 mov r1, r4 8027362: 2203 movs r2, #3 8027364: f7ff feec bl 8027140 if (result == ERR_OK) { 8027368: 4606 mov r6, r0 802736a: b9d8 cbnz r0, 80273a4 dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 802736c: 2202 movs r2, #2 802736e: 4620 mov r0, r4 8027370: 2139 movs r1, #57 ; 0x39 8027372: f7ff fe89 bl 8027088 dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 8027376: 8ca9 ldrh r1, [r5, #36] ; 0x24 8027378: 4620 mov r0, r4 802737a: f7ff fe9c bl 80270b6 dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); dhcp_option_long(dhcp, ntohl(dhcp->server_ip_addr.addr)); #endif dhcp_option_trailer(dhcp); 802737e: 4620 mov r0, r4 8027380: f7ff fec9 bl 8027116 pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 8027384: 8b21 ldrh r1, [r4, #24] 8027386: 6920 ldr r0, [r4, #16] 8027388: 31f0 adds r1, #240 ; 0xf0 802738a: b289 uxth r1, r1 802738c: f000 ffcb bl 8028326 /* broadcast to server */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 8027390: 9500 str r5, [sp, #0] 8027392: 6860 ldr r0, [r4, #4] 8027394: 6921 ldr r1, [r4, #16] 8027396: 4a0e ldr r2, [pc, #56] ; (80273d0 ) 8027398: 2343 movs r3, #67 ; 0x43 802739a: f003 fc3d bl 802ac18 dhcp_delete_msg(dhcp); 802739e: 4620 mov r0, r4 80273a0: f7ff ff6e bl 8027280 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind: REBINDING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_rebind: could not allocate DHCP request\n")); } dhcp->tries++; 80273a4: 7b63 ldrb r3, [r4, #13] 80273a6: 3301 adds r3, #1 80273a8: b2db uxtb r3, r3 msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 80273aa: 2b09 cmp r3, #9 dhcp_delete_msg(dhcp); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind: REBINDING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_rebind: could not allocate DHCP request\n")); } dhcp->tries++; 80273ac: 7363 strb r3, [r4, #13] msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 80273ae: d804 bhi.n 80273ba 80273b0: f44f 727a mov.w r2, #1000 ; 0x3e8 80273b4: 4353 muls r3, r2 80273b6: b29b uxth r3, r3 80273b8: e001 b.n 80273be 80273ba: f242 7310 movw r3, #10000 ; 0x2710 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 80273be: f44f 72fa mov.w r2, #500 ; 0x1f4 80273c2: f203 13f3 addw r3, r3, #499 ; 0x1f3 80273c6: fb93 f3f2 sdiv r3, r3, r2 80273ca: 8363 strh r3, [r4, #26] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_rebind(): set request timeout %"U16_F" msecs\n", msecs)); return result; } 80273cc: 4630 mov r0, r6 80273ce: bd7c pop {r2, r3, r4, r5, r6, pc} 80273d0: 08037ac8 .word 0x08037ac8 080273d4 : * * @param netif network interface which must reboot */ static err_t dhcp_reboot(struct netif *netif) { 80273d4: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 80273d6: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must reboot */ static err_t dhcp_reboot(struct netif *netif) { 80273d8: 4605 mov r5, r0 struct dhcp *dhcp = netif->dhcp; err_t result; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot()\n")); dhcp_set_state(dhcp, DHCP_REBOOTING); 80273da: 2103 movs r1, #3 80273dc: 4620 mov r0, r4 80273de: f7ff fe4b bl 8027078 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 80273e2: 4628 mov r0, r5 80273e4: 4621 mov r1, r4 80273e6: 2203 movs r2, #3 80273e8: f7ff feaa bl 8027140 if (result == ERR_OK) { 80273ec: 4606 mov r6, r0 80273ee: bb40 cbnz r0, 8027442 dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 80273f0: 2202 movs r2, #2 80273f2: 4620 mov r0, r4 80273f4: 2139 movs r1, #57 ; 0x39 80273f6: f7ff fe47 bl 8027088 dhcp_option_short(dhcp, 576); 80273fa: 4620 mov r0, r4 80273fc: f44f 7110 mov.w r1, #576 ; 0x240 8027400: f7ff fe59 bl 80270b6 dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); 8027404: 2204 movs r2, #4 8027406: 2132 movs r1, #50 ; 0x32 8027408: 4620 mov r0, r4 802740a: f7ff fe3d bl 8027088 dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 802740e: 6a60 ldr r0, [r4, #36] ; 0x24 8027410: f7ff fe30 bl 8027074 8027414: 4601 mov r1, r0 8027416: 4620 mov r0, r4 8027418: f7ff fe5d bl 80270d6 dhcp_option_trailer(dhcp); 802741c: 4620 mov r0, r4 802741e: f7ff fe7a bl 8027116 pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 8027422: 8b21 ldrh r1, [r4, #24] 8027424: 6920 ldr r0, [r4, #16] 8027426: 31f0 adds r1, #240 ; 0xf0 8027428: b289 uxth r1, r1 802742a: f000 ff7c bl 8028326 /* broadcast to server */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 802742e: 9500 str r5, [sp, #0] 8027430: 6860 ldr r0, [r4, #4] 8027432: 6921 ldr r1, [r4, #16] 8027434: 4a0e ldr r2, [pc, #56] ; (8027470 ) 8027436: 2343 movs r3, #67 ; 0x43 8027438: f003 fbee bl 802ac18 dhcp_delete_msg(dhcp); 802743c: 4620 mov r0, r4 802743e: f7ff ff1f bl 8027280 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot: REBOOTING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_reboot: could not allocate DHCP request\n")); } dhcp->tries++; 8027442: 7b63 ldrb r3, [r4, #13] 8027444: 3301 adds r3, #1 8027446: b2db uxtb r3, r3 msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 8027448: 2b09 cmp r3, #9 dhcp_delete_msg(dhcp); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot: REBOOTING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_reboot: could not allocate DHCP request\n")); } dhcp->tries++; 802744a: 7363 strb r3, [r4, #13] msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 802744c: d804 bhi.n 8027458 802744e: f44f 727a mov.w r2, #1000 ; 0x3e8 8027452: 4353 muls r3, r2 8027454: b29b uxth r3, r3 8027456: e001 b.n 802745c 8027458: f242 7310 movw r3, #10000 ; 0x2710 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 802745c: f44f 72fa mov.w r2, #500 ; 0x1f4 8027460: f203 13f3 addw r3, r3, #499 ; 0x1f3 8027464: fb93 f3f2 sdiv r3, r3, r2 8027468: 8363 strh r3, [r4, #26] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_reboot(): set request timeout %"U16_F" msecs\n", msecs)); return result; } 802746a: 4630 mov r0, r6 802746c: bd7c pop {r2, r3, r4, r5, r6, pc} 802746e: bf00 nop 8027470: 08037ac8 .word 0x08037ac8 08027474 : * @param netif the netif under DHCP control * @return lwIP specific error (see error.h) */ static err_t dhcp_select(struct netif *netif) { 8027474: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 8027476: 6a04 ldr r4, [r0, #32] * @param netif the netif under DHCP control * @return lwIP specific error (see error.h) */ static err_t dhcp_select(struct netif *netif) { 8027478: 4605 mov r5, r0 struct dhcp *dhcp = netif->dhcp; err_t result; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_select(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); dhcp_set_state(dhcp, DHCP_REQUESTING); 802747a: 2101 movs r1, #1 802747c: 4620 mov r0, r4 802747e: f7ff fdfb bl 8027078 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 8027482: 4628 mov r0, r5 8027484: 4621 mov r1, r4 8027486: 2203 movs r2, #3 8027488: f7ff fe5a bl 8027140 if (result == ERR_OK) { 802748c: 4606 mov r6, r0 802748e: 2800 cmp r0, #0 8027490: d148 bne.n 8027524 dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 8027492: 2202 movs r2, #2 8027494: 4620 mov r0, r4 8027496: 2139 movs r1, #57 ; 0x39 8027498: f7ff fdf6 bl 8027088 dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 802749c: 4620 mov r0, r4 802749e: 8ca9 ldrh r1, [r5, #36] ; 0x24 80274a0: f7ff fe09 bl 80270b6 /* MUST request the offered IP address */ dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); 80274a4: 2204 movs r2, #4 80274a6: 2132 movs r1, #50 ; 0x32 80274a8: 4620 mov r0, r4 80274aa: f7ff fded bl 8027088 dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 80274ae: 6a60 ldr r0, [r4, #36] ; 0x24 80274b0: f7ff fde0 bl 8027074 80274b4: 4601 mov r1, r0 80274b6: 4620 mov r0, r4 80274b8: f7ff fe0d bl 80270d6 dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); 80274bc: 2204 movs r2, #4 80274be: 2136 movs r1, #54 ; 0x36 80274c0: 4620 mov r0, r4 80274c2: f7ff fde1 bl 8027088 dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->server_ip_addr))); 80274c6: 6a20 ldr r0, [r4, #32] 80274c8: f7ff fdd4 bl 8027074 80274cc: 4601 mov r1, r0 80274ce: 4620 mov r0, r4 80274d0: f7ff fe01 bl 80270d6 dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, 4/*num options*/); 80274d4: 2204 movs r2, #4 80274d6: 4620 mov r0, r4 80274d8: 2137 movs r1, #55 ; 0x37 80274da: f7ff fdd5 bl 8027088 dhcp_option_byte(dhcp, DHCP_OPTION_SUBNET_MASK); 80274de: 4620 mov r0, r4 80274e0: 2101 movs r1, #1 80274e2: f7ff fde0 bl 80270a6 dhcp_option_byte(dhcp, DHCP_OPTION_ROUTER); 80274e6: 4620 mov r0, r4 80274e8: 2103 movs r1, #3 80274ea: f7ff fddc bl 80270a6 dhcp_option_byte(dhcp, DHCP_OPTION_BROADCAST); 80274ee: 4620 mov r0, r4 80274f0: 211c movs r1, #28 80274f2: f7ff fdd8 bl 80270a6 dhcp_option_byte(dhcp, DHCP_OPTION_DNS_SERVER); 80274f6: 2106 movs r1, #6 80274f8: 4620 mov r0, r4 80274fa: f7ff fdd4 bl 80270a6 #if LWIP_NETIF_HOSTNAME dhcp_option_hostname(dhcp, netif); #endif /* LWIP_NETIF_HOSTNAME */ dhcp_option_trailer(dhcp); 80274fe: 4620 mov r0, r4 8027500: f7ff fe09 bl 8027116 /* shrink the pbuf to the actual content length */ pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 8027504: 8b21 ldrh r1, [r4, #24] 8027506: 6920 ldr r0, [r4, #16] 8027508: 31f0 adds r1, #240 ; 0xf0 802750a: b289 uxth r1, r1 802750c: f000 ff0b bl 8028326 /* send broadcast to any DHCP server */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 8027510: 9500 str r5, [sp, #0] 8027512: 6860 ldr r0, [r4, #4] 8027514: 6921 ldr r1, [r4, #16] 8027516: 4a0f ldr r2, [pc, #60] ; (8027554 ) 8027518: 2343 movs r3, #67 ; 0x43 802751a: f003 fb7d bl 802ac18 dhcp_delete_msg(dhcp); 802751e: 4620 mov r0, r4 8027520: f7ff feae bl 8027280 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_select: REQUESTING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_select: could not allocate DHCP request\n")); } dhcp->tries++; 8027524: 7b63 ldrb r3, [r4, #13] 8027526: 3301 adds r3, #1 8027528: b2db uxtb r3, r3 msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; 802752a: 2b05 cmp r3, #5 802752c: bf98 it ls 802752e: f44f 727a movls.w r2, #1000 ; 0x3e8 dhcp_delete_msg(dhcp); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_select: REQUESTING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_select: could not allocate DHCP request\n")); } dhcp->tries++; 8027532: 7363 strb r3, [r4, #13] msecs = (dhcp->tries < 6 ? 1 << dhcp->tries : 60) * 1000; 8027534: bf9a itte ls 8027536: fa02 f303 lslls.w r3, r2, r3 802753a: b29b uxthls r3, r3 802753c: f64e 2360 movwhi r3, #60000 ; 0xea60 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 8027540: f44f 72fa mov.w r2, #500 ; 0x1f4 8027544: f203 13f3 addw r3, r3, #499 ; 0x1f3 8027548: fb93 f3f2 sdiv r3, r3, r2 802754c: 8363 strh r3, [r4, #26] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_select(): set request timeout %"U16_F" msecs\n", msecs)); return result; } 802754e: 4630 mov r0, r6 8027550: bd7c pop {r2, r3, r4, r5, r6, pc} 8027552: bf00 nop 8027554: 08037ac8 .word 0x08037ac8 08027558 : * * @param netif the netif under DHCP control */ static void dhcp_check(struct netif *netif) { 8027558: b538 push {r3, r4, r5, lr} struct dhcp *dhcp = netif->dhcp; 802755a: 6a04 ldr r4, [r0, #32] * * @param netif the netif under DHCP control */ static void dhcp_check(struct netif *netif) { 802755c: 4605 mov r5, r0 struct dhcp *dhcp = netif->dhcp; err_t result; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_check(netif=%p) %c%c\n", (void *)netif, (s16_t)netif->name[0], (s16_t)netif->name[1])); dhcp_set_state(dhcp, DHCP_CHECKING); 802755e: 2108 movs r1, #8 8027560: 4620 mov r0, r4 8027562: f7ff fd89 bl 8027078 /* create an ARP query for the offered IP address, expecting that no host responds, as the IP address should not be in use. */ result = etharp_query(netif, &dhcp->offered_ip_addr, NULL); 8027566: 4628 mov r0, r5 8027568: f104 0124 add.w r1, r4, #36 ; 0x24 802756c: 2200 movs r2, #0 802756e: f007 ff41 bl 802f3f4 if (result != ERR_OK) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("dhcp_check: could not perform ARP query\n")); } dhcp->tries++; 8027572: 7b63 ldrb r3, [r4, #13] 8027574: 3301 adds r3, #1 8027576: 7363 strb r3, [r4, #13] msecs = 500; dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 8027578: 2301 movs r3, #1 802757a: 8363 strh r3, [r4, #26] 802757c: bd38 pop {r3, r4, r5, pc} 0802757e : * * @param netif network interface to bind to the offered address */ static void dhcp_bind(struct netif *netif) { 802757e: b537 push {r0, r1, r2, r4, r5, lr} u32_t timeout; struct dhcp *dhcp; ip_addr_t sn_mask, gw_addr; LWIP_ERROR("dhcp_bind: netif != NULL", (netif != NULL), return;); 8027580: 4605 mov r5, r0 8027582: 2800 cmp r0, #0 8027584: d059 beq.n 802763a dhcp = netif->dhcp; 8027586: 6a04 ldr r4, [r0, #32] LWIP_ERROR("dhcp_bind: dhcp != NULL", (dhcp != NULL), return;); 8027588: 2c00 cmp r4, #0 802758a: d056 beq.n 802763a LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* temporary DHCP lease? */ if (dhcp->offered_t1_renew != 0xffffffffUL) { 802758c: 6b63 ldr r3, [r4, #52] ; 0x34 802758e: 1c58 adds r0, r3, #1 8027590: d00d beq.n 80275ae /* set renewal period timer */ LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t1 renewal timer %"U32_F" secs\n", dhcp->offered_t1_renew)); timeout = (dhcp->offered_t1_renew + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; 8027592: 223c movs r2, #60 ; 0x3c 8027594: 331e adds r3, #30 8027596: fbb3 f3f2 udiv r3, r3, r2 if(timeout > 0xffff) { timeout = 0xffff; } dhcp->t1_timeout = (u16_t)timeout; 802759a: f64f 72ff movw r2, #65535 ; 0xffff 802759e: 4293 cmp r3, r2 80275a0: bf28 it cs 80275a2: 4613 movcs r3, r2 80275a4: b29b uxth r3, r3 80275a6: 83a3 strh r3, [r4, #28] if (dhcp->t1_timeout == 0) { 80275a8: b90b cbnz r3, 80275ae dhcp->t1_timeout = 1; 80275aa: 2301 movs r3, #1 80275ac: 83a3 strh r3, [r4, #28] } LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t1_renew*1000)); } /* set renewal period timer */ if (dhcp->offered_t2_rebind != 0xffffffffUL) { 80275ae: 6ba3 ldr r3, [r4, #56] ; 0x38 80275b0: 1c59 adds r1, r3, #1 80275b2: d00d beq.n 80275d0 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_bind(): t2 rebind timer %"U32_F" secs\n", dhcp->offered_t2_rebind)); timeout = (dhcp->offered_t2_rebind + DHCP_COARSE_TIMER_SECS / 2) / DHCP_COARSE_TIMER_SECS; 80275b4: 223c movs r2, #60 ; 0x3c 80275b6: 331e adds r3, #30 80275b8: fbb3 f3f2 udiv r3, r3, r2 if(timeout > 0xffff) { timeout = 0xffff; } dhcp->t2_timeout = (u16_t)timeout; 80275bc: f64f 72ff movw r2, #65535 ; 0xffff 80275c0: 4293 cmp r3, r2 80275c2: bf28 it cs 80275c4: 4613 movcs r3, r2 80275c6: b29b uxth r3, r3 80275c8: 83e3 strh r3, [r4, #30] if (dhcp->t2_timeout == 0) { 80275ca: b90b cbnz r3, 80275d0 dhcp->t2_timeout = 1; 80275cc: 2301 movs r3, #1 80275ce: 83e3 strh r3, [r4, #30] } LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_bind(): set request timeout %"U32_F" msecs\n", dhcp->offered_t2_rebind*1000)); } /* If we have sub 1 minute lease, t2 and t1 will kick in at the same time. */ if ((dhcp->t1_timeout >= dhcp->t2_timeout) && (dhcp->t2_timeout > 0)) { 80275d0: 8be3 ldrh r3, [r4, #30] 80275d2: 8ba2 ldrh r2, [r4, #28] 80275d4: 429a cmp r2, r3 80275d6: d302 bcc.n 80275de 80275d8: b10b cbz r3, 80275de dhcp->t1_timeout = 0; 80275da: 2300 movs r3, #0 80275dc: 83a3 strh r3, [r4, #28] } if (dhcp->subnet_mask_given) { 80275de: 7ba3 ldrb r3, [r4, #14] 80275e0: b10b cbz r3, 80275e6 /* copy offered network mask */ ip_addr_copy(sn_mask, dhcp->offered_sn_mask); 80275e2: 6aa3 ldr r3, [r4, #40] ; 0x28 80275e4: e00b b.n 80275fe } else { /* subnet mask not given, choose a safe subnet mask given the network class */ u8_t first_octet = ip4_addr1(&dhcp->offered_ip_addr); 80275e6: f894 3024 ldrb.w r3, [r4, #36] ; 0x24 if (first_octet <= 127) { 80275ea: 061a lsls r2, r3, #24 80275ec: d401 bmi.n 80275f2 ip4_addr_set_u32(&sn_mask, PP_HTONL(0xff000000UL)); 80275ee: 23ff movs r3, #255 ; 0xff 80275f0: e005 b.n 80275fe } else if (first_octet >= 192) { 80275f2: 2bbf cmp r3, #191 ; 0xbf ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffffff00UL)); 80275f4: bf8c ite hi 80275f6: f06f 437f mvnhi.w r3, #4278190080 ; 0xff000000 } else { ip4_addr_set_u32(&sn_mask, PP_HTONL(0xffff0000UL)); 80275fa: f64f 73ff movwls r3, #65535 ; 0xffff 80275fe: 9300 str r3, [sp, #0] } } ip_addr_copy(gw_addr, dhcp->offered_gw_addr); 8027600: 6ae3 ldr r3, [r4, #44] ; 0x2c 8027602: 9301 str r3, [sp, #4] /* gateway address not given? */ if (ip_addr_isany(&gw_addr)) { 8027604: b92b cbnz r3, 8027612 /* copy network address */ ip_addr_get_network(&gw_addr, &dhcp->offered_ip_addr, &sn_mask); 8027606: 6a63 ldr r3, [r4, #36] ; 0x24 8027608: 9a00 ldr r2, [sp, #0] 802760a: 4013 ands r3, r2 /* use first host address on network as gateway */ ip4_addr_set_u32(&gw_addr, ip4_addr_get_u32(&gw_addr) | PP_HTONL(0x00000001UL)); 802760c: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000 8027610: 9301 str r3, [sp, #4] } #endif /* LWIP_DHCP_AUTOIP_COOP */ LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_bind(): IP: 0x%08"X32_F"\n", ip4_addr_get_u32(&dhcp->offered_ip_addr))); netif_set_ipaddr(netif, &dhcp->offered_ip_addr); 8027612: 4628 mov r0, r5 8027614: f104 0124 add.w r1, r4, #36 ; 0x24 8027618: f000 fd6a bl 80280f0 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_bind(): SN: 0x%08"X32_F"\n", ip4_addr_get_u32(&sn_mask))); netif_set_netmask(netif, &sn_mask); 802761c: 4628 mov r0, r5 802761e: 4669 mov r1, sp 8027620: f000 fda6 bl 8028170 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_bind(): GW: 0x%08"X32_F"\n", ip4_addr_get_u32(&gw_addr))); netif_set_gw(netif, &gw_addr); 8027624: a901 add r1, sp, #4 8027626: 4628 mov r0, r5 8027628: f000 fd9e bl 8028168 /* bring the interface up */ netif_set_up(netif); 802762c: 4628 mov r0, r5 802762e: f000 fdf5 bl 802821c /* netif is now bound to DHCP leased address */ dhcp_set_state(dhcp, DHCP_BOUND); 8027632: 4620 mov r0, r4 8027634: 210a movs r1, #10 8027636: f7ff fd1f bl 8027078 } 802763a: bd3e pop {r1, r2, r3, r4, r5, pc} 0802763c : /** * If an incoming DHCP message is in response to us, then trigger the state machine */ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) { 802763c: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8027640: 4692 mov sl, r2 8027642: b08b sub sp, #44 ; 0x2c LWIP_UNUSED_ARG(addr); LWIP_UNUSED_ARG(port); LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); if (p->len < DHCP_MIN_REPLY_LEN) { 8027644: f8ba 300a ldrh.w r3, [sl, #10] */ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) { struct netif *netif = (struct netif *)arg; struct dhcp *dhcp = netif->dhcp; 8027648: f8d0 8020 ldr.w r8, [r0, #32] struct dhcp_msg *reply_msg = (struct dhcp_msg *)p->payload; 802764c: 6852 ldr r2, [r2, #4] LWIP_UNUSED_ARG(addr); LWIP_UNUSED_ARG(port); LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); if (p->len < DHCP_MIN_REPLY_LEN) { 802764e: 2b2b cmp r3, #43 ; 0x2b /** * If an incoming DHCP message is in response to us, then trigger the state machine */ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) { 8027650: 4605 mov r5, r0 LWIP_UNUSED_ARG(addr); LWIP_UNUSED_ARG(port); LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); if (p->len < DHCP_MIN_REPLY_LEN) { 8027652: f240 81b8 bls.w 80279c6 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("DHCP reply message or pbuf too short\n")); goto free_pbuf_and_return; } if (reply_msg->op != DHCP_BOOTREPLY) { 8027656: 7813 ldrb r3, [r2, #0] 8027658: 2b02 cmp r3, #2 802765a: f040 81b4 bne.w 80279c6 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("not a DHCP reply message, but type %"U16_F"\n", (u16_t)reply_msg->op)); goto free_pbuf_and_return; } /* iterate through hardware address and match against DHCP message */ for (i = 0; i < netif->hwaddr_len; i++) { 802765e: f890 1026 ldrb.w r1, [r0, #38] ; 0x26 8027662: 2300 movs r3, #0 8027664: e008 b.n 8027678 /** * If an incoming DHCP message is in response to us, then trigger the state machine */ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) 8027666: 18e8 adds r0, r5, r3 8027668: 3301 adds r3, #1 802766a: 18d4 adds r4, r2, r3 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("not a DHCP reply message, but type %"U16_F"\n", (u16_t)reply_msg->op)); goto free_pbuf_and_return; } /* iterate through hardware address and match against DHCP message */ for (i = 0; i < netif->hwaddr_len; i++) { if (netif->hwaddr[i] != reply_msg->chaddr[i]) { 802766c: f890 0027 ldrb.w r0, [r0, #39] ; 0x27 8027670: 7ee4 ldrb r4, [r4, #27] 8027672: 4284 cmp r4, r0 8027674: f040 81a7 bne.w 80279c6 if (reply_msg->op != DHCP_BOOTREPLY) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("not a DHCP reply message, but type %"U16_F"\n", (u16_t)reply_msg->op)); goto free_pbuf_and_return; } /* iterate through hardware address and match against DHCP message */ for (i = 0; i < netif->hwaddr_len; i++) { 8027678: b2d8 uxtb r0, r3 802767a: 4288 cmp r0, r1 802767c: d3f3 bcc.n 8027666 (u16_t)i, (u16_t)netif->hwaddr[i], (u16_t)i, (u16_t)reply_msg->chaddr[i])); goto free_pbuf_and_return; } } /* match transaction ID against what we expected */ if (ntohl(reply_msg->xid) != dhcp->xid) { 802767e: 6850 ldr r0, [r2, #4] 8027680: f7ff fcf8 bl 8027074 8027684: f8d8 3000 ldr.w r3, [r8] 8027688: 4298 cmp r0, r3 802768a: f040 819c bne.w 80279c6 struct pbuf *q; int parse_file_as_options = 0; int parse_sname_as_options = 0; /* clear received options */ dhcp_clear_all_options(dhcp); 802768e: 2100 movs r1, #0 8027690: 220a movs r2, #10 8027692: 489d ldr r0, [pc, #628] ; (8027908 ) 8027694: f7fa f834 bl 8021700 /* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */ if (p->len < DHCP_SNAME_OFS) { 8027698: f8ba 300a ldrh.w r3, [sl, #10] 802769c: 2b2b cmp r3, #43 ; 0x2b 802769e: f240 8192 bls.w 80279c6 return ERR_BUF; } dhcp->msg_in = (struct dhcp_msg *)p->payload; 80276a2: f8da 3004 ldr.w r3, [sl, #4] /* parse options */ /* start with options field */ options_idx = DHCP_OPTIONS_OFS; /* parse options to the end of the received packet */ options_idx_max = p->tot_len; 80276a6: f8ba 9008 ldrh.w r9, [sl, #8] dhcp_clear_all_options(dhcp); /* check that beginning of dhcp_msg (up to and including chaddr) is in first pbuf */ if (p->len < DHCP_SNAME_OFS) { return ERR_BUF; } dhcp->msg_in = (struct dhcp_msg *)p->payload; 80276aa: f8c8 3008 str.w r3, [r8, #8] u16_t offset_max; u16_t options_idx; u16_t options_idx_max; struct pbuf *q; int parse_file_as_options = 0; int parse_sname_as_options = 0; 80276ae: f04f 0b00 mov.w fp, #0 #endif /* LWIP_DHCP_BOOTP_FILE */ /* parse options */ /* start with options field */ options_idx = DHCP_OPTIONS_OFS; 80276b2: 22f0 movs r2, #240 ; 0xf0 80276b4: e004 b.n 80276c0 parse_file_as_options = 0; options_idx = DHCP_FILE_OFS; options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN; goto again; } else if (parse_sname_as_options) { parse_sname_as_options = 0; 80276b6: f04f 0b00 mov.w fp, #0 options_idx = DHCP_SNAME_OFS; options_idx_max = DHCP_SNAME_OFS + DHCP_SNAME_LEN; 80276ba: f04f 096c mov.w r9, #108 ; 0x6c options_idx = DHCP_FILE_OFS; options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN; goto again; } else if (parse_sname_as_options) { parse_sname_as_options = 0; options_idx = DHCP_SNAME_OFS; 80276be: 222c movs r2, #44 ; 0x2c #endif /* LWIP_DHCP_BOOTP_FILE */ /* parse options */ /* start with options field */ options_idx = DHCP_OPTIONS_OFS; 80276c0: 4657 mov r7, sl 80276c2: e009 b.n 80276d8 again: q = p; while((q != NULL) && (options_idx >= q->len)) { options_idx -= q->len; options_idx_max -= q->len; q = q->next; 80276c4: 683f ldr r7, [r7, #0] /* parse options to the end of the received packet */ options_idx_max = p->tot_len; again: q = p; while((q != NULL) && (options_idx >= q->len)) { options_idx -= q->len; 80276c6: 1ad2 subs r2, r2, r3 options_idx_max -= q->len; 80276c8: ebc3 0909 rsb r9, r3, r9 /* parse options to the end of the received packet */ options_idx_max = p->tot_len; again: q = p; while((q != NULL) && (options_idx >= q->len)) { options_idx -= q->len; 80276cc: b292 uxth r2, r2 options_idx_max -= q->len; 80276ce: fa1f f989 uxth.w r9, r9 options_idx = DHCP_OPTIONS_OFS; /* parse options to the end of the received packet */ options_idx_max = p->tot_len; again: q = p; while((q != NULL) && (options_idx >= q->len)) { 80276d2: 2f00 cmp r7, #0 80276d4: f000 8177 beq.w 80279c6 80276d8: 897b ldrh r3, [r7, #10] 80276da: 429a cmp r2, r3 80276dc: d2f2 bcs.n 80276c4 if (q == NULL) { return ERR_BUF; } offset = options_idx; offset_max = options_idx_max; options = (u8_t*)q->payload; 80276de: 6878 ldr r0, [r7, #4] 80276e0: 9003 str r0, [sp, #12] 80276e2: e0db b.n 802789c u8_t len; u8_t decode_len = 0; int decode_idx = -1; u16_t val_offset = offset + 2; /* len byte might be in the next pbuf */ if (offset + 1 < q->len) { 80276e4: 897b ldrh r3, [r7, #10] 80276e6: 1c50 adds r0, r2, #1 80276e8: 4298 cmp r0, r3 80276ea: da03 bge.n 80276f4 len = options[offset + 1]; 80276ec: 9803 ldr r0, [sp, #12] 80276ee: 1883 adds r3, r0, r2 80276f0: 785b ldrb r3, [r3, #1] 80276f2: e003 b.n 80276fc } else { len = (q->next != NULL ? ((u8_t*)q->next->payload)[0] : 0); 80276f4: 683b ldr r3, [r7, #0] 80276f6: b10b cbz r3, 80276fc 80276f8: 685b ldr r3, [r3, #4] 80276fa: 781b ldrb r3, [r3, #0] } /* LWIP_DEBUGF(DHCP_DEBUG, ("msg_offset=%"U16_F", q->len=%"U16_F, msg_offset, q->len)); */ decode_len = len; switch(op) { 80276fc: 2933 cmp r1, #51 ; 0x33 80276fe: d038 beq.n 8027772 8027700: d807 bhi.n 8027712 8027702: 2901 cmp r1, #1 8027704: d019 beq.n 802773a 8027706: d311 bcc.n 802772c 8027708: 2903 cmp r1, #3 802770a: d01d beq.n 8027748 802770c: 2906 cmp r1, #6 802770e: d155 bne.n 80277bc 8027710: e021 b.n 8027756 8027712: 2936 cmp r1, #54 ; 0x36 8027714: d03d beq.n 8027792 8027716: d804 bhi.n 8027722 8027718: 2934 cmp r1, #52 ; 0x34 802771a: d031 beq.n 8027780 802771c: 2935 cmp r1, #53 ; 0x35 802771e: d14d bne.n 80277bc 8027720: e035 b.n 802778e 8027722: 293a cmp r1, #58 ; 0x3a 8027724: d03c beq.n 80277a0 8027726: 293b cmp r1, #59 ; 0x3b 8027728: d148 bne.n 80277bc 802772a: e040 b.n 80277ae /* case(DHCP_OPTION_END): handled above */ case(DHCP_OPTION_PAD): /* special option: no len encoded */ decode_len = len = 0; /* will be increased below */ offset--; 802772c: 1e51 subs r1, r2, #1 decode_len = len; switch(op) { /* case(DHCP_OPTION_END): handled above */ case(DHCP_OPTION_PAD): /* special option: no len encoded */ decode_len = len = 0; 802772e: 2300 movs r3, #0 /* will be increased below */ offset--; 8027730: b289 uxth r1, r1 /* at least 1 byte to read and no end marker, then at least 3 bytes to read? */ while((q != NULL) && (options[offset] != DHCP_OPTION_END) && (offset < offset_max)) { u8_t op = options[offset]; u8_t len; u8_t decode_len = 0; int decode_idx = -1; 8027732: f04f 34ff mov.w r4, #4294967295 decode_len = len; switch(op) { /* case(DHCP_OPTION_END): handled above */ case(DHCP_OPTION_PAD): /* special option: no len encoded */ decode_len = len = 0; 8027736: 461e mov r6, r3 8027738: e044 b.n 80277c4 /* will be increased below */ offset--; break; case(DHCP_OPTION_SUBNET_MASK): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 802773a: 2b04 cmp r3, #4 802773c: f040 8143 bne.w 80279c6 8027740: 461e mov r6, r3 8027742: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_SUBNET_MASK; 8027744: 2406 movs r4, #6 8027746: e03d b.n 80277c4 break; case(DHCP_OPTION_ROUTER): decode_len = 4; /* only copy the first given router */ LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); 8027748: 2b03 cmp r3, #3 802774a: f240 813c bls.w 80279c6 802774e: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_ROUTER; 8027750: 2407 movs r4, #7 case(DHCP_OPTION_SUBNET_MASK): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); decode_idx = DHCP_OPTION_IDX_SUBNET_MASK; break; case(DHCP_OPTION_ROUTER): decode_len = 4; /* only copy the first given router */ 8027752: 2604 movs r6, #4 8027754: e036 b.n 80277c4 LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); decode_idx = DHCP_OPTION_IDX_ROUTER; break; case(DHCP_OPTION_DNS_SERVER): /* special case: there might be more than one server */ LWIP_ERROR("len % 4 == 0", len % 4 == 0, return ERR_VAL;); 8027756: 0799 lsls r1, r3, #30 8027758: f040 8135 bne.w 80279c6 /* limit number of DNS servers */ decode_len = LWIP_MIN(len, 4 * DNS_MAX_SERVERS); 802775c: 2b08 cmp r3, #8 802775e: bf34 ite cc 8027760: 461e movcc r6, r3 8027762: 2608 movcs r6, #8 8027764: b2f6 uxtb r6, r6 LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;); 8027766: 42b3 cmp r3, r6 8027768: f0c0 812d bcc.w 80279c6 802776c: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_DNS_SERVER; 802776e: 2408 movs r4, #8 8027770: e028 b.n 80277c4 break; case(DHCP_OPTION_LEASE_TIME): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 8027772: 2b04 cmp r3, #4 8027774: f040 8127 bne.w 80279c6 8027778: 461e mov r6, r3 802777a: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_LEASE_TIME; 802777c: 2403 movs r4, #3 802777e: e021 b.n 80277c4 break; case(DHCP_OPTION_OVERLOAD): LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 8027780: 2b01 cmp r3, #1 8027782: f040 8120 bne.w 80279c6 8027786: 461e mov r6, r3 8027788: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_OVERLOAD; 802778a: 2400 movs r4, #0 802778c: e01a b.n 80277c4 break; case(DHCP_OPTION_MESSAGE_TYPE): LWIP_ERROR("len == 1", len == 1, return ERR_VAL;); 802778e: 2b01 cmp r3, #1 8027790: e007 b.n 80277a2 decode_idx = DHCP_OPTION_IDX_MSG_TYPE; break; case(DHCP_OPTION_SERVER_ID): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 8027792: 2b04 cmp r3, #4 8027794: f040 8117 bne.w 80279c6 8027798: 461e mov r6, r3 802779a: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_SERVER_ID; 802779c: 2402 movs r4, #2 802779e: e011 b.n 80277c4 break; case(DHCP_OPTION_T1): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 80277a0: 2b04 cmp r3, #4 80277a2: f040 8110 bne.w 80279c6 80277a6: 461e mov r6, r3 80277a8: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_T1; 80277aa: 461c mov r4, r3 80277ac: e00a b.n 80277c4 break; case(DHCP_OPTION_T2): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); 80277ae: 2b04 cmp r3, #4 80277b0: f040 8109 bne.w 80279c6 80277b4: 461e mov r6, r3 80277b6: 4611 mov r1, r2 decode_idx = DHCP_OPTION_IDX_T2; 80277b8: 2405 movs r4, #5 80277ba: e003 b.n 80277c4 } else { len = (q->next != NULL ? ((u8_t*)q->next->payload)[0] : 0); } /* LWIP_DEBUGF(DHCP_DEBUG, ("msg_offset=%"U16_F", q->len=%"U16_F, msg_offset, q->len)); */ decode_len = len; switch(op) { 80277bc: 4611 mov r1, r2 /* at least 1 byte to read and no end marker, then at least 3 bytes to read? */ while((q != NULL) && (options[offset] != DHCP_OPTION_END) && (offset < offset_max)) { u8_t op = options[offset]; u8_t len; u8_t decode_len = 0; int decode_idx = -1; 80277be: f04f 34ff mov.w r4, #4294967295 case(DHCP_OPTION_T2): LWIP_ERROR("len == 4", len == 4, return ERR_VAL;); decode_idx = DHCP_OPTION_IDX_T2; break; default: decode_len = 0; 80277c2: 2600 movs r6, #0 LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", op)); break; } offset += len + 2; 80277c4: 3102 adds r1, #2 80277c6: fa13 f381 uxtah r3, r3, r1 80277ca: b29b uxth r3, r3 80277cc: 9301 str r3, [sp, #4] if (decode_len > 0) { 80277ce: 2e00 cmp r6, #0 80277d0: d04f beq.n 8027872 while((q != NULL) && (options[offset] != DHCP_OPTION_END) && (offset < offset_max)) { u8_t op = options[offset]; u8_t len; u8_t decode_len = 0; int decode_idx = -1; u16_t val_offset = offset + 2; 80277d2: 3202 adds r2, #2 80277d4: b292 uxth r2, r2 LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", op)); break; } offset += len + 2; if (decode_len > 0) { u32_t value = 0; 80277d6: a90a add r1, sp, #40 ; 0x28 while((q != NULL) && (options[offset] != DHCP_OPTION_END) && (offset < offset_max)) { u8_t op = options[offset]; u8_t len; u8_t decode_len = 0; int decode_idx = -1; u16_t val_offset = offset + 2; 80277d8: 9205 str r2, [sp, #20] LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", op)); break; } offset += len + 2; if (decode_len > 0) { u32_t value = 0; 80277da: 2300 movs r3, #0 /** * If an incoming DHCP message is in response to us, then trigger the state machine */ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) 80277dc: 4a4b ldr r2, [pc, #300] ; (802790c ) LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", op)); break; } offset += len + 2; if (decode_len > 0) { u32_t value = 0; 80277de: f841 3d04 str.w r3, [r1, #-4]! /** * If an incoming DHCP message is in response to us, then trigger the state machine */ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) 80277e2: eb02 0284 add.w r2, r2, r4, lsl #2 LWIP_DEBUGF(DHCP_DEBUG, ("skipping option %"U16_F" in options\n", op)); break; } offset += len + 2; if (decode_len > 0) { u32_t value = 0; 80277e6: 9104 str r1, [sp, #16] /** * If an incoming DHCP message is in response to us, then trigger the state machine */ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) 80277e8: 9206 str r2, [sp, #24] 80277ea: 9302 str r3, [sp, #8] 80277ec: 9805 ldr r0, [sp, #20] 80277ee: 9902 ldr r1, [sp, #8] if (decode_len > 0) { u32_t value = 0; u16_t copy_len; decode_next: LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX); if (!dhcp_option_given(dhcp, decode_idx)) { 80277f0: 4a45 ldr r2, [pc, #276] ; (8027908 ) /** * If an incoming DHCP message is in response to us, then trigger the state machine */ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) 80277f2: 1843 adds r3, r0, r1 if (decode_len > 0) { u32_t value = 0; u16_t copy_len; decode_next: LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX); if (!dhcp_option_given(dhcp, decode_idx)) { 80277f4: 4844 ldr r0, [pc, #272] ; (8027908 ) 80277f6: 18a2 adds r2, r4, r2 80277f8: 9207 str r2, [sp, #28] 80277fa: 5c22 ldrb r2, [r4, r0] /** * If an incoming DHCP message is in response to us, then trigger the state machine */ static void dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) 80277fc: ebc1 0c06 rsb ip, r1, r6 8027800: b29b uxth r3, r3 8027802: fa5f fc8c uxtb.w ip, ip if (decode_len > 0) { u32_t value = 0; u16_t copy_len; decode_next: LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX); if (!dhcp_option_given(dhcp, decode_idx)) { 8027806: 2a00 cmp r2, #0 8027808: d133 bne.n 8027872 copy_len = LWIP_MIN(decode_len, 4); pbuf_copy_partial(q, &value, copy_len, val_offset); 802780a: f1bc 0f03 cmp.w ip, #3 802780e: bf94 ite ls 8027810: 4662 movls r2, ip 8027812: 2204 movhi r2, #4 8027814: 4638 mov r0, r7 8027816: 9904 ldr r1, [sp, #16] 8027818: f8cd c000 str.w ip, [sp] 802781c: f000 feaa bl 8028574 if (decode_len > 4) { 8027820: f8dd c000 ldr.w ip, [sp] 8027824: f1bc 0f04 cmp.w ip, #4 8027828: d90f bls.n 802784a /* decode more than one u32_t */ LWIP_ERROR("decode_len % 4 == 0", decode_len % 4 == 0, return ERR_VAL;); 802782a: f01c 0f03 tst.w ip, #3 802782e: f040 80ca bne.w 80279c6 dhcp_got_option(dhcp, decode_idx); 8027832: 9907 ldr r1, [sp, #28] dhcp_set_option_value(dhcp, decode_idx, htonl(value)); 8027834: 9809 ldr r0, [sp, #36] ; 0x24 copy_len = LWIP_MIN(decode_len, 4); pbuf_copy_partial(q, &value, copy_len, val_offset); if (decode_len > 4) { /* decode more than one u32_t */ LWIP_ERROR("decode_len % 4 == 0", decode_len % 4 == 0, return ERR_VAL;); dhcp_got_option(dhcp, decode_idx); 8027836: 2201 movs r2, #1 8027838: 700a strb r2, [r1, #0] dhcp_set_option_value(dhcp, decode_idx, htonl(value)); 802783a: f7ff fc19 bl 8027070 802783e: 9b02 ldr r3, [sp, #8] 8027840: 9906 ldr r1, [sp, #24] decode_len -= 4; val_offset += 4; decode_idx++; 8027842: 3401 adds r4, #1 pbuf_copy_partial(q, &value, copy_len, val_offset); if (decode_len > 4) { /* decode more than one u32_t */ LWIP_ERROR("decode_len % 4 == 0", decode_len % 4 == 0, return ERR_VAL;); dhcp_got_option(dhcp, decode_idx); dhcp_set_option_value(dhcp, decode_idx, htonl(value)); 8027844: 50c8 str r0, [r1, r3] 8027846: 3304 adds r3, #4 8027848: e7cf b.n 80277ea decode_len -= 4; val_offset += 4; decode_idx++; goto decode_next; } else if (decode_len == 4) { 802784a: d104 bne.n 8027856 value = ntohl(value); 802784c: 9809 ldr r0, [sp, #36] ; 0x24 802784e: f7ff fc11 bl 8027074 8027852: 9009 str r0, [sp, #36] ; 0x24 8027854: e006 b.n 8027864 } else { LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); 8027856: f1bc 0f01 cmp.w ip, #1 802785a: f040 80b4 bne.w 80279c6 value = ((u8_t*)&value)[0]; 802785e: f89d 3024 ldrb.w r3, [sp, #36] ; 0x24 8027862: 9309 str r3, [sp, #36] ; 0x24 } dhcp_got_option(dhcp, decode_idx); 8027864: 4a28 ldr r2, [pc, #160] ; (8027908 ) dhcp_set_option_value(dhcp, decode_idx, value); 8027866: 4829 ldr r0, [pc, #164] ; (802790c ) value = ntohl(value); } else { LWIP_ERROR("invalid decode_len", decode_len == 1, return ERR_VAL;); value = ((u8_t*)&value)[0]; } dhcp_got_option(dhcp, decode_idx); 8027868: 2301 movs r3, #1 802786a: 5513 strb r3, [r2, r4] dhcp_set_option_value(dhcp, decode_idx, value); 802786c: 9b09 ldr r3, [sp, #36] ; 0x24 802786e: f840 3024 str.w r3, [r0, r4, lsl #2] } } if (offset >= q->len) { 8027872: 897b ldrh r3, [r7, #10] 8027874: 9901 ldr r1, [sp, #4] 8027876: 4299 cmp r1, r3 8027878: d30f bcc.n 802789a offset -= q->len; 802787a: 1aca subs r2, r1, r3 offset_max -= q->len; 802787c: ebc3 0909 rsb r9, r3, r9 dhcp_got_option(dhcp, decode_idx); dhcp_set_option_value(dhcp, decode_idx, value); } } if (offset >= q->len) { offset -= q->len; 8027880: b292 uxth r2, r2 offset_max -= q->len; 8027882: fa1f f989 uxth.w r9, r9 if ((offset < offset_max) && offset_max) { 8027886: 454a cmp r2, r9 dhcp_got_option(dhcp, decode_idx); dhcp_set_option_value(dhcp, decode_idx, value); } } if (offset >= q->len) { offset -= q->len; 8027888: 9201 str r2, [sp, #4] offset_max -= q->len; if ((offset < offset_max) && offset_max) { 802788a: d303 bcc.n 8027894 break; } } } /* is this an overloaded message? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { 802788c: 4a1e ldr r2, [pc, #120] ; (8027908 ) 802788e: 7813 ldrb r3, [r2, #0] 8027890: b963 cbnz r3, 80278ac 8027892: e09f b.n 80279d4 } if (offset >= q->len) { offset -= q->len; offset_max -= q->len; if ((offset < offset_max) && offset_max) { q = q->next; 8027894: 683f ldr r7, [r7, #0] LWIP_ASSERT("next pbuf was null", q); options = (u8_t*)q->payload; 8027896: 687b ldr r3, [r7, #4] 8027898: 9303 str r3, [sp, #12] u32_t value = 0; u16_t copy_len; decode_next: LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX); if (!dhcp_option_given(dhcp, decode_idx)) { copy_len = LWIP_MIN(decode_len, 4); 802789a: 9a01 ldr r2, [sp, #4] } offset = options_idx; offset_max = options_idx_max; options = (u8_t*)q->payload; /* at least 1 byte to read and no end marker, then at least 3 bytes to read? */ while((q != NULL) && (options[offset] != DHCP_OPTION_END) && (offset < offset_max)) { 802789c: 9803 ldr r0, [sp, #12] 802789e: 5c81 ldrb r1, [r0, r2] 80278a0: 29ff cmp r1, #255 ; 0xff 80278a2: d0f3 beq.n 802788c 80278a4: 454a cmp r2, r9 80278a6: f4ff af1d bcc.w 80276e4 80278aa: e7ef b.n 802788c } } } /* is this an overloaded message? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD); 80278ac: 4b17 ldr r3, [pc, #92] ; (802790c ) dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); 80278ae: 4916 ldr r1, [pc, #88] ; (8027908 ) } } } /* is this an overloaded message? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD); 80278b0: 681b ldr r3, [r3, #0] dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); 80278b2: 2200 movs r2, #0 if (overload == DHCP_OVERLOAD_FILE) { 80278b4: 2b01 cmp r3, #1 } } /* is this an overloaded message? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_OVERLOAD)) { u32_t overload = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_OVERLOAD); dhcp_clear_option(dhcp, DHCP_OPTION_IDX_OVERLOAD); 80278b6: 700a strb r2, [r1, #0] if (overload == DHCP_OVERLOAD_FILE) { 80278b8: f000 8093 beq.w 80279e2 parse_file_as_options = 1; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n")); } else if (overload == DHCP_OVERLOAD_SNAME) { 80278bc: 2b02 cmp r3, #2 80278be: f43f aefa beq.w 80276b6 parse_sname_as_options = 1; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n")); } else if (overload == DHCP_OVERLOAD_SNAME_FILE) { 80278c2: 2b03 cmp r3, #3 80278c4: f040 8086 bne.w 80279d4 80278c8: e089 b.n 80279de LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("DHCP_OPTION_MESSAGE_TYPE option not found\n")); goto free_pbuf_and_return; } /* read DHCP message type */ msg_type = (u8_t)dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_MSG_TYPE); 80278ca: 4a10 ldr r2, [pc, #64] ; (802790c ) 80278cc: 7911 ldrb r1, [r2, #4] /* message type is DHCP ACK? */ if (msg_type == DHCP_ACK) { 80278ce: 2905 cmp r1, #5 80278d0: d140 bne.n 8027954 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_ACK received\n")); /* in requesting state? */ if (dhcp->state == DHCP_REQUESTING) { 80278d2: f898 100c ldrb.w r1, [r8, #12] 80278d6: 2901 cmp r1, #1 80278d8: d135 bne.n 8027946 * @param netif the netif under DHCP control */ static void dhcp_handle_ack(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; 80278da: 6a2c ldr r4, [r5, #32] #if LWIP_DHCP_BOOTP_FILE ip_addr_set_zero(&dhcp->offered_si_addr); #endif /* LWIP_DHCP_BOOTP_FILE */ /* lease time given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_LEASE_TIME)) { 80278dc: 78db ldrb r3, [r3, #3] #if LWIP_DNS u8_t n; #endif /* LWIP_DNS */ /* clear options we might not get from the ACK */ ip_addr_set_zero(&dhcp->offered_sn_mask); 80278de: f8c4 b028 str.w fp, [r4, #40] ; 0x28 ip_addr_set_zero(&dhcp->offered_gw_addr); 80278e2: f8c4 b02c str.w fp, [r4, #44] ; 0x2c #if LWIP_DHCP_BOOTP_FILE ip_addr_set_zero(&dhcp->offered_si_addr); #endif /* LWIP_DHCP_BOOTP_FILE */ /* lease time given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_LEASE_TIME)) { 80278e6: b10b cbz r3, 80278ec /* remember offered lease time */ dhcp->offered_t0_lease = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_LEASE_TIME); 80278e8: 68d3 ldr r3, [r2, #12] 80278ea: 6323 str r3, [r4, #48] ; 0x30 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) { 80278ec: 4b06 ldr r3, [pc, #24] ; (8027908 ) 80278ee: 791a ldrb r2, [r3, #4] 80278f0: b112 cbz r2, 80278f8 /* remember given renewal period */ dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1); 80278f2: 4a06 ldr r2, [pc, #24] ; (802790c ) 80278f4: 6912 ldr r2, [r2, #16] 80278f6: e001 b.n 80278fc } else { /* calculate safe periods for renewal */ dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2; 80278f8: 6b22 ldr r2, [r4, #48] ; 0x30 80278fa: 0852 lsrs r2, r2, #1 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { 80278fc: 795b ldrb r3, [r3, #5] if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T1)) { /* remember given renewal period */ dhcp->offered_t1_renew = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T1); } else { /* calculate safe periods for renewal */ dhcp->offered_t1_renew = dhcp->offered_t0_lease / 2; 80278fe: 6362 str r2, [r4, #52] ; 0x34 } /* renewal period given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_T2)) { 8027900: b133 cbz r3, 8027910 /* remember given rebind period */ dhcp->offered_t2_rebind = dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_T2); 8027902: 4b02 ldr r3, [pc, #8] ; (802790c ) 8027904: 695b ldr r3, [r3, #20] 8027906: e004 b.n 8027912 8027908: 2000f070 .word 0x2000f070 802790c: 2000f07c .word 0x2000f07c } else { /* calculate safe periods for rebinding */ dhcp->offered_t2_rebind = dhcp->offered_t0_lease; 8027910: 6b23 ldr r3, [r4, #48] ; 0x30 8027912: 63a3 str r3, [r4, #56] ; 0x38 } /* (y)our internet address */ ip_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); 8027914: 68a3 ldr r3, [r4, #8] boot file name copied in dhcp_parse_reply if not overloaded */ ip_addr_copy(dhcp->offered_si_addr, dhcp->msg_in->siaddr); #endif /* LWIP_DHCP_BOOTP_FILE */ /* subnet mask given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)) { 8027916: 4a39 ldr r2, [pc, #228] ; (80279fc ) /* calculate safe periods for rebinding */ dhcp->offered_t2_rebind = dhcp->offered_t0_lease; } /* (y)our internet address */ ip_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); 8027918: 691b ldr r3, [r3, #16] 802791a: 6263 str r3, [r4, #36] ; 0x24 boot file name copied in dhcp_parse_reply if not overloaded */ ip_addr_copy(dhcp->offered_si_addr, dhcp->msg_in->siaddr); #endif /* LWIP_DHCP_BOOTP_FILE */ /* subnet mask given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)) { 802791c: 7993 ldrb r3, [r2, #6] 802791e: 4616 mov r6, r2 8027920: b12b cbz r3, 802792e /* remember given subnet mask */ ip4_addr_set_u32(&dhcp->offered_sn_mask, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK))); 8027922: 4b37 ldr r3, [pc, #220] ; (8027a00 ) 8027924: 6998 ldr r0, [r3, #24] 8027926: f7ff fba3 bl 8027070 dhcp->subnet_mask_given = 1; 802792a: 2301 movs r3, #1 #endif /* LWIP_DHCP_BOOTP_FILE */ /* subnet mask given? */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SUBNET_MASK)) { /* remember given subnet mask */ ip4_addr_set_u32(&dhcp->offered_sn_mask, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SUBNET_MASK))); 802792c: 62a0 str r0, [r4, #40] ; 0x28 dhcp->subnet_mask_given = 1; } else { dhcp->subnet_mask_given = 0; 802792e: 73a3 strb r3, [r4, #14] } /* gateway router */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_ROUTER)) { 8027930: 79f3 ldrb r3, [r6, #7] 8027932: b123 cbz r3, 802793e ip4_addr_set_u32(&dhcp->offered_gw_addr, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_ROUTER))); 8027934: 4b32 ldr r3, [pc, #200] ; (8027a00 ) 8027936: 69d8 ldr r0, [r3, #28] 8027938: f7ff fb9a bl 8027070 802793c: 62e0 str r0, [r4, #44] ; 0x2c /* in requesting state? */ if (dhcp->state == DHCP_REQUESTING) { dhcp_handle_ack(netif); #if DHCP_DOES_ARP_CHECK /* check if the acknowledged lease address is already in use */ dhcp_check(netif); 802793e: 4628 mov r0, r5 8027940: f7ff fe0a bl 8027558 8027944: e03f b.n 80279c6 /* bind interface to the acknowledged lease address */ dhcp_bind(netif); #endif } /* already bound to the given lease address? */ else if ((dhcp->state == DHCP_REBOOTING) || (dhcp->state == DHCP_REBINDING) || (dhcp->state == DHCP_RENEWING)) { 8027946: 3903 subs r1, #3 8027948: 2902 cmp r1, #2 802794a: d83c bhi.n 80279c6 dhcp_bind(netif); 802794c: 4628 mov r0, r5 802794e: f7ff fe16 bl 802757e 8027952: e038 b.n 80279c6 } } /* received a DHCP_NAK in appropriate state? */ else if ((msg_type == DHCP_NAK) && 8027954: 2906 cmp r1, #6 8027956: d121 bne.n 802799c 8027958: f898 300c ldrb.w r3, [r8, #12] 802795c: 2b05 cmp r3, #5 802795e: d832 bhi.n 80279c6 8027960: f998 300c ldrsb.w r3, [r8, #12] 8027964: f04f 42b8 mov.w r2, #1543503872 ; 0x5c000000 8027968: 409a lsls r2, r3 802796a: d52c bpl.n 80279c6 { struct dhcp *dhcp = netif->dhcp; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_nak(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* Set the interface down since the address must no longer be used, as per RFC2131 */ netif_set_down(netif); 802796c: 4628 mov r0, r5 * @param netif the netif under DHCP control */ static void dhcp_handle_nak(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; 802796e: 6a2c ldr r4, [r5, #32] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_nak(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* Set the interface down since the address must no longer be used, as per RFC2131 */ netif_set_down(netif); 8027970: f000 fc6e bl 8028250 /* remove IP address from interface */ netif_set_ipaddr(netif, IP_ADDR_ANY); 8027974: 4628 mov r0, r5 8027976: 4923 ldr r1, [pc, #140] ; (8027a04 ) 8027978: f000 fbba bl 80280f0 netif_set_gw(netif, IP_ADDR_ANY); 802797c: 4628 mov r0, r5 802797e: 4921 ldr r1, [pc, #132] ; (8027a04 ) 8027980: f000 fbf2 bl 8028168 netif_set_netmask(netif, IP_ADDR_ANY); 8027984: 4628 mov r0, r5 8027986: 491f ldr r1, [pc, #124] ; (8027a04 ) 8027988: f000 fbf2 bl 8028170 /* Change to a defined state */ dhcp_set_state(dhcp, DHCP_BACKING_OFF); 802798c: 4620 mov r0, r4 802798e: 210c movs r1, #12 8027990: f7ff fb72 bl 8027078 /* We can immediately restart discovery */ dhcp_discover(netif); 8027994: 4628 mov r0, r5 8027996: f7ff fc7f bl 8027298 802799a: e014 b.n 80279c6 (dhcp->state == DHCP_REBINDING) || (dhcp->state == DHCP_RENEWING ))) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_NAK received\n")); dhcp_handle_nak(netif); } /* received a DHCP_OFFER in DHCP_SELECTING state? */ else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_SELECTING)) { 802799c: 2902 cmp r1, #2 802799e: d112 bne.n 80279c6 80279a0: f898 100c ldrb.w r1, [r8, #12] 80279a4: 2906 cmp r1, #6 80279a6: d10e bne.n 80279c6 { struct dhcp *dhcp = netif->dhcp; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_offer(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* obtain the server address */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SERVER_ID)) { 80279a8: 789b ldrb r3, [r3, #2] dhcp_handle_nak(netif); } /* received a DHCP_OFFER in DHCP_SELECTING state? */ else if ((msg_type == DHCP_OFFER) && (dhcp->state == DHCP_SELECTING)) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("DHCP_OFFER received in DHCP_SELECTING state\n")); dhcp->request_timeout = 0; 80279aa: f8a8 b01a strh.w fp, [r8, #26] * @param netif the netif under DHCP control */ static void dhcp_handle_offer(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; 80279ae: 6a2c ldr r4, [r5, #32] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_offer(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* obtain the server address */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SERVER_ID)) { 80279b0: b14b cbz r3, 80279c6 ip4_addr_set_u32(&dhcp->server_ip_addr, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID))); 80279b2: 6890 ldr r0, [r2, #8] 80279b4: f7ff fb5c bl 8027070 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): server 0x%08"X32_F"\n", ip4_addr_get_u32(&dhcp->server_ip_addr))); /* remember offered address */ ip_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); 80279b8: 68a3 ldr r3, [r4, #8] struct dhcp *dhcp = netif->dhcp; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_handle_offer(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* obtain the server address */ if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SERVER_ID)) { ip4_addr_set_u32(&dhcp->server_ip_addr, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID))); 80279ba: 6220 str r0, [r4, #32] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): server 0x%08"X32_F"\n", ip4_addr_get_u32(&dhcp->server_ip_addr))); /* remember offered address */ ip_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); 80279bc: 691b ldr r3, [r3, #16] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): offer for 0x%08"X32_F"\n", ip4_addr_get_u32(&dhcp->offered_ip_addr))); dhcp_select(netif); 80279be: 4628 mov r0, r5 if (dhcp_option_given(dhcp, DHCP_OPTION_IDX_SERVER_ID)) { ip4_addr_set_u32(&dhcp->server_ip_addr, htonl(dhcp_get_option_value(dhcp, DHCP_OPTION_IDX_SERVER_ID))); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): server 0x%08"X32_F"\n", ip4_addr_get_u32(&dhcp->server_ip_addr))); /* remember offered address */ ip_addr_copy(dhcp->offered_ip_addr, dhcp->msg_in->yiaddr); 80279c0: 6263 str r3, [r4, #36] ; 0x24 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_STATE, ("dhcp_handle_offer(): offer for 0x%08"X32_F"\n", ip4_addr_get_u32(&dhcp->offered_ip_addr))); dhcp_select(netif); 80279c2: f7ff fd57 bl 8027474 dhcp->request_timeout = 0; /* remember offered lease */ dhcp_handle_offer(netif); } free_pbuf_and_return: dhcp->msg_in = NULL; 80279c6: 2300 movs r3, #0 80279c8: f8c8 3008 str.w r3, [r8, #8] pbuf_free(p); 80279cc: 4650 mov r0, sl 80279ce: f000 fc83 bl 80282d8 80279d2: e010 b.n 80279f6 /* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */ parse_file_as_options = 0; options_idx = DHCP_FILE_OFS; options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN; goto again; } else if (parse_sname_as_options) { 80279d4: f1bb 0f00 cmp.w fp, #0 80279d8: f47f ae6d bne.w 80276b6 80279dc: e005 b.n 80279ea LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded file field\n")); } else if (overload == DHCP_OVERLOAD_SNAME) { parse_sname_as_options = 1; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("overloaded sname field\n")); } else if (overload == DHCP_OVERLOAD_SNAME_FILE) { parse_sname_as_options = 1; 80279de: f04f 0b01 mov.w fp, #1 } if (parse_file_as_options) { /* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */ parse_file_as_options = 0; options_idx = DHCP_FILE_OFS; options_idx_max = DHCP_FILE_OFS + DHCP_FILE_LEN; 80279e2: f04f 09ec mov.w r9, #236 ; 0xec #endif /* LWIP_DHCP_BOOTP_FILE */ } if (parse_file_as_options) { /* if both are overloaded, parse file first and then sname (RFC 2131 ch. 4.1) */ parse_file_as_options = 0; options_idx = DHCP_FILE_OFS; 80279e6: 226c movs r2, #108 ; 0x6c 80279e8: e66a b.n 80276c0 goto free_pbuf_and_return; } LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("searching DHCP_OPTION_MESSAGE_TYPE\n")); /* obtain pointer to DHCP message type */ if (!dhcp_option_given(dhcp, DHCP_OPTION_IDX_MSG_TYPE)) { 80279ea: 4b04 ldr r3, [pc, #16] ; (80279fc ) 80279ec: 785a ldrb r2, [r3, #1] 80279ee: 2a00 cmp r2, #0 80279f0: f47f af6b bne.w 80278ca 80279f4: e7e7 b.n 80279c6 dhcp_handle_offer(netif); } free_pbuf_and_return: dhcp->msg_in = NULL; pbuf_free(p); } 80279f6: b00b add sp, #44 ; 0x2c 80279f8: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 80279fc: 2000f070 .word 0x2000f070 8027a00: 2000f07c .word 0x2000f07c 8027a04: 08037acc .word 0x08037acc 08027a08 : * * @param netif the network interface on which the reply was received * @param addr The IP address we received a reply from */ void dhcp_arp_reply(struct netif *netif, ip_addr_t *addr) { 8027a08: b537 push {r0, r1, r2, r4, r5, lr} LWIP_ERROR("netif != NULL", (netif != NULL), return;); 8027a0a: 4605 mov r5, r0 8027a0c: 2800 cmp r0, #0 8027a0e: d037 beq.n 8027a80 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_arp_reply()\n")); /* is a DHCP client doing an ARP check? */ if ((netif->dhcp != NULL) && (netif->dhcp->state == DHCP_CHECKING)) { 8027a10: 6a04 ldr r4, [r0, #32] 8027a12: 2c00 cmp r4, #0 8027a14: d034 beq.n 8027a80 8027a16: 7b23 ldrb r3, [r4, #12] 8027a18: 2b08 cmp r3, #8 8027a1a: d131 bne.n 8027a80 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_arp_reply(): CHECKING, arp reply for 0x%08"X32_F"\n", ip4_addr_get_u32(addr))); /* did a host respond with the address we were offered by the DHCP server? */ if (ip_addr_cmp(addr, &netif->dhcp->offered_ip_addr)) { 8027a1c: 680a ldr r2, [r1, #0] 8027a1e: 6a63 ldr r3, [r4, #36] ; 0x24 8027a20: 429a cmp r2, r3 8027a22: d12d bne.n 8027a80 { struct dhcp *dhcp = netif->dhcp; err_t result = ERR_OK; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_decline()\n")); dhcp_set_state(dhcp, DHCP_BACKING_OFF); 8027a24: 4620 mov r0, r4 8027a26: 210c movs r1, #12 8027a28: f7ff fb26 bl 8027078 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_DECLINE); 8027a2c: 4628 mov r0, r5 8027a2e: 4621 mov r1, r4 8027a30: 2204 movs r2, #4 8027a32: f7ff fb85 bl 8027140 if (result == ERR_OK) { 8027a36: b9f0 cbnz r0, 8027a76 dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); 8027a38: 2204 movs r2, #4 8027a3a: 2132 movs r1, #50 ; 0x32 8027a3c: 4620 mov r0, r4 8027a3e: f7ff fb23 bl 8027088 dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); 8027a42: 6a60 ldr r0, [r4, #36] ; 0x24 8027a44: f7ff fb16 bl 8027074 8027a48: 4601 mov r1, r0 8027a4a: 4620 mov r0, r4 8027a4c: f7ff fb43 bl 80270d6 dhcp_option_trailer(dhcp); 8027a50: 4620 mov r0, r4 8027a52: f7ff fb60 bl 8027116 /* resize pbuf to reflect true size of options */ pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 8027a56: 8b21 ldrh r1, [r4, #24] 8027a58: 6920 ldr r0, [r4, #16] 8027a5a: 31f0 adds r1, #240 ; 0xf0 8027a5c: b289 uxth r1, r1 8027a5e: f000 fc62 bl 8028326 /* per section 4.4.4, broadcast DECLINE messages */ udp_sendto_if(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT, netif); 8027a62: 9500 str r5, [sp, #0] 8027a64: 6860 ldr r0, [r4, #4] 8027a66: 6921 ldr r1, [r4, #16] 8027a68: 4a06 ldr r2, [pc, #24] ; (8027a84 ) 8027a6a: 2343 movs r3, #67 ; 0x43 8027a6c: f003 f8d4 bl 802ac18 dhcp_delete_msg(dhcp); 8027a70: 4620 mov r0, r4 8027a72: f7ff fc05 bl 8027280 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_decline: BACKING OFF\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_decline: could not allocate DHCP request\n")); } dhcp->tries++; 8027a76: 7b63 ldrb r3, [r4, #13] 8027a78: 3301 adds r3, #1 8027a7a: 7363 strb r3, [r4, #13] msecs = 10*1000; dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 8027a7c: 2314 movs r3, #20 8027a7e: 8363 strh r3, [r4, #26] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE | LWIP_DBG_LEVEL_WARNING, ("dhcp_arp_reply(): arp reply matched with offered address, declining\n")); dhcp_decline(netif); } } } 8027a80: bd3e pop {r1, r2, r3, r4, r5, pc} 8027a82: bf00 nop 8027a84: 08037ac8 .word 0x08037ac8 08027a88 : * * @param netif network interface which must renew its lease */ err_t dhcp_renew(struct netif *netif) { 8027a88: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 8027a8a: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must renew its lease */ err_t dhcp_renew(struct netif *netif) { 8027a8c: 4605 mov r5, r0 struct dhcp *dhcp = netif->dhcp; err_t result; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_renew()\n")); dhcp_set_state(dhcp, DHCP_RENEWING); 8027a8e: 2105 movs r1, #5 8027a90: 4620 mov r0, r4 8027a92: f7ff faf1 bl 8027078 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_REQUEST); 8027a96: 4628 mov r0, r5 8027a98: 4621 mov r1, r4 8027a9a: 2203 movs r2, #3 8027a9c: f7ff fb50 bl 8027140 if (result == ERR_OK) { 8027aa0: 4606 mov r6, r0 8027aa2: b9e0 cbnz r0, 8027ade dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); 8027aa4: 2202 movs r2, #2 8027aa6: 4620 mov r0, r4 8027aa8: 2139 movs r1, #57 ; 0x39 8027aaa: f7ff faed bl 8027088 dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); 8027aae: 8ca9 ldrh r1, [r5, #36] ; 0x24 8027ab0: 4620 mov r0, r4 8027ab2: f7ff fb00 bl 80270b6 #if LWIP_NETIF_HOSTNAME dhcp_option_hostname(dhcp, netif); #endif /* LWIP_NETIF_HOSTNAME */ /* append DHCP message trailer */ dhcp_option_trailer(dhcp); 8027ab6: 4620 mov r0, r4 8027ab8: f7ff fb2d bl 8027116 pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 8027abc: 8b21 ldrh r1, [r4, #24] 8027abe: 6920 ldr r0, [r4, #16] 8027ac0: 31f0 adds r1, #240 ; 0xf0 8027ac2: b289 uxth r1, r1 8027ac4: f000 fc2f bl 8028326 udp_sendto_if(dhcp->pcb, dhcp->p_out, &dhcp->server_ip_addr, DHCP_SERVER_PORT, netif); 8027ac8: 9500 str r5, [sp, #0] 8027aca: 6860 ldr r0, [r4, #4] 8027acc: 6921 ldr r1, [r4, #16] 8027ace: f104 0220 add.w r2, r4, #32 8027ad2: 2343 movs r3, #67 ; 0x43 8027ad4: f003 f8a0 bl 802ac18 dhcp_delete_msg(dhcp); 8027ad8: 4620 mov r0, r4 8027ada: f7ff fbd1 bl 8027280 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew: RENEWING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_renew: could not allocate DHCP request\n")); } dhcp->tries++; 8027ade: 7b63 ldrb r3, [r4, #13] 8027ae0: 3301 adds r3, #1 8027ae2: b2db uxtb r3, r3 /* back-off on retries, but to a maximum of 20 seconds */ msecs = dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000; 8027ae4: 2b09 cmp r3, #9 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew: RENEWING\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_renew: could not allocate DHCP request\n")); } dhcp->tries++; 8027ae6: 7363 strb r3, [r4, #13] /* back-off on retries, but to a maximum of 20 seconds */ msecs = dhcp->tries < 10 ? dhcp->tries * 2000 : 20 * 1000; 8027ae8: d804 bhi.n 8027af4 8027aea: f44f 62fa mov.w r2, #2000 ; 0x7d0 8027aee: 4353 muls r3, r2 8027af0: b29b uxth r3, r3 8027af2: e001 b.n 8027af8 8027af4: f644 6320 movw r3, #20000 ; 0x4e20 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 8027af8: f44f 72fa mov.w r2, #500 ; 0x1f4 8027afc: f203 13f3 addw r3, r3, #499 ; 0x1f3 8027b00: fb93 f3f2 sdiv r3, r3, r2 8027b04: 8363 strh r3, [r4, #26] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_renew(): set request timeout %"U16_F" msecs\n", msecs)); return result; } 8027b06: 4630 mov r0, r6 8027b08: bd7c pop {r2, r3, r4, r5, r6, pc} 8027b0a: 0000 movs r0, r0 08027b0c : /** * The DHCP timer that checks for lease renewal/rebind timeouts. */ void dhcp_coarse_tmr() { 8027b0c: b538 push {r3, r4, r5, lr} struct netif *netif = netif_list; 8027b0e: 4b15 ldr r3, [pc, #84] ; (8027b64 ) 8027b10: 4d15 ldr r5, [pc, #84] ; (8027b68 ) 8027b12: 681c ldr r4, [r3, #0] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_coarse_tmr()\n")); /* iterate through all network interfaces */ while (netif != NULL) { 8027b14: e023 b.n 8027b5e /* only act on DHCP configured interfaces */ if (netif->dhcp != NULL) { 8027b16: 6a23 ldr r3, [r4, #32] 8027b18: b303 cbz r3, 8027b5c /* timer is active (non zero), and triggers (zeroes) now? */ if (netif->dhcp->t2_timeout-- == 1) { 8027b1a: 8bda ldrh r2, [r3, #30] 8027b1c: 1e51 subs r1, r2, #1 8027b1e: 2a01 cmp r2, #1 8027b20: 83d9 strh r1, [r3, #30] 8027b22: d10b bne.n 8027b3c 8027b24: 7b1a ldrb r2, [r3, #12] 8027b26: 2a0a cmp r2, #10 8027b28: d818 bhi.n 8027b5c 8027b2a: f993 300c ldrsb.w r3, [r3, #12] 8027b2e: fa15 f303 lsls.w r3, r5, r3 8027b32: d513 bpl.n 8027b5c /* just retry to rebind */ LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_t2_timeout(): must rebind\n")); /* This slightly different to RFC2131: DHCPREQUEST will be sent from state DHCP_REBINDING, not DHCP_BOUND */ dhcp_rebind(netif); 8027b34: 4620 mov r0, r4 8027b36: f7ff fc0b bl 8027350 8027b3a: e00f b.n 8027b5c if (netif->dhcp->t2_timeout-- == 1) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_coarse_tmr(): t2 timeout\n")); /* this clients' rebind timeout triggered */ dhcp_t2_timeout(netif); /* timer is active (non zero), and triggers (zeroes) now */ } else if (netif->dhcp->t1_timeout-- == 1) { 8027b3c: 8b9a ldrh r2, [r3, #28] 8027b3e: 1e51 subs r1, r2, #1 8027b40: 2a01 cmp r2, #1 8027b42: 8399 strh r1, [r3, #28] 8027b44: d10a bne.n 8027b5c 8027b46: 7b1a ldrb r2, [r3, #12] 8027b48: 2a0a cmp r2, #10 8027b4a: d807 bhi.n 8027b5c 8027b4c: f993 300c ldrsb.w r3, [r3, #12] 8027b50: fa15 f303 lsls.w r3, r5, r3 8027b54: d502 bpl.n 8027b5c * eventually time-out if renew tries fail. */ LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_t1_timeout(): must renew\n")); /* This slightly different to RFC2131: DHCPREQUEST will be sent from state DHCP_RENEWING, not DHCP_BOUND */ dhcp_renew(netif); 8027b56: 4620 mov r0, r4 8027b58: f7ff ff96 bl 8027a88 /* this clients' renewal timeout triggered */ dhcp_t1_timeout(netif); } } /* proceed to next netif */ netif = netif->next; 8027b5c: 6824 ldr r4, [r4, #0] dhcp_coarse_tmr() { struct netif *netif = netif_list; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_coarse_tmr()\n")); /* iterate through all network interfaces */ while (netif != NULL) { 8027b5e: 2c00 cmp r4, #0 8027b60: d1d9 bne.n 8027b16 } } /* proceed to next netif */ netif = netif->next; } } 8027b62: bd38 pop {r3, r4, r5, pc} 8027b64: 200104b8 .word 0x200104b8 8027b68: 44200000 .word 0x44200000 08027b6c : * * @param netif network interface which must release its lease */ err_t dhcp_release(struct netif *netif) { 8027b6c: b573 push {r0, r1, r4, r5, r6, lr} struct dhcp *dhcp = netif->dhcp; 8027b6e: 6a04 ldr r4, [r0, #32] * * @param netif network interface which must release its lease */ err_t dhcp_release(struct netif *netif) { 8027b70: 4605 mov r5, r0 err_t result; u16_t msecs; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_release()\n")); /* idle DHCP client */ dhcp_set_state(dhcp, DHCP_OFF); 8027b72: 2100 movs r1, #0 8027b74: 4620 mov r0, r4 8027b76: f7ff fa7f bl 8027078 /* clean old DHCP offer */ ip_addr_set_zero(&dhcp->server_ip_addr); 8027b7a: 2300 movs r3, #0 8027b7c: 6223 str r3, [r4, #32] ip_addr_set_zero(&dhcp->offered_ip_addr); 8027b7e: 6263 str r3, [r4, #36] ; 0x24 ip_addr_set_zero(&dhcp->offered_sn_mask); 8027b80: 62a3 str r3, [r4, #40] ; 0x28 ip_addr_set_zero(&dhcp->offered_gw_addr); 8027b82: 62e3 str r3, [r4, #44] ; 0x2c #if LWIP_DHCP_BOOTP_FILE ip_addr_set_zero(&dhcp->offered_si_addr); #endif /* LWIP_DHCP_BOOTP_FILE */ dhcp->offered_t0_lease = dhcp->offered_t1_renew = dhcp->offered_t2_rebind = 0; 8027b84: 63a3 str r3, [r4, #56] ; 0x38 8027b86: 6363 str r3, [r4, #52] ; 0x34 8027b88: 6323 str r3, [r4, #48] ; 0x30 /* create and initialize the DHCP message header */ result = dhcp_create_msg(netif, dhcp, DHCP_RELEASE); 8027b8a: 4628 mov r0, r5 8027b8c: 4621 mov r1, r4 8027b8e: 2207 movs r2, #7 8027b90: f7ff fad6 bl 8027140 if (result == ERR_OK) { 8027b94: 4606 mov r6, r0 8027b96: b998 cbnz r0, 8027bc0 dhcp_option_trailer(dhcp); 8027b98: 4620 mov r0, r4 8027b9a: f7ff fabc bl 8027116 pbuf_realloc(dhcp->p_out, sizeof(struct dhcp_msg) - DHCP_OPTIONS_LEN + dhcp->options_out_len); 8027b9e: 8b21 ldrh r1, [r4, #24] 8027ba0: 6920 ldr r0, [r4, #16] 8027ba2: 31f0 adds r1, #240 ; 0xf0 8027ba4: b289 uxth r1, r1 8027ba6: f000 fbbe bl 8028326 udp_sendto_if(dhcp->pcb, dhcp->p_out, &dhcp->server_ip_addr, DHCP_SERVER_PORT, netif); 8027baa: 9500 str r5, [sp, #0] 8027bac: 6860 ldr r0, [r4, #4] 8027bae: 6921 ldr r1, [r4, #16] 8027bb0: f104 0220 add.w r2, r4, #32 8027bb4: 2343 movs r3, #67 ; 0x43 8027bb6: f003 f82f bl 802ac18 dhcp_delete_msg(dhcp); 8027bba: 4620 mov r0, r4 8027bbc: f7ff fb60 bl 8027280 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_release: RELEASED, DHCP_OFF\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_release: could not allocate DHCP request\n")); } dhcp->tries++; 8027bc0: 7b63 ldrb r3, [r4, #13] 8027bc2: 3301 adds r3, #1 8027bc4: b2db uxtb r3, r3 msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 8027bc6: 2b09 cmp r3, #9 dhcp_delete_msg(dhcp); LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_release: RELEASED, DHCP_OFF\n")); } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("dhcp_release: could not allocate DHCP request\n")); } dhcp->tries++; 8027bc8: 7363 strb r3, [r4, #13] msecs = dhcp->tries < 10 ? dhcp->tries * 1000 : 10 * 1000; 8027bca: d804 bhi.n 8027bd6 8027bcc: f44f 727a mov.w r2, #1000 ; 0x3e8 8027bd0: 4353 muls r3, r2 8027bd2: b29b uxth r3, r3 8027bd4: e001 b.n 8027bda 8027bd6: f242 7310 movw r3, #10000 ; 0x2710 dhcp->request_timeout = (msecs + DHCP_FINE_TIMER_MSECS - 1) / DHCP_FINE_TIMER_MSECS; 8027bda: f44f 72fa mov.w r2, #500 ; 0x1f4 8027bde: f203 13f3 addw r3, r3, #499 ; 0x1f3 8027be2: fb93 f3f2 sdiv r3, r3, r2 8027be6: 8363 strh r3, [r4, #26] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_release(): set request timeout %"U16_F" msecs\n", msecs)); /* bring the interface down */ netif_set_down(netif); 8027be8: 4628 mov r0, r5 8027bea: f000 fb31 bl 8028250 /* remove IP address from interface */ netif_set_ipaddr(netif, IP_ADDR_ANY); 8027bee: 4628 mov r0, r5 8027bf0: 4906 ldr r1, [pc, #24] ; (8027c0c ) 8027bf2: f000 fa7d bl 80280f0 netif_set_gw(netif, IP_ADDR_ANY); 8027bf6: 4628 mov r0, r5 8027bf8: 4904 ldr r1, [pc, #16] ; (8027c0c ) 8027bfa: f000 fab5 bl 8028168 netif_set_netmask(netif, IP_ADDR_ANY); 8027bfe: 4628 mov r0, r5 8027c00: 4902 ldr r1, [pc, #8] ; (8027c0c ) 8027c02: f000 fab5 bl 8028170 return result; } 8027c06: 4630 mov r0, r6 8027c08: bd7c pop {r2, r3, r4, r5, r6, pc} 8027c0a: bf00 nop 8027c0c: 08037acc .word 0x08037acc 08027c10 : * A DHCP server is expected to respond within a short period of time. * This timer checks whether an outstanding DHCP request is timed out. */ void dhcp_fine_tmr() { 8027c10: b538 push {r3, r4, r5, lr} struct netif *netif = netif_list; 8027c12: 4b26 ldr r3, [pc, #152] ; (8027cac ) /* timer is active (non zero), and is about to trigger now */ if (netif->dhcp->request_timeout > 1) { netif->dhcp->request_timeout--; } else if (netif->dhcp->request_timeout == 1) { netif->dhcp->request_timeout--; 8027c14: 2500 movs r5, #0 * This timer checks whether an outstanding DHCP request is timed out. */ void dhcp_fine_tmr() { struct netif *netif = netif_list; 8027c16: 681c ldr r4, [r3, #0] /* loop through netif's */ while (netif != NULL) { 8027c18: e044 b.n 8027ca4 /* only act on DHCP configured interfaces */ if (netif->dhcp != NULL) { 8027c1a: 6a23 ldr r3, [r4, #32] 8027c1c: 2b00 cmp r3, #0 8027c1e: d040 beq.n 8027ca2 /* timer is active (non zero), and is about to trigger now */ if (netif->dhcp->request_timeout > 1) { 8027c20: 8b5a ldrh r2, [r3, #26] 8027c22: 2a01 cmp r2, #1 8027c24: d902 bls.n 8027c2c netif->dhcp->request_timeout--; 8027c26: 3a01 subs r2, #1 8027c28: 835a strh r2, [r3, #26] 8027c2a: e03a b.n 8027ca2 } else if (netif->dhcp->request_timeout == 1) { 8027c2c: d139 bne.n 8027ca2 dhcp_timeout(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout()\n")); /* back-off period has passed, or server selection timed out */ if ((dhcp->state == DHCP_BACKING_OFF) || (dhcp->state == DHCP_SELECTING)) { 8027c2e: 7b1a ldrb r2, [r3, #12] /* timer is active (non zero), and is about to trigger now */ if (netif->dhcp->request_timeout > 1) { netif->dhcp->request_timeout--; } else if (netif->dhcp->request_timeout == 1) { netif->dhcp->request_timeout--; 8027c30: 835d strh r5, [r3, #26] dhcp_timeout(struct netif *netif) { struct dhcp *dhcp = netif->dhcp; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout()\n")); /* back-off period has passed, or server selection timed out */ if ((dhcp->state == DHCP_BACKING_OFF) || (dhcp->state == DHCP_SELECTING)) { 8027c32: 2a0c cmp r2, #12 8027c34: d028 beq.n 8027c88 8027c36: 2a06 cmp r2, #6 8027c38: d100 bne.n 8027c3c 8027c3a: e025 b.n 8027c88 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout(): restarting discovery\n")); dhcp_discover(netif); /* receiving the requested lease timed out */ } else if (dhcp->state == DHCP_REQUESTING) { 8027c3c: 2a01 cmp r2, #1 8027c3e: d106 bne.n 8027c4e LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REQUESTING, DHCP request timed out\n")); if (dhcp->tries <= 5) { 8027c40: 7b5b ldrb r3, [r3, #13] 8027c42: 2b05 cmp r3, #5 dhcp_select(netif); 8027c44: 4620 mov r0, r4 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_timeout(): restarting discovery\n")); dhcp_discover(netif); /* receiving the requested lease timed out */ } else if (dhcp->state == DHCP_REQUESTING) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REQUESTING, DHCP request timed out\n")); if (dhcp->tries <= 5) { 8027c46: d81d bhi.n 8027c84 dhcp_select(netif); 8027c48: f7ff fc14 bl 8027474 8027c4c: e029 b.n 8027ca2 dhcp_release(netif); dhcp_discover(netif); } #if DHCP_DOES_ARP_CHECK /* received no ARP reply for the offered address (which is good) */ } else if (dhcp->state == DHCP_CHECKING) { 8027c4e: 2a08 cmp r2, #8 8027c50: d109 bne.n 8027c66 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): CHECKING, ARP request timed out\n")); if (dhcp->tries <= 1) { 8027c52: 7b5b ldrb r3, [r3, #13] 8027c54: 2b01 cmp r3, #1 dhcp_check(netif); 8027c56: 4620 mov r0, r4 } #if DHCP_DOES_ARP_CHECK /* received no ARP reply for the offered address (which is good) */ } else if (dhcp->state == DHCP_CHECKING) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): CHECKING, ARP request timed out\n")); if (dhcp->tries <= 1) { 8027c58: d802 bhi.n 8027c60 dhcp_check(netif); 8027c5a: f7ff fc7d bl 8027558 8027c5e: e020 b.n 8027ca2 /* no ARP replies on the offered address, looks like the IP address is indeed free */ } else { /* bind the interface to the offered address */ dhcp_bind(netif); 8027c60: f7ff fc8d bl 802757e 8027c64: e01d b.n 8027ca2 } #endif /* DHCP_DOES_ARP_CHECK */ } /* did not get response to renew request? */ else if (dhcp->state == DHCP_RENEWING) { 8027c66: 2a05 cmp r2, #5 8027c68: d103 bne.n 8027c72 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): RENEWING, DHCP request timed out\n")); /* just retry renewal */ /* note that the rebind timer will eventually time-out if renew does not work */ dhcp_renew(netif); 8027c6a: 4620 mov r0, r4 8027c6c: f7ff ff0c bl 8027a88 8027c70: e017 b.n 8027ca2 /* did not get response to rebind request? */ } else if (dhcp->state == DHCP_REBINDING) { 8027c72: 2a04 cmp r2, #4 8027c74: d10a bne.n 8027c8c LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REBINDING, DHCP request timed out\n")); if (dhcp->tries <= 8) { 8027c76: 7b5b ldrb r3, [r3, #13] 8027c78: 2b08 cmp r3, #8 dhcp_rebind(netif); 8027c7a: 4620 mov r0, r4 /* note that the rebind timer will eventually time-out if renew does not work */ dhcp_renew(netif); /* did not get response to rebind request? */ } else if (dhcp->state == DHCP_REBINDING) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): REBINDING, DHCP request timed out\n")); if (dhcp->tries <= 8) { 8027c7c: d802 bhi.n 8027c84 dhcp_rebind(netif); 8027c7e: f7ff fb67 bl 8027350 8027c82: e00e b.n 8027ca2 } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): RELEASING, DISCOVERING\n")); dhcp_release(netif); 8027c84: f7ff ff72 bl 8027b6c dhcp_discover(netif); 8027c88: 4620 mov r0, r4 8027c8a: e008 b.n 8027c9e } } else if (dhcp->state == DHCP_REBOOTING) { 8027c8c: 2a03 cmp r2, #3 8027c8e: d108 bne.n 8027ca2 if (dhcp->tries < REBOOT_TRIES) { 8027c90: 7b5b ldrb r3, [r3, #13] 8027c92: 2b01 cmp r3, #1 dhcp_reboot(netif); 8027c94: 4620 mov r0, r4 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_timeout(): RELEASING, DISCOVERING\n")); dhcp_release(netif); dhcp_discover(netif); } } else if (dhcp->state == DHCP_REBOOTING) { if (dhcp->tries < REBOOT_TRIES) { 8027c96: d802 bhi.n 8027c9e dhcp_reboot(netif); 8027c98: f7ff fb9c bl 80273d4 8027c9c: e001 b.n 8027ca2 } else { dhcp_discover(netif); 8027c9e: f7ff fafb bl 8027298 /* this client's request timeout triggered */ dhcp_timeout(netif); } } /* proceed to next network interface */ netif = netif->next; 8027ca2: 6824 ldr r4, [r4, #0] void dhcp_fine_tmr() { struct netif *netif = netif_list; /* loop through netif's */ while (netif != NULL) { 8027ca4: 2c00 cmp r4, #0 8027ca6: d1b8 bne.n 8027c1a } } /* proceed to next network interface */ netif = netif->next; } } 8027ca8: bd38 pop {r3, r4, r5, pc} 8027caa: bf00 nop 8027cac: 200104b8 .word 0x200104b8 08027cb0 : * * @param netif The network interface to stop DHCP on */ void dhcp_stop(struct netif *netif) { 8027cb0: b510 push {r4, lr} struct dhcp *dhcp; LWIP_ERROR("dhcp_stop: netif != NULL", (netif != NULL), return;); 8027cb2: b198 cbz r0, 8027cdc dhcp = netif->dhcp; /* Remove the flag that says this netif is handled by DHCP. */ netif->flags &= ~NETIF_FLAG_DHCP; 8027cb4: f890 302d ldrb.w r3, [r0, #45] ; 0x2d void dhcp_stop(struct netif *netif) { struct dhcp *dhcp; LWIP_ERROR("dhcp_stop: netif != NULL", (netif != NULL), return;); dhcp = netif->dhcp; 8027cb8: 6a04 ldr r4, [r0, #32] /* Remove the flag that says this netif is handled by DHCP. */ netif->flags &= ~NETIF_FLAG_DHCP; 8027cba: f023 0308 bic.w r3, r3, #8 8027cbe: f880 302d strb.w r3, [r0, #45] ; 0x2d LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_stop()\n")); /* netif is DHCP configured? */ if (dhcp != NULL) { 8027cc2: b15c cbz r4, 8027cdc autoip_stop(netif); dhcp->autoip_coop_state = DHCP_AUTOIP_COOP_STATE_OFF; } #endif /* LWIP_DHCP_AUTOIP_COOP */ if (dhcp->pcb != NULL) { 8027cc4: 6860 ldr r0, [r4, #4] 8027cc6: b118 cbz r0, 8027cd0 udp_remove(dhcp->pcb); 8027cc8: f003 f852 bl 802ad70 dhcp->pcb = NULL; 8027ccc: 2300 movs r3, #0 8027cce: 6063 str r3, [r4, #4] } LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); dhcp_set_state(dhcp, DHCP_OFF); 8027cd0: 4620 mov r0, r4 8027cd2: 2100 movs r1, #0 } } 8027cd4: e8bd 4010 ldmia.w sp!, {r4, lr} if (dhcp->pcb != NULL) { udp_remove(dhcp->pcb); dhcp->pcb = NULL; } LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL); dhcp_set_state(dhcp, DHCP_OFF); 8027cd8: f7ff b9ce b.w 8027078 8027cdc: bd10 pop {r4, pc} 8027cde: 0000 movs r0, r0 08027ce0 : * - ERR_OK - No error * - ERR_MEM - Out of memory */ err_t dhcp_start(struct netif *netif) { 8027ce0: b538 push {r3, r4, r5, lr} struct dhcp *dhcp; err_t result = ERR_OK; LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); 8027ce2: 4604 mov r4, r0 8027ce4: b908 cbnz r0, 8027cea 8027ce6: 20f2 movs r0, #242 ; 0xf2 8027ce8: e047 b.n 8027d7a dhcp = netif->dhcp; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* Remove the flag that says this netif is handled by DHCP, it is set when we succeeded starting. */ netif->flags &= ~NETIF_FLAG_DHCP; 8027cea: f890 302d ldrb.w r3, [r0, #45] ; 0x2d { struct dhcp *dhcp; err_t result = ERR_OK; LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); dhcp = netif->dhcp; 8027cee: 6a05 ldr r5, [r0, #32] LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* Remove the flag that says this netif is handled by DHCP, it is set when we succeeded starting. */ netif->flags &= ~NETIF_FLAG_DHCP; 8027cf0: f023 0208 bic.w r2, r3, #8 /* check hwtype of the netif */ if ((netif->flags & NETIF_FLAG_ETHARP) == 0) { 8027cf4: f003 0320 and.w r3, r3, #32 8027cf8: b2db uxtb r3, r3 LWIP_ERROR("netif != NULL", (netif != NULL), return ERR_ARG;); dhcp = netif->dhcp; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(netif=%p) %c%c%"U16_F"\n", (void*)netif, netif->name[0], netif->name[1], (u16_t)netif->num)); /* Remove the flag that says this netif is handled by DHCP, it is set when we succeeded starting. */ netif->flags &= ~NETIF_FLAG_DHCP; 8027cfa: f880 202d strb.w r2, [r0, #45] ; 0x2d /* check hwtype of the netif */ if ((netif->flags & NETIF_FLAG_ETHARP) == 0) { 8027cfe: 2b00 cmp r3, #0 8027d00: d0f1 beq.n 8027ce6 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): No ETHARP netif\n")); return ERR_ARG; } /* check MTU of the netif */ if (netif->mtu < DHCP_MAX_MSG_LEN_MIN_REQUIRED) { 8027d02: 8c83 ldrh r3, [r0, #36] ; 0x24 8027d04: f5b3 7f10 cmp.w r3, #576 ; 0x240 8027d08: d200 bcs.n 8027d0c 8027d0a: e02e b.n 8027d6a LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): Cannot use this netif with DHCP: MTU is too small\n")); return ERR_MEM; } /* no DHCP client attached yet? */ if (dhcp == NULL) { 8027d0c: b935 cbnz r5, 8027d1c LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting new DHCP client\n")); dhcp = (struct dhcp *)mem_malloc(sizeof(struct dhcp)); 8027d0e: 203c movs r0, #60 ; 0x3c 8027d10: f000 f938 bl 8027f84 if (dhcp == NULL) { 8027d14: 4605 mov r5, r0 8027d16: b340 cbz r0, 8027d6a LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not allocate dhcp\n")); return ERR_MEM; } /* store this dhcp client in the netif */ netif->dhcp = dhcp; 8027d18: 6220 str r0, [r4, #32] 8027d1a: e003 b.n 8027d24 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): allocated dhcp")); /* already has DHCP client attached */ } else { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("dhcp_start(): restarting DHCP configuration\n")); if (dhcp->pcb != NULL) { 8027d1c: 6868 ldr r0, [r5, #4] 8027d1e: b108 cbz r0, 8027d24 udp_remove(dhcp->pcb); 8027d20: f003 f826 bl 802ad70 LWIP_ASSERT("pbuf p_out wasn't freed", dhcp->p_out == NULL); LWIP_ASSERT("reply wasn't freed", dhcp->msg_in == NULL ); } /* clear data structure */ memset(dhcp, 0, sizeof(struct dhcp)); 8027d24: 2100 movs r1, #0 8027d26: 223c movs r2, #60 ; 0x3c 8027d28: 4628 mov r0, r5 8027d2a: f7f9 fce9 bl 8021700 /* dhcp_set_state(&dhcp, DHCP_OFF); */ /* allocate UDP PCB */ dhcp->pcb = udp_new(); 8027d2e: f003 f83b bl 802ada8 8027d32: 6068 str r0, [r5, #4] if (dhcp->pcb == NULL) { 8027d34: b1c8 cbz r0, 8027d6a LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not obtain pcb\n")); return ERR_MEM; } ip_set_option(dhcp->pcb, SOF_BROADCAST); 8027d36: 7a03 ldrb r3, [r0, #8] /* set up local and remote port for the pcb */ udp_bind(dhcp->pcb, IP_ADDR_ANY, DHCP_CLIENT_PORT); 8027d38: 4911 ldr r1, [pc, #68] ; (8027d80 ) dhcp->pcb = udp_new(); if (dhcp->pcb == NULL) { LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): could not obtain pcb\n")); return ERR_MEM; } ip_set_option(dhcp->pcb, SOF_BROADCAST); 8027d3a: f043 0320 orr.w r3, r3, #32 8027d3e: 7203 strb r3, [r0, #8] /* set up local and remote port for the pcb */ udp_bind(dhcp->pcb, IP_ADDR_ANY, DHCP_CLIENT_PORT); 8027d40: 2244 movs r2, #68 ; 0x44 8027d42: 6868 ldr r0, [r5, #4] 8027d44: f002 ff18 bl 802ab78 udp_connect(dhcp->pcb, IP_ADDR_ANY, DHCP_SERVER_PORT); 8027d48: 490d ldr r1, [pc, #52] ; (8027d80 ) 8027d4a: 6868 ldr r0, [r5, #4] 8027d4c: 2243 movs r2, #67 ; 0x43 8027d4e: f002 ffdd bl 802ad0c /* set up the recv callback and argument */ udp_recv(dhcp->pcb, dhcp_recv, netif); 8027d52: 6868 ldr r0, [r5, #4] 8027d54: 490b ldr r1, [pc, #44] ; (8027d84 ) 8027d56: 4622 mov r2, r4 8027d58: f003 f806 bl 802ad68 LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_start(): starting DHCP configuration\n")); /* (re)start the DHCP negotiation */ result = dhcp_discover(netif); 8027d5c: 4620 mov r0, r4 8027d5e: f7ff fa9b bl 8027298 if (result != ERR_OK) { 8027d62: b120 cbz r0, 8027d6e /* free resources allocated above */ dhcp_stop(netif); 8027d64: 4620 mov r0, r4 8027d66: f7ff ffa3 bl 8027cb0 return ERR_MEM; 8027d6a: 20ff movs r0, #255 ; 0xff 8027d6c: e005 b.n 8027d7a } /* Set the flag that says this netif is handled by DHCP. */ netif->flags |= NETIF_FLAG_DHCP; 8027d6e: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 8027d72: f043 0308 orr.w r3, r3, #8 8027d76: f884 302d strb.w r3, [r4, #45] ; 0x2d return result; } 8027d7a: b240 sxtb r0, r0 8027d7c: bd38 pop {r3, r4, r5, pc} 8027d7e: bf00 nop 8027d80: 08037acc .word 0x08037acc 8027d84: 0802763d .word 0x0802763d 08027d88 : /** * Perform Sanity check of user-configurable values, and initialize all modules. */ void lwip_init(void) { 8027d88: b508 push {r3, lr} /* Modules initialization */ stats_init(); #if !NO_SYS sys_init(); 8027d8a: f007 ff0f bl 802fbac #endif /* !NO_SYS */ mem_init(); 8027d8e: f000 f80f bl 8027db0 memp_init(); 8027d92: f000 f95b bl 802804c pbuf_init(); netif_init(); 8027d96: f000 f9a9 bl 80280ec #endif /* LWIP_ARP */ #if LWIP_RAW raw_init(); #endif /* LWIP_RAW */ #if LWIP_UDP udp_init(); 8027d9a: f002 fe27 bl 802a9ec #endif /* LWIP_UDP */ #if LWIP_TCP tcp_init(); 8027d9e: f000 fc8b bl 80286b8 #endif /* LWIP_TCP */ #if LWIP_SNMP snmp_init(); 8027da2: f005 fdc5 bl 802d930 #endif /* LWIP_DNS */ #if LWIP_TIMERS sys_timeouts_init(); #endif /* LWIP_TIMERS */ } 8027da6: e8bd 4008 ldmia.w sp!, {r3, lr} #if LWIP_DNS dns_init(); #endif /* LWIP_DNS */ #if LWIP_TIMERS sys_timeouts_init(); 8027daa: f002 bd49 b.w 802a840 8027dae: 0000 movs r0, r0 08027db0 : LWIP_ASSERT("Sanity check alignment", (SIZEOF_STRUCT_MEM & (MEM_ALIGNMENT-1)) == 0); /* align the heap */ ram = (u8_t *)LWIP_MEM_ALIGN(LWIP_RAM_HEAP_POINTER); 8027db0: 4b0b ldr r3, [pc, #44] ; (8027de0 ) 8027db2: 4a0c ldr r2, [pc, #48] ; (8027de4 ) mem = (struct mem *)(void *)ram; mem->next = MEM_SIZE_ALIGNED; mem->prev = 0; mem->used = 0; /* initialize the end of the heap */ ram_end = (struct mem *)(void *)&ram[MEM_SIZE_ALIGNED]; 8027db4: 480c ldr r0, [pc, #48] ; (8027de8 ) LWIP_ASSERT("Sanity check alignment", (SIZEOF_STRUCT_MEM & (MEM_ALIGNMENT-1)) == 0); /* align the heap */ ram = (u8_t *)LWIP_MEM_ALIGN(LWIP_RAM_HEAP_POINTER); 8027db6: f023 0303 bic.w r3, r3, #3 8027dba: 6013 str r3, [r2, #0] /* initialize the start of the heap */ mem = (struct mem *)(void *)ram; mem->next = MEM_SIZE_ALIGNED; 8027dbc: f44f 51a0 mov.w r1, #5120 ; 0x1400 mem->prev = 0; 8027dc0: 2200 movs r2, #0 8027dc2: 805a strh r2, [r3, #2] mem->used = 0; 8027dc4: 711a strb r2, [r3, #4] /* initialize the end of the heap */ ram_end = (struct mem *)(void *)&ram[MEM_SIZE_ALIGNED]; 8027dc6: 185a adds r2, r3, r1 8027dc8: 6002 str r2, [r0, #0] ram_end->used = 1; 8027dca: 2001 movs r0, #1 8027dcc: 7110 strb r0, [r2, #4] ram_end->next = MEM_SIZE_ALIGNED; ram_end->prev = MEM_SIZE_ALIGNED; 8027dce: 8051 strh r1, [r2, #2] /* align the heap */ ram = (u8_t *)LWIP_MEM_ALIGN(LWIP_RAM_HEAP_POINTER); /* initialize the start of the heap */ mem = (struct mem *)(void *)ram; mem->next = MEM_SIZE_ALIGNED; 8027dd0: 8019 strh r1, [r3, #0] /* initialize the lowest-free pointer to the start of the heap */ lfree = (struct mem *)(void *)ram; MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED); if(sys_mutex_new(&mem_mutex) != ERR_OK) { 8027dd2: 4806 ldr r0, [pc, #24] ; (8027dec ) mem->prev = 0; mem->used = 0; /* initialize the end of the heap */ ram_end = (struct mem *)(void *)&ram[MEM_SIZE_ALIGNED]; ram_end->used = 1; ram_end->next = MEM_SIZE_ALIGNED; 8027dd4: 8011 strh r1, [r2, #0] ram_end->prev = MEM_SIZE_ALIGNED; /* initialize the lowest-free pointer to the start of the heap */ lfree = (struct mem *)(void *)ram; 8027dd6: 4a06 ldr r2, [pc, #24] ; (8027df0 ) 8027dd8: 6013 str r3, [r2, #0] MEM_STATS_AVAIL(avail, MEM_SIZE_ALIGNED); if(sys_mutex_new(&mem_mutex) != ERR_OK) { 8027dda: f007 bec9 b.w 802fb70 8027dde: bf00 nop 8027de0: 2000f0a7 .word 0x2000f0a7 8027de4: 200024cc .word 0x200024cc 8027de8: 200024c4 .word 0x200024c4 8027dec: 200024c8 .word 0x200024c8 8027df0: 200024c0 .word 0x200024c0 08027df4 : * @param rmem is the data portion of a struct mem as returned by a previous * call to mem_malloc() */ void mem_free(void *rmem) { 8027df4: b570 push {r4, r5, r6, lr} struct mem *mem; LWIP_MEM_FREE_DECL_PROTECT(); if (rmem == NULL) { 8027df6: 4604 mov r4, r0 8027df8: 2800 cmp r0, #0 8027dfa: d04c beq.n 8027e96 LWIP_ASSERT("mem_free: sanity check alignment", (((mem_ptr_t)rmem) & (MEM_ALIGNMENT-1)) == 0); LWIP_ASSERT("mem_free: legal memory", (u8_t *)rmem >= (u8_t *)ram && (u8_t *)rmem < (u8_t *)ram_end); if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { 8027dfc: 4b26 ldr r3, [pc, #152] ; (8027e98 ) 8027dfe: 681b ldr r3, [r3, #0] 8027e00: 4298 cmp r0, r3 8027e02: d303 bcc.n 8027e0c 8027e04: 4b25 ldr r3, [pc, #148] ; (8027e9c ) 8027e06: 681b ldr r3, [r3, #0] 8027e08: 4298 cmp r0, r3 8027e0a: d305 bcc.n 8027e18 SYS_ARCH_DECL_PROTECT(lev); LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory\n")); /* protect mem stats from concurrent access */ SYS_ARCH_PROTECT(lev); 8027e0c: f007 fee8 bl 802fbe0 plug_holes(mem); #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_free_count = 1; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_MEM_FREE_UNPROTECT(); } 8027e10: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} SYS_ARCH_DECL_PROTECT(lev); LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_free: illegal memory\n")); /* protect mem stats from concurrent access */ SYS_ARCH_PROTECT(lev); MEM_STATS_INC(illegal); SYS_ARCH_UNPROTECT(lev); 8027e14: f007 beee b.w 802fbf4 return; } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 8027e18: 4821 ldr r0, [pc, #132] ; (8027ea0 ) 8027e1a: f007 feb5 bl 802fb88 /* Get the corresponding struct mem ... */ mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); /* ... which has to be in a used state ... */ LWIP_ASSERT("mem_free: mem->used", mem->used); /* ... and is now unused. */ mem->used = 0; 8027e1e: 2300 movs r3, #0 8027e20: f804 3c04 strb.w r3, [r4, #-4] if (mem < lfree) { 8027e24: 4b1f ldr r3, [pc, #124] ; (8027ea4 ) LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0); /* plug hole forward */ LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED); nmem = (struct mem *)(void *)&ram[mem->next]; 8027e26: f834 0c08 ldrh.w r0, [r4, #-8] /* ... which has to be in a used state ... */ LWIP_ASSERT("mem_free: mem->used", mem->used); /* ... and is now unused. */ mem->used = 0; if (mem < lfree) { 8027e2a: 6819 ldr r1, [r3, #0] return; } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); /* Get the corresponding struct mem ... */ mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); 8027e2c: f1a4 0208 sub.w r2, r4, #8 /* ... which has to be in a used state ... */ LWIP_ASSERT("mem_free: mem->used", mem->used); /* ... and is now unused. */ mem->used = 0; if (mem < lfree) { 8027e30: 428a cmp r2, r1 /* the newly freed struct is now the lowest */ lfree = mem; 8027e32: bf38 it cc 8027e34: 601a strcc r2, [r3, #0] LWIP_ASSERT("plug_holes: mem->used == 0", mem->used == 0); /* plug hole forward */ LWIP_ASSERT("plug_holes: mem->next <= MEM_SIZE_ALIGNED", mem->next <= MEM_SIZE_ALIGNED); nmem = (struct mem *)(void *)&ram[mem->next]; 8027e36: 4b18 ldr r3, [pc, #96] ; (8027e98 ) 8027e38: 681b ldr r3, [r3, #0] 8027e3a: 1819 adds r1, r3, r0 if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) { 8027e3c: 428a cmp r2, r1 8027e3e: d011 beq.n 8027e64 8027e40: 790d ldrb r5, [r1, #4] 8027e42: b97d cbnz r5, 8027e64 8027e44: 4d15 ldr r5, [pc, #84] ; (8027e9c ) 8027e46: 682d ldr r5, [r5, #0] 8027e48: 42a9 cmp r1, r5 8027e4a: d00b beq.n 8027e64 /* if mem->next is unused and not end of ram, combine mem and mem->next */ if (lfree == nmem) { 8027e4c: 4d15 ldr r5, [pc, #84] ; (8027ea4 ) 8027e4e: 682e ldr r6, [r5, #0] 8027e50: 428e cmp r6, r1 lfree = mem; } mem->next = nmem->next; 8027e52: 5a19 ldrh r1, [r3, r0] nmem = (struct mem *)(void *)&ram[mem->next]; if (mem != nmem && nmem->used == 0 && (u8_t *)nmem != (u8_t *)ram_end) { /* if mem->next is unused and not end of ram, combine mem and mem->next */ if (lfree == nmem) { lfree = mem; 8027e54: bf08 it eq 8027e56: 602a streq r2, [r5, #0] } mem->next = nmem->next; 8027e58: f824 1c08 strh.w r1, [r4, #-8] ((struct mem *)(void *)&ram[nmem->next])->prev = (mem_size_t)((u8_t *)mem - ram); 8027e5c: 5a19 ldrh r1, [r3, r0] 8027e5e: 1859 adds r1, r3, r1 8027e60: 1ad0 subs r0, r2, r3 8027e62: 8048 strh r0, [r1, #2] } /* plug hole backward */ pmem = (struct mem *)(void *)&ram[mem->prev]; 8027e64: f834 0c06 ldrh.w r0, [r4, #-6] 8027e68: 1819 adds r1, r3, r0 if (pmem != mem && pmem->used == 0) { 8027e6a: 4291 cmp r1, r2 8027e6c: d00e beq.n 8027e8c 8027e6e: 790d ldrb r5, [r1, #4] 8027e70: b965 cbnz r5, 8027e8c /* if mem->prev is unused, combine mem and mem->prev */ if (lfree == mem) { 8027e72: 4d0c ldr r5, [pc, #48] ; (8027ea4 ) 8027e74: 682e ldr r6, [r5, #0] 8027e76: 4296 cmp r6, r2 lfree = pmem; } pmem->next = mem->next; 8027e78: f834 2c08 ldrh.w r2, [r4, #-8] /* plug hole backward */ pmem = (struct mem *)(void *)&ram[mem->prev]; if (pmem != mem && pmem->used == 0) { /* if mem->prev is unused, combine mem and mem->prev */ if (lfree == mem) { lfree = pmem; 8027e7c: bf08 it eq 8027e7e: 6029 streq r1, [r5, #0] } pmem->next = mem->next; 8027e80: 521a strh r2, [r3, r0] ((struct mem *)(void *)&ram[mem->next])->prev = (mem_size_t)((u8_t *)pmem - ram); 8027e82: f834 2c08 ldrh.w r2, [r4, #-8] 8027e86: 189a adds r2, r3, r2 8027e88: 1acb subs r3, r1, r3 8027e8a: 8053 strh r3, [r2, #2] /* finally, see if prev or next are free also */ plug_holes(mem); #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_free_count = 1; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_MEM_FREE_UNPROTECT(); 8027e8c: 4804 ldr r0, [pc, #16] ; (8027ea0 ) } 8027e8e: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} /* finally, see if prev or next are free also */ plug_holes(mem); #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_free_count = 1; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_MEM_FREE_UNPROTECT(); 8027e92: f007 be85 b.w 802fba0 8027e96: bd70 pop {r4, r5, r6, pc} 8027e98: 200024cc .word 0x200024cc 8027e9c: 200024c4 .word 0x200024c4 8027ea0: 200024c8 .word 0x200024c8 8027ea4: 200024c0 .word 0x200024c0 08027ea8 : * or NULL if newsize is > old size, in which case rmem is NOT touched * or freed! */ void * mem_trim(void *rmem, mem_size_t newsize) { 8027ea8: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} /* use the FREE_PROTECT here: it protects with sem OR SYS_ARCH_PROTECT */ LWIP_MEM_FREE_DECL_PROTECT(); /* Expand the size of the allocated memory region so that we can adjust for alignment. */ newsize = LWIP_MEM_ALIGN_SIZE(newsize); 8027eac: 3103 adds r1, #3 8027eae: f64f 75fc movw r5, #65532 ; 0xfffc 8027eb2: 400d ands r5, r1 if(newsize < MIN_SIZE_ALIGNED) { 8027eb4: 2d0b cmp r5, #11 * or NULL if newsize is > old size, in which case rmem is NOT touched * or freed! */ void * mem_trim(void *rmem, mem_size_t newsize) { 8027eb6: 4604 mov r4, r0 /* Expand the size of the allocated memory region so that we can adjust for alignment. */ newsize = LWIP_MEM_ALIGN_SIZE(newsize); if(newsize < MIN_SIZE_ALIGNED) { 8027eb8: d903 bls.n 8027ec2 /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; } if (newsize > MEM_SIZE_ALIGNED) { 8027eba: f5b5 5fa0 cmp.w r5, #5120 ; 0x1400 8027ebe: d901 bls.n 8027ec4 8027ec0: e053 b.n 8027f6a adjust for alignment. */ newsize = LWIP_MEM_ALIGN_SIZE(newsize); if(newsize < MIN_SIZE_ALIGNED) { /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; 8027ec2: 250c movs r5, #12 } LWIP_ASSERT("mem_trim: legal memory", (u8_t *)rmem >= (u8_t *)ram && (u8_t *)rmem < (u8_t *)ram_end); if ((u8_t *)rmem < (u8_t *)ram || (u8_t *)rmem >= (u8_t *)ram_end) { 8027ec4: f8df 80b8 ldr.w r8, [pc, #184] ; 8027f80 8027ec8: f8d8 3000 ldr.w r3, [r8] 8027ecc: 429c cmp r4, r3 8027ece: d303 bcc.n 8027ed8 8027ed0: 4a28 ldr r2, [pc, #160] ; (8027f74 ) 8027ed2: 6812 ldr r2, [r2, #0] 8027ed4: 4294 cmp r4, r2 8027ed6: d304 bcc.n 8027ee2 SYS_ARCH_DECL_PROTECT(lev); LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SEVERE, ("mem_trim: illegal memory\n")); /* protect mem stats from concurrent access */ SYS_ARCH_PROTECT(lev); 8027ed8: f007 fe82 bl 802fbe0 MEM_STATS_INC(illegal); SYS_ARCH_UNPROTECT(lev); 8027edc: f007 fe8a bl 802fbf4 return rmem; 8027ee0: e044 b.n 8027f6c } /* Get the corresponding struct mem ... */ mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); 8027ee2: f1a4 0608 sub.w r6, r4, #8 /* ... and its offset pointer */ ptr = (mem_size_t)((u8_t *)mem - ram); size = mem->next - ptr - SIZEOF_STRUCT_MEM; 8027ee6: f834 7c08 ldrh.w r7, [r4, #-8] return rmem; } /* Get the corresponding struct mem ... */ mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); /* ... and its offset pointer */ ptr = (mem_size_t)((u8_t *)mem - ram); 8027eea: 1af6 subs r6, r6, r3 size = mem->next - ptr - SIZEOF_STRUCT_MEM; 8027eec: 3f08 subs r7, #8 return rmem; } /* Get the corresponding struct mem ... */ mem = (struct mem *)(void *)((u8_t *)rmem - SIZEOF_STRUCT_MEM); /* ... and its offset pointer */ ptr = (mem_size_t)((u8_t *)mem - ram); 8027eee: b2b6 uxth r6, r6 size = mem->next - ptr - SIZEOF_STRUCT_MEM; 8027ef0: 1bbf subs r7, r7, r6 8027ef2: b2bf uxth r7, r7 LWIP_ASSERT("mem_trim can only shrink memory", newsize <= size); if (newsize > size) { 8027ef4: 42bd cmp r5, r7 8027ef6: d838 bhi.n 8027f6a /* not supported */ return NULL; } if (newsize == size) { 8027ef8: d038 beq.n 8027f6c /* No change in size, simply return */ return rmem; } /* protect the heap from concurrent access */ LWIP_MEM_FREE_PROTECT(); 8027efa: 481f ldr r0, [pc, #124] ; (8027f78 ) 8027efc: f007 fe44 bl 802fb88 mem2 = (struct mem *)(void *)&ram[mem->next]; 8027f00: f8d8 3000 ldr.w r3, [r8] 8027f04: f834 1c08 ldrh.w r1, [r4, #-8] 8027f08: 185a adds r2, r3, r1 if(mem2->used == 0) { 8027f0a: 7910 ldrb r0, [r2, #4] 8027f0c: b978 cbnz r0, 8027f2e /* The next struct is unused, we can simply move it at little */ mem_size_t next; /* remember the old next pointer */ next = mem2->next; 8027f0e: 5a5f ldrh r7, [r3, r1] /* create new struct mem which is moved directly after the shrinked mem */ ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; 8027f10: f106 0108 add.w r1, r6, #8 8027f14: 186d adds r5, r5, r1 if (lfree == mem2) { 8027f16: 4919 ldr r1, [pc, #100] ; (8027f7c ) 8027f18: 6808 ldr r0, [r1, #0] /* The next struct is unused, we can simply move it at little */ mem_size_t next; /* remember the old next pointer */ next = mem2->next; /* create new struct mem which is moved directly after the shrinked mem */ ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; 8027f1a: b2ad uxth r5, r5 if (lfree == mem2) { 8027f1c: 4290 cmp r0, r2 8027f1e: eb03 0205 add.w r2, r3, r5 lfree = (struct mem *)(void *)&ram[ptr2]; 8027f22: bf08 it eq 8027f24: 600a streq r2, [r1, #0] } mem2 = (struct mem *)(void *)&ram[ptr2]; mem2->used = 0; 8027f26: 2100 movs r1, #0 8027f28: 7111 strb r1, [r2, #4] /* restore the next pointer */ mem2->next = next; 8027f2a: 535f strh r7, [r3, r5] 8027f2c: e010 b.n 8027f50 if (mem2->next != MEM_SIZE_ALIGNED) { ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; } MEM_STATS_DEC_USED(used, (size - newsize)); /* no need to plug holes, we've already done that */ } else if (newsize + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED <= size) { 8027f2e: f105 0214 add.w r2, r5, #20 8027f32: 42ba cmp r2, r7 8027f34: d815 bhi.n 8027f62 * @todo we could leave out MIN_SIZE_ALIGNED. We would create an empty * region that couldn't hold data, but when mem->next gets freed, * the 2 regions would be combined, resulting in more free memory */ ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; mem2 = (struct mem *)(void *)&ram[ptr2]; if (mem2 < lfree) { 8027f36: 4811 ldr r0, [pc, #68] ; (8027f7c ) * Old size ('size') must be big enough to contain at least 'newsize' plus a struct mem * ('SIZEOF_STRUCT_MEM') with some data ('MIN_SIZE_ALIGNED'). * @todo we could leave out MIN_SIZE_ALIGNED. We would create an empty * region that couldn't hold data, but when mem->next gets freed, * the 2 regions would be combined, resulting in more free memory */ ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; 8027f38: f106 0208 add.w r2, r6, #8 8027f3c: 18ad adds r5, r5, r2 mem2 = (struct mem *)(void *)&ram[ptr2]; if (mem2 < lfree) { 8027f3e: 6807 ldr r7, [r0, #0] * Old size ('size') must be big enough to contain at least 'newsize' plus a struct mem * ('SIZEOF_STRUCT_MEM') with some data ('MIN_SIZE_ALIGNED'). * @todo we could leave out MIN_SIZE_ALIGNED. We would create an empty * region that couldn't hold data, but when mem->next gets freed, * the 2 regions would be combined, resulting in more free memory */ ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; 8027f40: b2ad uxth r5, r5 mem2 = (struct mem *)(void *)&ram[ptr2]; 8027f42: 195a adds r2, r3, r5 if (mem2 < lfree) { 8027f44: 42ba cmp r2, r7 lfree = mem2; 8027f46: bf38 it cc 8027f48: 6002 strcc r2, [r0, #0] } mem2->used = 0; mem2->next = mem->next; 8027f4a: 5359 strh r1, [r3, r5] ptr2 = ptr + SIZEOF_STRUCT_MEM + newsize; mem2 = (struct mem *)(void *)&ram[ptr2]; if (mem2 < lfree) { lfree = mem2; } mem2->used = 0; 8027f4c: 2000 movs r0, #0 8027f4e: 7110 strb r0, [r2, #4] mem2->next = mem->next; mem2->prev = ptr; 8027f50: 8056 strh r6, [r2, #2] mem->next = ptr2; 8027f52: f824 5c08 strh.w r5, [r4, #-8] if (mem2->next != MEM_SIZE_ALIGNED) { 8027f56: 5b5a ldrh r2, [r3, r5] 8027f58: f5b2 5fa0 cmp.w r2, #5120 ; 0x1400 ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; 8027f5c: bf1c itt ne 8027f5e: 189b addne r3, r3, r2 8027f60: 805d strhne r5, [r3, #2] -> the remaining space stays unused since it is too small } */ #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_free_count = 1; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_MEM_FREE_UNPROTECT(); 8027f62: 4805 ldr r0, [pc, #20] ; (8027f78 ) 8027f64: f007 fe1c bl 802fba0 return rmem; 8027f68: e000 b.n 8027f6c /* every data block must be at least MIN_SIZE_ALIGNED long */ newsize = MIN_SIZE_ALIGNED; } if (newsize > MEM_SIZE_ALIGNED) { return NULL; 8027f6a: 2400 movs r4, #0 #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_free_count = 1; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_MEM_FREE_UNPROTECT(); return rmem; } 8027f6c: 4620 mov r0, r4 8027f6e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8027f72: bf00 nop 8027f74: 200024c4 .word 0x200024c4 8027f78: 200024c8 .word 0x200024c8 8027f7c: 200024c0 .word 0x200024c0 8027f80: 200024cc .word 0x200024cc 08027f84 : * * Note that the returned value will always be aligned (as defined by MEM_ALIGNMENT). */ void * mem_malloc(mem_size_t size) { 8027f84: b5f8 push {r3, r4, r5, r6, r7, lr} #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT u8_t local_mem_free_count = 0; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_MEM_ALLOC_DECL_PROTECT(); if (size == 0) { 8027f86: 2800 cmp r0, #0 8027f88: d056 beq.n 8028038 return NULL; } /* Expand the size of the allocated memory region so that we can adjust for alignment. */ size = LWIP_MEM_ALIGN_SIZE(size); 8027f8a: 3003 adds r0, #3 8027f8c: f64f 74fc movw r4, #65532 ; 0xfffc 8027f90: 4004 ands r4, r0 if(size < MIN_SIZE_ALIGNED) { 8027f92: 2c0b cmp r4, #11 8027f94: d903 bls.n 8027f9e /* every data block must be at least MIN_SIZE_ALIGNED long */ size = MIN_SIZE_ALIGNED; } if (size > MEM_SIZE_ALIGNED) { 8027f96: f5b4 5fa0 cmp.w r4, #5120 ; 0x1400 8027f9a: d901 bls.n 8027fa0 8027f9c: e04b b.n 8028036 adjust for alignment. */ size = LWIP_MEM_ALIGN_SIZE(size); if(size < MIN_SIZE_ALIGNED) { /* every data block must be at least MIN_SIZE_ALIGNED long */ size = MIN_SIZE_ALIGNED; 8027f9e: 240c movs r4, #12 if (size > MEM_SIZE_ALIGNED) { return NULL; } /* protect the heap from concurrent access */ sys_mutex_lock(&mem_mutex); 8027fa0: 4826 ldr r0, [pc, #152] ; (802803c ) 8027fa2: f007 fdf1 bl 802fb88 #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ /* Scan through the heap searching for a free block that is big enough, * beginning with the lowest free block. */ for (ptr = (mem_size_t)((u8_t *)lfree - ram); ptr < MEM_SIZE_ALIGNED - size; 8027fa6: 4b26 ldr r3, [pc, #152] ; (8028040 ) 8027fa8: 6819 ldr r1, [r3, #0] 8027faa: 4b26 ldr r3, [pc, #152] ; (8028044 ) 8027fac: 681a ldr r2, [r3, #0] 8027fae: 1a8b subs r3, r1, r2 8027fb0: b29b uxth r3, r3 8027fb2: f5c4 5ea0 rsb lr, r4, #5120 ; 0x1400 8027fb6: e039 b.n 802802c ptr = ((struct mem *)(void *)&ram[ptr])->next) { mem = (struct mem *)(void *)&ram[ptr]; 8027fb8: 18d5 adds r5, r2, r3 local_mem_free_count = 1; break; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if ((!mem->used) && 8027fba: 792f ldrb r7, [r5, #4] 8027fbc: 2f00 cmp r7, #0 8027fbe: d134 bne.n 802802a (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) { 8027fc0: 5ad6 ldrh r6, [r2, r3] 8027fc2: f1a6 0008 sub.w r0, r6, #8 8027fc6: 1ac0 subs r0, r0, r3 local_mem_free_count = 1; break; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if ((!mem->used) && 8027fc8: 42a0 cmp r0, r4 8027fca: d32e bcc.n 802802a (mem->next - (ptr + SIZEOF_STRUCT_MEM)) >= size) { /* mem is not used and at least perfect fit is possible: * mem->next - (ptr + SIZEOF_STRUCT_MEM) gives us the 'user data size' of mem */ if (mem->next - (ptr + SIZEOF_STRUCT_MEM) >= (size + SIZEOF_STRUCT_MEM + MIN_SIZE_ALIGNED)) { 8027fcc: f104 0e14 add.w lr, r4, #20 8027fd0: 4570 cmp r0, lr 8027fd2: d310 bcc.n 8027ff6 * struct mem would fit in but no data between mem2 and mem2->next * @todo we could leave out MIN_SIZE_ALIGNED. We would create an empty * region that couldn't hold data, but when mem->next gets freed, * the 2 regions would be combined, resulting in more free memory */ ptr2 = ptr + SIZEOF_STRUCT_MEM + size; 8027fd4: 3408 adds r4, #8 8027fd6: 191c adds r4, r3, r4 8027fd8: b2a4 uxth r4, r4 /* create mem2 struct */ mem2 = (struct mem *)(void *)&ram[ptr2]; 8027fda: 1910 adds r0, r2, r4 mem2->used = 0; mem2->next = mem->next; 8027fdc: 5316 strh r6, [r2, r4] mem2->prev = ptr; 8027fde: 8043 strh r3, [r0, #2] /* and insert it between mem and mem->next */ mem->next = ptr2; 8027fe0: 802c strh r4, [r5, #0] mem->used = 1; 8027fe2: 2301 movs r3, #1 * the 2 regions would be combined, resulting in more free memory */ ptr2 = ptr + SIZEOF_STRUCT_MEM + size; /* create mem2 struct */ mem2 = (struct mem *)(void *)&ram[ptr2]; mem2->used = 0; 8027fe4: 7107 strb r7, [r0, #4] mem2->next = mem->next; mem2->prev = ptr; /* and insert it between mem and mem->next */ mem->next = ptr2; mem->used = 1; 8027fe6: 712b strb r3, [r5, #4] if (mem2->next != MEM_SIZE_ALIGNED) { 8027fe8: 5b13 ldrh r3, [r2, r4] 8027fea: f5b3 5fa0 cmp.w r3, #5120 ; 0x1400 8027fee: d004 beq.n 8027ffa ((struct mem *)(void *)&ram[mem2->next])->prev = ptr2; 8027ff0: 18d2 adds r2, r2, r3 8027ff2: 8054 strh r4, [r2, #2] 8027ff4: e001 b.n 8027ffa * take care of this). * -> near fit or excact fit: do not split, no mem2 creation * also can't move mem->next directly behind mem, since mem->next * will always be used at this point! */ mem->used = 1; 8027ff6: 2301 movs r3, #1 8027ff8: 712b strb r3, [r5, #4] MEM_STATS_INC_USED(used, mem->next - (mem_size_t)((u8_t *)mem - ram)); } #if LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT mem_malloc_adjust_lfree: #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if (mem == lfree) { 8027ffa: 428d cmp r5, r1 8027ffc: d10f bne.n 802801e struct mem *cur = lfree; /* Find next free block after mem and update lowest free pointer */ while (cur->used && cur != ram_end) { 8027ffe: 4b12 ldr r3, [pc, #72] ; (8028048 ) 8028000: 681a ldr r2, [r3, #0] /* If mem_free or mem_trim have run, we have to restart since they could have altered our current struct mem or lfree. */ goto mem_malloc_adjust_lfree; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ cur = (struct mem *)(void *)&ram[cur->next]; 8028002: 4b10 ldr r3, [pc, #64] ; (8028044 ) 8028004: 6819 ldr r1, [r3, #0] 8028006: 462b mov r3, r5 8028008: e001 b.n 802800e 802800a: 881b ldrh r3, [r3, #0] 802800c: 18cb adds r3, r1, r3 mem_malloc_adjust_lfree: #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if (mem == lfree) { struct mem *cur = lfree; /* Find next free block after mem and update lowest free pointer */ while (cur->used && cur != ram_end) { 802800e: 7918 ldrb r0, [r3, #4] 8028010: b910 cbnz r0, 8028018 goto mem_malloc_adjust_lfree; } #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ cur = (struct mem *)(void *)&ram[cur->next]; } lfree = cur; 8028012: 4a0b ldr r2, [pc, #44] ; (8028040 ) 8028014: 6013 str r3, [r2, #0] 8028016: e002 b.n 802801e mem_malloc_adjust_lfree: #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ if (mem == lfree) { struct mem *cur = lfree; /* Find next free block after mem and update lowest free pointer */ while (cur->used && cur != ram_end) { 8028018: 4293 cmp r3, r2 802801a: d1f6 bne.n 802800a 802801c: e7f9 b.n 8028012 } lfree = cur; LWIP_ASSERT("mem_malloc: !lfree->used", ((lfree == ram_end) || (!lfree->used))); } LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); 802801e: 4807 ldr r0, [pc, #28] ; (802803c ) 8028020: f007 fdbe bl 802fba0 LWIP_ASSERT("mem_malloc: allocated memory properly aligned.", ((mem_ptr_t)mem + SIZEOF_STRUCT_MEM) % MEM_ALIGNMENT == 0); LWIP_ASSERT("mem_malloc: sanity check alignment", (((mem_ptr_t)mem) & (MEM_ALIGNMENT-1)) == 0); return (u8_t *)mem + SIZEOF_STRUCT_MEM; 8028024: f105 0008 add.w r0, r5, #8 8028028: bdf8 pop {r3, r4, r5, r6, r7, pc} /* Scan through the heap searching for a free block that is big enough, * beginning with the lowest free block. */ for (ptr = (mem_size_t)((u8_t *)lfree - ram); ptr < MEM_SIZE_ALIGNED - size; ptr = ((struct mem *)(void *)&ram[ptr])->next) { 802802a: 882b ldrh r3, [r5, #0] #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ /* Scan through the heap searching for a free block that is big enough, * beginning with the lowest free block. */ for (ptr = (mem_size_t)((u8_t *)lfree - ram); ptr < MEM_SIZE_ALIGNED - size; 802802c: 4573 cmp r3, lr 802802e: dbc3 blt.n 8027fb8 } while(local_mem_free_count != 0); #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size)); MEM_STATS_INC(err); LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); 8028030: 4802 ldr r0, [pc, #8] ; (802803c ) 8028032: f007 fdb5 bl 802fba0 u8_t local_mem_free_count = 0; #endif /* LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT */ LWIP_MEM_ALLOC_DECL_PROTECT(); if (size == 0) { return NULL; 8028036: 2000 movs r0, #0 LWIP_DEBUGF(MEM_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("mem_malloc: could not allocate %"S16_F" bytes\n", (s16_t)size)); MEM_STATS_INC(err); LWIP_MEM_ALLOC_UNPROTECT(); sys_mutex_unlock(&mem_mutex); return NULL; } 8028038: bdf8 pop {r3, r4, r5, r6, r7, pc} 802803a: bf00 nop 802803c: 200024c8 .word 0x200024c8 8028040: 200024c0 .word 0x200024c0 8028044: 200024cc .word 0x200024cc 8028048: 200024c4 .word 0x200024c4 0802804c : MEMP_STATS_AVAIL(err, i, 0); MEMP_STATS_AVAIL(avail, i, memp_num[i]); } #if !MEMP_SEPARATE_POOLS memp = (struct memp *)LWIP_MEM_ALIGN(memp_memory); 802804c: 4a0e ldr r2, [pc, #56] ; (8028088 ) 802804e: 490f ldr r1, [pc, #60] ; (802808c ) * * Carves out memp_memory into linked lists for each pool-type. */ void memp_init(void) { 8028050: b5f0 push {r4, r5, r6, r7, lr} MEMP_STATS_AVAIL(err, i, 0); MEMP_STATS_AVAIL(avail, i, memp_num[i]); } #if !MEMP_SEPARATE_POOLS memp = (struct memp *)LWIP_MEM_ALIGN(memp_memory); 8028052: 2300 movs r3, #0 memp_tab[i] = NULL; #if MEMP_SEPARATE_POOLS memp = (struct memp*)memp_bases[i]; #endif /* MEMP_SEPARATE_POOLS */ /* create a linked list of memp elements */ for (j = 0; j < memp_num[i]; ++j) { 8028054: 4e0e ldr r6, [pc, #56] ; (8028090 ) memp->next = memp_tab[i]; memp_tab[i] = memp; memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + memp_sizes[i] 8028056: 4f0f ldr r7, [pc, #60] ; (8028094 ) MEMP_STATS_AVAIL(err, i, 0); MEMP_STATS_AVAIL(avail, i, memp_num[i]); } #if !MEMP_SEPARATE_POOLS memp = (struct memp *)LWIP_MEM_ALIGN(memp_memory); 8028058: f022 0203 bic.w r2, r2, #3 #endif /* !MEMP_SEPARATE_POOLS */ /* for every pool: */ for (i = 0; i < MEMP_MAX; ++i) { memp_tab[i] = NULL; 802805c: 461d mov r5, r3 802805e: f841 5b04 str.w r5, [r1], #4 #if MEMP_SEPARATE_POOLS memp = (struct memp*)memp_bases[i]; #endif /* MEMP_SEPARATE_POOLS */ /* create a linked list of memp elements */ for (j = 0; j < memp_num[i]; ++j) { 8028062: f833 c006 ldrh.w ip, [r3, r6] 8028066: 2000 movs r0, #0 8028068: e008 b.n 802807c memp->next = memp_tab[i]; 802806a: f851 4c04 ldr.w r4, [r1, #-4] 802806e: 6014 str r4, [r2, #0] memp_tab[i] = memp; memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + memp_sizes[i] 8028070: 5bdc ldrh r4, [r3, r7] memp = (struct memp*)memp_bases[i]; #endif /* MEMP_SEPARATE_POOLS */ /* create a linked list of memp elements */ for (j = 0; j < memp_num[i]; ++j) { memp->next = memp_tab[i]; memp_tab[i] = memp; 8028072: f841 2c04 str.w r2, [r1, #-4] memp_tab[i] = NULL; #if MEMP_SEPARATE_POOLS memp = (struct memp*)memp_bases[i]; #endif /* MEMP_SEPARATE_POOLS */ /* create a linked list of memp elements */ for (j = 0; j < memp_num[i]; ++j) { 8028076: 3001 adds r0, #1 memp->next = memp_tab[i]; memp_tab[i] = memp; memp = (struct memp *)(void *)((u8_t *)memp + MEMP_SIZE + memp_sizes[i] 8028078: 1912 adds r2, r2, r4 memp_tab[i] = NULL; #if MEMP_SEPARATE_POOLS memp = (struct memp*)memp_bases[i]; #endif /* MEMP_SEPARATE_POOLS */ /* create a linked list of memp elements */ for (j = 0; j < memp_num[i]; ++j) { 802807a: b280 uxth r0, r0 802807c: 4560 cmp r0, ip 802807e: d1f4 bne.n 802806a 8028080: 3302 adds r3, #2 #if !MEMP_SEPARATE_POOLS memp = (struct memp *)LWIP_MEM_ALIGN(memp_memory); #endif /* !MEMP_SEPARATE_POOLS */ /* for every pool: */ for (i = 0; i < MEMP_MAX; ++i) { 8028082: 2b20 cmp r3, #32 8028084: d1eb bne.n 802805e #if MEMP_OVERFLOW_CHECK memp_overflow_init(); /* check everything a first time to see if it worked */ memp_overflow_check_all(); #endif /* MEMP_OVERFLOW_CHECK */ } 8028086: bdf0 pop {r4, r5, r6, r7, pc} 8028088: 200024d3 .word 0x200024d3 802808c: 2000db10 .word 0x2000db10 8028090: 08037a64 .word 0x08037a64 8028094: 08037a84 .word 0x08037a84 08028098 : #endif { struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 8028098: 280f cmp r0, #15 #if !MEMP_OVERFLOW_CHECK memp_malloc(memp_t type) #else memp_malloc_fn(memp_t type, const char* file, const int line) #endif { 802809a: b538 push {r3, r4, r5, lr} 802809c: 4605 mov r5, r0 struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 802809e: d80b bhi.n 80280b8 SYS_ARCH_PROTECT(old_level); 80280a0: f007 fd9e bl 802fbe0 #if MEMP_OVERFLOW_CHECK >= 2 memp_overflow_check_all(); #endif /* MEMP_OVERFLOW_CHECK >= 2 */ memp = memp_tab[type]; 80280a4: 4b06 ldr r3, [pc, #24] ; (80280c0 ) 80280a6: f853 4025 ldr.w r4, [r3, r5, lsl #2] if (memp != NULL) { 80280aa: b114 cbz r4, 80280b2 memp_tab[type] = memp->next; 80280ac: 6822 ldr r2, [r4, #0] 80280ae: f843 2025 str.w r2, [r3, r5, lsl #2] } else { LWIP_DEBUGF(MEMP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("memp_malloc: out of memory in pool %s\n", memp_desc[type])); MEMP_STATS_INC(err, type); } SYS_ARCH_UNPROTECT(old_level); 80280b2: f007 fd9f bl 802fbf4 return memp; 80280b6: e000 b.n 80280ba #endif { struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); LWIP_ERROR("memp_malloc: type < MEMP_MAX", (type < MEMP_MAX), return NULL;); 80280b8: 2400 movs r4, #0 } SYS_ARCH_UNPROTECT(old_level); return memp; } 80280ba: 4620 mov r0, r4 80280bc: bd38 pop {r3, r4, r5, pc} 80280be: bf00 nop 80280c0: 2000db10 .word 0x2000db10 080280c4 : * @param type the pool where to put mem * @param mem the memp element to free */ void memp_free(memp_t type, void *mem) { 80280c4: b538 push {r3, r4, r5, lr} 80280c6: 4605 mov r5, r0 struct memp *memp; SYS_ARCH_DECL_PROTECT(old_level); if (mem == NULL) { 80280c8: 460c mov r4, r1 80280ca: b159 cbz r1, 80280e4 LWIP_ASSERT("memp_free: mem properly aligned", ((mem_ptr_t)mem % MEM_ALIGNMENT) == 0); memp = (struct memp *)(void *)((u8_t*)mem - MEMP_SIZE); SYS_ARCH_PROTECT(old_level); 80280cc: f007 fd88 bl 802fbe0 #endif /* MEMP_OVERFLOW_CHECK >= 2 */ #endif /* MEMP_OVERFLOW_CHECK */ MEMP_STATS_DEC(used, type); memp->next = memp_tab[type]; 80280d0: 4b05 ldr r3, [pc, #20] ; (80280e8 ) 80280d2: f853 2025 ldr.w r2, [r3, r5, lsl #2] 80280d6: 6022 str r2, [r4, #0] memp_tab[type] = memp; 80280d8: f843 4025 str.w r4, [r3, r5, lsl #2] #if MEMP_SANITY_CHECK LWIP_ASSERT("memp sanity", memp_sanity()); #endif /* MEMP_SANITY_CHECK */ SYS_ARCH_UNPROTECT(old_level); } 80280dc: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} #if MEMP_SANITY_CHECK LWIP_ASSERT("memp sanity", memp_sanity()); #endif /* MEMP_SANITY_CHECK */ SYS_ARCH_UNPROTECT(old_level); 80280e0: f007 bd88 b.w 802fbf4 80280e4: bd38 pop {r3, r4, r5, pc} 80280e6: bf00 nop 80280e8: 2000db10 .word 0x2000db10 080280ec : } #endif /* LWIP_HAVE_LOOPIF */ void netif_init(void) { 80280ec: 4770 bx lr 80280ee: 0000 movs r0, r0 080280f0 : * @note call netif_set_addr() if you also want to change netmask and * default gateway */ void netif_set_ipaddr(struct netif *netif, ip_addr_t *ipaddr) { 80280f0: b570 push {r4, r5, r6, lr} 80280f2: 4604 mov r4, r0 #if LWIP_TCP struct tcp_pcb *pcb; struct tcp_pcb_listen *lpcb; /* address is actually being changed? */ if (ipaddr && (ip_addr_cmp(ipaddr, &(netif->ip_addr))) == 0) { 80280f4: 460d mov r5, r1 80280f6: b941 cbnz r1, 802810a ip_addr_set(&(lpcb->local_ip), ipaddr); } } } #endif snmp_delete_ipaddridx_tree(netif); 80280f8: 4620 mov r0, r4 80280fa: f004 fd99 bl 802cc30 snmp_delete_iprteidx_tree(0,netif); 80280fe: 2000 movs r0, #0 8028100: 4621 mov r1, r4 8028102: f004 fe2b bl 802cd5c /* set new IP address to netif */ ip_addr_set(&(netif->ip_addr), ipaddr); 8028106: b9fd cbnz r5, 8028148 8028108: e01f b.n 802814a #if LWIP_TCP struct tcp_pcb *pcb; struct tcp_pcb_listen *lpcb; /* address is actually being changed? */ if (ipaddr && (ip_addr_cmp(ipaddr, &(netif->ip_addr))) == 0) { 802810a: 680a ldr r2, [r1, #0] 802810c: 6843 ldr r3, [r0, #4] 802810e: 429a cmp r2, r3 8028110: d0f2 beq.n 80280f8 /* extern struct tcp_pcb *tcp_active_pcbs; defined by tcp.h */ LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: netif address being changed\n")); pcb = tcp_active_pcbs; 8028112: 4b13 ldr r3, [pc, #76] ; (8028160 ) 8028114: 6818 ldr r0, [r3, #0] while (pcb != NULL) { 8028116: e007 b.n 8028128 /* PCB bound to current local interface address? */ if (ip_addr_cmp(&(pcb->local_ip), &(netif->ip_addr)) 8028118: 6802 ldr r2, [r0, #0] 802811a: 6863 ldr r3, [r4, #4] 802811c: 68c6 ldr r6, [r0, #12] 802811e: 429a cmp r2, r3 8028120: d101 bne.n 8028126 #endif /* LWIP_AUTOIP */ ) { /* this connection must be aborted */ struct tcp_pcb *next = pcb->next; LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: aborting TCP pcb %p\n", (void *)pcb)); tcp_abort(pcb); 8028122: f000 fd89 bl 8028c38 pcb = next; } else { pcb = pcb->next; 8028126: 4630 mov r0, r6 /* address is actually being changed? */ if (ipaddr && (ip_addr_cmp(ipaddr, &(netif->ip_addr))) == 0) { /* extern struct tcp_pcb *tcp_active_pcbs; defined by tcp.h */ LWIP_DEBUGF(NETIF_DEBUG | LWIP_DBG_STATE, ("netif_set_ipaddr: netif address being changed\n")); pcb = tcp_active_pcbs; while (pcb != NULL) { 8028128: 2800 cmp r0, #0 802812a: d1f5 bne.n 8028118 pcb = next; } else { pcb = pcb->next; } } for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 802812c: 4b0d ldr r3, [pc, #52] ; (8028164 ) 802812e: 681b ldr r3, [r3, #0] 8028130: e007 b.n 8028142 /* PCB bound to current local interface address? */ if ((!(ip_addr_isany(&(lpcb->local_ip)))) && 8028132: 681a ldr r2, [r3, #0] 8028134: b122 cbz r2, 8028140 8028136: 6861 ldr r1, [r4, #4] 8028138: 428a cmp r2, r1 (ip_addr_cmp(&(lpcb->local_ip), &(netif->ip_addr)))) { /* The PCB is listening to the old ipaddr and * is set to listen to the new one instead */ ip_addr_set(&(lpcb->local_ip), ipaddr); 802813a: bf04 itt eq 802813c: 682a ldreq r2, [r5, #0] 802813e: 601a streq r2, [r3, #0] pcb = next; } else { pcb = pcb->next; } } for (lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 8028140: 68db ldr r3, [r3, #12] 8028142: 2b00 cmp r3, #0 8028144: d1f5 bne.n 8028132 8028146: e7d7 b.n 80280f8 } #endif snmp_delete_ipaddridx_tree(netif); snmp_delete_iprteidx_tree(0,netif); /* set new IP address to netif */ ip_addr_set(&(netif->ip_addr), ipaddr); 8028148: 682d ldr r5, [r5, #0] snmp_insert_ipaddridx_tree(netif); 802814a: 4620 mov r0, r4 } #endif snmp_delete_ipaddridx_tree(netif); snmp_delete_iprteidx_tree(0,netif); /* set new IP address to netif */ ip_addr_set(&(netif->ip_addr), ipaddr); 802814c: 6065 str r5, [r4, #4] snmp_insert_ipaddridx_tree(netif); 802814e: f004 fd2d bl 802cbac snmp_insert_iprteidx_tree(0,netif); 8028152: 2000 movs r0, #0 8028154: 4621 mov r1, r4 netif->name[0], netif->name[1], ip4_addr1_16(&netif->ip_addr), ip4_addr2_16(&netif->ip_addr), ip4_addr3_16(&netif->ip_addr), ip4_addr4_16(&netif->ip_addr))); } 8028156: e8bd 4070 ldmia.w sp!, {r4, r5, r6, lr} snmp_delete_ipaddridx_tree(netif); snmp_delete_iprteidx_tree(0,netif); /* set new IP address to netif */ ip_addr_set(&(netif->ip_addr), ipaddr); snmp_insert_ipaddridx_tree(netif); snmp_insert_iprteidx_tree(0,netif); 802815a: f004 bdb3 b.w 802ccc4 802815e: bf00 nop 8028160: 200104c4 .word 0x200104c4 8028164: 200104cc .word 0x200104cc 08028168 : * @note call netif_set_addr() if you also want to change ip address and netmask */ void netif_set_gw(struct netif *netif, ip_addr_t *gw) { ip_addr_set(&(netif->gw), gw); 8028168: b101 cbz r1, 802816c 802816a: 6809 ldr r1, [r1, #0] 802816c: 60c1 str r1, [r0, #12] 802816e: 4770 bx lr 08028170 : * @note call netif_set_addr() if you also want to change ip address and * default gateway */ void netif_set_netmask(struct netif *netif, ip_addr_t *netmask) { 8028170: b538 push {r3, r4, r5, lr} 8028172: 4604 mov r4, r0 8028174: 460d mov r5, r1 snmp_delete_iprteidx_tree(0, netif); 8028176: 2000 movs r0, #0 8028178: 4621 mov r1, r4 802817a: f004 fdef bl 802cd5c /* set new netmask to netif */ ip_addr_set(&(netif->netmask), netmask); 802817e: b105 cbz r5, 8028182 8028180: 682d ldr r5, [r5, #0] snmp_insert_iprteidx_tree(0, netif); 8028182: 2000 movs r0, #0 8028184: 4621 mov r1, r4 void netif_set_netmask(struct netif *netif, ip_addr_t *netmask) { snmp_delete_iprteidx_tree(0, netif); /* set new netmask to netif */ ip_addr_set(&(netif->netmask), netmask); 8028186: 60a5 str r5, [r4, #8] netif->name[0], netif->name[1], ip4_addr1_16(&netif->netmask), ip4_addr2_16(&netif->netmask), ip4_addr3_16(&netif->netmask), ip4_addr4_16(&netif->netmask))); } 8028188: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} netif_set_netmask(struct netif *netif, ip_addr_t *netmask) { snmp_delete_iprteidx_tree(0, netif); /* set new netmask to netif */ ip_addr_set(&(netif->netmask), netmask); snmp_insert_iprteidx_tree(0, netif); 802818c: f004 bd9a b.w 802ccc4 08028190 : * @param gw the new default gateway */ void netif_set_addr(struct netif *netif, ip_addr_t *ipaddr, ip_addr_t *netmask, ip_addr_t *gw) { 8028190: b570 push {r4, r5, r6, lr} 8028192: 4605 mov r5, r0 8028194: 4616 mov r6, r2 8028196: 461c mov r4, r3 netif_set_ipaddr(netif, ipaddr); 8028198: f7ff ffaa bl 80280f0 netif_set_netmask(netif, netmask); 802819c: 4628 mov r0, r5 802819e: 4631 mov r1, r6 80281a0: f7ff ffe6 bl 8028170 * @note call netif_set_addr() if you also want to change ip address and netmask */ void netif_set_gw(struct netif *netif, ip_addr_t *gw) { ip_addr_set(&(netif->gw), gw); 80281a4: b104 cbz r4, 80281a8 80281a6: 6824 ldr r4, [r4, #0] 80281a8: 60ec str r4, [r5, #12] 80281aa: bd70 pop {r4, r5, r6, pc} 080281ac : * @return netif, or NULL if failed. */ struct netif * netif_add(struct netif *netif, ip_addr_t *ipaddr, ip_addr_t *netmask, ip_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input) { 80281ac: b5f8 push {r3, r4, r5, r6, r7, lr} netif->loop_first = NULL; netif->loop_last = NULL; #endif /* ENABLE_LOOPBACK */ /* remember netif specific state information data */ netif->state = state; 80281ae: 9e06 ldr r6, [sp, #24] 80281b0: 61c6 str r6, [r0, #28] netif->num = netif_num++; 80281b2: 4e10 ldr r6, [pc, #64] ; (80281f4 ) 80281b4: 7837 ldrb r7, [r6, #0] 80281b6: f880 7030 strb.w r7, [r0, #48] ; 0x30 80281ba: 3701 adds r7, #1 80281bc: 7037 strb r7, [r6, #0] netif->input = input; 80281be: 9e08 ldr r6, [sp, #32] { LWIP_ASSERT("No init function given", init != NULL); /* reset new interface configuration state */ ip_addr_set_zero(&netif->ip_addr); 80281c0: 2500 movs r5, #0 * @return netif, or NULL if failed. */ struct netif * netif_add(struct netif *netif, ip_addr_t *ipaddr, ip_addr_t *netmask, ip_addr_t *gw, void *state, netif_init_fn init, netif_input_fn input) { 80281c2: 4604 mov r4, r0 LWIP_ASSERT("No init function given", init != NULL); /* reset new interface configuration state */ ip_addr_set_zero(&netif->ip_addr); 80281c4: 6045 str r5, [r0, #4] ip_addr_set_zero(&netif->netmask); 80281c6: 6085 str r5, [r0, #8] ip_addr_set_zero(&netif->gw); 80281c8: 60c5 str r5, [r0, #12] netif->flags = 0; 80281ca: f880 502d strb.w r5, [r0, #45] ; 0x2d #if LWIP_DHCP /* netif not under DHCP control by default */ netif->dhcp = NULL; 80281ce: 6205 str r5, [r0, #32] #endif /* ENABLE_LOOPBACK */ /* remember netif specific state information data */ netif->state = state; netif->num = netif_num++; netif->input = input; 80281d0: 6106 str r6, [r0, #16] NETIF_SET_HWADDRHINT(netif, NULL); #if ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS netif->loop_cnt_current = 0; #endif /* ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS */ netif_set_addr(netif, ipaddr, netmask, gw); 80281d2: f7ff ffdd bl 8028190 /* call user specified initialization function for netif */ if (init(netif) != ERR_OK) { 80281d6: 4620 mov r0, r4 80281d8: 9b07 ldr r3, [sp, #28] 80281da: 4798 blx r3 80281dc: b930 cbnz r0, 80281ec return NULL; } /* add this netif to the list */ netif->next = netif_list; 80281de: 4b06 ldr r3, [pc, #24] ; (80281f8 ) 80281e0: 681a ldr r2, [r3, #0] 80281e2: 6022 str r2, [r4, #0] netif_list = netif; 80281e4: 601c str r4, [r3, #0] snmp_inc_iflist(); 80281e6: f004 fbc5 bl 802c974 LWIP_DEBUGF(NETIF_DEBUG, (" netmask ")); ip_addr_debug_print(NETIF_DEBUG, netmask); LWIP_DEBUGF(NETIF_DEBUG, (" gw ")); ip_addr_debug_print(NETIF_DEBUG, gw); LWIP_DEBUGF(NETIF_DEBUG, ("\n")); return netif; 80281ea: e000 b.n 80281ee netif_set_addr(netif, ipaddr, netmask, gw); /* call user specified initialization function for netif */ if (init(netif) != ERR_OK) { return NULL; 80281ec: 462c mov r4, r5 ip_addr_debug_print(NETIF_DEBUG, netmask); LWIP_DEBUGF(NETIF_DEBUG, (" gw ")); ip_addr_debug_print(NETIF_DEBUG, gw); LWIP_DEBUGF(NETIF_DEBUG, ("\n")); return netif; } 80281ee: 4620 mov r0, r4 80281f0: bdf8 pop {r3, r4, r5, r6, r7, pc} 80281f2: bf00 nop 80281f4: 2000db50 .word 0x2000db50 80281f8: 200104b8 .word 0x200104b8 080281fc : * * @param netif the default network interface */ void netif_set_default(struct netif *netif) { 80281fc: b510 push {r4, lr} if (netif == NULL) { 80281fe: 4604 mov r4, r0 /* remove default route */ snmp_delete_iprteidx_tree(1, netif); 8028200: 4621 mov r1, r4 8028202: 2001 movs r0, #1 * @param netif the default network interface */ void netif_set_default(struct netif *netif) { if (netif == NULL) { 8028204: b914 cbnz r4, 802820c /* remove default route */ snmp_delete_iprteidx_tree(1, netif); 8028206: f004 fda9 bl 802cd5c 802820a: e001 b.n 8028210 } else { /* install default route */ snmp_insert_iprteidx_tree(1, netif); 802820c: f004 fd5a bl 802ccc4 } netif_default = netif; 8028210: 4b01 ldr r3, [pc, #4] ; (8028218 ) 8028212: 601c str r4, [r3, #0] 8028214: bd10 pop {r4, pc} 8028216: bf00 nop 8028218: 200104bc .word 0x200104bc 0802821c : * up once configured. * * @see dhcp_start() */ void netif_set_up(struct netif *netif) { 802821c: b510 push {r4, lr} if (!(netif->flags & NETIF_FLAG_UP)) { 802821e: f890 302d ldrb.w r3, [r0, #45] ; 0x2d 8028222: 07da lsls r2, r3, #31 * up once configured. * * @see dhcp_start() */ void netif_set_up(struct netif *netif) { 8028224: 4604 mov r4, r0 if (!(netif->flags & NETIF_FLAG_UP)) { 8028226: d412 bmi.n 802824e netif->flags |= NETIF_FLAG_UP; 8028228: f043 0301 orr.w r3, r3, #1 802822c: f880 302d strb.w r3, [r0, #45] ; 0x2d #if LWIP_SNMP snmp_get_sysuptime(&netif->ts); 8028230: 3038 adds r0, #56 ; 0x38 8028232: f004 fb43 bl 802c8bc * @note: Enabling DHCP on a down interface will make it come * up once configured. * * @see dhcp_start() */ void netif_set_up(struct netif *netif) 8028236: f894 302d ldrb.w r3, [r4, #45] ; 0x2d NETIF_STATUS_CALLBACK(netif); if (netif->flags & NETIF_FLAG_LINK_UP) { #if LWIP_ARP /* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */ if (netif->flags & (NETIF_FLAG_ETHARP)) { 802823a: f003 0330 and.w r3, r3, #48 ; 0x30 802823e: 2b30 cmp r3, #48 ; 0x30 8028240: d105 bne.n 802824e etharp_gratuitous(netif); 8028242: 4620 mov r0, r4 8028244: 1d21 adds r1, r4, #4 igmp_report_groups( netif); } #endif /* LWIP_IGMP */ } } } 8028246: e8bd 4010 ldmia.w sp!, {r4, lr} if (netif->flags & NETIF_FLAG_LINK_UP) { #if LWIP_ARP /* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */ if (netif->flags & (NETIF_FLAG_ETHARP)) { etharp_gratuitous(netif); 802824a: f007 b87d b.w 802f348 802824e: bd10 pop {r4, pc} 08028250 : * up once configured. * * @see dhcp_start() */ void netif_set_down(struct netif *netif) { 8028250: b510 push {r4, lr} if (netif->flags & NETIF_FLAG_UP) { 8028252: f890 302d ldrb.w r3, [r0, #45] ; 0x2d 8028256: 07d9 lsls r1, r3, #31 * up once configured. * * @see dhcp_start() */ void netif_set_down(struct netif *netif) { 8028258: 4604 mov r4, r0 if (netif->flags & NETIF_FLAG_UP) { 802825a: d511 bpl.n 8028280 netif->flags &= ~NETIF_FLAG_UP; 802825c: f023 0301 bic.w r3, r3, #1 8028260: f880 302d strb.w r3, [r0, #45] ; 0x2d #if LWIP_SNMP snmp_get_sysuptime(&netif->ts); 8028264: 3038 adds r0, #56 ; 0x38 8028266: f004 fb29 bl 802c8bc #endif #if LWIP_ARP if (netif->flags & NETIF_FLAG_ETHARP) { 802826a: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 802826e: f003 0320 and.w r3, r3, #32 8028272: b2db uxtb r3, r3 8028274: b123 cbz r3, 8028280 etharp_cleanup_netif(netif); 8028276: 4620 mov r0, r4 } #endif /* LWIP_ARP */ NETIF_STATUS_CALLBACK(netif); } } 8028278: e8bd 4010 ldmia.w sp!, {r4, lr} snmp_get_sysuptime(&netif->ts); #endif #if LWIP_ARP if (netif->flags & NETIF_FLAG_ETHARP) { etharp_cleanup_netif(netif); 802827c: f007 b834 b.w 802f2e8 8028280: bd10 pop {r4, pc} 08028282 : * @return non-zero on failure, zero on success. * */ u8_t pbuf_header(struct pbuf *p, s16_t header_size_increment) { 8028282: b510 push {r4, lr} u16_t type; void *payload; u16_t increment_magnitude; LWIP_ASSERT("p != NULL", p != NULL); if ((header_size_increment == 0) || (p == NULL)) { 8028284: b321 cbz r1, 80282d0 8028286: b330 cbz r0, 80282d6 return 0; } if (header_size_increment < 0){ 8028288: 2900 cmp r1, #0 802828a: da05 bge.n 8028298 increment_magnitude = -header_size_increment; 802828c: 424b negs r3, r1 /* Check that we aren't going to move off the end of the pbuf */ LWIP_ERROR("increment_magnitude <= p->len", (increment_magnitude <= p->len), return 1;); 802828e: 8942 ldrh r2, [r0, #10] if ((header_size_increment == 0) || (p == NULL)) { return 0; } if (header_size_increment < 0){ increment_magnitude = -header_size_increment; 8028290: b29b uxth r3, r3 /* Check that we aren't going to move off the end of the pbuf */ LWIP_ERROR("increment_magnitude <= p->len", (increment_magnitude <= p->len), return 1;); 8028292: 429a cmp r2, r3 8028294: d201 bcs.n 802829a 8028296: e01d b.n 80282d4 } else { increment_magnitude = header_size_increment; 8028298: b28b uxth r3, r1 LWIP_ASSERT("p->payload - increment_magnitude >= p + SIZEOF_STRUCT_PBUF", (u8_t *)p->payload - increment_magnitude >= (u8_t *)p + SIZEOF_STRUCT_PBUF); #endif } type = p->type; 802829a: 7b02 ldrb r2, [r0, #12] /* remember current payload pointer */ payload = p->payload; 802829c: 6844 ldr r4, [r0, #4] /* pbuf types containing payloads? */ if (type == PBUF_RAM || type == PBUF_POOL) { 802829e: b10a cbz r2, 80282a4 80282a0: 2a03 cmp r2, #3 80282a2: d105 bne.n 80282b0 /* set new payload pointer */ p->payload = (u8_t *)p->payload - header_size_increment; 80282a4: 1a64 subs r4, r4, r1 /* boundary check fails? */ if ((u8_t *)p->payload < (u8_t *)p + SIZEOF_STRUCT_PBUF) { 80282a6: f100 0310 add.w r3, r0, #16 80282aa: 429c cmp r4, r3 80282ac: d312 bcc.n 80282d4 80282ae: e008 b.n 80282c2 p->payload = payload; /* bail out unsuccesfully */ return 1; } /* pbuf types refering to external payloads? */ } else if (type == PBUF_REF || type == PBUF_ROM) { 80282b0: 3a01 subs r2, #1 80282b2: 2a01 cmp r2, #1 80282b4: d80e bhi.n 80282d4 /* hide a header in the payload? */ if ((header_size_increment < 0) && (increment_magnitude <= p->len)) { 80282b6: 2900 cmp r1, #0 80282b8: da0c bge.n 80282d4 80282ba: 8942 ldrh r2, [r0, #10] 80282bc: 429a cmp r2, r3 80282be: d309 bcc.n 80282d4 /* increase payload pointer */ p->payload = (u8_t *)p->payload - header_size_increment; 80282c0: 1a64 subs r4, r4, r1 /* Unknown type */ LWIP_ASSERT("bad pbuf type", 0); return 1; } /* modify pbuf length fields */ p->len += header_size_increment; 80282c2: 8943 ldrh r3, [r0, #10] /* pbuf types refering to external payloads? */ } else if (type == PBUF_REF || type == PBUF_ROM) { /* hide a header in the payload? */ if ((header_size_increment < 0) && (increment_magnitude <= p->len)) { /* increase payload pointer */ p->payload = (u8_t *)p->payload - header_size_increment; 80282c4: 6044 str r4, [r0, #4] /* Unknown type */ LWIP_ASSERT("bad pbuf type", 0); return 1; } /* modify pbuf length fields */ p->len += header_size_increment; 80282c6: 18cb adds r3, r1, r3 80282c8: 8143 strh r3, [r0, #10] p->tot_len += header_size_increment; 80282ca: 8903 ldrh r3, [r0, #8] 80282cc: 18c9 adds r1, r1, r3 80282ce: 8101 strh r1, [r0, #8] LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_header: old %p new %p (%"S16_F")\n", (void *)payload, (void *)p->payload, header_size_increment)); return 0; 80282d0: 2000 movs r0, #0 80282d2: bd10 pop {r4, pc} } if (header_size_increment < 0){ increment_magnitude = -header_size_increment; /* Check that we aren't going to move off the end of the pbuf */ LWIP_ERROR("increment_magnitude <= p->len", (increment_magnitude <= p->len), return 1;); 80282d4: 2001 movs r0, #1 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_header: old %p new %p (%"S16_F")\n", (void *)payload, (void *)p->payload, header_size_increment)); return 0; } 80282d6: bd10 pop {r4, pc} 080282d8 : * 1->1->1 becomes ....... * */ u8_t pbuf_free(struct pbuf *p) { 80282d8: b570 push {r4, r5, r6, lr} u16_t type; struct pbuf *q; u8_t count; if (p == NULL) { 80282da: 4604 mov r4, r0 80282dc: b300 cbz r0, 8028320 80282de: 2500 movs r5, #0 u16_t ref; SYS_ARCH_DECL_PROTECT(old_level); /* Since decrementing ref cannot be guaranteed to be a single machine operation * we must protect it. We put the new ref into a local variable to prevent * further protection. */ SYS_ARCH_PROTECT(old_level); 80282e0: f007 fc7e bl 802fbe0 /* all pbufs in a chain are referenced at least once */ LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0); /* decrease reference count (number of pointers to pbuf) */ ref = --(p->ref); 80282e4: 89e6 ldrh r6, [r4, #14] 80282e6: 3e01 subs r6, #1 80282e8: b2b6 uxth r6, r6 80282ea: 81e6 strh r6, [r4, #14] SYS_ARCH_UNPROTECT(old_level); 80282ec: f007 fc82 bl 802fbf4 /* this pbuf is no longer referenced to? */ if (ref == 0) { 80282f0: b9be cbnz r6, 8028322 /* remember next pbuf in chain for next iteration */ q = p->next; LWIP_DEBUGF( PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_free: deallocating %p\n", (void *)p)); type = p->type; 80282f2: 7b23 ldrb r3, [r4, #12] ref = --(p->ref); SYS_ARCH_UNPROTECT(old_level); /* this pbuf is no longer referenced to? */ if (ref == 0) { /* remember next pbuf in chain for next iteration */ q = p->next; 80282f4: 6826 ldr r6, [r4, #0] pc->custom_free_function(p); } else #endif /* LWIP_SUPPORT_CUSTOM_PBUF */ { /* is this a pbuf from the pool? */ if (type == PBUF_POOL) { 80282f6: 2b03 cmp r3, #3 80282f8: d101 bne.n 80282fe memp_free(MEMP_PBUF_POOL, p); 80282fa: 200f movs r0, #15 80282fc: e003 b.n 8028306 /* is this a ROM or RAM referencing pbuf? */ } else if (type == PBUF_ROM || type == PBUF_REF) { 80282fe: 3b01 subs r3, #1 8028300: 2b01 cmp r3, #1 8028302: d804 bhi.n 802830e memp_free(MEMP_PBUF, p); 8028304: 200e movs r0, #14 8028306: 4621 mov r1, r4 8028308: f7ff fedc bl 80280c4 802830c: e002 b.n 8028314 /* type == PBUF_RAM */ } else { mem_free(p); 802830e: 4620 mov r0, r4 8028310: f7ff fd70 bl 8027df4 } } count++; 8028314: 3501 adds r5, #1 8028316: b2ed uxtb r5, r5 p->type == PBUF_REF || p->type == PBUF_POOL); count = 0; /* de-allocate all consecutive pbufs from the head of the chain that * obtain a zero reference count after decrementing*/ while (p != NULL) { 8028318: 4634 mov r4, r6 802831a: 2e00 cmp r6, #0 802831c: d1e0 bne.n 80282e0 802831e: e000 b.n 8028322 if (p == NULL) { LWIP_ASSERT("p != NULL", p != NULL); /* if assertions are disabled, proceed with debug output */ LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("pbuf_free(p == NULL) was called.\n")); return 0; 8028320: 4605 mov r5, r0 } } PERF_STOP("pbuf_free"); /* return number of de-allocated pbufs */ return count; } 8028322: 4628 mov r0, r5 8028324: bd70 pop {r4, r5, r6, pc} 08028326 : * * @note Despite its name, pbuf_realloc cannot grow the size of a pbuf (chain). */ void pbuf_realloc(struct pbuf *p, u16_t new_len) { 8028326: b538 push {r3, r4, r5, lr} p->type == PBUF_ROM || p->type == PBUF_RAM || p->type == PBUF_REF); /* desired length larger than current length? */ if (new_len >= p->tot_len) { 8028328: 8903 ldrh r3, [r0, #8] 802832a: 4299 cmp r1, r3 802832c: d220 bcs.n 8028370 return; } /* the pbuf chain grows by (new_len - p->tot_len) bytes * (which may be negative in case of shrinking) */ grow = new_len - p->tot_len; 802832e: 1aca subs r2, r1, r3 /* first, step over any pbufs that should remain in the chain */ rem_len = new_len; q = p; /* should this pbuf be kept? */ while (rem_len > q->len) { 8028330: 460d mov r5, r1 8028332: 4604 mov r4, r0 8028334: e005 b.n 8028342 /* decrease remaining length by pbuf length */ rem_len -= q->len; 8028336: 1aed subs r5, r5, r3 /* decrease total length indicator */ LWIP_ASSERT("grow < max_u16_t", grow < 0xffff); q->tot_len += (u16_t)grow; 8028338: 8923 ldrh r3, [r4, #8] 802833a: 18d3 adds r3, r2, r3 802833c: 8123 strh r3, [r4, #8] /* proceed to next pbuf in chain */ q = q->next; 802833e: 6824 ldr r4, [r4, #0] rem_len = new_len; q = p; /* should this pbuf be kept? */ while (rem_len > q->len) { /* decrease remaining length by pbuf length */ rem_len -= q->len; 8028340: b2ad uxth r5, r5 /* first, step over any pbufs that should remain in the chain */ rem_len = new_len; q = p; /* should this pbuf be kept? */ while (rem_len > q->len) { 8028342: 8963 ldrh r3, [r4, #10] 8028344: 429d cmp r5, r3 8028346: d8f6 bhi.n 8028336 /* we have now reached the new last pbuf (in q) */ /* rem_len == desired length for pbuf q */ /* shrink allocated memory for PBUF_RAM */ /* (other types merely adjust their length fields */ if ((q->type == PBUF_RAM) && (rem_len != q->len)) { 8028348: 7b22 ldrb r2, [r4, #12] 802834a: b94a cbnz r2, 8028360 802834c: 429d cmp r5, r3 802834e: d007 beq.n 8028360 /* reallocate and adjust the length of the pbuf that will be split */ q = (struct pbuf *)mem_trim(q, (u16_t)((u8_t *)q->payload - (u8_t *)q) + rem_len); 8028350: 6863 ldr r3, [r4, #4] 8028352: 1b1b subs r3, r3, r4 8028354: 18e9 adds r1, r5, r3 8028356: 4620 mov r0, r4 8028358: b289 uxth r1, r1 802835a: f7ff fda5 bl 8027ea8 802835e: 4604 mov r4, r0 /* adjust length fields for new last pbuf */ q->len = rem_len; q->tot_len = q->len; /* any remaining pbufs in chain? */ if (q->next != NULL) { 8028360: 6820 ldr r0, [r4, #0] /* reallocate and adjust the length of the pbuf that will be split */ q = (struct pbuf *)mem_trim(q, (u16_t)((u8_t *)q->payload - (u8_t *)q) + rem_len); LWIP_ASSERT("mem_trim returned q == NULL", q != NULL); } /* adjust length fields for new last pbuf */ q->len = rem_len; 8028362: 8165 strh r5, [r4, #10] q->tot_len = q->len; 8028364: 8125 strh r5, [r4, #8] /* any remaining pbufs in chain? */ if (q->next != NULL) { 8028366: b108 cbz r0, 802836c /* free remaining pbufs in chain */ pbuf_free(q->next); 8028368: f7ff ffb6 bl 80282d8 } /* q is last packet in chain */ q->next = NULL; 802836c: 2300 movs r3, #0 802836e: 6023 str r3, [r4, #0] 8028370: bd38 pop {r3, r4, r5, pc} 08028372 : * @return the allocated pbuf. If multiple pbufs where allocated, this * is the first pbuf of a pbuf chain. */ struct pbuf * pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type) { 8028372: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8028376: 460d mov r5, r1 8028378: 4617 mov r7, r2 u16_t offset; s32_t rem_len; /* remaining length */ LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F")\n", length)); /* determine header offset */ switch (layer) { 802837a: 2803 cmp r0, #3 802837c: d87c bhi.n 8028478 802837e: e8df f000 tbb [pc, r0] 8028382: 0802 .short 0x0802 8028384: 0604 .short 0x0604 case PBUF_TRANSPORT: /* add room for transport (often TCP) layer header */ offset = PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN; 8028386: 2636 movs r6, #54 ; 0x36 8028388: e004 b.n 8028394 /* add room for IP layer header */ offset = PBUF_LINK_HLEN + PBUF_IP_HLEN; break; case PBUF_LINK: /* add room for link layer header */ offset = PBUF_LINK_HLEN; 802838a: 260e movs r6, #14 break; 802838c: e002 b.n 8028394 case PBUF_RAW: offset = 0; 802838e: 2600 movs r6, #0 break; 8028390: e000 b.n 8028394 /* add room for transport (often TCP) layer header */ offset = PBUF_LINK_HLEN + PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN; break; case PBUF_IP: /* add room for IP layer header */ offset = PBUF_LINK_HLEN + PBUF_IP_HLEN; 8028392: 2622 movs r6, #34 ; 0x22 default: LWIP_ASSERT("pbuf_alloc: bad pbuf layer", 0); return NULL; } switch (type) { 8028394: 2f03 cmp r7, #3 8028396: d86f bhi.n 8028478 8028398: e8df f007 tbb [pc, r7] 802839c: 025e5e46 .word 0x025e5e46 case PBUF_POOL: /* allocate head of pbuf chain into p */ p = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); 80283a0: 200f movs r0, #15 80283a2: f7ff fe79 bl 8028098 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc: allocated pbuf %p\n", (void *)p)); if (p == NULL) { 80283a6: 4604 mov r4, r0 80283a8: b900 cbnz r0, 80283ac 80283aa: e065 b.n 8028478 } p->type = type; p->next = NULL; /* make the payload pointer point 'offset' bytes into pbuf data memory */ p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset))); 80283ac: 1982 adds r2, r0, r6 LWIP_ASSERT("pbuf_alloc: pbuf p->payload properly aligned", ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); /* the total length of the pbuf chain is the requested size */ p->tot_len = length; /* set the length of the first pbuf in the chain */ p->len = LWIP_MIN(length, PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)); 80283ae: 3603 adds r6, #3 80283b0: f026 0603 bic.w r6, r6, #3 } p->type = type; p->next = NULL; /* make the payload pointer point 'offset' bytes into pbuf data memory */ p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset))); 80283b4: 3213 adds r2, #19 LWIP_ASSERT("pbuf_alloc: pbuf p->payload properly aligned", ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); /* the total length of the pbuf chain is the requested size */ p->tot_len = length; /* set the length of the first pbuf in the chain */ p->len = LWIP_MIN(length, PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)); 80283b6: f5c6 66c0 rsb r6, r6, #1536 ; 0x600 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc: allocated pbuf %p\n", (void *)p)); if (p == NULL) { PBUF_POOL_IS_EMPTY(); return NULL; } p->type = type; 80283ba: 2303 movs r3, #3 p->next = NULL; /* make the payload pointer point 'offset' bytes into pbuf data memory */ p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset))); 80283bc: f022 0203 bic.w r2, r2, #3 LWIP_ASSERT("pbuf_alloc: pbuf p->payload properly aligned", ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); /* the total length of the pbuf chain is the requested size */ p->tot_len = length; /* set the length of the first pbuf in the chain */ p->len = LWIP_MIN(length, PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)); 80283c0: 3604 adds r6, #4 80283c2: 42ae cmp r6, r5 80283c4: bfa8 it ge 80283c6: 462e movge r6, r5 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc: allocated pbuf %p\n", (void *)p)); if (p == NULL) { PBUF_POOL_IS_EMPTY(); return NULL; } p->type = type; 80283c8: 7303 strb r3, [r0, #12] p->next = NULL; /* make the payload pointer point 'offset' bytes into pbuf data memory */ p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset))); 80283ca: 6042 str r2, [r0, #4] if (p == NULL) { PBUF_POOL_IS_EMPTY(); return NULL; } p->type = type; p->next = NULL; 80283cc: 2300 movs r3, #0 ((u8_t*)p->payload + p->len <= (u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED)); LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT", (PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 ); /* set reference count (needed here in case we fail) */ p->ref = 1; 80283ce: 2201 movs r2, #1 LWIP_ASSERT("pbuf_alloc: pbuf p->payload properly aligned", ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); /* the total length of the pbuf chain is the requested size */ p->tot_len = length; /* set the length of the first pbuf in the chain */ p->len = LWIP_MIN(length, PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)); 80283d0: 8146 strh r6, [r0, #10] if (p == NULL) { PBUF_POOL_IS_EMPTY(); return NULL; } p->type = type; p->next = NULL; 80283d2: 6003 str r3, [r0, #0] /* make the payload pointer point 'offset' bytes into pbuf data memory */ p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + (SIZEOF_STRUCT_PBUF + offset))); LWIP_ASSERT("pbuf_alloc: pbuf p->payload properly aligned", ((mem_ptr_t)p->payload % MEM_ALIGNMENT) == 0); /* the total length of the pbuf chain is the requested size */ p->tot_len = length; 80283d4: 8105 strh r5, [r0, #8] ((u8_t*)p->payload + p->len <= (u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED)); LWIP_ASSERT("PBUF_POOL_BUFSIZE must be bigger than MEM_ALIGNMENT", (PBUF_POOL_BUFSIZE_ALIGNED - LWIP_MEM_ALIGN_SIZE(offset)) > 0 ); /* set reference count (needed here in case we fail) */ p->ref = 1; 80283d6: 81c2 strh r2, [r0, #14] /* now allocate the tail of the pbuf chain */ /* remember first pbuf for linkage in next iteration */ r = p; /* remaining length to be allocated */ rem_len = length - p->len; 80283d8: 1bae subs r6, r5, r6 /* any remaining pbufs to be allocated? */ while (rem_len > 0) { 80283da: 4607 mov r7, r0 80283dc: 4698 mov r8, r3 r->next = q; /* set total length of this pbuf and next in chain */ LWIP_ASSERT("rem_len < max_u16_t", rem_len < 0xffff); q->tot_len = (u16_t)rem_len; /* this pbuf length is pool size, unless smaller sized tail */ q->len = LWIP_MIN((u16_t)rem_len, PBUF_POOL_BUFSIZE_ALIGNED); 80283de: f240 6903 movw r9, #1539 ; 0x603 80283e2: f240 6a04 movw sl, #1540 ; 0x604 /* remember first pbuf for linkage in next iteration */ r = p; /* remaining length to be allocated */ rem_len = length - p->len; /* any remaining pbufs to be allocated? */ while (rem_len > 0) { 80283e6: e01c b.n 8028422 q = (struct pbuf *)memp_malloc(MEMP_PBUF_POOL); 80283e8: 200f movs r0, #15 80283ea: f7ff fe55 bl 8028098 if (q == NULL) { 80283ee: 4605 mov r5, r0 80283f0: b918 cbnz r0, 80283fa PBUF_POOL_IS_EMPTY(); /* free chain so far allocated */ pbuf_free(p); 80283f2: 4620 mov r0, r4 80283f4: f7ff ff70 bl 80282d8 80283f8: e03e b.n 8028478 /* bail out unsuccesfully */ return NULL; } q->type = type; 80283fa: 2303 movs r3, #3 /* set total length of this pbuf and next in chain */ LWIP_ASSERT("rem_len < max_u16_t", rem_len < 0xffff); q->tot_len = (u16_t)rem_len; /* this pbuf length is pool size, unless smaller sized tail */ q->len = LWIP_MIN((u16_t)rem_len, PBUF_POOL_BUFSIZE_ALIGNED); q->payload = (void *)((u8_t *)q + SIZEOF_STRUCT_PBUF); 80283fc: f100 0210 add.w r2, r0, #16 /* free chain so far allocated */ pbuf_free(p); /* bail out unsuccesfully */ return NULL; } q->type = type; 8028400: 7303 strb r3, [r0, #12] q->next = NULL; /* make previous pbuf point to this pbuf */ r->next = q; /* set total length of this pbuf and next in chain */ LWIP_ASSERT("rem_len < max_u16_t", rem_len < 0xffff); q->tot_len = (u16_t)rem_len; 8028402: b2b3 uxth r3, r6 8028404: 8103 strh r3, [r0, #8] /* this pbuf length is pool size, unless smaller sized tail */ q->len = LWIP_MIN((u16_t)rem_len, PBUF_POOL_BUFSIZE_ALIGNED); q->payload = (void *)((u8_t *)q + SIZEOF_STRUCT_PBUF); 8028406: 6042 str r2, [r0, #4] r->next = q; /* set total length of this pbuf and next in chain */ LWIP_ASSERT("rem_len < max_u16_t", rem_len < 0xffff); q->tot_len = (u16_t)rem_len; /* this pbuf length is pool size, unless smaller sized tail */ q->len = LWIP_MIN((u16_t)rem_len, PBUF_POOL_BUFSIZE_ALIGNED); 8028408: 454b cmp r3, r9 802840a: bf88 it hi 802840c: 4653 movhi r3, sl LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned", ((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0); LWIP_ASSERT("check p->payload + p->len does not overflow pbuf", ((u8_t*)p->payload + p->len <= (u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED)); q->ref = 1; 802840e: 2201 movs r2, #1 /* bail out unsuccesfully */ return NULL; } q->type = type; q->flags = 0; q->next = NULL; 8028410: f8c0 8000 str.w r8, [r0] pbuf_free(p); /* bail out unsuccesfully */ return NULL; } q->type = type; q->flags = 0; 8028414: f880 800d strb.w r8, [r0, #13] q->next = NULL; /* make previous pbuf point to this pbuf */ r->next = q; 8028418: 6038 str r0, [r7, #0] /* set total length of this pbuf and next in chain */ LWIP_ASSERT("rem_len < max_u16_t", rem_len < 0xffff); q->tot_len = (u16_t)rem_len; /* this pbuf length is pool size, unless smaller sized tail */ q->len = LWIP_MIN((u16_t)rem_len, PBUF_POOL_BUFSIZE_ALIGNED); 802841a: 8143 strh r3, [r0, #10] LWIP_ASSERT("pbuf_alloc: pbuf q->payload properly aligned", ((mem_ptr_t)q->payload % MEM_ALIGNMENT) == 0); LWIP_ASSERT("check p->payload + p->len does not overflow pbuf", ((u8_t*)p->payload + p->len <= (u8_t*)p + SIZEOF_STRUCT_PBUF + PBUF_POOL_BUFSIZE_ALIGNED)); q->ref = 1; 802841c: 81c2 strh r2, [r0, #14] /* calculate remaining length to be allocated */ rem_len -= q->len; 802841e: 1af6 subs r6, r6, r3 8028420: 4607 mov r7, r0 /* remember first pbuf for linkage in next iteration */ r = p; /* remaining length to be allocated */ rem_len = length - p->len; /* any remaining pbufs to be allocated? */ while (rem_len > 0) { 8028422: 2e00 cmp r6, #0 8028424: dce0 bgt.n 80283e8 8028426: e022 b.n 802846e /*r->next = NULL;*/ break; case PBUF_RAM: /* If pbuf is to be allocated in RAM, allocate memory for it. */ p = (struct pbuf*)mem_malloc(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF + offset) + LWIP_MEM_ALIGN_SIZE(length)); 8028428: f106 0013 add.w r0, r6, #19 802842c: 1ceb adds r3, r5, #3 802842e: f023 0303 bic.w r3, r3, #3 8028432: f020 0003 bic.w r0, r0, #3 8028436: 18c0 adds r0, r0, r3 8028438: b280 uxth r0, r0 802843a: f7ff fda3 bl 8027f84 if (p == NULL) { 802843e: 4604 mov r4, r0 8028440: b1d0 cbz r0, 8028478 return NULL; } /* Set up internal structure of the pbuf. */ p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)); 8028442: 1986 adds r6, r0, r6 8028444: 3613 adds r6, #19 p->len = p->tot_len = length; p->next = NULL; 8028446: 2300 movs r3, #0 p = (struct pbuf*)mem_malloc(LWIP_MEM_ALIGN_SIZE(SIZEOF_STRUCT_PBUF + offset) + LWIP_MEM_ALIGN_SIZE(length)); if (p == NULL) { return NULL; } /* Set up internal structure of the pbuf. */ p->payload = LWIP_MEM_ALIGN((void *)((u8_t *)p + SIZEOF_STRUCT_PBUF + offset)); 8028448: f026 0603 bic.w r6, r6, #3 802844c: 6046 str r6, [r0, #4] p->len = p->tot_len = length; 802844e: 8105 strh r5, [r0, #8] 8028450: 8145 strh r5, [r0, #10] p->next = NULL; 8028452: 6003 str r3, [r0, #0] p->type = type; 8028454: 7303 strb r3, [r0, #12] 8028456: e00a b.n 802846e /* pbuf references existing (non-volatile static constant) ROM payload? */ case PBUF_ROM: /* pbuf references existing (externally allocated) RAM payload? */ case PBUF_REF: /* only allocate memory for the pbuf structure */ p = (struct pbuf *)memp_malloc(MEMP_PBUF); 8028458: 200e movs r0, #14 802845a: f7ff fe1d bl 8028098 if (p == NULL) { 802845e: 4604 mov r4, r0 8028460: b150 cbz r0, 8028478 ("pbuf_alloc: Could not allocate MEMP_PBUF for PBUF_%s.\n", (type == PBUF_ROM) ? "ROM" : "REF")); return NULL; } /* caller must set this field properly, afterwards */ p->payload = NULL; 8028462: 2300 movs r3, #0 8028464: 6043 str r3, [r0, #4] p->len = p->tot_len = length; 8028466: 8105 strh r5, [r0, #8] 8028468: 8145 strh r5, [r0, #10] p->next = NULL; 802846a: 6003 str r3, [r0, #0] p->type = type; 802846c: 7307 strb r7, [r0, #12] default: LWIP_ASSERT("pbuf_alloc: erroneous type", 0); return NULL; } /* set reference count */ p->ref = 1; 802846e: 2301 movs r3, #1 8028470: 81e3 strh r3, [r4, #14] /* set flags */ p->flags = 0; 8028472: 2300 movs r3, #0 8028474: 7363 strb r3, [r4, #13] LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p)); return p; 8028476: e000 b.n 802847a p->next = NULL; p->type = type; break; default: LWIP_ASSERT("pbuf_alloc: erroneous type", 0); return NULL; 8028478: 2400 movs r4, #0 p->ref = 1; /* set flags */ p->flags = 0; LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_alloc(length=%"U16_F") == %p\n", length, (void *)p)); return p; } 802847a: 4620 mov r0, r4 802847c: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 08028480 : * @return the number of pbufs in a chain */ u8_t pbuf_clen(struct pbuf *p) { 8028480: 4603 mov r3, r0 u8_t len; len = 0; 8028482: 2000 movs r0, #0 while (p != NULL) { 8028484: e002 b.n 802848c ++len; 8028486: 3001 adds r0, #1 p = p->next; 8028488: 681b ldr r3, [r3, #0] { u8_t len; len = 0; while (p != NULL) { ++len; 802848a: b2c0 uxtb r0, r0 pbuf_clen(struct pbuf *p) { u8_t len; len = 0; while (p != NULL) { 802848c: 2b00 cmp r3, #0 802848e: d1fa bne.n 8028486 ++len; p = p->next; } return len; } 8028490: 4770 bx lr 08028492 : * @param p pbuf to increase reference counter of * */ void pbuf_ref(struct pbuf *p) { 8028492: b510 push {r4, lr} SYS_ARCH_DECL_PROTECT(old_level); /* pbuf given? */ if (p != NULL) { 8028494: 4604 mov r4, r0 8028496: b140 cbz r0, 80284aa SYS_ARCH_PROTECT(old_level); 8028498: f007 fba2 bl 802fbe0 ++(p->ref); 802849c: 89e3 ldrh r3, [r4, #14] 802849e: 3301 adds r3, #1 80284a0: 81e3 strh r3, [r4, #14] SYS_ARCH_UNPROTECT(old_level); } } 80284a2: e8bd 4010 ldmia.w sp!, {r4, lr} SYS_ARCH_DECL_PROTECT(old_level); /* pbuf given? */ if (p != NULL) { SYS_ARCH_PROTECT(old_level); ++(p->ref); SYS_ARCH_UNPROTECT(old_level); 80284a6: f007 bba5 b.w 802fbf4 80284aa: bd10 pop {r4, pc} 080284ac : * @see pbuf_chain() */ void pbuf_cat(struct pbuf *h, struct pbuf *t) { 80284ac: b510 push {r4, lr} struct pbuf *p; LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)", 80284ae: b168 cbz r0, 80284cc 80284b0: b161 cbz r1, 80284cc 80284b2: e003 b.n 80284bc ((h != NULL) && (t != NULL)), return;); /* proceed to last pbuf of chain */ for (p = h; p->next != NULL; p = p->next) { /* add total length of second chain to all totals of first chain */ p->tot_len += t->tot_len; 80284b4: 8904 ldrh r4, [r0, #8] 80284b6: 191b adds r3, r3, r4 80284b8: 8103 strh r3, [r0, #8] LWIP_ERROR("(h != NULL) && (t != NULL) (programmer violates API)", ((h != NULL) && (t != NULL)), return;); /* proceed to last pbuf of chain */ for (p = h; p->next != NULL; p = p->next) { 80284ba: 4610 mov r0, r2 80284bc: 6802 ldr r2, [r0, #0] 80284be: 890b ldrh r3, [r1, #8] 80284c0: 2a00 cmp r2, #0 80284c2: d1f7 bne.n 80284b4 } /* { p is last pbuf of first h chain, p->next == NULL } */ LWIP_ASSERT("p->tot_len == p->len (of last pbuf in chain)", p->tot_len == p->len); LWIP_ASSERT("p->next == NULL", p->next == NULL); /* add total length of second chain to last pbuf total of first chain */ p->tot_len += t->tot_len; 80284c4: 8902 ldrh r2, [r0, #8] /* chain last pbuf of head (p) with first of tail (t) */ p->next = t; 80284c6: 6001 str r1, [r0, #0] } /* { p is last pbuf of first h chain, p->next == NULL } */ LWIP_ASSERT("p->tot_len == p->len (of last pbuf in chain)", p->tot_len == p->len); LWIP_ASSERT("p->next == NULL", p->next == NULL); /* add total length of second chain to last pbuf total of first chain */ p->tot_len += t->tot_len; 80284c8: 189b adds r3, r3, r2 80284ca: 8103 strh r3, [r0, #8] 80284cc: bd10 pop {r4, pc} 080284ce : * The ->ref field of the first pbuf of the tail chain is adjusted. * */ void pbuf_chain(struct pbuf *h, struct pbuf *t) { 80284ce: b510 push {r4, lr} 80284d0: 460c mov r4, r1 pbuf_cat(h, t); 80284d2: f7ff ffeb bl 80284ac /* t is now referenced by h */ pbuf_ref(t); 80284d6: 4620 mov r0, r4 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_chain: %p references %p\n", (void *)h, (void *)t)); } 80284d8: e8bd 4010 ldmia.w sp!, {r4, lr} void pbuf_chain(struct pbuf *h, struct pbuf *t) { pbuf_cat(h, t); /* t is now referenced by h */ pbuf_ref(t); 80284dc: f7ff bfd9 b.w 8028492 080284e0 : * ERR_ARG if one of the pbufs is NULL or p_to is not big * enough to hold p_from */ err_t pbuf_copy(struct pbuf *p_to, struct pbuf *p_from) { 80284e0: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 80284e4: 460c mov r4, r1 LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy(%p, %p)\n", (void*)p_to, (void*)p_from)); /* is the target big enough to hold the source? */ LWIP_ERROR("pbuf_copy: target not big enough to hold source", ((p_to != NULL) && 80284e6: 4605 mov r5, r0 80284e8: b908 cbnz r0, 80284ee 80284ea: 20f2 movs r0, #242 ; 0xf2 80284ec: e03f b.n 802856e 80284ee: 2900 cmp r1, #0 80284f0: d0fb beq.n 80284ea 80284f2: 8902 ldrh r2, [r0, #8] 80284f4: 890b ldrh r3, [r1, #8] 80284f6: 429a cmp r2, r3 80284f8: d3f7 bcc.n 80284ea 80284fa: 2600 movs r6, #0 80284fc: 4637 mov r7, r6 /* iterate through pbuf chain */ do { /* copy one part of the original chain */ if ((p_to->len - offset_to) >= (p_from->len - offset_from)) { 80284fe: f8b4 800a ldrh.w r8, [r4, #10] 8028502: 896b ldrh r3, [r5, #10] len = p_from->len - offset_from; } else { /* current p_from does not fit into current p_to */ len = p_to->len - offset_to; } MEMCPY((u8_t*)p_to->payload + offset_to, (u8_t*)p_from->payload + offset_from, len); 8028504: 6861 ldr r1, [r4, #4] 8028506: 6868 ldr r0, [r5, #4] /* iterate through pbuf chain */ do { /* copy one part of the original chain */ if ((p_to->len - offset_to) >= (p_from->len - offset_from)) { 8028508: ebc6 0808 rsb r8, r6, r8 802850c: 1bdb subs r3, r3, r7 802850e: 4543 cmp r3, r8 /* complete current p_from fits into current p_to */ len = p_from->len - offset_from; } else { /* current p_from does not fit into current p_to */ len = p_to->len - offset_to; 8028510: bfb4 ite lt 8028512: fa1f f883 uxthlt.w r8, r3 do { /* copy one part of the original chain */ if ((p_to->len - offset_to) >= (p_from->len - offset_from)) { /* complete current p_from fits into current p_to */ len = p_from->len - offset_from; 8028516: fa1f f888 uxthge.w r8, r8 } else { /* current p_from does not fit into current p_to */ len = p_to->len - offset_to; } MEMCPY((u8_t*)p_to->payload + offset_to, (u8_t*)p_from->payload + offset_from, len); 802851a: 19c0 adds r0, r0, r7 802851c: 1989 adds r1, r1, r6 802851e: 4642 mov r2, r8 8028520: f7f9 f834 bl 802158c offset_to += len; offset_from += len; 8028524: 4446 add r6, r8 LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len); LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len); if (offset_from >= p_from->len) { 8028526: 8963 ldrh r3, [r4, #10] /* current p_from does not fit into current p_to */ len = p_to->len - offset_to; } MEMCPY((u8_t*)p_to->payload + offset_to, (u8_t*)p_from->payload + offset_from, len); offset_to += len; offset_from += len; 8028528: b2b6 uxth r6, r6 LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len); LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len); if (offset_from >= p_from->len) { 802852a: 42b3 cmp r3, r6 } else { /* current p_from does not fit into current p_to */ len = p_to->len - offset_to; } MEMCPY((u8_t*)p_to->payload + offset_to, (u8_t*)p_from->payload + offset_from, len); offset_to += len; 802852c: 4447 add r7, r8 if (offset_from >= p_from->len) { /* on to next p_from (if any) */ offset_from = 0; p_from = p_from->next; } if (offset_to == p_to->len) { 802852e: 896b ldrh r3, [r5, #10] LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len); LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len); if (offset_from >= p_from->len) { /* on to next p_from (if any) */ offset_from = 0; p_from = p_from->next; 8028530: bf98 it ls 8028532: 6824 ldrls r4, [r4, #0] } else { /* current p_from does not fit into current p_to */ len = p_to->len - offset_to; } MEMCPY((u8_t*)p_to->payload + offset_to, (u8_t*)p_from->payload + offset_from, len); offset_to += len; 8028534: b2bf uxth r7, r7 offset_from += len; LWIP_ASSERT("offset_to <= p_to->len", offset_to <= p_to->len); LWIP_ASSERT("offset_from <= p_from->len", offset_from <= p_from->len); if (offset_from >= p_from->len) { /* on to next p_from (if any) */ offset_from = 0; 8028536: bf98 it ls 8028538: 2600 movls r6, #0 p_from = p_from->next; } if (offset_to == p_to->len) { 802853a: 42bb cmp r3, r7 802853c: d105 bne.n 802854a /* on to next p_to (if any) */ offset_to = 0; p_to = p_to->next; 802853e: 682d ldr r5, [r5, #0] LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL) , return ERR_ARG;); 8028540: b915 cbnz r5, 8028548 8028542: 2c00 cmp r4, #0 8028544: d1d1 bne.n 80284ea 8028546: e00f b.n 8028568 offset_from = 0; p_from = p_from->next; } if (offset_to == p_to->len) { /* on to next p_to (if any) */ offset_to = 0; 8028548: 2700 movs r7, #0 p_to = p_to->next; LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL) , return ERR_ARG;); } if((p_from != NULL) && (p_from->len == p_from->tot_len)) { 802854a: b12c cbz r4, 8028558 802854c: 8962 ldrh r2, [r4, #10] 802854e: 8923 ldrh r3, [r4, #8] 8028550: 429a cmp r2, r3 8028552: d101 bne.n 8028558 /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!\n", 8028554: 6823 ldr r3, [r4, #0] 8028556: b94b cbnz r3, 802856c (p_from->next == NULL), return ERR_VAL;); } if((p_to != NULL) && (p_to->len == p_to->tot_len)) { 8028558: 896a ldrh r2, [r5, #10] 802855a: 892b ldrh r3, [r5, #8] 802855c: 429a cmp r2, r3 802855e: d101 bne.n 8028564 /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!\n", 8028560: 682b ldr r3, [r5, #0] 8028562: b91b cbnz r3, 802856c (p_to->next == NULL), return ERR_VAL;); } } while (p_from); 8028564: 2c00 cmp r4, #0 8028566: d1ca bne.n 80284fe LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n")); return ERR_OK; 8028568: 4620 mov r0, r4 802856a: e000 b.n 802856e LWIP_ERROR("p_to != NULL", (p_to != NULL) || (p_from == NULL) , return ERR_ARG;); } if((p_from != NULL) && (p_from->len == p_from->tot_len)) { /* don't copy more than one packet! */ LWIP_ERROR("pbuf_copy() does not allow packet queues!\n", 802856c: 20fa movs r0, #250 ; 0xfa (p_to->next == NULL), return ERR_VAL;); } } while (p_from); LWIP_DEBUGF(PBUF_DEBUG | LWIP_DBG_TRACE, ("pbuf_copy: end of chain reached.\n")); return ERR_OK; } 802856e: b240 sxtb r0, r0 8028570: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 08028574 : * @param offset offset into the packet buffer from where to begin copying len bytes * @return the number of bytes copied, or 0 on failure */ u16_t pbuf_copy_partial(struct pbuf *buf, void *dataptr, u16_t len, u16_t offset) { 8028574: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 8028578: 4688 mov r8, r1 802857a: 4616 mov r6, r2 struct pbuf *p; u16_t left; u16_t buf_copy_len; u16_t copied_total = 0; LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;); 802857c: b328 cbz r0, 80285ca LWIP_ERROR("pbuf_copy_partial: invalid dataptr", (dataptr != NULL), return 0;); 802857e: b331 cbz r1, 80285ce 8028580: 2400 movs r4, #0 8028582: 4605 mov r5, r0 8028584: 46a1 mov r9, r4 8028586: e01c b.n 80285c2 return 0; } /* Note some systems use byte copy if dataptr or one of the pbuf payload pointers are unaligned. */ for(p = buf; len != 0 && p != NULL; p = p->next) { if ((offset != 0) && (offset >= p->len)) { 8028588: b12b cbz r3, 8028596 802858a: 896a ldrh r2, [r5, #10] 802858c: 4293 cmp r3, r2 802858e: d302 bcc.n 8028596 /* don't copy from this buffer -> on to the next */ offset -= p->len; 8028590: 1a9b subs r3, r3, r2 8028592: b29b uxth r3, r3 8028594: e014 b.n 80285c0 } else { /* copy from this buffer. maybe only partially. */ buf_copy_len = p->len - offset; 8028596: 896f ldrh r7, [r5, #10] if (buf_copy_len > len) buf_copy_len = len; /* copy the necessary parts of the buffer */ MEMCPY(&((char*)dataptr)[left], &((char*)p->payload)[offset], buf_copy_len); 8028598: 6869 ldr r1, [r5, #4] if ((offset != 0) && (offset >= p->len)) { /* don't copy from this buffer -> on to the next */ offset -= p->len; } else { /* copy from this buffer. maybe only partially. */ buf_copy_len = p->len - offset; 802859a: 1aff subs r7, r7, r3 802859c: b2bf uxth r7, r7 802859e: 42b7 cmp r7, r6 80285a0: bf28 it cs 80285a2: 4637 movcs r7, r6 if (buf_copy_len > len) buf_copy_len = len; /* copy the necessary parts of the buffer */ MEMCPY(&((char*)dataptr)[left], &((char*)p->payload)[offset], buf_copy_len); 80285a4: eb08 0009 add.w r0, r8, r9 80285a8: 18c9 adds r1, r1, r3 80285aa: 463a mov r2, r7 copied_total += buf_copy_len; 80285ac: 193c adds r4, r7, r4 left += buf_copy_len; 80285ae: 44b9 add r9, r7 len -= buf_copy_len; 80285b0: 1bf6 subs r6, r6, r7 /* copy from this buffer. maybe only partially. */ buf_copy_len = p->len - offset; if (buf_copy_len > len) buf_copy_len = len; /* copy the necessary parts of the buffer */ MEMCPY(&((char*)dataptr)[left], &((char*)p->payload)[offset], buf_copy_len); 80285b2: f7f8 ffeb bl 802158c copied_total += buf_copy_len; 80285b6: b2a4 uxth r4, r4 left += buf_copy_len; 80285b8: fa1f f989 uxth.w r9, r9 len -= buf_copy_len; 80285bc: b2b6 uxth r6, r6 offset = 0; 80285be: 2300 movs r3, #0 if((buf == NULL) || (dataptr == NULL)) { return 0; } /* Note some systems use byte copy if dataptr or one of the pbuf payload pointers are unaligned. */ for(p = buf; len != 0 && p != NULL; p = p->next) { 80285c0: 682d ldr r5, [r5, #0] 80285c2: b12e cbz r6, 80285d0 80285c4: 2d00 cmp r5, #0 80285c6: d1df bne.n 8028588 80285c8: e002 b.n 80285d0 struct pbuf *p; u16_t left; u16_t buf_copy_len; u16_t copied_total = 0; LWIP_ERROR("pbuf_copy_partial: invalid buf", (buf != NULL), return 0;); 80285ca: 4604 mov r4, r0 80285cc: e000 b.n 80285d0 80285ce: 460c mov r4, r1 len -= buf_copy_len; offset = 0; } } return copied_total; } 80285d0: 4620 mov r0, r4 80285d2: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 80285d6: 0000 movs r0, r0 080285d8 : * caller). * */ u8_t raw_input(struct pbuf *p, struct netif *inp) { 80285d8: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} u8_t eaten = 0; LWIP_UNUSED_ARG(inp); iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); 80285dc: 6843 ldr r3, [r0, #4] /* loop through all raw pcbs until the packet is eaten by one */ /* this allows multiple pcbs to match against the packet by design */ while ((eaten == 0) && (pcb != NULL)) { if ((pcb->protocol == proto) && (ip_addr_isany(&pcb->local_ip) || ip_addr_cmp(&(pcb->local_ip), ¤t_iphdr_dest))) { 80285de: f8df a074 ldr.w sl, [pc, #116] ; 8028654 u8_t eaten = 0; LWIP_UNUSED_ARG(inp); iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); 80285e2: f893 9009 ldrb.w r9, [r3, #9] prev = NULL; pcb = raw_pcbs; 80285e6: 4b19 ldr r3, [pc, #100] ; (802864c ) * caller). * */ u8_t raw_input(struct pbuf *p, struct netif *inp) { 80285e8: 4606 mov r6, r0 iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); prev = NULL; pcb = raw_pcbs; 80285ea: 681c ldr r4, [r3, #0] LWIP_UNUSED_ARG(inp); iphdr = (struct ip_hdr *)p->payload; proto = IPH_PROTO(iphdr); prev = NULL; 80285ec: 2500 movs r5, #0 eaten = 1; if (prev != NULL) { /* move the pcb to the front of raw_pcbs so that is found faster next time */ prev->next = pcb->next; pcb->next = raw_pcbs; 80285ee: 4698 mov r8, r3 80285f0: e023 b.n 802863a prev = NULL; pcb = raw_pcbs; /* loop through all raw pcbs until the packet is eaten by one */ /* this allows multiple pcbs to match against the packet by design */ while ((eaten == 0) && (pcb != NULL)) { if ((pcb->protocol == proto) && 80285f2: 7c23 ldrb r3, [r4, #16] 80285f4: 454b cmp r3, r9 80285f6: d118 bne.n 802862a (ip_addr_isany(&pcb->local_ip) || 80285f8: 6823 ldr r3, [r4, #0] 80285fa: b11b cbz r3, 8028604 80285fc: f8da 2000 ldr.w r2, [sl] 8028600: 4293 cmp r3, r2 8028602: d112 bne.n 802862a /* broadcast filter? */ if (ip_get_option(pcb, SOF_BROADCAST) || !ip_addr_isbroadcast(¤t_iphdr_dest, inp)) #endif /* IP_SOF_BROADCAST_RECV */ { /* receive callback function available? */ if (pcb->recv != NULL) { 8028604: 6967 ldr r7, [r4, #20] 8028606: b187 cbz r7, 802862a /* the receive callback function did not eat the packet? */ if (pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr()) != 0) { 8028608: 69a0 ldr r0, [r4, #24] 802860a: 4b11 ldr r3, [pc, #68] ; (8028650 ) 802860c: 4621 mov r1, r4 802860e: 4632 mov r2, r6 8028610: 47b8 blx r7 8028612: b150 cbz r0, 802862a /* receive function ate the packet */ p = NULL; eaten = 1; if (prev != NULL) { 8028614: b15d cbz r5, 802862e /* move the pcb to the front of raw_pcbs so that is found faster next time */ prev->next = pcb->next; 8028616: 68e3 ldr r3, [r4, #12] 8028618: 60eb str r3, [r5, #12] pcb->next = raw_pcbs; 802861a: f8d8 3000 ldr.w r3, [r8] raw_pcbs = pcb; 802861e: f8c8 4000 str.w r4, [r8] eaten = 1; if (prev != NULL) { /* move the pcb to the front of raw_pcbs so that is found faster next time */ prev->next = pcb->next; pcb->next = raw_pcbs; 8028622: 60e3 str r3, [r4, #12] /* receive callback function available? */ if (pcb->recv != NULL) { /* the receive callback function did not eat the packet? */ if (pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr()) != 0) { /* receive function ate the packet */ p = NULL; 8028624: 2600 movs r6, #0 eaten = 1; 8028626: 2301 movs r3, #1 8028628: e003 b.n 8028632 pcb = raw_pcbs; /* loop through all raw pcbs until the packet is eaten by one */ /* this allows multiple pcbs to match against the packet by design */ while ((eaten == 0) && (pcb != NULL)) { if ((pcb->protocol == proto) && (ip_addr_isany(&pcb->local_ip) || 802862a: 2300 movs r3, #0 802862c: e001 b.n 8028632 if (pcb->recv != NULL) { /* the receive callback function did not eat the packet? */ if (pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr()) != 0) { /* receive function ate the packet */ p = NULL; eaten = 1; 802862e: 2301 movs r3, #1 /* receive callback function available? */ if (pcb->recv != NULL) { /* the receive callback function did not eat the packet? */ if (pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr()) != 0) { /* receive function ate the packet */ p = NULL; 8028630: 462e mov r6, r5 /* no receive callback function was set for this raw PCB */ } /* drop the packet */ } prev = pcb; pcb = pcb->next; 8028632: 68e2 ldr r2, [r4, #12] 8028634: 4625 mov r5, r4 prev = NULL; pcb = raw_pcbs; /* loop through all raw pcbs until the packet is eaten by one */ /* this allows multiple pcbs to match against the packet by design */ while ((eaten == 0) && (pcb != NULL)) { 8028636: b92b cbnz r3, 8028644 /* no receive callback function was set for this raw PCB */ } /* drop the packet */ } prev = pcb; pcb = pcb->next; 8028638: 4614 mov r4, r2 prev = NULL; pcb = raw_pcbs; /* loop through all raw pcbs until the packet is eaten by one */ /* this allows multiple pcbs to match against the packet by design */ while ((eaten == 0) && (pcb != NULL)) { 802863a: 2c00 cmp r4, #0 802863c: d1d9 bne.n 80285f2 802863e: 4620 mov r0, r4 8028640: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 8028644: 2001 movs r0, #1 } prev = pcb; pcb = pcb->next; } return eaten; } 8028646: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802864a: bf00 nop 802864c: 2000db54 .word 0x2000db54 8028650: 200104e4 .word 0x200104e4 8028654: 200104ec .word 0x200104ec 08028658 : LWIP_UNUSED_ARG(arg); LWIP_UNUSED_ARG(pcb); LWIP_UNUSED_ARG(err); return ERR_ABRT; } 8028658: f06f 0009 mvn.w r0, #9 802865c: 4770 bx lr 802865e: 0000 movs r0, r0 08028660 : * * @return a new (free) local TCP port number */ static u16_t tcp_new_port(void) { 8028660: 4b13 ldr r3, [pc, #76] ; (80286b0 ) 8028662: b570 push {r4, r5, r6, lr} 8028664: 8818 ldrh r0, [r3, #0] if (tcp_port++ == TCP_LOCAL_PORT_RANGE_END) { tcp_port = TCP_LOCAL_PORT_RANGE_START; } /* Check all PCB lists. */ for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { for(pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { 8028666: 4d13 ldr r5, [pc, #76] ; (80286b4 ) * * @return a new (free) local TCP port number */ static u16_t tcp_new_port(void) { 8028668: f44f 4280 mov.w r2, #16384 ; 0x4000 u8_t i; u16_t n = 0; struct tcp_pcb *pcb; again: if (tcp_port++ == TCP_LOCAL_PORT_RANGE_END) { 802866c: f64f 74ff movw r4, #65535 ; 0xffff 8028670: 42a0 cmp r0, r4 8028672: d002 beq.n 802867a 8028674: 3001 adds r0, #1 8028676: b280 uxth r0, r0 8028678: e001 b.n 802867e tcp_port = TCP_LOCAL_PORT_RANGE_START; 802867a: f44f 4040 mov.w r0, #49152 ; 0xc000 802867e: 2300 movs r3, #0 } /* Check all PCB lists. */ for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { for(pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { 8028680: 5959 ldr r1, [r3, r5] 8028682: 6809 ldr r1, [r1, #0] 8028684: e00b b.n 802869e if (pcb->local_port == tcp_port) { 8028686: 8b4e ldrh r6, [r1, #26] 8028688: 4286 cmp r6, r0 802868a: d107 bne.n 802869c 802868c: 3a01 subs r2, #1 802868e: b292 uxth r2, r2 if (++n > (TCP_LOCAL_PORT_RANGE_END - TCP_LOCAL_PORT_RANGE_START)) { 8028690: 2a00 cmp r2, #0 8028692: d1ed bne.n 8028670 8028694: 4b06 ldr r3, [pc, #24] ; (80286b0 ) 8028696: 8018 strh r0, [r3, #0] return 0; 8028698: 4610 mov r0, r2 802869a: bd70 pop {r4, r5, r6, pc} if (tcp_port++ == TCP_LOCAL_PORT_RANGE_END) { tcp_port = TCP_LOCAL_PORT_RANGE_START; } /* Check all PCB lists. */ for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { for(pcb = *tcp_pcb_lists[i]; pcb != NULL; pcb = pcb->next) { 802869c: 68c9 ldr r1, [r1, #12] 802869e: 2900 cmp r1, #0 80286a0: d1f1 bne.n 8028686 80286a2: 3304 adds r3, #4 again: if (tcp_port++ == TCP_LOCAL_PORT_RANGE_END) { tcp_port = TCP_LOCAL_PORT_RANGE_START; } /* Check all PCB lists. */ for (i = 0; i < NUM_TCP_PCB_LISTS; i++) { 80286a4: 2b10 cmp r3, #16 80286a6: d1eb bne.n 8028680 80286a8: 4b01 ldr r3, [pc, #4] ; (80286b0 ) 80286aa: 8018 strh r0, [r3, #0] goto again; } } } return tcp_port; } 80286ac: bd70 pop {r4, r5, r6, pc} 80286ae: bf00 nop 80286b0: 20001108 .word 0x20001108 80286b4: 08037aa4 .word 0x08037aa4 080286b8 : /** * Initialize this module. */ void tcp_init(void) { 80286b8: 4770 bx lr 80286ba: 0000 movs r0, r0 080286bc : * ERR_VAL if bind failed because the PCB is not in a valid state * ERR_OK if bound */ err_t tcp_bind(struct tcp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 80286bc: b5f8 push {r3, r4, r5, r6, r7, lr} int i; int max_pcb_list = NUM_TCP_PCB_LISTS; struct tcp_pcb *cpcb; LWIP_ERROR("tcp_bind: can only bind in state CLOSED", pcb->state == CLOSED, return ERR_VAL); 80286be: 7e03 ldrb r3, [r0, #24] * ERR_VAL if bind failed because the PCB is not in a valid state * ERR_OK if bound */ err_t tcp_bind(struct tcp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 80286c0: 4604 mov r4, r0 80286c2: 460d mov r5, r1 int i; int max_pcb_list = NUM_TCP_PCB_LISTS; struct tcp_pcb *cpcb; LWIP_ERROR("tcp_bind: can only bind in state CLOSED", pcb->state == CLOSED, return ERR_VAL); 80286c4: bb33 cbnz r3, 8028714 if (ip_get_option(pcb, SOF_REUSEADDR)) { max_pcb_list = NUM_TCP_PCB_LISTS_NO_TIME_WAIT; } #endif /* SO_REUSE */ if (port == 0) { 80286c6: b91a cbnz r2, 80286d0 port = tcp_new_port(); 80286c8: f7ff ffca bl 8028660 if (port == 0) { 80286cc: 4602 mov r2, r0 80286ce: b318 cbz r0, 8028718 } } /* Check if the address already is in use (on all lists) */ for (i = 0; i < max_pcb_list; i++) { for(cpcb = *tcp_pcb_lists[i]; cpcb != NULL; cpcb = cpcb->next) { 80286d0: 4f14 ldr r7, [pc, #80] ; (8028724 ) * ERR_VAL if bind failed because the PCB is not in a valid state * ERR_OK if bound */ err_t tcp_bind(struct tcp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 80286d2: 2100 movs r1, #0 } } /* Check if the address already is in use (on all lists) */ for (i = 0; i < max_pcb_list; i++) { for(cpcb = *tcp_pcb_lists[i]; cpcb != NULL; cpcb = cpcb->next) { 80286d4: 59cb ldr r3, [r1, r7] 80286d6: 681b ldr r3, [r3, #0] 80286d8: e00a b.n 80286f0 if (cpcb->local_port == port) { 80286da: 8b58 ldrh r0, [r3, #26] 80286dc: 4290 cmp r0, r2 80286de: d106 bne.n 80286ee tcp_connect. */ if (!ip_get_option(pcb, SOF_REUSEADDR) || !ip_get_option(cpcb, SOF_REUSEADDR)) #endif /* SO_REUSE */ { if (ip_addr_isany(&(cpcb->local_ip)) || 80286e0: 681e ldr r6, [r3, #0] 80286e2: b1de cbz r6, 802871c 80286e4: b1d5 cbz r5, 802871c ip_addr_isany(ipaddr) || 80286e6: 6828 ldr r0, [r5, #0] 80286e8: b1c0 cbz r0, 802871c 80286ea: 4286 cmp r6, r0 80286ec: d016 beq.n 802871c } } /* Check if the address already is in use (on all lists) */ for (i = 0; i < max_pcb_list; i++) { for(cpcb = *tcp_pcb_lists[i]; cpcb != NULL; cpcb = cpcb->next) { 80286ee: 68db ldr r3, [r3, #12] 80286f0: 2b00 cmp r3, #0 80286f2: d1f2 bne.n 80286da 80286f4: 3104 adds r1, #4 return ERR_BUF; } } /* Check if the address already is in use (on all lists) */ for (i = 0; i < max_pcb_list; i++) { 80286f6: 2910 cmp r1, #16 80286f8: d1ec bne.n 80286d4 } } } } if (!ip_addr_isany(ipaddr)) { 80286fa: b115 cbz r5, 8028702 80286fc: 682b ldr r3, [r5, #0] 80286fe: b103 cbz r3, 8028702 pcb->local_ip = *ipaddr; 8028700: 6023 str r3, [r4, #0] } pcb->local_port = port; TCP_REG(&tcp_bound_pcbs, pcb); 8028702: 4b09 ldr r3, [pc, #36] ; (8028728 ) } if (!ip_addr_isany(ipaddr)) { pcb->local_ip = *ipaddr; } pcb->local_port = port; 8028704: 8362 strh r2, [r4, #26] TCP_REG(&tcp_bound_pcbs, pcb); 8028706: 681a ldr r2, [r3, #0] 8028708: 601c str r4, [r3, #0] 802870a: 60e2 str r2, [r4, #12] 802870c: f002 f8de bl 802a8cc LWIP_DEBUGF(TCP_DEBUG, ("tcp_bind: bind to port %"U16_F"\n", port)); return ERR_OK; 8028710: 2000 movs r0, #0 8028712: e004 b.n 802871e { int i; int max_pcb_list = NUM_TCP_PCB_LISTS; struct tcp_pcb *cpcb; LWIP_ERROR("tcp_bind: can only bind in state CLOSED", pcb->state == CLOSED, return ERR_VAL); 8028714: 20fa movs r0, #250 ; 0xfa 8028716: e002 b.n 802871e #endif /* SO_REUSE */ if (port == 0) { port = tcp_new_port(); if (port == 0) { return ERR_BUF; 8028718: 20fe movs r0, #254 ; 0xfe 802871a: e000 b.n 802871e #endif /* SO_REUSE */ { if (ip_addr_isany(&(cpcb->local_ip)) || ip_addr_isany(ipaddr) || ip_addr_cmp(&(cpcb->local_ip), ipaddr)) { return ERR_USE; 802871c: 20f8 movs r0, #248 ; 0xf8 } pcb->local_port = port; TCP_REG(&tcp_bound_pcbs, pcb); LWIP_DEBUGF(TCP_DEBUG, ("tcp_bind: bind to port %"U16_F"\n", port)); return ERR_OK; } 802871e: b240 sxtb r0, r0 8028720: bdf8 pop {r3, r4, r5, r6, r7, pc} 8028722: bf00 nop 8028724: 08037aa4 .word 0x08037aa4 8028728: 200104d4 .word 0x200104d4 0802872c : * called like this: * tpcb = tcp_listen(tpcb); */ struct tcp_pcb * tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog) { 802872c: b538 push {r3, r4, r5, lr} struct tcp_pcb_listen *lpcb; LWIP_UNUSED_ARG(backlog); LWIP_ERROR("tcp_listen: pcb already connected", pcb->state == CLOSED, return NULL); 802872e: 7e03 ldrb r3, [r0, #24] * called like this: * tpcb = tcp_listen(tpcb); */ struct tcp_pcb * tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog) { 8028730: 4604 mov r4, r0 struct tcp_pcb_listen *lpcb; LWIP_UNUSED_ARG(backlog); LWIP_ERROR("tcp_listen: pcb already connected", pcb->state == CLOSED, return NULL); 8028732: b10b cbz r3, 8028738 8028734: 2000 movs r0, #0 8028736: bd38 pop {r3, r4, r5, pc} } } } } #endif /* SO_REUSE */ lpcb = (struct tcp_pcb_listen *)memp_malloc(MEMP_TCP_PCB_LISTEN); 8028738: 2003 movs r0, #3 802873a: f7ff fcad bl 8028098 if (lpcb == NULL) { 802873e: 4605 mov r5, r0 8028740: 2800 cmp r0, #0 8028742: d0f7 beq.n 8028734 return NULL; } lpcb->callback_arg = pcb->callback_arg; 8028744: 6923 ldr r3, [r4, #16] 8028746: 6103 str r3, [r0, #16] lpcb->local_port = pcb->local_port; 8028748: 8b63 ldrh r3, [r4, #26] 802874a: 8343 strh r3, [r0, #26] lpcb->state = LISTEN; 802874c: 2301 movs r3, #1 802874e: 7603 strb r3, [r0, #24] lpcb->prio = pcb->prio; 8028750: 7e63 ldrb r3, [r4, #25] 8028752: 7643 strb r3, [r0, #25] lpcb->so_options = pcb->so_options; ip_set_option(lpcb, SOF_ACCEPTCONN); 8028754: 7a23 ldrb r3, [r4, #8] 8028756: f043 0302 orr.w r3, r3, #2 802875a: 7203 strb r3, [r0, #8] lpcb->ttl = pcb->ttl; 802875c: 7aa3 ldrb r3, [r4, #10] 802875e: 7283 strb r3, [r0, #10] lpcb->tos = pcb->tos; 8028760: 7a63 ldrb r3, [r4, #9] 8028762: 7243 strb r3, [r0, #9] ip_addr_copy(lpcb->local_ip, pcb->local_ip); 8028764: 6823 ldr r3, [r4, #0] 8028766: 6003 str r3, [r0, #0] if (pcb->local_port != 0) { 8028768: 8b63 ldrh r3, [r4, #26] 802876a: b1ab cbz r3, 8028798 TCP_RMV(&tcp_bound_pcbs, pcb); 802876c: 4a11 ldr r2, [pc, #68] ; (80287b4 ) 802876e: 6813 ldr r3, [r2, #0] 8028770: 42a3 cmp r3, r4 8028772: d101 bne.n 8028778 8028774: 68e3 ldr r3, [r4, #12] 8028776: e00c b.n 8028792 8028778: 4a0f ldr r2, [pc, #60] ; (80287b8 ) 802877a: 6013 str r3, [r2, #0] 802877c: e007 b.n 802878e 802877e: 68d9 ldr r1, [r3, #12] 8028780: 42a1 cmp r1, r4 8028782: d103 bne.n 802878c 8028784: 6013 str r3, [r2, #0] 8028786: 68e2 ldr r2, [r4, #12] 8028788: 60da str r2, [r3, #12] 802878a: e003 b.n 8028794 802878c: 460b mov r3, r1 802878e: 2b00 cmp r3, #0 8028790: d1f5 bne.n 802877e 8028792: 6013 str r3, [r2, #0] 8028794: 2300 movs r3, #0 8028796: 60e3 str r3, [r4, #12] } memp_free(MEMP_TCP_PCB, pcb); 8028798: 2002 movs r0, #2 802879a: 4621 mov r1, r4 802879c: f7ff fc92 bl 80280c4 #if LWIP_CALLBACK_API lpcb->accept = tcp_accept_null; 80287a0: 4b06 ldr r3, [pc, #24] ; (80287bc ) 80287a2: 616b str r3, [r5, #20] #endif /* LWIP_CALLBACK_API */ #if TCP_LISTEN_BACKLOG lpcb->accepts_pending = 0; lpcb->backlog = (backlog ? backlog : 1); #endif /* TCP_LISTEN_BACKLOG */ TCP_REG(&tcp_listen_pcbs.pcbs, (struct tcp_pcb *)lpcb); 80287a4: 4b06 ldr r3, [pc, #24] ; (80287c0 ) 80287a6: 681a ldr r2, [r3, #0] 80287a8: 601d str r5, [r3, #0] 80287aa: 60ea str r2, [r5, #12] 80287ac: f002 f88e bl 802a8cc return (struct tcp_pcb *)lpcb; 80287b0: 4628 mov r0, r5 } 80287b2: bd38 pop {r3, r4, r5, pc} 80287b4: 200104d4 .word 0x200104d4 80287b8: 200104d0 .word 0x200104d0 80287bc: 08028659 .word 0x08028659 80287c0: 200104cc .word 0x200104cc 080287c4 : * * Returns how much extra window would be advertised if we sent an * update now. */ u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) { 80287c4: b530 push {r4, r5, lr} u32_t new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { 80287c6: 6b01 ldr r1, [r0, #48] ; 0x30 * Returns how much extra window would be advertised if we sent an * update now. */ u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) { u32_t new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; 80287c8: 8d84 ldrh r4, [r0, #44] ; 0x2c if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { 80287ca: 8ec5 ldrh r5, [r0, #54] ; 0x36 * Returns how much extra window would be advertised if we sent an * update now. */ u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) { u32_t new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; 80287cc: 6a82 ldr r2, [r0, #40] ; 0x28 * * Returns how much extra window would be advertised if we sent an * update now. */ u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) { 80287ce: 4603 mov r3, r0 u32_t new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { 80287d0: f640 3068 movw r0, #2920 ; 0xb68 80287d4: 4285 cmp r5, r0 80287d6: bf28 it cs 80287d8: 4605 movcs r5, r0 * Returns how much extra window would be advertised if we sent an * update now. */ u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) { u32_t new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; 80287da: 1a60 subs r0, r4, r1 if (TCP_SEQ_GEQ(new_right_edge, pcb->rcv_ann_right_edge + LWIP_MIN((TCP_WND / 2), pcb->mss))) { 80287dc: 1880 adds r0, r0, r2 80287de: 1b45 subs r5, r0, r5 80287e0: 2d00 cmp r5, #0 80287e2: db01 blt.n 80287e8 /* we can advertise more window */ pcb->rcv_ann_wnd = pcb->rcv_wnd; 80287e4: 85dc strh r4, [r3, #46] ; 0x2e return new_right_edge - pcb->rcv_ann_right_edge; 80287e6: bd30 pop {r4, r5, pc} } else { if (TCP_SEQ_GT(pcb->rcv_nxt, pcb->rcv_ann_right_edge)) { 80287e8: 1a50 subs r0, r2, r1 80287ea: 2800 cmp r0, #0 80287ec: f04f 0000 mov.w r0, #0 80287f0: dd01 ble.n 80287f6 /* Can happen due to other end sending out of advertised window, * but within actual available (but not yet advertised) window */ pcb->rcv_ann_wnd = 0; 80287f2: 85d8 strh r0, [r3, #46] ; 0x2e 80287f4: bd30 pop {r4, r5, pc} } else { /* keep the right edge of window constant */ u32_t new_rcv_ann_wnd = pcb->rcv_ann_right_edge - pcb->rcv_nxt; 80287f6: 1a8a subs r2, r1, r2 LWIP_ASSERT("new_rcv_ann_wnd <= 0xffff", new_rcv_ann_wnd <= 0xffff); pcb->rcv_ann_wnd = (u16_t)new_rcv_ann_wnd; 80287f8: 85da strh r2, [r3, #46] ; 0x2e } return 0; } } 80287fa: bd30 pop {r4, r5, pc} 080287fc : LWIP_ASSERT("don't call tcp_recved for listen-pcbs", pcb->state != LISTEN); LWIP_ASSERT("tcp_recved: len would wrap rcv_wnd\n", len <= 0xffff - pcb->rcv_wnd ); pcb->rcv_wnd += len; 80287fc: 8d83 ldrh r3, [r0, #44] ; 0x2c 80287fe: 18c9 adds r1, r1, r3 8028800: b289 uxth r1, r1 if (pcb->rcv_wnd > TCP_WND) { 8028802: f241 63d0 movw r3, #5840 ; 0x16d0 8028806: 4299 cmp r1, r3 * @param pcb the tcp_pcb for which data is read * @param len the amount of bytes that have been read by the application */ void tcp_recved(struct tcp_pcb *pcb, u16_t len) { 8028808: b510 push {r4, lr} LWIP_ASSERT("tcp_recved: len would wrap rcv_wnd\n", len <= 0xffff - pcb->rcv_wnd ); pcb->rcv_wnd += len; if (pcb->rcv_wnd > TCP_WND) { pcb->rcv_wnd = TCP_WND; 802880a: bf8c ite hi 802880c: 8583 strhhi r3, [r0, #44] ; 0x2c LWIP_ASSERT("don't call tcp_recved for listen-pcbs", pcb->state != LISTEN); LWIP_ASSERT("tcp_recved: len would wrap rcv_wnd\n", len <= 0xffff - pcb->rcv_wnd ); pcb->rcv_wnd += len; 802880e: 8581 strhls r1, [r0, #44] ; 0x2c * @param pcb the tcp_pcb for which data is read * @param len the amount of bytes that have been read by the application */ void tcp_recved(struct tcp_pcb *pcb, u16_t len) { 8028810: 4604 mov r4, r0 pcb->rcv_wnd += len; if (pcb->rcv_wnd > TCP_WND) { pcb->rcv_wnd = TCP_WND; } wnd_inflation = tcp_update_rcv_ann_wnd(pcb); 8028812: f7ff ffd7 bl 80287c4 /* If the change in the right edge of window is significant (default * watermark is TCP_WND/4), then send an explicit update now. * Otherwise wait for a packet to be sent in the normal course of * events (or more window to be available later) */ if (wnd_inflation >= TCP_WND_UPDATE_THRESHOLD) { 8028816: f240 53b3 movw r3, #1459 ; 0x5b3 802881a: 4298 cmp r0, r3 802881c: dd08 ble.n 8028830 tcp_ack_now(pcb); 802881e: 7fa3 ldrb r3, [r4, #30] tcp_output(pcb); 8028820: 4620 mov r0, r4 /* If the change in the right edge of window is significant (default * watermark is TCP_WND/4), then send an explicit update now. * Otherwise wait for a packet to be sent in the normal course of * events (or more window to be available later) */ if (wnd_inflation >= TCP_WND_UPDATE_THRESHOLD) { tcp_ack_now(pcb); 8028822: f043 0302 orr.w r3, r3, #2 8028826: 77a3 strb r3, [r4, #30] tcp_output(pcb); } LWIP_DEBUGF(TCP_DEBUG, ("tcp_recved: recveived %"U16_F" bytes, wnd %"U16_F" (%"U16_F").\n", len, pcb->rcv_wnd, TCP_WND - pcb->rcv_wnd)); } 8028828: e8bd 4010 ldmia.w sp!, {r4, lr} * watermark is TCP_WND/4), then send an explicit update now. * Otherwise wait for a packet to be sent in the normal course of * events (or more window to be available later) */ if (wnd_inflation >= TCP_WND_UPDATE_THRESHOLD) { tcp_ack_now(pcb); tcp_output(pcb); 802882c: f001 bd90 b.w 802a350 8028830: bd10 pop {r4, pc} 08028832 : * * @param seg single tcp_seg to free */ void tcp_seg_free(struct tcp_seg *seg) { 8028832: b510 push {r4, lr} if (seg != NULL) { 8028834: 4604 mov r4, r0 8028836: b148 cbz r0, 802884c if (seg->p != NULL) { 8028838: 6840 ldr r0, [r0, #4] 802883a: b108 cbz r0, 8028840 pbuf_free(seg->p); 802883c: f7ff fd4c bl 80282d8 #if TCP_DEBUG seg->p = NULL; #endif /* TCP_DEBUG */ } memp_free(MEMP_TCP_SEG, seg); 8028840: 2004 movs r0, #4 8028842: 4621 mov r1, r4 } } 8028844: e8bd 4010 ldmia.w sp!, {r4, lr} pbuf_free(seg->p); #if TCP_DEBUG seg->p = NULL; #endif /* TCP_DEBUG */ } memp_free(MEMP_TCP_SEG, seg); 8028848: f7ff bc3c b.w 80280c4 802884c: bd10 pop {r4, pc} 0802884e : * * @param seg tcp_seg list of TCP segments to free */ void tcp_segs_free(struct tcp_seg *seg) { 802884e: b510 push {r4, lr} while (seg != NULL) { 8028850: e003 b.n 802885a struct tcp_seg *next = seg->next; 8028852: 6804 ldr r4, [r0, #0] tcp_seg_free(seg); 8028854: f7ff ffed bl 8028832 seg = next; 8028858: 4620 mov r0, r4 * @param seg tcp_seg list of TCP segments to free */ void tcp_segs_free(struct tcp_seg *seg) { while (seg != NULL) { 802885a: 2800 cmp r0, #0 802885c: d1f9 bne.n 8028852 struct tcp_seg *next = seg->next; tcp_seg_free(seg); seg = next; } } 802885e: bd10 pop {r4, pc} 08028860 : void tcp_arg(struct tcp_pcb *pcb, void *arg) { /* This function is allowed to be called for both listen pcbs and connection pcbs. */ pcb->callback_arg = arg; 8028860: 6101 str r1, [r0, #16] 8028862: 4770 bx lr 08028864 : */ void tcp_recv(struct tcp_pcb *pcb, tcp_recv_fn recv) { LWIP_ASSERT("invalid socket state for recv callback", pcb->state != LISTEN); pcb->recv = recv; 8028864: 67c1 str r1, [r0, #124] ; 0x7c 8028866: 4770 bx lr 08028868 : */ void tcp_sent(struct tcp_pcb *pcb, tcp_sent_fn sent) { LWIP_ASSERT("invalid socket state for sent callback", pcb->state != LISTEN); pcb->sent = sent; 8028868: 6781 str r1, [r0, #120] ; 0x78 802886a: 4770 bx lr 0802886c : */ void tcp_err(struct tcp_pcb *pcb, tcp_err_fn err) { LWIP_ASSERT("invalid socket state for err callback", pcb->state != LISTEN); pcb->errf = err; 802886c: f8c0 1088 str.w r1, [r0, #136] ; 0x88 8028870: 4770 bx lr 08028872 : void tcp_accept(struct tcp_pcb *pcb, tcp_accept_fn accept) { /* This function is allowed to be called for both listen pcbs and connection pcbs. */ pcb->accept = accept; 8028872: 6141 str r1, [r0, #20] 8028874: 4770 bx lr 08028876 : void tcp_poll(struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval) { LWIP_ASSERT("invalid socket state for poll", pcb->state != LISTEN); #if LWIP_CALLBACK_API pcb->poll = poll; 8028876: f8c0 1084 str.w r1, [r0, #132] ; 0x84 #else /* LWIP_CALLBACK_API */ LWIP_UNUSED_ARG(poll); #endif /* LWIP_CALLBACK_API */ pcb->pollinterval = interval; 802887a: f880 2020 strb.w r2, [r0, #32] 802887e: 4770 bx lr 08028880 : * @param pcb tcp_pcb to purge. The pcb itself is not deallocated! */ void tcp_pcb_purge(struct tcp_pcb *pcb) { if (pcb->state != CLOSED && 8028880: 7e03 ldrb r3, [r0, #24] * * @param pcb tcp_pcb to purge. The pcb itself is not deallocated! */ void tcp_pcb_purge(struct tcp_pcb *pcb) { 8028882: b510 push {r4, lr} 8028884: 4604 mov r4, r0 if (pcb->state != CLOSED && 8028886: b1bb cbz r3, 80288b8 8028888: 2b0a cmp r3, #10 802888a: d015 beq.n 80288b8 pcb->state != TIME_WAIT && 802888c: 2b01 cmp r3, #1 802888e: d013 beq.n 80288b8 } } #endif /* TCP_LISTEN_BACKLOG */ if (pcb->refused_data != NULL) { 8028890: 6f40 ldr r0, [r0, #116] ; 0x74 8028892: b118 cbz r0, 802889c LWIP_DEBUGF(TCP_DEBUG, ("tcp_pcb_purge: data left on ->refused_data\n")); pbuf_free(pcb->refused_data); 8028894: f7ff fd20 bl 80282d8 pcb->refused_data = NULL; 8028898: 2300 movs r3, #0 802889a: 6763 str r3, [r4, #116] ; 0x74 pcb->ooseq = NULL; #endif /* TCP_QUEUE_OOSEQ */ /* Stop the retransmission timer as it will expect data on unacked queue if it fires */ pcb->rtime = -1; 802889c: f64f 73ff movw r3, #65535 ; 0xffff 80288a0: 86a3 strh r3, [r4, #52] ; 0x34 tcp_segs_free(pcb->unsent); 80288a2: 6ee0 ldr r0, [r4, #108] ; 0x6c 80288a4: f7ff ffd3 bl 802884e tcp_segs_free(pcb->unacked); 80288a8: 6f20 ldr r0, [r4, #112] ; 0x70 80288aa: f7ff ffd0 bl 802884e pcb->unacked = pcb->unsent = NULL; 80288ae: 2300 movs r3, #0 80288b0: 66e3 str r3, [r4, #108] ; 0x6c 80288b2: 6723 str r3, [r4, #112] ; 0x70 #if TCP_OVERSIZE pcb->unsent_oversize = 0; 80288b4: f8a4 306a strh.w r3, [r4, #106] ; 0x6a 80288b8: bd10 pop {r4, pc} 80288ba: 0000 movs r0, r0 080288bc : u8_t pcb_reset; /* flag if a RST should be sent when removing */ err_t err; err = ERR_OK; ++tcp_ticks; 80288bc: 4b9c ldr r3, [pc, #624] ; (8028b30 ) * * Automatically called from tcp_tmr(). */ void tcp_slowtmr(void) { 80288be: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} u8_t pcb_reset; /* flag if a RST should be sent when removing */ err_t err; err = ERR_OK; ++tcp_ticks; 80288c2: 681a ldr r2, [r3, #0] err_arg = pcb->callback_arg; pcb2 = pcb; pcb = pcb->next; memp_free(MEMP_TCP_PCB, pcb2); tcp_active_pcbs_changed = 0; 80288c4: f8df 8284 ldr.w r8, [pc, #644] ; 8028b4c u8_t pcb_reset; /* flag if a RST should be sent when removing */ err_t err; err = ERR_OK; ++tcp_ticks; 80288c8: 3201 adds r2, #1 80288ca: 601a str r2, [r3, #0] ++tcp_timer_ctr; 80288cc: 4b99 ldr r3, [pc, #612] ; (8028b34 ) 80288ce: 781a ldrb r2, [r3, #0] 80288d0: 3201 adds r2, #1 80288d2: 701a strb r2, [r3, #0] 80288d4: 46c1 mov r9, r8 tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; pcb = tcp_active_pcbs; 80288d6: 4b98 ldr r3, [pc, #608] ; (8028b38 ) while (pcb != NULL) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: processing active pcb\n")); LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED); LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN); LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT); if (pcb->last_timer == tcp_timer_ctr) { 80288d8: f8df a258 ldr.w sl, [pc, #600] ; 8028b34 ++tcp_timer_ctr; tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; pcb = tcp_active_pcbs; 80288dc: 681c ldr r4, [r3, #0] ++tcp_ticks; ++tcp_timer_ctr; tcp_slowtmr_start: /* Steps through all of the active PCBs. */ prev = NULL; 80288de: 2600 movs r6, #0 pcb = tcp_active_pcbs; if (pcb == NULL) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: no active pcbs\n")); } while (pcb != NULL) { 80288e0: e0ff b.n 8028ae2 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: processing active pcb\n")); LWIP_ASSERT("tcp_slowtmr: active pcb->state != CLOSED\n", pcb->state != CLOSED); LWIP_ASSERT("tcp_slowtmr: active pcb->state != LISTEN\n", pcb->state != LISTEN); LWIP_ASSERT("tcp_slowtmr: active pcb->state != TIME-WAIT\n", pcb->state != TIME_WAIT); if (pcb->last_timer == tcp_timer_ctr) { 80288e2: f89a 3000 ldrb.w r3, [sl] 80288e6: f894 2021 ldrb.w r2, [r4, #33] ; 0x21 80288ea: 429a cmp r2, r3 80288ec: d101 bne.n 80288f2 /* skip this pcb, we have already processed it */ pcb = pcb->next; 80288ee: 68e7 ldr r7, [r4, #12] continue; 80288f0: e0f6 b.n 8028ae0 pcb->last_timer = tcp_timer_ctr; pcb_remove = 0; pcb_reset = 0; if (pcb->state == SYN_SENT && pcb->nrtx == TCP_SYNMAXRTX) { 80288f2: 7e21 ldrb r1, [r4, #24] if (pcb->last_timer == tcp_timer_ctr) { /* skip this pcb, we have already processed it */ pcb = pcb->next; continue; } pcb->last_timer = tcp_timer_ctr; 80288f4: f884 3021 strb.w r3, [r4, #33] ; 0x21 pcb_remove = 0; pcb_reset = 0; if (pcb->state == SYN_SENT && pcb->nrtx == TCP_SYNMAXRTX) { 80288f8: 2902 cmp r1, #2 80288fa: f894 2046 ldrb.w r2, [r4, #70] ; 0x46 80288fe: d101 bne.n 8028904 8028900: 2a06 cmp r2, #6 8028902: d051 beq.n 80289a8 ++pcb_remove; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max SYN retries reached\n")); } else if (pcb->nrtx == TCP_MAXRTX) { 8028904: 2a0c cmp r2, #12 8028906: d04f beq.n 80289a8 ++pcb_remove; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); } else { if (pcb->persist_backoff > 0) { 8028908: f894 3091 ldrb.w r3, [r4, #145] ; 0x91 802890c: b1c3 cbz r3, 8028940 /* If snd_wnd is zero, use persist timer to send 1 byte probes * instead of using the standard retransmission mechanism. */ pcb->persist_cnt++; if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 802890e: 498b ldr r1, [pc, #556] ; (8028b3c ) LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); } else { if (pcb->persist_backoff > 0) { /* If snd_wnd is zero, use persist timer to send 1 byte probes * instead of using the standard retransmission mechanism. */ pcb->persist_cnt++; 8028910: f894 2090 ldrb.w r2, [r4, #144] ; 0x90 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 8028914: 18c9 adds r1, r1, r3 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); } else { if (pcb->persist_backoff > 0) { /* If snd_wnd is zero, use persist timer to send 1 byte probes * instead of using the standard retransmission mechanism. */ pcb->persist_cnt++; 8028916: 3201 adds r2, #1 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 8028918: f811 1c01 ldrb.w r1, [r1, #-1] LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); } else { if (pcb->persist_backoff > 0) { /* If snd_wnd is zero, use persist timer to send 1 byte probes * instead of using the standard retransmission mechanism. */ pcb->persist_cnt++; 802891c: b2d2 uxtb r2, r2 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 802891e: 4291 cmp r1, r2 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: max DATA retries reached\n")); } else { if (pcb->persist_backoff > 0) { /* If snd_wnd is zero, use persist timer to send 1 byte probes * instead of using the standard retransmission mechanism. */ pcb->persist_cnt++; 8028920: f884 2090 strb.w r2, [r4, #144] ; 0x90 if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { 8028924: d900 bls.n 8028928 8028926: e03d b.n 80289a4 pcb->persist_cnt = 0; 8028928: 2200 movs r2, #0 if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { 802892a: 2b06 cmp r3, #6 if (pcb->persist_backoff > 0) { /* If snd_wnd is zero, use persist timer to send 1 byte probes * instead of using the standard retransmission mechanism. */ pcb->persist_cnt++; if (pcb->persist_cnt >= tcp_persist_backoff[pcb->persist_backoff-1]) { pcb->persist_cnt = 0; 802892c: f884 2090 strb.w r2, [r4, #144] ; 0x90 if (pcb->persist_backoff < sizeof(tcp_persist_backoff)) { 8028930: d802 bhi.n 8028938 pcb->persist_backoff++; 8028932: 3301 adds r3, #1 8028934: f884 3091 strb.w r3, [r4, #145] ; 0x91 } tcp_zero_window_probe(pcb); 8028938: 4620 mov r0, r4 802893a: f001 ff04 bl 802a746 802893e: e031 b.n 80289a4 } } else { /* Increase the retransmission timer if it is running */ if(pcb->rtime >= 0) { 8028940: 8ea3 ldrh r3, [r4, #52] ; 0x34 8028942: 0418 lsls r0, r3, #16 8028944: d401 bmi.n 802894a ++pcb->rtime; 8028946: 3301 adds r3, #1 8028948: 86a3 strh r3, [r4, #52] ; 0x34 } if (pcb->unacked != NULL && pcb->rtime >= pcb->rto) { 802894a: 6f23 ldr r3, [r4, #112] ; 0x70 802894c: b353 cbz r3, 80289a4 802894e: f9b4 0034 ldrsh.w r0, [r4, #52] ; 0x34 8028952: f9b4 3044 ldrsh.w r3, [r4, #68] ; 0x44 8028956: 4298 cmp r0, r3 8028958: db24 blt.n 80289a4 " pcb->rto %"S16_F"\n", pcb->rtime, pcb->rto)); /* Double retransmission time-out unless we are trying to * connect to somebody (i.e., we are in SYN_SENT). */ if (pcb->state != SYN_SENT) { 802895a: 2902 cmp r1, #2 802895c: d00b beq.n 8028976 pcb->rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[pcb->nrtx]; 802895e: f9b4 1040 ldrsh.w r1, [r4, #64] ; 0x40 8028962: f9b4 3042 ldrsh.w r3, [r4, #66] ; 0x42 8028966: eb03 03e1 add.w r3, r3, r1, asr #3 802896a: 4975 ldr r1, [pc, #468] ; (8028b40 ) 802896c: 5c8a ldrb r2, [r1, r2] 802896e: fa03 f302 lsl.w r3, r3, r2 8028972: f8a4 3044 strh.w r3, [r4, #68] ; 0x44 } /* Reset the retransmission timer. */ pcb->rtime = 0; 8028976: 2300 movs r3, #0 /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); 8028978: f8b4 104c ldrh.w r1, [r4, #76] ; 0x4c if (pcb->state != SYN_SENT) { pcb->rto = ((pcb->sa >> 3) + pcb->sv) << tcp_backoff[pcb->nrtx]; } /* Reset the retransmission timer. */ pcb->rtime = 0; 802897c: 86a3 strh r3, [r4, #52] ; 0x34 /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); 802897e: f8b4 3060 ldrh.w r3, [r4, #96] ; 0x60 pcb->ssthresh = eff_wnd >> 1; 8028982: 4299 cmp r1, r3 8028984: bf28 it cs 8028986: 4619 movcs r1, r3 if (pcb->ssthresh < (pcb->mss << 1)) { 8028988: 8ee3 ldrh r3, [r4, #54] ; 0x36 /* Reset the retransmission timer. */ pcb->rtime = 0; /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); pcb->ssthresh = eff_wnd >> 1; 802898a: 0849 lsrs r1, r1, #1 if (pcb->ssthresh < (pcb->mss << 1)) { 802898c: 005a lsls r2, r3, #1 802898e: 4291 cmp r1, r2 /* Reset the retransmission timer. */ pcb->rtime = 0; /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); pcb->ssthresh = eff_wnd >> 1; 8028990: f8a4 104e strh.w r1, [r4, #78] ; 0x4e if (pcb->ssthresh < (pcb->mss << 1)) { pcb->ssthresh = (pcb->mss << 1); } pcb->cwnd = pcb->mss; 8028994: f8a4 304c strh.w r3, [r4, #76] ; 0x4c /* Reduce congestion window and ssthresh. */ eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); pcb->ssthresh = eff_wnd >> 1; if (pcb->ssthresh < (pcb->mss << 1)) { pcb->ssthresh = (pcb->mss << 1); 8028998: bfb8 it lt 802899a: f8a4 204e strhlt.w r2, [r4, #78] ; 0x4e " ssthresh %"U16_F"\n", pcb->cwnd, pcb->ssthresh)); /* The following needs to be called AFTER cwnd is set to one mss - STJ */ tcp_rexmit_rto(pcb); 802899e: 4620 mov r0, r4 80289a0: f001 fe40 bl 802a624 pcb = pcb->next; continue; } pcb->last_timer = tcp_timer_ctr; pcb_remove = 0; 80289a4: 2500 movs r5, #0 80289a6: e000 b.n 80289aa pcb_reset = 0; if (pcb->state == SYN_SENT && pcb->nrtx == TCP_SYNMAXRTX) { ++pcb_remove; 80289a8: 2501 movs r5, #1 tcp_rexmit_rto(pcb); } } } /* Check if this PCB has stayed too long in FIN-WAIT-2 */ if (pcb->state == FIN_WAIT_2) { 80289aa: 7e23 ldrb r3, [r4, #24] 80289ac: 2b06 cmp r3, #6 80289ae: d10c bne.n 80289ca /* If this PCB is in FIN_WAIT_2 because of SHUT_WR don't let it time out. */ if (pcb->flags & TF_RXCLOSED) { 80289b0: 7fa2 ldrb r2, [r4, #30] 80289b2: f002 0210 and.w r2, r2, #16 80289b6: b2d2 uxtb r2, r2 80289b8: b13a cbz r2, 80289ca /* PCB was fully closed (either through close() or SHUT_RDWR): normal FIN-WAIT timeout handling. */ if ((u32_t)(tcp_ticks - pcb->tmr) > 80289ba: 4a5d ldr r2, [pc, #372] ; (8028b30 ) 80289bc: 6811 ldr r1, [r2, #0] 80289be: 6a62 ldr r2, [r4, #36] ; 0x24 80289c0: 1a8a subs r2, r1, r2 80289c2: 2a28 cmp r2, #40 ; 0x28 80289c4: d901 bls.n 80289ca TCP_FIN_WAIT_TIMEOUT / TCP_SLOW_INTERVAL) { ++pcb_remove; 80289c6: 3501 adds r5, #1 80289c8: b2ed uxtb r5, r5 } } } /* Check if KEEPALIVE should be sent */ if(ip_get_option(pcb, SOF_KEEPALIVE) && 80289ca: 7a27 ldrb r7, [r4, #8] 80289cc: f007 0708 and.w r7, r7, #8 80289d0: b2ff uxtb r7, r7 80289d2: b34f cbz r7, 8028a28 80289d4: 2b04 cmp r3, #4 80289d6: d001 beq.n 80289dc ((pcb->state == ESTABLISHED) || 80289d8: 2b07 cmp r3, #7 80289da: d124 bne.n 8028a26 (pcb->state == CLOSE_WAIT))) { if((u32_t)(tcp_ticks - pcb->tmr) > 80289dc: 4b54 ldr r3, [pc, #336] ; (8028b30 ) (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) 80289de: f8d4 008c ldr.w r0, [r4, #140] ; 0x8c /* Check if KEEPALIVE should be sent */ if(ip_get_option(pcb, SOF_KEEPALIVE) && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { if((u32_t)(tcp_ticks - pcb->tmr) > 80289e2: 681a ldr r2, [r3, #0] 80289e4: 6a63 ldr r3, [r4, #36] ; 0x24 80289e6: 1ad2 subs r2, r2, r3 (pcb->keep_idle + TCP_KEEP_DUR(pcb)) / TCP_SLOW_INTERVAL) 80289e8: f500 2324 add.w r3, r0, #671744 ; 0xa4000 80289ec: f603 43b8 addw r3, r3, #3256 ; 0xcb8 80289f0: f44f 71fa mov.w r1, #500 ; 0x1f4 80289f4: fbb3 f3f1 udiv r3, r3, r1 /* Check if KEEPALIVE should be sent */ if(ip_get_option(pcb, SOF_KEEPALIVE) && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { if((u32_t)(tcp_ticks - pcb->tmr) > 80289f8: 429a cmp r2, r3 80289fa: d903 bls.n 8028a04 { LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: KEEPALIVE timeout. Aborting connection to %"U16_F".%"U16_F".%"U16_F".%"U16_F".\n", ip4_addr1_16(&pcb->remote_ip), ip4_addr2_16(&pcb->remote_ip), ip4_addr3_16(&pcb->remote_ip), ip4_addr4_16(&pcb->remote_ip))); ++pcb_remove; 80289fc: 3501 adds r5, #1 80289fe: b2ed uxtb r5, r5 ++pcb_reset; 8028a00: 2701 movs r7, #1 8028a02: e011 b.n 8028a28 } else if((u32_t)(tcp_ticks - pcb->tmr) > (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) 8028a04: f894 3092 ldrb.w r3, [r4, #146] ; 0x92 8028a08: 4f4e ldr r7, [pc, #312] ; (8028b44 ) 8028a0a: fb07 0003 mla r0, r7, r3, r0 / TCP_SLOW_INTERVAL) 8028a0e: fbb0 f1f1 udiv r1, r0, r1 ip4_addr3_16(&pcb->remote_ip), ip4_addr4_16(&pcb->remote_ip))); ++pcb_remove; ++pcb_reset; } else if((u32_t)(tcp_ticks - pcb->tmr) > 8028a12: 428a cmp r2, r1 8028a14: d907 bls.n 8028a26 (pcb->keep_idle + pcb->keep_cnt_sent * TCP_KEEP_INTVL(pcb)) / TCP_SLOW_INTERVAL) { tcp_keepalive(pcb); 8028a16: 4620 mov r0, r4 8028a18: f001 fe76 bl 802a708 pcb->keep_cnt_sent++; 8028a1c: f894 3092 ldrb.w r3, [r4, #146] ; 0x92 8028a20: 3301 adds r3, #1 8028a22: f884 3092 strb.w r3, [r4, #146] ; 0x92 continue; } pcb->last_timer = tcp_timer_ctr; pcb_remove = 0; pcb_reset = 0; 8028a26: 2700 movs r7, #0 LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: dropping OOSEQ queued data\n")); } #endif /* TCP_QUEUE_OOSEQ */ /* Check if this PCB has stayed too long in SYN-RCVD */ if (pcb->state == SYN_RCVD) { 8028a28: 7e23 ldrb r3, [r4, #24] 8028a2a: 2b03 cmp r3, #3 8028a2c: d108 bne.n 8028a40 if ((u32_t)(tcp_ticks - pcb->tmr) > 8028a2e: 4b40 ldr r3, [pc, #256] ; (8028b30 ) 8028a30: 681a ldr r2, [r3, #0] 8028a32: 6a63 ldr r3, [r4, #36] ; 0x24 8028a34: 1ad3 subs r3, r2, r3 8028a36: 2b28 cmp r3, #40 ; 0x28 8028a38: d90a bls.n 8028a50 TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) { ++pcb_remove; 8028a3a: 3501 adds r5, #1 8028a3c: b2ed uxtb r5, r5 8028a3e: e007 b.n 8028a50 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in SYN-RCVD\n")); } } /* Check if this PCB has stayed too long in LAST-ACK */ if (pcb->state == LAST_ACK) { 8028a40: 2b09 cmp r3, #9 8028a42: d105 bne.n 8028a50 if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { 8028a44: 4b3a ldr r3, [pc, #232] ; (8028b30 ) 8028a46: 681a ldr r2, [r3, #0] 8028a48: 6a63 ldr r3, [r4, #36] ; 0x24 8028a4a: 1ad3 subs r3, r2, r3 8028a4c: 2bf0 cmp r3, #240 ; 0xf0 8028a4e: d800 bhi.n 8028a52 LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in LAST-ACK\n")); } } /* If the PCB should be removed, do it. */ if (pcb_remove) { 8028a50: b345 cbz r5, 8028aa4 struct tcp_pcb *pcb2; tcp_err_fn err_fn; void *err_arg; tcp_pcb_purge(pcb); 8028a52: 4620 mov r0, r4 8028a54: f7ff ff14 bl 8028880 8028a58: 68e3 ldr r3, [r4, #12] /* Remove PCB from tcp_active_pcbs list. */ if (prev != NULL) { 8028a5a: b10e cbz r6, 8028a60 LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_active_pcbs", pcb != tcp_active_pcbs); prev->next = pcb->next; 8028a5c: 60f3 str r3, [r6, #12] 8028a5e: e001 b.n 8028a64 } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_active_pcbs", tcp_active_pcbs == pcb); tcp_active_pcbs = pcb->next; 8028a60: 4a35 ldr r2, [pc, #212] ; (8028b38 ) 8028a62: 6013 str r3, [r2, #0] } if (pcb_reset) { 8028a64: b14f cbz r7, 8028a7a tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, 8028a66: 8b63 ldrh r3, [r4, #26] 8028a68: 9300 str r3, [sp, #0] 8028a6a: 8ba3 ldrh r3, [r4, #28] 8028a6c: 9301 str r3, [sp, #4] 8028a6e: 6d20 ldr r0, [r4, #80] ; 0x50 8028a70: 6aa1 ldr r1, [r4, #40] ; 0x28 8028a72: 4622 mov r2, r4 8028a74: 1d23 adds r3, r4, #4 8028a76: f001 fd8f bl 802a598 pcb->local_port, pcb->remote_port); } err_fn = pcb->errf; 8028a7a: f8d4 5088 ldr.w r5, [r4, #136] ; 0x88 err_arg = pcb->callback_arg; 8028a7e: f8d4 b010 ldr.w fp, [r4, #16] pcb2 = pcb; pcb = pcb->next; 8028a82: 68e7 ldr r7, [r4, #12] memp_free(MEMP_TCP_PCB, pcb2); 8028a84: 2002 movs r0, #2 8028a86: 4621 mov r1, r4 8028a88: f7ff fb1c bl 80280c4 tcp_active_pcbs_changed = 0; 8028a8c: 2300 movs r3, #0 8028a8e: f888 3000 strb.w r3, [r8] TCP_EVENT_ERR(err_fn, err_arg, ERR_ABRT); 8028a92: b11d cbz r5, 8028a9c 8028a94: 4658 mov r0, fp 8028a96: f06f 0109 mvn.w r1, #9 8028a9a: 47a8 blx r5 if (tcp_active_pcbs_changed) { 8028a9c: f899 3000 ldrb.w r3, [r9] 8028aa0: b1f3 cbz r3, 8028ae0 8028aa2: e718 b.n 80288d6 /* get the 'next' element now and work with 'prev' below (in case of abort) */ prev = pcb; pcb = pcb->next; /* We check if we should poll the connection. */ ++prev->polltmr; 8028aa4: 7fe3 ldrb r3, [r4, #31] if (prev->polltmr >= prev->pollinterval) { 8028aa6: f894 2020 ldrb.w r2, [r4, #32] goto tcp_slowtmr_start; } } else { /* get the 'next' element now and work with 'prev' below (in case of abort) */ prev = pcb; pcb = pcb->next; 8028aaa: 68e7 ldr r7, [r4, #12] /* We check if we should poll the connection. */ ++prev->polltmr; 8028aac: 3301 adds r3, #1 8028aae: b2db uxtb r3, r3 if (prev->polltmr >= prev->pollinterval) { 8028ab0: 429a cmp r2, r3 /* get the 'next' element now and work with 'prev' below (in case of abort) */ prev = pcb; pcb = pcb->next; /* We check if we should poll the connection. */ ++prev->polltmr; 8028ab2: 77e3 strb r3, [r4, #31] if (prev->polltmr >= prev->pollinterval) { 8028ab4: d813 bhi.n 8028ade prev->polltmr = 0; LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n")); tcp_active_pcbs_changed = 0; TCP_EVENT_POLL(prev, err); 8028ab6: f8d4 3084 ldr.w r3, [r4, #132] ; 0x84 pcb = pcb->next; /* We check if we should poll the connection. */ ++prev->polltmr; if (prev->polltmr >= prev->pollinterval) { prev->polltmr = 0; 8028aba: 77e5 strb r5, [r4, #31] LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: polling application\n")); tcp_active_pcbs_changed = 0; 8028abc: f888 5000 strb.w r5, [r8] TCP_EVENT_POLL(prev, err); 8028ac0: b11b cbz r3, 8028aca 8028ac2: 6920 ldr r0, [r4, #16] 8028ac4: 4621 mov r1, r4 8028ac6: 4798 blx r3 8028ac8: e000 b.n 8028acc 8028aca: 4628 mov r0, r5 if (tcp_active_pcbs_changed) { 8028acc: f899 3000 ldrb.w r3, [r9] 8028ad0: 2b00 cmp r3, #0 8028ad2: f47f af00 bne.w 80288d6 goto tcp_slowtmr_start; } /* if err == ERR_ABRT, 'prev' is already deallocated */ if (err == ERR_OK) { 8028ad6: b910 cbnz r0, 8028ade tcp_output(prev); 8028ad8: 4620 mov r0, r4 8028ada: f001 fc39 bl 802a350 TCP_EVENT_POLL(prev, err); if (tcp_active_pcbs_changed) { goto tcp_slowtmr_start; } /* if err == ERR_ABRT, 'prev' is already deallocated */ if (err == ERR_OK) { 8028ade: 4626 mov r6, r4 prev = pcb; pcb = pcb->next; /* We check if we should poll the connection. */ ++prev->polltmr; if (prev->polltmr >= prev->pollinterval) { 8028ae0: 463c mov r4, r7 prev = NULL; pcb = tcp_active_pcbs; if (pcb == NULL) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: no active pcbs\n")); } while (pcb != NULL) { 8028ae2: 2c00 cmp r4, #0 8028ae4: f47f aefd bne.w 80288e2 } /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; 8028ae8: 4b17 ldr r3, [pc, #92] ; (8028b48 ) while (pcb != NULL) { LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); pcb_remove = 0; /* Check if this PCB has stayed long enough in TIME-WAIT */ if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { 8028aea: 4e11 ldr r6, [pc, #68] ; (8028b30 ) } /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; 8028aec: 681d ldr r5, [r3, #0] LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs); prev->next = pcb->next; } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); tcp_tw_pcbs = pcb->next; 8028aee: 461f mov r7, r3 /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; while (pcb != NULL) { 8028af0: e00f b.n 8028b12 LWIP_ASSERT("tcp_slowtmr: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); pcb_remove = 0; /* Check if this PCB has stayed long enough in TIME-WAIT */ if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) { 8028af2: 6832 ldr r2, [r6, #0] 8028af4: 6a6b ldr r3, [r5, #36] ; 0x24 8028af6: 1ad3 subs r3, r2, r3 8028af8: 2bf0 cmp r3, #240 ; 0xf0 8028afa: d810 bhi.n 8028b1e 8028afc: e00c b.n 8028b18 struct tcp_pcb *pcb2; tcp_pcb_purge(pcb); /* Remove PCB from tcp_tw_pcbs list. */ if (prev != NULL) { LWIP_ASSERT("tcp_slowtmr: middle tcp != tcp_tw_pcbs", pcb != tcp_tw_pcbs); prev->next = pcb->next; 8028afe: 60e2 str r2, [r4, #12] 8028b00: e000 b.n 8028b04 } else { /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); tcp_tw_pcbs = pcb->next; 8028b02: 603a str r2, [r7, #0] } pcb2 = pcb; pcb = pcb->next; memp_free(MEMP_TCP_PCB, pcb2); 8028b04: 4629 mov r1, r5 8028b06: 2002 movs r0, #2 /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); tcp_tw_pcbs = pcb->next; } pcb2 = pcb; pcb = pcb->next; 8028b08: f8d5 800c ldr.w r8, [r5, #12] memp_free(MEMP_TCP_PCB, pcb2); 8028b0c: f7ff fada bl 80280c4 /* This PCB was the first. */ LWIP_ASSERT("tcp_slowtmr: first pcb == tcp_tw_pcbs", tcp_tw_pcbs == pcb); tcp_tw_pcbs = pcb->next; } pcb2 = pcb; pcb = pcb->next; 8028b10: 4645 mov r5, r8 /* Steps through all of the TIME-WAIT PCBs. */ prev = NULL; pcb = tcp_tw_pcbs; while (pcb != NULL) { 8028b12: 2d00 cmp r5, #0 8028b14: d1ed bne.n 8028af2 8028b16: e009 b.n 8028b2c pcb2 = pcb; pcb = pcb->next; memp_free(MEMP_TCP_PCB, pcb2); } else { prev = pcb; pcb = pcb->next; 8028b18: 462c mov r4, r5 8028b1a: 68ed ldr r5, [r5, #12] 8028b1c: e7f9 b.n 8028b12 /* If the PCB should be removed, do it. */ if (pcb_remove) { struct tcp_pcb *pcb2; tcp_pcb_purge(pcb); 8028b1e: 4628 mov r0, r5 8028b20: f7ff feae bl 8028880 8028b24: 68ea ldr r2, [r5, #12] /* Remove PCB from tcp_tw_pcbs list. */ if (prev != NULL) { 8028b26: 2c00 cmp r4, #0 8028b28: d1e9 bne.n 8028afe 8028b2a: e7ea b.n 8028b02 } else { prev = pcb; pcb = pcb->next; } } } 8028b2c: e8bd 8ffe ldmia.w sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 8028b30: 200104c8 .word 0x200104c8 8028b34: 2000db59 .word 0x2000db59 8028b38: 200104c4 .word 0x200104c4 8028b3c: 08037ac1 .word 0x08037ac1 8028b40: 08037ab4 .word 0x08037ab4 8028b44: 000124f8 .word 0x000124f8 8028b48: 200104d8 .word 0x200104d8 8028b4c: 200104c0 .word 0x200104c0 08028b50 : * @param pcb tcp_pcb to purge. The pcb itself is NOT deallocated! */ void tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb) { TCP_RMV(pcblist, pcb); 8028b50: 6803 ldr r3, [r0, #0] 8028b52: 428b cmp r3, r1 * @param pcblist PCB list to purge. * @param pcb tcp_pcb to purge. The pcb itself is NOT deallocated! */ void tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb) { 8028b54: b510 push {r4, lr} 8028b56: 460c mov r4, r1 TCP_RMV(pcblist, pcb); 8028b58: d102 bne.n 8028b60 8028b5a: 68cb ldr r3, [r1, #12] 8028b5c: 6003 str r3, [r0, #0] 8028b5e: e00d b.n 8028b7c 8028b60: 4a11 ldr r2, [pc, #68] ; (8028ba8 ) 8028b62: 6013 str r3, [r2, #0] 8028b64: e007 b.n 8028b76 8028b66: 68d9 ldr r1, [r3, #12] 8028b68: 42a1 cmp r1, r4 8028b6a: d103 bne.n 8028b74 8028b6c: 6013 str r3, [r2, #0] 8028b6e: 68e2 ldr r2, [r4, #12] 8028b70: 60da str r2, [r3, #12] 8028b72: e003 b.n 8028b7c 8028b74: 460b mov r3, r1 8028b76: 2b00 cmp r3, #0 8028b78: d1f5 bne.n 8028b66 8028b7a: 6013 str r3, [r2, #0] 8028b7c: 2300 movs r3, #0 8028b7e: 60e3 str r3, [r4, #12] tcp_pcb_purge(pcb); 8028b80: 4620 mov r0, r4 8028b82: f7ff fe7d bl 8028880 /* if there is an outstanding delayed ACKs, send it */ if (pcb->state != TIME_WAIT && 8028b86: 7e23 ldrb r3, [r4, #24] 8028b88: 2b0a cmp r3, #10 8028b8a: d00a beq.n 8028ba2 8028b8c: 2b01 cmp r3, #1 8028b8e: d008 beq.n 8028ba2 pcb->state != LISTEN && pcb->flags & TF_ACK_DELAY) { 8028b90: 7fa3 ldrb r3, [r4, #30] tcp_pcb_purge(pcb); /* if there is an outstanding delayed ACKs, send it */ if (pcb->state != TIME_WAIT && pcb->state != LISTEN && 8028b92: 07da lsls r2, r3, #31 8028b94: d505 bpl.n 8028ba2 pcb->flags & TF_ACK_DELAY) { pcb->flags |= TF_ACK_NOW; 8028b96: f043 0302 orr.w r3, r3, #2 8028b9a: 77a3 strb r3, [r4, #30] tcp_output(pcb); 8028b9c: 4620 mov r0, r4 8028b9e: f001 fbd7 bl 802a350 #if TCP_QUEUE_OOSEQ LWIP_ASSERT("ooseq segments leaking", pcb->ooseq == NULL); #endif /* TCP_QUEUE_OOSEQ */ } pcb->state = CLOSED; 8028ba2: 2300 movs r3, #0 8028ba4: 7623 strb r3, [r4, #24] 8028ba6: bd10 pop {r4, pc} 8028ba8: 200104d0 .word 0x200104d0 08028bac : LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs", pcb->state != LISTEN); /* Figure out on which TCP PCB list we are, and remove us. If we are in an active state, call the receive function associated with the PCB with a NULL argument, and send an RST to the remote end. */ if (pcb->state == TIME_WAIT) { 8028bac: 7e03 ldrb r3, [r0, #24] 8028bae: 2b0a cmp r3, #10 * @param pcb the tcp_pcb to abort * @param reset boolean to indicate whether a reset should be sent */ void tcp_abandon(struct tcp_pcb *pcb, int reset) { 8028bb0: e92d 43f7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, lr} 8028bb4: 4604 mov r4, r0 8028bb6: 4689 mov r9, r1 LWIP_ASSERT("don't call tcp_abort/tcp_abandon for listen-pcbs", pcb->state != LISTEN); /* Figure out on which TCP PCB list we are, and remove us. If we are in an active state, call the receive function associated with the PCB with a NULL argument, and send an RST to the remote end. */ if (pcb->state == TIME_WAIT) { 8028bb8: d10a bne.n 8028bd0 tcp_pcb_remove(&tcp_tw_pcbs, pcb); 8028bba: 4621 mov r1, r4 8028bbc: 481b ldr r0, [pc, #108] ; (8028c2c ) 8028bbe: f7ff ffc7 bl 8028b50 memp_free(MEMP_TCP_PCB, pcb); 8028bc2: 2002 movs r0, #2 8028bc4: 4621 mov r1, r4 tcp_rst(seqno, ackno, &pcb->local_ip, &pcb->remote_ip, pcb->local_port, pcb->remote_port); } memp_free(MEMP_TCP_PCB, pcb); TCP_EVENT_ERR(errf, errf_arg, ERR_ABRT); } } 8028bc6: b003 add sp, #12 8028bc8: e8bd 43f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, lr} /* Figure out on which TCP PCB list we are, and remove us. If we are in an active state, call the receive function associated with the PCB with a NULL argument, and send an RST to the remote end. */ if (pcb->state == TIME_WAIT) { tcp_pcb_remove(&tcp_tw_pcbs, pcb); memp_free(MEMP_TCP_PCB, pcb); 8028bcc: f7ff ba7a b.w 80280c4 } else { seqno = pcb->snd_nxt; 8028bd0: f8d0 8050 ldr.w r8, [r0, #80] ; 0x50 ackno = pcb->rcv_nxt; 8028bd4: 6a87 ldr r7, [r0, #40] ; 0x28 #if LWIP_CALLBACK_API errf = pcb->errf; 8028bd6: f8d0 5088 ldr.w r5, [r0, #136] ; 0x88 #endif /* LWIP_CALLBACK_API */ errf_arg = pcb->callback_arg; 8028bda: 6906 ldr r6, [r0, #16] TCP_PCB_REMOVE_ACTIVE(pcb); 8028bdc: 4814 ldr r0, [pc, #80] ; (8028c30 ) 8028bde: 4621 mov r1, r4 8028be0: f7ff ffb6 bl 8028b50 8028be4: 4b13 ldr r3, [pc, #76] ; (8028c34 ) if (pcb->unacked != NULL) { 8028be6: 6f20 ldr r0, [r4, #112] ; 0x70 ackno = pcb->rcv_nxt; #if LWIP_CALLBACK_API errf = pcb->errf; #endif /* LWIP_CALLBACK_API */ errf_arg = pcb->callback_arg; TCP_PCB_REMOVE_ACTIVE(pcb); 8028be8: 2201 movs r2, #1 8028bea: 701a strb r2, [r3, #0] if (pcb->unacked != NULL) { 8028bec: b108 cbz r0, 8028bf2 tcp_segs_free(pcb->unacked); 8028bee: f7ff fe2e bl 802884e } if (pcb->unsent != NULL) { 8028bf2: 6ee0 ldr r0, [r4, #108] ; 0x6c 8028bf4: b108 cbz r0, 8028bfa tcp_segs_free(pcb->unsent); 8028bf6: f7ff fe2a bl 802884e #if TCP_QUEUE_OOSEQ if (pcb->ooseq != NULL) { tcp_segs_free(pcb->ooseq); } #endif /* TCP_QUEUE_OOSEQ */ if (reset) { 8028bfa: f1b9 0f00 cmp.w r9, #0 8028bfe: d009 beq.n 8028c14 LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_abandon: sending RST\n")); tcp_rst(seqno, ackno, &pcb->local_ip, &pcb->remote_ip, pcb->local_port, pcb->remote_port); 8028c00: 8b63 ldrh r3, [r4, #26] 8028c02: 9300 str r3, [sp, #0] 8028c04: 8ba3 ldrh r3, [r4, #28] 8028c06: 4640 mov r0, r8 8028c08: 9301 str r3, [sp, #4] 8028c0a: 4639 mov r1, r7 8028c0c: 4622 mov r2, r4 8028c0e: 1d23 adds r3, r4, #4 8028c10: f001 fcc2 bl 802a598 } memp_free(MEMP_TCP_PCB, pcb); 8028c14: 2002 movs r0, #2 8028c16: 4621 mov r1, r4 8028c18: f7ff fa54 bl 80280c4 TCP_EVENT_ERR(errf, errf_arg, ERR_ABRT); 8028c1c: b11d cbz r5, 8028c26 8028c1e: 4630 mov r0, r6 8028c20: f06f 0109 mvn.w r1, #9 8028c24: 47a8 blx r5 } } 8028c26: b003 add sp, #12 8028c28: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 8028c2c: 200104d8 .word 0x200104d8 8028c30: 200104c4 .word 0x200104c4 8028c34: 200104c0 .word 0x200104c0 08028c38 : * @param pcb the tcp pcb to abort */ void tcp_abort(struct tcp_pcb *pcb) { tcp_abandon(pcb, 1); 8028c38: 2101 movs r1, #1 8028c3a: f7ff bfb7 b.w 8028bac 8028c3e: 0000 movs r0, r0 08028c40 : * @return ERR_OK if connection has been closed * another err_t if closing failed and pcb is not freed */ static err_t tcp_close_shutdown(struct tcp_pcb *pcb, u8_t rst_on_unacked_data) { 8028c40: b537 push {r0, r1, r2, r4, r5, lr} 8028c42: 4604 mov r4, r0 err_t err; if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { 8028c44: 2900 cmp r1, #0 8028c46: d043 beq.n 8028cd0 8028c48: 7e03 ldrb r3, [r0, #24] 8028c4a: 2b04 cmp r3, #4 8028c4c: d001 beq.n 8028c52 8028c4e: 2b07 cmp r3, #7 8028c50: d13e bne.n 8028cd0 if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND)) { 8028c52: 6f63 ldr r3, [r4, #116] ; 0x74 8028c54: b923 cbnz r3, 8028c60 8028c56: 8da2 ldrh r2, [r4, #44] ; 0x2c 8028c58: f241 63d0 movw r3, #5840 ; 0x16d0 8028c5c: 429a cmp r2, r3 8028c5e: d037 beq.n 8028cd0 side about this. */ LWIP_ASSERT("pcb->flags & TF_RXCLOSED", pcb->flags & TF_RXCLOSED); /* don't call tcp_abort here: we must not deallocate the pcb since that might not be expected when calling tcp_close */ tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, 8028c60: 8b63 ldrh r3, [r4, #26] 8028c62: 6d20 ldr r0, [r4, #80] ; 0x50 8028c64: 9300 str r3, [sp, #0] 8028c66: 8ba3 ldrh r3, [r4, #28] 8028c68: 6aa1 ldr r1, [r4, #40] ; 0x28 8028c6a: 9301 str r3, [sp, #4] 8028c6c: 4622 mov r2, r4 8028c6e: 1d23 adds r3, r4, #4 8028c70: f001 fc92 bl 802a598 pcb->local_port, pcb->remote_port); tcp_pcb_purge(pcb); 8028c74: 4620 mov r0, r4 8028c76: f7ff fe03 bl 8028880 TCP_RMV_ACTIVE(pcb); 8028c7a: 4a42 ldr r2, [pc, #264] ; (8028d84 ) 8028c7c: 6813 ldr r3, [r2, #0] 8028c7e: 42a3 cmp r3, r4 8028c80: d101 bne.n 8028c86 8028c82: 68e3 ldr r3, [r4, #12] 8028c84: e00c b.n 8028ca0 8028c86: 4a40 ldr r2, [pc, #256] ; (8028d88 ) 8028c88: 6013 str r3, [r2, #0] 8028c8a: e007 b.n 8028c9c 8028c8c: 68d9 ldr r1, [r3, #12] 8028c8e: 42a1 cmp r1, r4 8028c90: d103 bne.n 8028c9a 8028c92: 6013 str r3, [r2, #0] 8028c94: 68e2 ldr r2, [r4, #12] 8028c96: 60da str r2, [r3, #12] 8028c98: e003 b.n 8028ca2 8028c9a: 460b mov r3, r1 8028c9c: 2b00 cmp r3, #0 8028c9e: d1f5 bne.n 8028c8c 8028ca0: 6013 str r3, [r2, #0] 8028ca2: 4b3a ldr r3, [pc, #232] ; (8028d8c ) 8028ca4: 2201 movs r2, #1 8028ca6: 701a strb r2, [r3, #0] if (pcb->state == ESTABLISHED) { 8028ca8: 7e23 ldrb r3, [r4, #24] that might not be expected when calling tcp_close */ tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, pcb->local_port, pcb->remote_port); tcp_pcb_purge(pcb); TCP_RMV_ACTIVE(pcb); 8028caa: 2500 movs r5, #0 if (pcb->state == ESTABLISHED) { 8028cac: 2b04 cmp r3, #4 that might not be expected when calling tcp_close */ tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip, pcb->local_port, pcb->remote_port); tcp_pcb_purge(pcb); TCP_RMV_ACTIVE(pcb); 8028cae: 60e5 str r5, [r4, #12] if (pcb->state == ESTABLISHED) { 8028cb0: d108 bne.n 8028cc4 /* move to TIME_WAIT since we close actively */ pcb->state = TIME_WAIT; 8028cb2: 230a movs r3, #10 8028cb4: 7623 strb r3, [r4, #24] TCP_REG(&tcp_tw_pcbs, pcb); 8028cb6: 4b36 ldr r3, [pc, #216] ; (8028d90 ) 8028cb8: 681a ldr r2, [r3, #0] 8028cba: 601c str r4, [r3, #0] 8028cbc: 60e2 str r2, [r4, #12] 8028cbe: f001 fe05 bl 802a8cc 8028cc2: e003 b.n 8028ccc } else { /* CLOSE_WAIT: deallocate the pcb since we already sent a RST for it */ memp_free(MEMP_TCP_PCB, pcb); 8028cc4: 2002 movs r0, #2 8028cc6: 4621 mov r1, r4 8028cc8: f7ff f9fc bl 80280c4 } return ERR_OK; 8028ccc: 4628 mov r0, r5 8028cce: e051 b.n 8028d74 } } switch (pcb->state) { 8028cd0: 7e23 ldrb r3, [r4, #24] 8028cd2: 2b07 cmp r3, #7 8028cd4: d853 bhi.n 8028d7e 8028cd6: e8df f003 tbb [pc, r3] 8028cda: 1e04 .short 0x1e04 8028cdc: 523c3527 .word 0x523c3527 8028ce0: 4452 .short 0x4452 * Calling tcp_close() with a pcb that has already been closed, (i.e. twice) * or for a pcb that has been used and then entered the CLOSED state * is erroneous, but this should never happen as the pcb has in those cases * been freed, and so any remaining handles are bogus. */ err = ERR_OK; if (pcb->local_port != 0) { 8028ce2: 8b63 ldrh r3, [r4, #26] 8028ce4: b1ab cbz r3, 8028d12 TCP_RMV(&tcp_bound_pcbs, pcb); 8028ce6: 4a2b ldr r2, [pc, #172] ; (8028d94 ) 8028ce8: 6813 ldr r3, [r2, #0] 8028cea: 42a3 cmp r3, r4 8028cec: d101 bne.n 8028cf2 8028cee: 68e3 ldr r3, [r4, #12] 8028cf0: e00c b.n 8028d0c 8028cf2: 4a25 ldr r2, [pc, #148] ; (8028d88 ) 8028cf4: 6013 str r3, [r2, #0] 8028cf6: e007 b.n 8028d08 8028cf8: 68d9 ldr r1, [r3, #12] 8028cfa: 42a1 cmp r1, r4 8028cfc: d103 bne.n 8028d06 8028cfe: 6013 str r3, [r2, #0] 8028d00: 68e2 ldr r2, [r4, #12] 8028d02: 60da str r2, [r3, #12] 8028d04: e003 b.n 8028d0e 8028d06: 460b mov r3, r1 8028d08: 2b00 cmp r3, #0 8028d0a: d1f5 bne.n 8028cf8 8028d0c: 6013 str r3, [r2, #0] 8028d0e: 2300 movs r3, #0 8028d10: 60e3 str r3, [r4, #12] } memp_free(MEMP_TCP_PCB, pcb); 8028d12: 2002 movs r0, #2 8028d14: e004 b.n 8028d20 pcb = NULL; break; case LISTEN: err = ERR_OK; tcp_pcb_remove(&tcp_listen_pcbs.pcbs, pcb); 8028d16: 4820 ldr r0, [pc, #128] ; (8028d98 ) 8028d18: 4621 mov r1, r4 8028d1a: f7ff ff19 bl 8028b50 memp_free(MEMP_TCP_PCB_LISTEN, pcb); 8028d1e: 2003 movs r0, #3 8028d20: 4621 mov r1, r4 8028d22: f7ff f9cf bl 80280c4 pcb = NULL; break; 8028d26: e02a b.n 8028d7e case SYN_SENT: err = ERR_OK; TCP_PCB_REMOVE_ACTIVE(pcb); 8028d28: 4621 mov r1, r4 8028d2a: 4816 ldr r0, [pc, #88] ; (8028d84 ) 8028d2c: f7ff ff10 bl 8028b50 8028d30: 4b16 ldr r3, [pc, #88] ; (8028d8c ) 8028d32: 2201 movs r2, #1 memp_free(MEMP_TCP_PCB, pcb); 8028d34: 2002 movs r0, #2 8028d36: 4621 mov r1, r4 memp_free(MEMP_TCP_PCB_LISTEN, pcb); pcb = NULL; break; case SYN_SENT: err = ERR_OK; TCP_PCB_REMOVE_ACTIVE(pcb); 8028d38: 701a strb r2, [r3, #0] memp_free(MEMP_TCP_PCB, pcb); 8028d3a: f7ff f9c3 bl 80280c4 pcb = NULL; snmp_inc_tcpattemptfails(); 8028d3e: f004 f893 bl 802ce68 break; 8028d42: e01c b.n 8028d7e case SYN_RCVD: err = tcp_send_fin(pcb); 8028d44: 4620 mov r0, r4 8028d46: f001 fabe bl 802a2c6 if (err == ERR_OK) { 8028d4a: b998 cbnz r0, 8028d74 snmp_inc_tcpattemptfails(); 8028d4c: f004 f88c bl 802ce68 8028d50: e005 b.n 8028d5e pcb->state = FIN_WAIT_1; } break; case ESTABLISHED: err = tcp_send_fin(pcb); 8028d52: 4620 mov r0, r4 8028d54: f001 fab7 bl 802a2c6 if (err == ERR_OK) { 8028d58: b960 cbnz r0, 8028d74 snmp_inc_tcpestabresets(); 8028d5a: f004 f88d bl 802ce78 pcb->state = FIN_WAIT_1; 8028d5e: 2305 movs r3, #5 8028d60: e006 b.n 8028d70 } break; case CLOSE_WAIT: err = tcp_send_fin(pcb); 8028d62: 4620 mov r0, r4 8028d64: f001 faaf bl 802a2c6 if (err == ERR_OK) { 8028d68: b920 cbnz r0, 8028d74 snmp_inc_tcpestabresets(); 8028d6a: f004 f885 bl 802ce78 pcb->state = LAST_ACK; 8028d6e: 2309 movs r3, #9 8028d70: 7623 strb r3, [r4, #24] 8028d72: e001 b.n 8028d78 8028d74: b240 sxtb r0, r0 8028d76: e004 b.n 8028d82 returns (unsent data is sent from tcp timer functions, also), we don't care for the return value of tcp_output for now. */ /* @todo: When implementing SO_LINGER, this must be changed somehow: If SOF_LINGER is set, the data should be sent and acked before close returns. This can only be valid for sequential APIs, not for the raw API. */ tcp_output(pcb); 8028d78: 4620 mov r0, r4 8028d7a: f001 fae9 bl 802a350 8028d7e: 2000 movs r0, #0 8028d80: e7f8 b.n 8028d74 } return err; } 8028d82: bd3e pop {r1, r2, r3, r4, r5, pc} 8028d84: 200104c4 .word 0x200104c4 8028d88: 200104d0 .word 0x200104d0 8028d8c: 200104c0 .word 0x200104c0 8028d90: 200104d8 .word 0x200104d8 8028d94: 200104d4 .word 0x200104d4 8028d98: 200104cc .word 0x200104cc 08028d9c : #if TCP_DEBUG LWIP_DEBUGF(TCP_DEBUG, ("tcp_close: closing in ")); tcp_debug_print_state(pcb->state); #endif /* TCP_DEBUG */ if (pcb->state != LISTEN) { 8028d9c: 7e03 ldrb r3, [r0, #24] 8028d9e: 2b01 cmp r3, #1 8028da0: d003 beq.n 8028daa /* Set a flag not to receive any more data... */ pcb->flags |= TF_RXCLOSED; 8028da2: 7f83 ldrb r3, [r0, #30] 8028da4: f043 0310 orr.w r3, r3, #16 8028da8: 7783 strb r3, [r0, #30] } /* ... and close */ return tcp_close_shutdown(pcb, 1); 8028daa: 2101 movs r1, #1 8028dac: f7ff bf48 b.w 8028c40 08028db0 : * Default receive callback that is called if the user didn't register * a recv callback for the pcb. */ err_t tcp_recv_null(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) { 8028db0: b510 push {r4, lr} 8028db2: 4608 mov r0, r1 LWIP_UNUSED_ARG(arg); if (p != NULL) { 8028db4: 4614 mov r4, r2 8028db6: b132 cbz r2, 8028dc6 tcp_recved(pcb, p->tot_len); 8028db8: 8911 ldrh r1, [r2, #8] 8028dba: f7ff fd1f bl 80287fc pbuf_free(p); 8028dbe: 4620 mov r0, r4 8028dc0: f7ff fa8a bl 80282d8 8028dc4: e004 b.n 8028dd0 } else if (err == ERR_OK) { 8028dc6: b91b cbnz r3, 8028dd0 return tcp_close(pcb); } return ERR_OK; } 8028dc8: e8bd 4010 ldmia.w sp!, {r4, lr} LWIP_UNUSED_ARG(arg); if (p != NULL) { tcp_recved(pcb, p->tot_len); pbuf_free(p); } else if (err == ERR_OK) { return tcp_close(pcb); 8028dcc: f7ff bfe6 b.w 8028d9c } return ERR_OK; } 8028dd0: 2000 movs r0, #0 8028dd2: bd10 pop {r4, pc} 08028dd4 : } /** Pass pcb->refused_data to the recv callback */ err_t tcp_process_refused_data(struct tcp_pcb *pcb) { 8028dd4: b5f8 push {r3, r4, r5, r6, r7, lr} err_t err; u8_t refused_flags = pcb->refused_data->flags; 8028dd6: 6f45 ldr r5, [r0, #116] ; 0x74 closes the pcb */ struct pbuf *refused_data = pcb->refused_data; pcb->refused_data = NULL; /* Notify again application with data previously received. */ LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: notify kept packet\n")); TCP_EVENT_RECV(pcb, refused_data, ERR_OK, err); 8028dd8: 6fc6 ldr r6, [r0, #124] ; 0x7c /** Pass pcb->refused_data to the recv callback */ err_t tcp_process_refused_data(struct tcp_pcb *pcb) { err_t err; u8_t refused_flags = pcb->refused_data->flags; 8028dda: 7b6f ldrb r7, [r5, #13] /* set pcb->refused_data to NULL in case the callback frees it and then closes the pcb */ struct pbuf *refused_data = pcb->refused_data; pcb->refused_data = NULL; 8028ddc: 2300 movs r3, #0 } /** Pass pcb->refused_data to the recv callback */ err_t tcp_process_refused_data(struct tcp_pcb *pcb) { 8028dde: 4604 mov r4, r0 err_t err; u8_t refused_flags = pcb->refused_data->flags; /* set pcb->refused_data to NULL in case the callback frees it and then closes the pcb */ struct pbuf *refused_data = pcb->refused_data; pcb->refused_data = NULL; 8028de0: 6743 str r3, [r0, #116] ; 0x74 /* Notify again application with data previously received. */ LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: notify kept packet\n")); TCP_EVENT_RECV(pcb, refused_data, ERR_OK, err); 8028de2: b126 cbz r6, 8028dee 8028de4: 4621 mov r1, r4 8028de6: 462a mov r2, r5 8028de8: 6900 ldr r0, [r0, #16] 8028dea: 47b0 blx r6 8028dec: e005 b.n 8028dfa 8028dee: 4630 mov r0, r6 8028df0: 4621 mov r1, r4 8028df2: 462a mov r2, r5 8028df4: 4633 mov r3, r6 8028df6: f7ff ffdb bl 8028db0 if (err == ERR_OK) { 8028dfa: b9b0 cbnz r0, 8028e2a /* did refused_data include a FIN? */ if (refused_flags & PBUF_FLAG_TCP_FIN) { 8028dfc: f007 0720 and.w r7, r7, #32 8028e00: b2ff uxtb r7, r7 8028e02: b1bf cbz r7, 8028e34 /* correct rcv_wnd as the application won't call tcp_recved() for the FIN's seqno */ if (pcb->rcv_wnd != TCP_WND) { 8028e04: 8da3 ldrh r3, [r4, #44] ; 0x2c 8028e06: f241 62d0 movw r2, #5840 ; 0x16d0 8028e0a: 4293 cmp r3, r2 8028e0c: d001 beq.n 8028e12 pcb->rcv_wnd++; 8028e0e: 3301 adds r3, #1 8028e10: 85a3 strh r3, [r4, #44] ; 0x2c } TCP_EVENT_CLOSED(pcb, err); 8028e12: 6fe5 ldr r5, [r4, #124] ; 0x7c 8028e14: b905 cbnz r5, 8028e18 8028e16: e00c b.n 8028e32 8028e18: 2200 movs r2, #0 8028e1a: 6920 ldr r0, [r4, #16] 8028e1c: 4621 mov r1, r4 8028e1e: 4613 mov r3, r2 8028e20: 47a8 blx r5 if (err == ERR_ABRT) { 8028e22: 300a adds r0, #10 8028e24: d105 bne.n 8028e32 return ERR_ABRT; 8028e26: 20f6 movs r0, #246 ; 0xf6 8028e28: e004 b.n 8028e34 } } } else if (err == ERR_ABRT) { 8028e2a: b240 sxtb r0, r0 8028e2c: 300a adds r0, #10 8028e2e: d0fa beq.n 8028e26 segment contains data). */ LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_input: drop incoming packets, because pcb is \"full\"\n")); return ERR_ABRT; } else { /* data is still refused, pbuf is still valid (go on for ACK-only packets) */ pcb->refused_data = refused_data; 8028e30: 6765 str r5, [r4, #116] ; 0x74 } return ERR_OK; 8028e32: 2000 movs r0, #0 } 8028e34: b240 sxtb r0, r0 8028e36: bdf8 pop {r3, r4, r5, r6, r7, pc} 08028e38 : * * Automatically called from tcp_tmr(). */ void tcp_fasttmr(void) { 8028e38: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} struct tcp_pcb *pcb; ++tcp_timer_ctr; 8028e3c: 4b18 ldr r3, [pc, #96] ; (8028ea0 ) tcp_fasttmr_start: pcb = tcp_active_pcbs; 8028e3e: 4f19 ldr r7, [pc, #100] ; (8028ea4 ) void tcp_fasttmr(void) { struct tcp_pcb *pcb; ++tcp_timer_ctr; 8028e40: 781a ldrb r2, [r3, #0] 8028e42: 3201 adds r2, #1 8028e44: 701a strb r2, [r3, #0] tcp_fasttmr_start: pcb = tcp_active_pcbs; while(pcb != NULL) { if (pcb->last_timer != tcp_timer_ctr) { 8028e46: 4698 mov r8, r3 struct tcp_pcb *pcb; ++tcp_timer_ctr; tcp_fasttmr_start: pcb = tcp_active_pcbs; 8028e48: 683c ldr r4, [r7, #0] next = pcb->next; /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { tcp_active_pcbs_changed = 0; 8028e4a: 4d17 ldr r5, [pc, #92] ; (8028ea8 ) 8028e4c: 2600 movs r6, #0 ++tcp_timer_ctr; tcp_fasttmr_start: pcb = tcp_active_pcbs; while(pcb != NULL) { 8028e4e: e022 b.n 8028e96 if (pcb->last_timer != tcp_timer_ctr) { 8028e50: f898 2000 ldrb.w r2, [r8] 8028e54: f894 3021 ldrb.w r3, [r4, #33] ; 0x21 8028e58: 4293 cmp r3, r2 8028e5a: d020 beq.n 8028e9e struct tcp_pcb *next; pcb->last_timer = tcp_timer_ctr; 8028e5c: f884 2021 strb.w r2, [r4, #33] ; 0x21 /* send delayed ACKs */ if (pcb->flags & TF_ACK_DELAY) { 8028e60: 7fa2 ldrb r2, [r4, #30] 8028e62: 07d1 lsls r1, r2, #31 8028e64: d509 bpl.n 8028e7a LWIP_DEBUGF(TCP_DEBUG, ("tcp_fasttmr: delayed ACK\n")); tcp_ack_now(pcb); 8028e66: f042 0202 orr.w r2, r2, #2 8028e6a: 77a2 strb r2, [r4, #30] tcp_output(pcb); 8028e6c: 4620 mov r0, r4 8028e6e: f001 fa6f bl 802a350 pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); 8028e72: 7fa3 ldrb r3, [r4, #30] 8028e74: f023 0303 bic.w r3, r3, #3 8028e78: 77a3 strb r3, [r4, #30] } next = pcb->next; /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 8028e7a: 6f63 ldr r3, [r4, #116] ; 0x74 tcp_ack_now(pcb); tcp_output(pcb); pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); } next = pcb->next; 8028e7c: f8d4 900c ldr.w r9, [r4, #12] /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 8028e80: b90b cbnz r3, 8028e86 8028e82: 464c mov r4, r9 8028e84: e007 b.n 8028e96 tcp_active_pcbs_changed = 0; tcp_process_refused_data(pcb); 8028e86: 4620 mov r0, r4 next = pcb->next; /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { tcp_active_pcbs_changed = 0; 8028e88: 702e strb r6, [r5, #0] tcp_process_refused_data(pcb); 8028e8a: f7ff ffa3 bl 8028dd4 if (tcp_active_pcbs_changed) { 8028e8e: 782b ldrb r3, [r5, #0] 8028e90: 2b00 cmp r3, #0 8028e92: d1d9 bne.n 8028e48 8028e94: e7f5 b.n 8028e82 ++tcp_timer_ctr; tcp_fasttmr_start: pcb = tcp_active_pcbs; while(pcb != NULL) { 8028e96: 2c00 cmp r4, #0 8028e98: d1da bne.n 8028e50 8028e9a: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 8028e9e: e7fe b.n 8028e9e 8028ea0: 2000db59 .word 0x2000db59 8028ea4: 200104c4 .word 0x200104c4 8028ea8: 200104c0 .word 0x200104c0 08028eac : /** * Called periodically to dispatch TCP timers. */ void tcp_tmr(void) { 8028eac: b508 push {r3, lr} /* Call tcp_fasttmr() every 250 ms */ tcp_fasttmr(); 8028eae: f7ff ffc3 bl 8028e38 if (++tcp_timer & 1) { 8028eb2: 4a06 ldr r2, [pc, #24] ; (8028ecc ) 8028eb4: 7813 ldrb r3, [r2, #0] 8028eb6: 3301 adds r3, #1 8028eb8: b2db uxtb r3, r3 8028eba: 07d8 lsls r0, r3, #31 8028ebc: 7013 strb r3, [r2, #0] 8028ebe: d503 bpl.n 8028ec8 /* Call tcp_tmr() every 500 ms, i.e., every other timer tcp_tmr() is called. */ tcp_slowtmr(); } } 8028ec0: e8bd 4008 ldmia.w sp!, {r3, lr} tcp_fasttmr(); if (++tcp_timer & 1) { /* Call tcp_tmr() every 500 ms, i.e., every other timer tcp_tmr() is called. */ tcp_slowtmr(); 8028ec4: f7ff bcfa b.w 80288bc 8028ec8: bd08 pop {r3, pc} 8028eca: bf00 nop 8028ecc: 2000db58 .word 0x2000db58 08028ed0 : u32_t tcp_next_iss(void) { static u32_t iss = 6510; iss += tcp_ticks; /* XXX */ 8028ed0: 4b03 ldr r3, [pc, #12] ; (8028ee0 ) 8028ed2: 4a04 ldr r2, [pc, #16] ; (8028ee4 ) 8028ed4: 6810 ldr r0, [r2, #0] 8028ed6: 681a ldr r2, [r3, #0] 8028ed8: 1880 adds r0, r0, r2 8028eda: 6018 str r0, [r3, #0] return iss; } 8028edc: 4770 bx lr 8028ede: bf00 nop 8028ee0: 20001104 .word 0x20001104 8028ee4: 200104c8 .word 0x200104c8 08028ee8 : * @param prio priority for the new pcb * @return a new tcp_pcb that initially is in state CLOSED */ struct tcp_pcb * tcp_alloc(u8_t prio) { 8028ee8: b5f8 push {r3, r4, r5, r6, r7, lr} 8028eea: 4605 mov r5, r0 struct tcp_pcb *pcb; u32_t iss; pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 8028eec: 2002 movs r0, #2 8028eee: f7ff f8d3 bl 8028098 if (pcb == NULL) { 8028ef2: 4604 mov r4, r0 8028ef4: 2800 cmp r0, #0 8028ef6: d136 bne.n 8028f66 u32_t inactivity; inactivity = 0; inactive = NULL; /* Go through the list of TIME_WAIT pcbs and get the oldest pcb. */ for(pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 8028ef8: 4b39 ldr r3, [pc, #228] ; (8028fe0 ) if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 8028efa: 4a3a ldr r2, [pc, #232] ; (8028fe4 ) u32_t inactivity; inactivity = 0; inactive = NULL; /* Go through the list of TIME_WAIT pcbs and get the oldest pcb. */ for(pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 8028efc: 681b ldr r3, [r3, #0] if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 8028efe: 6811 ldr r1, [r2, #0] 8028f00: e007 b.n 8028f12 8028f02: 6a5a ldr r2, [r3, #36] ; 0x24 8028f04: 1a8a subs r2, r1, r2 8028f06: 42a2 cmp r2, r4 8028f08: bf34 ite cc 8028f0a: 4622 movcc r2, r4 8028f0c: 4618 movcs r0, r3 u32_t inactivity; inactivity = 0; inactive = NULL; /* Go through the list of TIME_WAIT pcbs and get the oldest pcb. */ for(pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 8028f0e: 68db ldr r3, [r3, #12] 8028f10: 4614 mov r4, r2 8028f12: 2b00 cmp r3, #0 8028f14: d1f5 bne.n 8028f02 if ((u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { inactivity = tcp_ticks - pcb->tmr; inactive = pcb; } } if (inactive != NULL) { 8028f16: b108 cbz r0, 8028f1c LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_timewait: killing oldest TIME-WAIT PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 8028f18: f7ff fe8e bl 8028c38 if (pcb == NULL) { /* Try killing oldest connection in TIME-WAIT. */ LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing off oldest TIME-WAIT connection\n")); tcp_kill_timewait(); /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 8028f1c: 2002 movs r0, #2 8028f1e: f7ff f8bb bl 8028098 if (pcb == NULL) { 8028f22: 4604 mov r4, r0 8028f24: b9f8 cbnz r0, 8028f66 inactivity = 0; inactive = NULL; for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { if (pcb->prio <= prio && pcb->prio <= mprio && (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 8028f26: 4a2f ldr r2, [pc, #188] ; (8028fe4 ) mprio = TCP_PRIO_MAX; /* We kill the oldest active connection that has lower priority than prio. */ inactivity = 0; inactive = NULL; for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 8028f28: 4b2f ldr r3, [pc, #188] ; (8028fe8 ) if (pcb->prio <= prio && pcb->prio <= mprio && (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 8028f2a: 6817 ldr r7, [r2, #0] mprio = TCP_PRIO_MAX; /* We kill the oldest active connection that has lower priority than prio. */ inactivity = 0; inactive = NULL; for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 8028f2c: 681b ldr r3, [r3, #0] struct tcp_pcb *pcb, *inactive; u32_t inactivity; u8_t mprio; mprio = TCP_PRIO_MAX; 8028f2e: 207f movs r0, #127 ; 0x7f /* We kill the oldest active connection that has lower priority than prio. */ inactivity = 0; inactive = NULL; 8028f30: 4622 mov r2, r4 8028f32: e00c b.n 8028f4e for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { if (pcb->prio <= prio && 8028f34: 7e59 ldrb r1, [r3, #25] 8028f36: 42a9 cmp r1, r5 8028f38: d808 bhi.n 8028f4c 8028f3a: 4281 cmp r1, r0 8028f3c: d806 bhi.n 8028f4c pcb->prio <= mprio && (u32_t)(tcp_ticks - pcb->tmr) >= inactivity) { 8028f3e: 6a5e ldr r6, [r3, #36] ; 0x24 8028f40: 1bbe subs r6, r7, r6 /* We kill the oldest active connection that has lower priority than prio. */ inactivity = 0; inactive = NULL; for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { if (pcb->prio <= prio && pcb->prio <= mprio && 8028f42: 42a6 cmp r6, r4 8028f44: d302 bcc.n 8028f4c 8028f46: 4608 mov r0, r1 8028f48: 4634 mov r4, r6 8028f4a: 461a mov r2, r3 mprio = TCP_PRIO_MAX; /* We kill the oldest active connection that has lower priority than prio. */ inactivity = 0; inactive = NULL; for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 8028f4c: 68db ldr r3, [r3, #12] 8028f4e: 2b00 cmp r3, #0 8028f50: d1f0 bne.n 8028f34 inactivity = tcp_ticks - pcb->tmr; inactive = pcb; mprio = pcb->prio; } } if (inactive != NULL) { 8028f52: b112 cbz r2, 8028f5a LWIP_DEBUGF(TCP_DEBUG, ("tcp_kill_prio: killing oldest PCB %p (%"S32_F")\n", (void *)inactive, inactivity)); tcp_abort(inactive); 8028f54: 4610 mov r0, r2 8028f56: f7ff fe6f bl 8028c38 if (pcb == NULL) { /* Try killing active connections with lower priority than the new one. */ LWIP_DEBUGF(TCP_DEBUG, ("tcp_alloc: killing connection with prio lower than %d\n", prio)); tcp_kill_prio(prio); /* Try to allocate a tcp_pcb again. */ pcb = (struct tcp_pcb *)memp_malloc(MEMP_TCP_PCB); 8028f5a: 2002 movs r0, #2 8028f5c: f7ff f89c bl 8028098 if (pcb != NULL) { /* adjust err stats: timewait PCB was freed above */ MEMP_STATS_DEC(err, MEMP_TCP_PCB); } } if (pcb != NULL) { 8028f60: 4604 mov r4, r0 8028f62: 2800 cmp r0, #0 8028f64: d039 beq.n 8028fda memset(pcb, 0, sizeof(struct tcp_pcb)); 8028f66: 2100 movs r1, #0 8028f68: 2294 movs r2, #148 ; 0x94 8028f6a: 4620 mov r0, r4 8028f6c: f7f8 fbc8 bl 8021700 pcb->prio = prio; pcb->snd_buf = TCP_SND_BUF; pcb->snd_queuelen = 0; pcb->rcv_wnd = TCP_WND; 8028f70: f241 62d0 movw r2, #5840 ; 0x16d0 } } if (pcb != NULL) { memset(pcb, 0, sizeof(struct tcp_pcb)); pcb->prio = prio; pcb->snd_buf = TCP_SND_BUF; 8028f74: f246 63a8 movw r3, #26280 ; 0x66a8 8028f78: f8a4 3066 strh.w r3, [r4, #102] ; 0x66 pcb->snd_queuelen = 0; pcb->rcv_wnd = TCP_WND; 8028f7c: 85a2 strh r2, [r4, #44] ; 0x2c } if (pcb != NULL) { memset(pcb, 0, sizeof(struct tcp_pcb)); pcb->prio = prio; pcb->snd_buf = TCP_SND_BUF; pcb->snd_queuelen = 0; 8028f7e: 2300 movs r3, #0 pcb->rcv_wnd = TCP_WND; pcb->rcv_ann_wnd = TCP_WND; 8028f80: 85e2 strh r2, [r4, #46] ; 0x2e pcb->tos = 0; pcb->ttl = TCP_TTL; 8028f82: 22ff movs r2, #255 ; 0xff MEMP_STATS_DEC(err, MEMP_TCP_PCB); } } if (pcb != NULL) { memset(pcb, 0, sizeof(struct tcp_pcb)); pcb->prio = prio; 8028f84: 7665 strb r5, [r4, #25] pcb->snd_buf = TCP_SND_BUF; pcb->snd_queuelen = 0; 8028f86: f8a4 3068 strh.w r3, [r4, #104] ; 0x68 8028f8a: 461d mov r5, r3 pcb->rcv_wnd = TCP_WND; pcb->rcv_ann_wnd = TCP_WND; pcb->tos = 0; 8028f8c: 7263 strb r3, [r4, #9] pcb->ttl = TCP_TTL; 8028f8e: 72a2 strb r2, [r4, #10] /* As initial send MSS, we use TCP_MSS but limit it to 536. The send MSS is updated when an MSS option is received. */ pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS; pcb->rto = 3000 / TCP_SLOW_INTERVAL; pcb->sa = 0; 8028f90: f8a4 3040 strh.w r3, [r4, #64] ; 0x40 pcb->rcv_ann_wnd = TCP_WND; pcb->tos = 0; pcb->ttl = TCP_TTL; /* As initial send MSS, we use TCP_MSS but limit it to 536. The send MSS is updated when an MSS option is received. */ pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS; 8028f94: f44f 7206 mov.w r2, #536 ; 0x218 pcb->rto = 3000 / TCP_SLOW_INTERVAL; pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; 8028f98: f64f 73ff movw r3, #65535 ; 0xffff pcb->rcv_ann_wnd = TCP_WND; pcb->tos = 0; pcb->ttl = TCP_TTL; /* As initial send MSS, we use TCP_MSS but limit it to 536. The send MSS is updated when an MSS option is received. */ pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS; 8028f9c: 86e2 strh r2, [r4, #54] ; 0x36 pcb->rto = 3000 / TCP_SLOW_INTERVAL; pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; 8028f9e: 86a3 strh r3, [r4, #52] ; 0x34 pcb->tos = 0; pcb->ttl = TCP_TTL; /* As initial send MSS, we use TCP_MSS but limit it to 536. The send MSS is updated when an MSS option is received. */ pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS; pcb->rto = 3000 / TCP_SLOW_INTERVAL; 8028fa0: 2206 movs r2, #6 pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; pcb->cwnd = 1; 8028fa2: 2301 movs r3, #1 8028fa4: f8a4 304c strh.w r3, [r4, #76] ; 0x4c pcb->tos = 0; pcb->ttl = TCP_TTL; /* As initial send MSS, we use TCP_MSS but limit it to 536. The send MSS is updated when an MSS option is received. */ pcb->mss = (TCP_MSS > 536) ? 536 : TCP_MSS; pcb->rto = 3000 / TCP_SLOW_INTERVAL; 8028fa8: f8a4 2044 strh.w r2, [r4, #68] ; 0x44 pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; 8028fac: f8a4 2042 strh.w r2, [r4, #66] ; 0x42 pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); 8028fb0: f7ff ff8e bl 8028ed0 pcb->snd_wl2 = iss; pcb->snd_nxt = iss; pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; 8028fb4: 4b0b ldr r3, [pc, #44] ; (8028fe4 ) pcb->sa = 0; pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); pcb->snd_wl2 = iss; 8028fb6: 65a0 str r0, [r4, #88] ; 0x58 pcb->snd_nxt = iss; pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; 8028fb8: 681b ldr r3, [r3, #0] pcb->sv = 3000 / TCP_SLOW_INTERVAL; pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); pcb->snd_wl2 = iss; pcb->snd_nxt = iss; 8028fba: 6520 str r0, [r4, #80] ; 0x50 pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; 8028fbc: 6263 str r3, [r4, #36] ; 0x24 pcb->last_timer = tcp_timer_ctr; 8028fbe: 4b0b ldr r3, [pc, #44] ; (8028fec ) pcb->rtime = -1; pcb->cwnd = 1; iss = tcp_next_iss(); pcb->snd_wl2 = iss; pcb->snd_nxt = iss; pcb->lastack = iss; 8028fc0: 64a0 str r0, [r4, #72] ; 0x48 pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; pcb->last_timer = tcp_timer_ctr; 8028fc2: 781b ldrb r3, [r3, #0] pcb->cwnd = 1; iss = tcp_next_iss(); pcb->snd_wl2 = iss; pcb->snd_nxt = iss; pcb->lastack = iss; pcb->snd_lbb = iss; 8028fc4: 65e0 str r0, [r4, #92] ; 0x5c pcb->tmr = tcp_ticks; pcb->last_timer = tcp_timer_ctr; 8028fc6: f884 3021 strb.w r3, [r4, #33] ; 0x21 pcb->polltmr = 0; #if LWIP_CALLBACK_API pcb->recv = tcp_recv_null; 8028fca: 4b09 ldr r3, [pc, #36] ; (8028ff0 ) pcb->lastack = iss; pcb->snd_lbb = iss; pcb->tmr = tcp_ticks; pcb->last_timer = tcp_timer_ctr; pcb->polltmr = 0; 8028fcc: 77e5 strb r5, [r4, #31] #if LWIP_CALLBACK_API pcb->recv = tcp_recv_null; 8028fce: 67e3 str r3, [r4, #124] ; 0x7c #endif /* LWIP_CALLBACK_API */ /* Init KEEPALIVE timer */ pcb->keep_idle = TCP_KEEPIDLE_DEFAULT; 8028fd0: 4b08 ldr r3, [pc, #32] ; (8028ff4 ) #if LWIP_TCP_KEEPALIVE pcb->keep_intvl = TCP_KEEPINTVL_DEFAULT; pcb->keep_cnt = TCP_KEEPCNT_DEFAULT; #endif /* LWIP_TCP_KEEPALIVE */ pcb->keep_cnt_sent = 0; 8028fd2: f884 5092 strb.w r5, [r4, #146] ; 0x92 #if LWIP_CALLBACK_API pcb->recv = tcp_recv_null; #endif /* LWIP_CALLBACK_API */ /* Init KEEPALIVE timer */ pcb->keep_idle = TCP_KEEPIDLE_DEFAULT; 8028fd6: f8c4 308c str.w r3, [r4, #140] ; 0x8c #endif /* LWIP_TCP_KEEPALIVE */ pcb->keep_cnt_sent = 0; } return pcb; } 8028fda: 4620 mov r0, r4 8028fdc: bdf8 pop {r3, r4, r5, r6, r7, pc} 8028fde: bf00 nop 8028fe0: 200104d8 .word 0x200104d8 8028fe4: 200104c8 .word 0x200104c8 8028fe8: 200104c4 .word 0x200104c4 8028fec: 2000db59 .word 0x2000db59 8028ff0: 08028db1 .word 0x08028db1 8028ff4: 006ddd00 .word 0x006ddd00 08028ff8 : * @return a new tcp_pcb that initially is in state CLOSED */ struct tcp_pcb * tcp_new(void) { return tcp_alloc(TCP_PRIO_NORMAL); 8028ff8: 2040 movs r0, #64 ; 0x40 8028ffa: f7ff bf75 b.w 8028ee8 08028ffe : * by using ip_route to determin the netif used to send to the address and * calculating the minimum of TCP_MSS and that netif's mtu (if set). */ u16_t tcp_eff_send_mss(u16_t sendmss, ip_addr_t *addr) { 8028ffe: b510 push {r4, lr} 8029000: 4604 mov r4, r0 u16_t mss_s; struct netif *outif; outif = ip_route(addr); 8029002: 4608 mov r0, r1 8029004: f002 f8f2 bl 802b1ec if ((outif != NULL) && (outif->mtu != 0)) { 8029008: b130 cbz r0, 8029018 802900a: 8c83 ldrh r3, [r0, #36] ; 0x24 802900c: b123 cbz r3, 8029018 mss_s = outif->mtu - IP_HLEN - TCP_HLEN; 802900e: 3b28 subs r3, #40 ; 0x28 /* RFC 1122, chap 4.2.2.6: * Eff.snd.MSS = min(SendMSS+20, MMS_S) - TCPhdrsize - IPoptionsize * We correct for TCP options in tcp_write(), and don't support IP options. */ sendmss = LWIP_MIN(sendmss, mss_s); 8029010: b29b uxth r3, r3 8029012: 429c cmp r4, r3 8029014: bf28 it cs 8029016: 461c movcs r4, r3 } return sendmss; } 8029018: 4620 mov r0, r4 802901a: bd10 pop {r4, pc} 0802901c : * * @param pcb the tcp_pcb for which a segment arrived */ static void tcp_parseopt(struct tcp_pcb *pcb) { 802901c: b5f8 push {r3, r4, r5, r6, r7, lr} u8_t *opts, opt; #if LWIP_TCP_TIMESTAMPS u32_t tsval; #endif opts = (u8_t *)tcphdr + TCP_HLEN; 802901e: 4d1e ldr r5, [pc, #120] ; (8029098 ) 8029020: 682c ldr r4, [r5, #0] * * @param pcb the tcp_pcb for which a segment arrived */ static void tcp_parseopt(struct tcp_pcb *pcb) { 8029022: 4606 mov r6, r0 #endif opts = (u8_t *)tcphdr + TCP_HLEN; /* Parse the TCP MSS option, if present. */ if(TCPH_HDRLEN(tcphdr) > 0x5) { 8029024: 89a0 ldrh r0, [r4, #12] 8029026: f7fe f81e bl 8027066 802902a: f3c0 300f ubfx r0, r0, #12, #16 802902e: 2805 cmp r0, #5 8029030: d931 bls.n 8029096 max_c = (TCPH_HDRLEN(tcphdr) - 5) << 2; 8029032: 682b ldr r3, [r5, #0] 8029034: 8998 ldrh r0, [r3, #12] 8029036: f7fe f816 bl 8027066 802903a: 0b00 lsrs r0, r0, #12 802903c: 1f41 subs r1, r0, #5 802903e: 0089 lsls r1, r1, #2 u8_t *opts, opt; #if LWIP_TCP_TIMESTAMPS u32_t tsval; #endif opts = (u8_t *)tcphdr + TCP_HLEN; 8029040: 3414 adds r4, #20 /* Parse the TCP MSS option, if present. */ if(TCPH_HDRLEN(tcphdr) > 0x5) { max_c = (TCPH_HDRLEN(tcphdr) - 5) << 2; 8029042: b289 uxth r1, r1 for (c = 0; c < max_c; ) { 8029044: 2300 movs r3, #0 return; } /* An MSS option with the right option length. */ mss = (opts[c + 2] << 8) | opts[c + 3]; /* Limit the mss to the configured TCP_MSS and prevent division by zero */ pcb->mss = ((mss > TCP_MSS) || (mss == 0)) ? TCP_MSS : mss; 8029046: f240 50b3 movw r0, #1459 ; 0x5b3 802904a: f240 55b4 movw r5, #1460 ; 0x5b4 opts = (u8_t *)tcphdr + TCP_HLEN; /* Parse the TCP MSS option, if present. */ if(TCPH_HDRLEN(tcphdr) > 0x5) { max_c = (TCPH_HDRLEN(tcphdr) - 5) << 2; for (c = 0; c < max_c; ) { 802904e: e020 b.n 8029092 opt = opts[c]; switch (opt) { 8029050: 5ce2 ldrb r2, [r4, r3] 8029052: 2a01 cmp r2, #1 8029054: d005 beq.n 8029062 8029056: d31e bcc.n 8029096 8029058: 2a02 cmp r2, #2 802905a: eb04 0203 add.w r2, r4, r3 802905e: d114 bne.n 802908a 8029060: e001 b.n 8029066 /* End of options. */ LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: EOL\n")); return; case 0x01: /* NOP option. */ ++c; 8029062: 3301 adds r3, #1 8029064: e014 b.n 8029090 LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: NOP\n")); break; case 0x02: LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: MSS\n")); if (opts[c + 1] != 0x04 || c + 0x04 > max_c) { 8029066: 7857 ldrb r7, [r2, #1] 8029068: 2f04 cmp r7, #4 802906a: d114 bne.n 8029096 802906c: 1cdf adds r7, r3, #3 802906e: 428f cmp r7, r1 8029070: da11 bge.n 8029096 /* Bad length */ LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n")); return; } /* An MSS option with the right option length. */ mss = (opts[c + 2] << 8) | opts[c + 3]; 8029072: 7897 ldrb r7, [r2, #2] 8029074: 78d2 ldrb r2, [r2, #3] 8029076: ea42 2207 orr.w r2, r2, r7, lsl #8 /* Limit the mss to the configured TCP_MSS and prevent division by zero */ pcb->mss = ((mss > TCP_MSS) || (mss == 0)) ? TCP_MSS : mss; 802907a: 1e57 subs r7, r2, #1 802907c: b2bf uxth r7, r7 802907e: 4287 cmp r7, r0 8029080: bf88 it hi 8029082: 462a movhi r2, r5 8029084: 86f2 strh r2, [r6, #54] ; 0x36 /* Advance to next option */ c += 0x04; 8029086: 3304 adds r3, #4 8029088: e002 b.n 8029090 c += 0x0A; break; #endif default: LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: other\n")); if (opts[c + 1] == 0) { 802908a: 7852 ldrb r2, [r2, #1] 802908c: b11a cbz r2, 8029096 and we don't process them further. */ return; } /* All other options have a length field, so that we easily can skip past them. */ c += opts[c + 1]; 802908e: 18d3 adds r3, r2, r3 8029090: b29b uxth r3, r3 opts = (u8_t *)tcphdr + TCP_HLEN; /* Parse the TCP MSS option, if present. */ if(TCPH_HDRLEN(tcphdr) > 0x5) { max_c = (TCPH_HDRLEN(tcphdr) - 5) << 2; for (c = 0; c < max_c; ) { 8029092: 428b cmp r3, r1 8029094: d3dc bcc.n 8029050 8029096: bdf8 pop {r3, r4, r5, r6, r7, pc} 8029098: 2000db5c .word 0x2000db5c 0802909c : * * Called from tcp_process(). */ static void tcp_receive(struct tcp_pcb *pcb) { 802909c: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} u16_t ooseq_qlen; #endif /* TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS */ LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); if (flags & TCP_ACK) { 80290a0: 4ba0 ldr r3, [pc, #640] ; (8029324 ) 80290a2: 781b ldrb r3, [r3, #0] 80290a4: f003 0310 and.w r3, r3, #16 80290a8: b2db uxtb r3, r3 * * Called from tcp_process(). */ static void tcp_receive(struct tcp_pcb *pcb) { 80290aa: 4604 mov r4, r0 u16_t ooseq_qlen; #endif /* TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS */ LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); if (flags & TCP_ACK) { 80290ac: 2b00 cmp r3, #0 80290ae: f000 816b beq.w 8029388 right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 80290b2: 4a9d ldr r2, [pc, #628] ; (8029328 ) 80290b4: 6d43 ldr r3, [r0, #84] ; 0x54 80290b6: 6812 ldr r2, [r2, #0] #endif /* TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS */ LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); if (flags & TCP_ACK) { right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; 80290b8: f8b0 5060 ldrh.w r5, [r0, #96] ; 0x60 80290bc: 6d81 ldr r1, [r0, #88] ; 0x58 /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || 80290be: 1a98 subs r0, r3, r2 80290c0: 2800 cmp r0, #0 80290c2: db0e blt.n 80290e2 80290c4: 4293 cmp r3, r2 80290c6: 4b99 ldr r3, [pc, #612] ; (802932c ) 80290c8: d103 bne.n 80290d2 (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || 80290ca: 6818 ldr r0, [r3, #0] 80290cc: 1a08 subs r0, r1, r0 80290ce: 2800 cmp r0, #0 80290d0: db07 blt.n 80290e2 80290d2: 681b ldr r3, [r3, #0] 80290d4: 4299 cmp r1, r3 80290d6: d11f bne.n 8029118 (pcb->snd_wl2 == ackno && tcphdr->wnd > pcb->snd_wnd)) { 80290d8: 4b95 ldr r3, [pc, #596] ; (8029330 ) 80290da: 681b ldr r3, [r3, #0] 80290dc: 89db ldrh r3, [r3, #14] 80290de: 42ab cmp r3, r5 80290e0: d91a bls.n 8029118 pcb->snd_wnd = tcphdr->wnd; 80290e2: 4b93 ldr r3, [pc, #588] ; (8029330 ) /* keep track of the biggest window announced by the remote host to calculate the maximum segment size */ if (pcb->snd_wnd_max < tcphdr->wnd) { 80290e4: f8b4 6062 ldrh.w r6, [r4, #98] ; 0x62 /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || (pcb->snd_wl2 == ackno && tcphdr->wnd > pcb->snd_wnd)) { pcb->snd_wnd = tcphdr->wnd; 80290e8: 681b ldr r3, [r3, #0] 80290ea: 89d8 ldrh r0, [r3, #14] /* keep track of the biggest window announced by the remote host to calculate the maximum segment size */ if (pcb->snd_wnd_max < tcphdr->wnd) { pcb->snd_wnd_max = tcphdr->wnd; } pcb->snd_wl1 = seqno; 80290ec: 6562 str r2, [r4, #84] ; 0x54 pcb->snd_wl2 = ackno; 80290ee: 4a8f ldr r2, [pc, #572] ; (802932c ) /* Update window. */ if (TCP_SEQ_LT(pcb->snd_wl1, seqno) || (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || (pcb->snd_wl2 == ackno && tcphdr->wnd > pcb->snd_wnd)) { pcb->snd_wnd = tcphdr->wnd; 80290f0: f8a4 0060 strh.w r0, [r4, #96] ; 0x60 the maximum segment size */ if (pcb->snd_wnd_max < tcphdr->wnd) { pcb->snd_wnd_max = tcphdr->wnd; } pcb->snd_wl1 = seqno; pcb->snd_wl2 = ackno; 80290f4: 6812 ldr r2, [r2, #0] (pcb->snd_wl1 == seqno && TCP_SEQ_LT(pcb->snd_wl2, ackno)) || (pcb->snd_wl2 == ackno && tcphdr->wnd > pcb->snd_wnd)) { pcb->snd_wnd = tcphdr->wnd; /* keep track of the biggest window announced by the remote host to calculate the maximum segment size */ if (pcb->snd_wnd_max < tcphdr->wnd) { 80290f6: 4286 cmp r6, r0 pcb->snd_wnd_max = tcphdr->wnd; } pcb->snd_wl1 = seqno; pcb->snd_wl2 = ackno; 80290f8: 65a2 str r2, [r4, #88] ; 0x58 (pcb->snd_wl2 == ackno && tcphdr->wnd > pcb->snd_wnd)) { pcb->snd_wnd = tcphdr->wnd; /* keep track of the biggest window announced by the remote host to calculate the maximum segment size */ if (pcb->snd_wnd_max < tcphdr->wnd) { pcb->snd_wnd_max = tcphdr->wnd; 80290fa: bf38 it cc 80290fc: f8a4 0062 strhcc.w r0, [r4, #98] ; 0x62 8029100: f894 2091 ldrb.w r2, [r4, #145] ; 0x91 } pcb->snd_wl1 = seqno; pcb->snd_wl2 = ackno; if (pcb->snd_wnd == 0) { 8029104: b920 cbnz r0, 8029110 if (pcb->persist_backoff == 0) { 8029106: b93a cbnz r2, 8029118 /* start persist timer */ pcb->persist_cnt = 0; 8029108: f884 0090 strb.w r0, [r4, #144] ; 0x90 pcb->persist_backoff = 1; 802910c: 2301 movs r3, #1 802910e: e001 b.n 8029114 } } else if (pcb->persist_backoff > 0) { 8029110: b112 cbz r2, 8029118 /* stop persist timer */ pcb->persist_backoff = 0; 8029112: 2300 movs r3, #0 8029114: f884 3091 strb.w r3, [r4, #145] ; 0x91 * If it only passes 1, should reset dupack counter * */ /* Clause 1 */ if (TCP_SEQ_LEQ(ackno, pcb->lastack)) { 8029118: 4b84 ldr r3, [pc, #528] ; (802932c ) 802911a: 6ca2 ldr r2, [r4, #72] ; 0x48 802911c: 681b ldr r3, [r3, #0] 802911e: 1a98 subs r0, r3, r2 8029120: 2800 cmp r0, #0 8029122: dc34 bgt.n 802918e pcb->acked = 0; 8029124: 2000 movs r0, #0 8029126: f8a4 0064 strh.w r0, [r4, #100] ; 0x64 /* Clause 2 */ if (tcplen == 0) { 802912a: 4882 ldr r0, [pc, #520] ; (8029334 ) 802912c: 8800 ldrh r0, [r0, #0] 802912e: 2800 cmp r0, #0 8029130: f040 81f4 bne.w 802951c /* Clause 3 */ if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge){ 8029134: f8b4 6060 ldrh.w r6, [r4, #96] ; 0x60 8029138: 6da0 ldr r0, [r4, #88] ; 0x58 #endif /* TCP_OOSEQ_MAX_BYTES || TCP_OOSEQ_MAX_PBUFS */ LWIP_ASSERT("tcp_receive: wrong state", pcb->state >= ESTABLISHED); if (flags & TCP_ACK) { right_wnd_edge = pcb->snd_wnd + pcb->snd_wl2; 802913a: 1869 adds r1, r5, r1 if (TCP_SEQ_LEQ(ackno, pcb->lastack)) { pcb->acked = 0; /* Clause 2 */ if (tcplen == 0) { /* Clause 3 */ if (pcb->snd_wl2 + pcb->snd_wnd == right_wnd_edge){ 802913c: 1830 adds r0, r6, r0 802913e: 4288 cmp r0, r1 8029140: f040 81ec bne.w 802951c /* Clause 4 */ if (pcb->rtime >= 0) { 8029144: f9b4 1034 ldrsh.w r1, [r4, #52] ; 0x34 8029148: 2900 cmp r1, #0 802914a: f2c0 81e7 blt.w 802951c /* Clause 5 */ if (pcb->lastack == ackno) { 802914e: 429a cmp r2, r3 8029150: f040 81e4 bne.w 802951c found_dupack = 1; if ((u8_t)(pcb->dupacks + 1) > pcb->dupacks) { 8029154: f894 2047 ldrb.w r2, [r4, #71] ; 0x47 8029158: 1c53 adds r3, r2, #1 802915a: b2db uxtb r3, r3 802915c: 4293 cmp r3, r2 ++pcb->dupacks; 802915e: bf88 it hi 8029160: f884 3047 strbhi.w r3, [r4, #71] ; 0x47 } if (pcb->dupacks > 3) { 8029164: f894 3047 ldrb.w r3, [r4, #71] ; 0x47 8029168: 2b03 cmp r3, #3 802916a: d90a bls.n 8029182 /* Inflate the congestion window, but not if it means that the value overflows. */ if ((u16_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { 802916c: f8b4 204c ldrh.w r2, [r4, #76] ; 0x4c 8029170: 8ee3 ldrh r3, [r4, #54] ; 0x36 8029172: 18d3 adds r3, r2, r3 8029174: b29b uxth r3, r3 8029176: 4293 cmp r3, r2 8029178: f240 80b2 bls.w 80292e0 pcb->cwnd += pcb->mss; 802917c: f8a4 304c strh.w r3, [r4, #76] ; 0x4c 8029180: e0ae b.n 80292e0 } } else if (pcb->dupacks == 3) { 8029182: f040 80ad bne.w 80292e0 /* Do fast retransmit */ tcp_rexmit_fast(pcb); 8029186: 4620 mov r0, r4 8029188: f001 fa92 bl 802a6b0 802918c: e0a8 b.n 80292e0 /* If Clause (1) or more is true, but not a duplicate ack, reset * count of consecutive duplicate acks */ if (!found_dupack) { pcb->dupacks = 0; } } else if (TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)){ 802918e: 43d1 mvns r1, r2 8029190: 42d9 cmn r1, r3 8029192: d47e bmi.n 8029292 8029194: 6d21 ldr r1, [r4, #80] ; 0x50 8029196: 1a59 subs r1, r3, r1 8029198: 2900 cmp r1, #0 802919a: dc7a bgt.n 8029292 /* We come here when the ACK acknowledges new data. */ /* Reset the "IN Fast Retransmit" flag, since we are no longer in fast retransmit. Also reset the congestion window to the slow start threshold. */ if (pcb->flags & TF_INFR) { 802919c: 7fa1 ldrb r1, [r4, #30] 802919e: f001 0004 and.w r0, r1, #4 80291a2: b2c0 uxtb r0, r0 80291a4: b130 cbz r0, 80291b4 pcb->flags &= ~TF_INFR; 80291a6: f021 0104 bic.w r1, r1, #4 80291aa: 77a1 strb r1, [r4, #30] pcb->cwnd = pcb->ssthresh; 80291ac: f8b4 104e ldrh.w r1, [r4, #78] ; 0x4e 80291b0: f8a4 104c strh.w r1, [r4, #76] ; 0x4c /* Reset the number of retransmissions. */ pcb->nrtx = 0; /* Reset the retransmission time-out. */ pcb->rto = (pcb->sa >> 3) + pcb->sv; 80291b4: f9b4 5040 ldrsh.w r5, [r4, #64] ; 0x40 80291b8: f8b4 0042 ldrh.w r0, [r4, #66] ; 0x42 pcb->snd_buf += pcb->acked; /* Reset the fast retransmit variables. */ pcb->dupacks = 0; pcb->lastack = ackno; 80291bc: 64a3 str r3, [r4, #72] ; 0x48 /* Reset the number of retransmissions. */ pcb->nrtx = 0; /* Reset the retransmission time-out. */ pcb->rto = (pcb->sa >> 3) + pcb->sv; 80291be: eb00 00e5 add.w r0, r0, r5, asr #3 /* Update the send buffer space. Diff between the two can never exceed 64K? */ pcb->acked = (u16_t)(ackno - pcb->lastack); 80291c2: 1a9a subs r2, r3, r2 /* Reset the number of retransmissions. */ pcb->nrtx = 0; /* Reset the retransmission time-out. */ pcb->rto = (pcb->sa >> 3) + pcb->sv; 80291c4: f8a4 0044 strh.w r0, [r4, #68] ; 0x44 pcb->dupacks = 0; pcb->lastack = ackno; /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { 80291c8: 7e23 ldrb r3, [r4, #24] pcb->rto = (pcb->sa >> 3) + pcb->sv; /* Update the send buffer space. Diff between the two can never exceed 64K? */ pcb->acked = (u16_t)(ackno - pcb->lastack); pcb->snd_buf += pcb->acked; 80291ca: f8b4 0066 ldrh.w r0, [r4, #102] ; 0x66 /* Reset the retransmission time-out. */ pcb->rto = (pcb->sa >> 3) + pcb->sv; /* Update the send buffer space. Diff between the two can never exceed 64K? */ pcb->acked = (u16_t)(ackno - pcb->lastack); 80291ce: f8a4 2064 strh.w r2, [r4, #100] ; 0x64 pcb->flags &= ~TF_INFR; pcb->cwnd = pcb->ssthresh; } /* Reset the number of retransmissions. */ pcb->nrtx = 0; 80291d2: 2100 movs r1, #0 pcb->rto = (pcb->sa >> 3) + pcb->sv; /* Update the send buffer space. Diff between the two can never exceed 64K? */ pcb->acked = (u16_t)(ackno - pcb->lastack); pcb->snd_buf += pcb->acked; 80291d4: 1812 adds r2, r2, r0 pcb->dupacks = 0; pcb->lastack = ackno; /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { 80291d6: 2b03 cmp r3, #3 pcb->flags &= ~TF_INFR; pcb->cwnd = pcb->ssthresh; } /* Reset the number of retransmissions. */ pcb->nrtx = 0; 80291d8: f884 1046 strb.w r1, [r4, #70] ; 0x46 pcb->rto = (pcb->sa >> 3) + pcb->sv; /* Update the send buffer space. Diff between the two can never exceed 64K? */ pcb->acked = (u16_t)(ackno - pcb->lastack); pcb->snd_buf += pcb->acked; 80291dc: f8a4 2066 strh.w r2, [r4, #102] ; 0x66 /* Reset the fast retransmit variables. */ pcb->dupacks = 0; 80291e0: f884 1047 strb.w r1, [r4, #71] ; 0x47 pcb->lastack = ackno; /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { 80291e4: d931 bls.n 802924a if (pcb->cwnd < pcb->ssthresh) { 80291e6: f8b4 204e ldrh.w r2, [r4, #78] ; 0x4e 80291ea: f8b4 304c ldrh.w r3, [r4, #76] ; 0x4c 80291ee: 429a cmp r2, r3 if ((u16_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { 80291f0: 8ee2 ldrh r2, [r4, #54] ; 0x36 pcb->lastack = ackno; /* Update the congestion control variables (cwnd and ssthresh). */ if (pcb->state >= ESTABLISHED) { if (pcb->cwnd < pcb->ssthresh) { 80291f2: d900 bls.n 80291f6 80291f4: e002 b.n 80291fc if ((u16_t)(pcb->cwnd + pcb->mss) > pcb->cwnd) { pcb->cwnd += pcb->mss; } LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_receive: slow start cwnd %"U16_F"\n", pcb->cwnd)); } else { u16_t new_cwnd = (pcb->cwnd + pcb->mss * pcb->mss / pcb->cwnd); 80291f6: 4352 muls r2, r2 80291f8: fb92 f2f3 sdiv r2, r2, r3 80291fc: 189a adds r2, r3, r2 80291fe: b292 uxth r2, r2 if (new_cwnd > pcb->cwnd) { 8029200: 429a cmp r2, r3 8029202: d922 bls.n 802924a pcb->cwnd = new_cwnd; 8029204: f8a4 204c strh.w r2, [r4, #76] ; 0x4c 8029208: e01f b.n 802924a LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: removing %"U32_F":%"U32_F" from pcb->unacked\n", ntohl(pcb->unacked->tcphdr->seqno), ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked))); next = pcb->unacked; 802920a: 6f25 ldr r5, [r4, #112] ; 0x70 pcb->unacked = pcb->unacked->next; 802920c: 682b ldr r3, [r5, #0] LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"U16_F" ... ", (u16_t)pcb->snd_queuelen)); LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p))); 802920e: 6868 ldr r0, [r5, #4] ntohl(pcb->unacked->tcphdr->seqno), ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked))); next = pcb->unacked; pcb->unacked = pcb->unacked->next; 8029210: 6723 str r3, [r4, #112] ; 0x70 LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"U16_F" ... ", (u16_t)pcb->snd_queuelen)); LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p))); 8029212: f7ff f935 bl 8028480 /* Prevent ACK for FIN to generate a sent event */ if ((pcb->acked != 0) && ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0)) { 8029216: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 802921a: b153 cbz r3, 8029232 802921c: 68eb ldr r3, [r5, #12] 802921e: 8998 ldrh r0, [r3, #12] 8029220: f7fd ff21 bl 8027066 8029224: 07c3 lsls r3, r0, #31 8029226: d504 bpl.n 8029232 pcb->acked--; 8029228: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 802922c: 3b01 subs r3, #1 802922e: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 } pcb->snd_queuelen -= pbuf_clen(next->p); 8029232: 6868 ldr r0, [r5, #4] 8029234: f8b4 7068 ldrh.w r7, [r4, #104] ; 0x68 8029238: f7ff f922 bl 8028480 802923c: 1a38 subs r0, r7, r0 802923e: f8a4 0068 strh.w r0, [r4, #104] ; 0x68 tcp_seg_free(next); 8029242: 4628 mov r0, r5 8029244: f7ff faf5 bl 8028832 8029248: e000 b.n 802924c ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked): 0)); /* Remove segment from the unacknowledged list if the incoming ACK acknowlegdes them. */ while (pcb->unacked != NULL && TCP_SEQ_LEQ(ntohl(pcb->unacked->tcphdr->seqno) + 802924a: 4e38 ldr r6, [pc, #224] ; (802932c ) pcb->unacked != NULL? ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked): 0)); /* Remove segment from the unacknowledged list if the incoming ACK acknowlegdes them. */ while (pcb->unacked != NULL && 802924c: 6f23 ldr r3, [r4, #112] ; 0x70 802924e: b91b cbnz r3, 8029258 } } /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if(pcb->unacked == NULL) 8029250: 6f22 ldr r2, [r4, #112] ; 0x70 8029252: 2300 movs r3, #0 8029254: b9d2 cbnz r2, 802928c 8029256: e015 b.n 8029284 ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked): 0)); /* Remove segment from the unacknowledged list if the incoming ACK acknowlegdes them. */ while (pcb->unacked != NULL && TCP_SEQ_LEQ(ntohl(pcb->unacked->tcphdr->seqno) + 8029258: 68db ldr r3, [r3, #12] 802925a: 6858 ldr r0, [r3, #4] 802925c: f7fd ff0a bl 8027074 8029260: 6f23 ldr r3, [r4, #112] ; 0x70 8029262: 891d ldrh r5, [r3, #8] 8029264: 68db ldr r3, [r3, #12] 8029266: 4607 mov r7, r0 8029268: 8998 ldrh r0, [r3, #12] 802926a: f7fd fefc bl 8027066 802926e: 6833 ldr r3, [r6, #0] 8029270: f010 0003 ands.w r0, r0, #3 8029274: bf18 it ne 8029276: 2001 movne r0, #1 8029278: 1afb subs r3, r7, r3 802927a: 1828 adds r0, r5, r0 802927c: 181b adds r3, r3, r0 pcb->unacked != NULL? ntohl(pcb->unacked->tcphdr->seqno) + TCP_TCPLEN(pcb->unacked): 0)); /* Remove segment from the unacknowledged list if the incoming ACK acknowlegdes them. */ while (pcb->unacked != NULL && 802927e: 2b00 cmp r3, #0 8029280: ddc3 ble.n 802920a 8029282: e7e5 b.n 8029250 } /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if(pcb->unacked == NULL) pcb->rtime = -1; 8029284: f64f 72ff movw r2, #65535 ; 0xffff 8029288: 86a2 strh r2, [r4, #52] ; 0x34 802928a: e000 b.n 802928e else pcb->rtime = 0; 802928c: 86a3 strh r3, [r4, #52] ; 0x34 pcb->polltmr = 0; 802928e: 77e3 strb r3, [r4, #31] 8029290: e026 b.n 80292e0 } else { /* Fix bug bug #21582: out of sequence ACK, didn't really ack anything */ pcb->acked = 0; 8029292: 2300 movs r3, #0 8029294: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 8029298: e022 b.n 80292e0 TCP_TCPLEN(pcb->unsent), pcb->snd_nxt)) { LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: removing %"U32_F":%"U32_F" from pcb->unsent\n", ntohl(pcb->unsent->tcphdr->seqno), ntohl(pcb->unsent->tcphdr->seqno) + TCP_TCPLEN(pcb->unsent))); next = pcb->unsent; 802929a: 6ee5 ldr r5, [r4, #108] ; 0x6c pcb->unsent = pcb->unsent->next; 802929c: 682b ldr r3, [r5, #0] 802929e: 66e3 str r3, [r4, #108] ; 0x6c #if TCP_OVERSIZE if (pcb->unsent == NULL) { 80292a0: b90b cbnz r3, 80292a6 pcb->unsent_oversize = 0; 80292a2: f8a4 306a strh.w r3, [r4, #106] ; 0x6a } #endif /* TCP_OVERSIZE */ LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"U16_F" ... ", (u16_t)pcb->snd_queuelen)); LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p))); 80292a6: 6868 ldr r0, [r5, #4] 80292a8: f7ff f8ea bl 8028480 /* Prevent ACK for FIN to generate a sent event */ if ((pcb->acked != 0) && ((TCPH_FLAGS(next->tcphdr) & TCP_FIN) != 0)) { 80292ac: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 80292b0: b153 cbz r3, 80292c8 80292b2: 68eb ldr r3, [r5, #12] 80292b4: 8998 ldrh r0, [r3, #12] 80292b6: f7fd fed6 bl 8027066 80292ba: 07c7 lsls r7, r0, #31 80292bc: d504 bpl.n 80292c8 pcb->acked--; 80292be: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 80292c2: 3b01 subs r3, #1 80292c4: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 } pcb->snd_queuelen -= pbuf_clen(next->p); 80292c8: 6868 ldr r0, [r5, #4] 80292ca: f8b4 7068 ldrh.w r7, [r4, #104] ; 0x68 80292ce: f7ff f8d7 bl 8028480 80292d2: 1a38 subs r0, r7, r0 80292d4: f8a4 0068 strh.w r0, [r4, #104] ; 0x68 tcp_seg_free(next); 80292d8: 4628 mov r0, r5 80292da: f7ff faaa bl 8028832 80292de: e000 b.n 80292e2 strange since an "unsent" segment shouldn't be acked. The rationale is that lwIP puts all outstanding segments on the ->unsent list after a retransmission, so these segments may in fact have been sent once. */ while (pcb->unsent != NULL && TCP_SEQ_BETWEEN(ackno, ntohl(pcb->unsent->tcphdr->seqno) + 80292e0: 4e12 ldr r6, [pc, #72] ; (802932c ) on the list are acknowledged by the ACK. This may seem strange since an "unsent" segment shouldn't be acked. The rationale is that lwIP puts all outstanding segments on the ->unsent list after a retransmission, so these segments may in fact have been sent once. */ while (pcb->unsent != NULL && 80292e2: 6ee3 ldr r3, [r4, #108] ; 0x6c 80292e4: b913 cbnz r3, 80292ec pcb->rttest, pcb->rtseq, ackno)); /* RTT estimation calculations. This is done by checking if the incoming segment acknowledges the segment we use to take a round-trip time measurement. */ if (pcb->rttest && TCP_SEQ_LT(pcb->rtseq, ackno)) { 80292e6: 6ba3 ldr r3, [r4, #56] ; 0x38 80292e8: bb33 cbnz r3, 8029338 80292ea: e04d b.n 8029388 strange since an "unsent" segment shouldn't be acked. The rationale is that lwIP puts all outstanding segments on the ->unsent list after a retransmission, so these segments may in fact have been sent once. */ while (pcb->unsent != NULL && TCP_SEQ_BETWEEN(ackno, ntohl(pcb->unsent->tcphdr->seqno) + 80292ec: 68db ldr r3, [r3, #12] 80292ee: 6835 ldr r5, [r6, #0] 80292f0: 6858 ldr r0, [r3, #4] 80292f2: f7fd febf bl 8027074 80292f6: 6ee3 ldr r3, [r4, #108] ; 0x6c 80292f8: 891f ldrh r7, [r3, #8] 80292fa: 68db ldr r3, [r3, #12] 80292fc: 4680 mov r8, r0 80292fe: 8998 ldrh r0, [r3, #12] 8029300: f7fd feb1 bl 8027066 8029304: f010 0003 ands.w r0, r0, #3 8029308: bf18 it ne 802930a: 2001 movne r0, #1 802930c: ebc8 0505 rsb r5, r8, r5 8029310: 1838 adds r0, r7, r0 8029312: 1a2d subs r5, r5, r0 on the list are acknowledged by the ACK. This may seem strange since an "unsent" segment shouldn't be acked. The rationale is that lwIP puts all outstanding segments on the ->unsent list after a retransmission, so these segments may in fact have been sent once. */ while (pcb->unsent != NULL && 8029314: 2d00 cmp r5, #0 8029316: dbe6 blt.n 80292e6 TCP_SEQ_BETWEEN(ackno, ntohl(pcb->unsent->tcphdr->seqno) + 8029318: 6832 ldr r2, [r6, #0] 802931a: 6d23 ldr r3, [r4, #80] ; 0x50 802931c: 1ad3 subs r3, r2, r3 802931e: 2b00 cmp r3, #0 8029320: ddbb ble.n 802929a 8029322: e7e0 b.n 80292e6 8029324: 2000db6c .word 0x2000db6c 8029328: 2000db60 .word 0x2000db60 802932c: 2000db68 .word 0x2000db68 8029330: 2000db5c .word 0x2000db5c 8029334: 2000db64 .word 0x2000db64 pcb->rttest, pcb->rtseq, ackno)); /* RTT estimation calculations. This is done by checking if the incoming segment acknowledges the segment we use to take a round-trip time measurement. */ if (pcb->rttest && TCP_SEQ_LT(pcb->rtseq, ackno)) { 8029338: 497b ldr r1, [pc, #492] ; (8029528 ) 802933a: 6be2 ldr r2, [r4, #60] ; 0x3c 802933c: 6809 ldr r1, [r1, #0] 802933e: 1a52 subs r2, r2, r1 8029340: 2a00 cmp r2, #0 8029342: da21 bge.n 8029388 /* diff between this shouldn't exceed 32K since this are tcp timer ticks and a round-trip shouldn't be that long... */ m = (s16_t)(tcp_ticks - pcb->rttest); 8029344: 4a79 ldr r2, [pc, #484] ; (802952c ) LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: experienced rtt %"U16_F" ticks (%"U16_F" msec).\n", m, m * TCP_SLOW_INTERVAL)); /* This is taken directly from VJs original code in his paper */ m = m - (pcb->sa >> 3); 8029346: f8b4 1040 ldrh.w r1, [r4, #64] ; 0x40 incoming segment acknowledges the segment we use to take a round-trip time measurement. */ if (pcb->rttest && TCP_SEQ_LT(pcb->rtseq, ackno)) { /* diff between this shouldn't exceed 32K since this are tcp timer ticks and a round-trip shouldn't be that long... */ m = (s16_t)(tcp_ticks - pcb->rttest); 802934a: 6812 ldr r2, [r2, #0] LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: experienced rtt %"U16_F" ticks (%"U16_F" msec).\n", m, m * TCP_SLOW_INTERVAL)); /* This is taken directly from VJs original code in his paper */ m = m - (pcb->sa >> 3); 802934c: f341 00cc sbfx r0, r1, #3, #13 incoming segment acknowledges the segment we use to take a round-trip time measurement. */ if (pcb->rttest && TCP_SEQ_LT(pcb->rtseq, ackno)) { /* diff between this shouldn't exceed 32K since this are tcp timer ticks and a round-trip shouldn't be that long... */ m = (s16_t)(tcp_ticks - pcb->rttest); 8029350: 1ad2 subs r2, r2, r3 LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: experienced rtt %"U16_F" ticks (%"U16_F" msec).\n", m, m * TCP_SLOW_INTERVAL)); /* This is taken directly from VJs original code in his paper */ m = m - (pcb->sa >> 3); 8029352: 1a12 subs r2, r2, r0 8029354: b292 uxth r2, r2 8029356: b293 uxth r3, r2 pcb->sa += m; 8029358: 1851 adds r1, r2, r1 802935a: b289 uxth r1, r1 if (m < 0) { 802935c: 0418 lsls r0, r3, #16 LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: experienced rtt %"U16_F" ticks (%"U16_F" msec).\n", m, m * TCP_SLOW_INTERVAL)); /* This is taken directly from VJs original code in his paper */ m = m - (pcb->sa >> 3); pcb->sa += m; 802935e: f8a4 1040 strh.w r1, [r4, #64] ; 0x40 if (m < 0) { 8029362: d501 bpl.n 8029368 m = -m; 8029364: 4253 negs r3, r2 8029366: b29b uxth r3, r3 } m = m - (pcb->sv >> 2); 8029368: f8b4 2042 ldrh.w r2, [r4, #66] ; 0x42 802936c: f342 008d sbfx r0, r2, #2, #14 8029370: 1a12 subs r2, r2, r0 pcb->sv += m; 8029372: 18d3 adds r3, r2, r3 8029374: b29b uxth r3, r3 pcb->rto = (pcb->sa >> 3) + pcb->sv; 8029376: f341 01cc sbfx r1, r1, #3, #13 pcb->sa += m; if (m < 0) { m = -m; } m = m - (pcb->sv >> 2); pcb->sv += m; 802937a: f8a4 3042 strh.w r3, [r4, #66] ; 0x42 pcb->rto = (pcb->sa >> 3) + pcb->sv; 802937e: 185b adds r3, r3, r1 8029380: f8a4 3044 strh.w r3, [r4, #68] ; 0x44 LWIP_DEBUGF(TCP_RTO_DEBUG, ("tcp_receive: RTO %"U16_F" (%"U16_F" milliseconds)\n", pcb->rto, pcb->rto * TCP_SLOW_INTERVAL)); pcb->rttest = 0; 8029384: 2300 movs r3, #0 8029386: 63a3 str r3, [r4, #56] ; 0x38 /* If the incoming segment contains data, we must process it further unless the pcb already received a FIN. (RFC 793, chapeter 3.9, "SEGMENT ARRIVES" in states CLOSE-WAIT, CLOSING, LAST-ACK and TIME-WAIT: "Ignore the segment text.") */ if ((tcplen > 0) && (pcb->state < CLOSE_WAIT)) { 8029388: 4b69 ldr r3, [pc, #420] ; (8029530 ) 802938a: 4a6a ldr r2, [pc, #424] ; (8029534 ) 802938c: 8818 ldrh r0, [r3, #0] 802938e: 2800 cmp r0, #0 8029390: f000 80b3 beq.w 80294fa 8029394: 7e23 ldrb r3, [r4, #24] 8029396: 2b06 cmp r3, #6 8029398: f200 80af bhi.w 80294fa this if the sequence number of the incoming segment is less than rcv_nxt, and the sequence number plus the length of the segment is larger than rcv_nxt. */ /* if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)){ if (TCP_SEQ_LT(pcb->rcv_nxt, seqno + tcplen)) {*/ if (TCP_SEQ_BETWEEN(pcb->rcv_nxt, seqno + 1, seqno + tcplen - 1)){ 802939c: 6811 ldr r1, [r2, #0] 802939e: 6aa3 ldr r3, [r4, #40] ; 0x28 80293a0: 43ca mvns r2, r1 80293a2: 42da cmn r2, r3 80293a4: d425 bmi.n 80293f2 80293a6: 1c5a adds r2, r3, #1 80293a8: 1a52 subs r2, r2, r1 80293aa: 1a10 subs r0, r2, r0 80293ac: 2800 cmp r0, #0 80293ae: dc20 bgt.n 80293f2 After we are done with adjusting the pbuf pointers we must adjust the ->data pointer in the seg and the segment length.*/ off = pcb->rcv_nxt - seqno; 80293b0: 1a59 subs r1, r3, r1 p = inseg.p; 80293b2: 4b61 ldr r3, [pc, #388] ; (8029538 ) 80293b4: 6858 ldr r0, [r3, #4] LWIP_ASSERT("inseg.p != NULL", inseg.p); LWIP_ASSERT("insane offset!", (off < 0x7fff)); if (inseg.p->len < off) { 80293b6: 8943 ldrh r3, [r0, #10] 80293b8: 428b cmp r3, r1 80293ba: da0a bge.n 80293d2 LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); new_tot_len = (u16_t)(inseg.p->tot_len - off); 80293bc: 8902 ldrh r2, [r0, #8] off -= p->len; /* KJM following line changed (with addition of new_tot_len var) to fix bug #9076 inseg.p->tot_len -= p->len; */ p->tot_len = new_tot_len; p->len = 0; 80293be: 2500 movs r5, #0 p = inseg.p; LWIP_ASSERT("inseg.p != NULL", inseg.p); LWIP_ASSERT("insane offset!", (off < 0x7fff)); if (inseg.p->len < off) { LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); new_tot_len = (u16_t)(inseg.p->tot_len - off); 80293c0: 1a52 subs r2, r2, r1 while (p->len < off) { 80293c2: e003 b.n 80293cc off -= p->len; /* KJM following line changed (with addition of new_tot_len var) to fix bug #9076 inseg.p->tot_len -= p->len; */ p->tot_len = new_tot_len; 80293c4: 8102 strh r2, [r0, #8] p->len = 0; 80293c6: 8145 strh r5, [r0, #10] p = p->next; 80293c8: 6800 ldr r0, [r0, #0] LWIP_ASSERT("insane offset!", (off < 0x7fff)); if (inseg.p->len < off) { LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); new_tot_len = (u16_t)(inseg.p->tot_len - off); while (p->len < off) { off -= p->len; 80293ca: 1ac9 subs r1, r1, r3 LWIP_ASSERT("inseg.p != NULL", inseg.p); LWIP_ASSERT("insane offset!", (off < 0x7fff)); if (inseg.p->len < off) { LWIP_ASSERT("pbuf too short!", (((s32_t)inseg.p->tot_len) >= off)); new_tot_len = (u16_t)(inseg.p->tot_len - off); while (p->len < off) { 80293cc: 8943 ldrh r3, [r0, #10] 80293ce: 428b cmp r3, r1 80293d0: dbf8 blt.n 80293c4 if(pbuf_header(p, (s16_t)-off)) { /* Do we need to cope with this failing? Assert for now */ LWIP_ASSERT("pbuf_header failed", 0); } } else { if(pbuf_header(inseg.p, (s16_t)-off)) { 80293d2: 4249 negs r1, r1 80293d4: b209 sxth r1, r1 80293d6: f7fe ff54 bl 8028282 /* Do we need to cope with this failing? Assert for now */ LWIP_ASSERT("pbuf_header failed", 0); } } inseg.len -= (u16_t)(pcb->rcv_nxt - seqno); 80293da: 4a57 ldr r2, [pc, #348] ; (8029538 ) 80293dc: 4955 ldr r1, [pc, #340] ; (8029534 ) 80293de: 8915 ldrh r5, [r2, #8] 80293e0: 6808 ldr r0, [r1, #0] 80293e2: 6aa3 ldr r3, [r4, #40] ; 0x28 80293e4: 1940 adds r0, r0, r5 80293e6: 1ac0 subs r0, r0, r3 80293e8: 8110 strh r0, [r2, #8] inseg.tcphdr->seqno = seqno = pcb->rcv_nxt; 80293ea: 68d2 ldr r2, [r2, #12] 80293ec: 600b str r3, [r1, #0] 80293ee: 6053 str r3, [r2, #4] 80293f0: e006 b.n 8029400 } else { if (TCP_SEQ_LT(seqno, pcb->rcv_nxt)){ 80293f2: 1ac9 subs r1, r1, r3 80293f4: 2900 cmp r1, #0 80293f6: da03 bge.n 8029400 /* the whole segment is < rcv_nxt */ /* must be a duplicate of a packet that has already been correctly handled */ LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: duplicate seqno %"U32_F"\n", seqno)); tcp_ack_now(pcb); 80293f8: 7fa3 ldrb r3, [r4, #30] 80293fa: f043 0302 orr.w r3, r3, #2 80293fe: 77a3 strb r3, [r4, #30] } /* The sequence number must be within the window (above rcv_nxt and below rcv_nxt + rcv_wnd) in order to be further processed. */ if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 8029400: 4b4c ldr r3, [pc, #304] ; (8029534 ) 8029402: 6aa2 ldr r2, [r4, #40] ; 0x28 8029404: 681b ldr r3, [r3, #0] 8029406: 1a99 subs r1, r3, r2 8029408: 2900 cmp r1, #0 802940a: db71 blt.n 80294f0 802940c: 1c59 adds r1, r3, #1 802940e: 8da0 ldrh r0, [r4, #44] ; 0x2c 8029410: 1a89 subs r1, r1, r2 8029412: 1a09 subs r1, r1, r0 8029414: 2900 cmp r1, #0 8029416: dc6b bgt.n 80294f0 pcb->rcv_nxt + pcb->rcv_wnd - 1)){ if (pcb->rcv_nxt == seqno) { 8029418: 429a cmp r2, r3 802941a: d169 bne.n 80294f0 /* The incoming segment is the next in sequence. We check if we have to trim the end of the segment and update rcv_nxt and pass the data to the application. */ tcplen = TCP_TCPLEN(&inseg); 802941c: 4d46 ldr r5, [pc, #280] ; (8029538 ) 802941e: 68eb ldr r3, [r5, #12] 8029420: 892e ldrh r6, [r5, #8] 8029422: 8998 ldrh r0, [r3, #12] 8029424: f7fd fe1f bl 8027066 8029428: f010 0003 ands.w r0, r0, #3 802942c: bf18 it ne 802942e: 2001 movne r0, #1 8029430: 4b3f ldr r3, [pc, #252] ; (8029530 ) 8029432: 1830 adds r0, r6, r0 8029434: b280 uxth r0, r0 8029436: 8018 strh r0, [r3, #0] if (tcplen > pcb->rcv_wnd) { 8029438: 8da3 ldrh r3, [r4, #44] ; 0x2c 802943a: 4283 cmp r3, r0 802943c: d230 bcs.n 80294a0 LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: other end overran receive window" "seqno %"U32_F" len %"U16_F" right edge %"U32_F"\n", seqno, tcplen, pcb->rcv_nxt + pcb->rcv_wnd)); if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 802943e: 68eb ldr r3, [r5, #12] 8029440: 8998 ldrh r0, [r3, #12] 8029442: f7fd fe10 bl 8027066 8029446: 07c0 lsls r0, r0, #31 8029448: d50c bpl.n 8029464 /* Must remove the FIN from the header as we're trimming * that byte of sequence-space from the packet */ TCPH_FLAGS_SET(inseg.tcphdr, TCPH_FLAGS(inseg.tcphdr) &~ TCP_FIN); 802944a: 68ed ldr r5, [r5, #12] 802944c: 89ae ldrh r6, [r5, #12] 802944e: 4630 mov r0, r6 8029450: f7fd fe09 bl 8027066 8029454: f000 003e and.w r0, r0, #62 ; 0x3e 8029458: f7fd fe00 bl 802705c 802945c: f426 567c bic.w r6, r6, #16128 ; 0x3f00 8029460: 4330 orrs r0, r6 8029462: 81a8 strh r0, [r5, #12] } /* Adjust length of segment to fit in the window. */ inseg.len = pcb->rcv_wnd; 8029464: 8da3 ldrh r3, [r4, #44] ; 0x2c 8029466: 4d34 ldr r5, [pc, #208] ; (8029538 ) 8029468: 812b strh r3, [r5, #8] if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) { 802946a: 68eb ldr r3, [r5, #12] 802946c: 8998 ldrh r0, [r3, #12] 802946e: f7fd fdfa bl 8027066 8029472: f000 0002 and.w r0, r0, #2 8029476: b280 uxth r0, r0 8029478: b110 cbz r0, 8029480 inseg.len -= 1; 802947a: 892b ldrh r3, [r5, #8] 802947c: 3b01 subs r3, #1 802947e: 812b strh r3, [r5, #8] } pbuf_realloc(inseg.p, inseg.len); 8029480: 6868 ldr r0, [r5, #4] 8029482: 8929 ldrh r1, [r5, #8] 8029484: f7fe ff4f bl 8028326 tcplen = TCP_TCPLEN(&inseg); 8029488: 68eb ldr r3, [r5, #12] 802948a: 892e ldrh r6, [r5, #8] 802948c: 8998 ldrh r0, [r3, #12] 802948e: f7fd fdea bl 8027066 8029492: f010 0003 ands.w r0, r0, #3 8029496: bf18 it ne 8029498: 2001 movne r0, #1 802949a: 4b25 ldr r3, [pc, #148] ; (8029530 ) 802949c: 1830 adds r0, r6, r0 802949e: 8018 strh r0, [r3, #0] pcb->ooseq = next; } } #endif /* TCP_QUEUE_OOSEQ */ pcb->rcv_nxt = seqno + tcplen; 80294a0: 4b23 ldr r3, [pc, #140] ; (8029530 ) 80294a2: 4a24 ldr r2, [pc, #144] ; (8029534 ) 80294a4: 881b ldrh r3, [r3, #0] 80294a6: 6812 ldr r2, [r2, #0] 80294a8: 189a adds r2, r3, r2 80294aa: 62a2 str r2, [r4, #40] ; 0x28 /* Update the receiver's (our) window. */ LWIP_ASSERT("tcp_receive: tcplen > rcv_wnd\n", pcb->rcv_wnd >= tcplen); pcb->rcv_wnd -= tcplen; 80294ac: 8da2 ldrh r2, [r4, #44] ; 0x2c 80294ae: 1ad3 subs r3, r2, r3 80294b0: 85a3 strh r3, [r4, #44] ; 0x2c tcp_update_rcv_ann_wnd(pcb); 80294b2: 4620 mov r0, r4 80294b4: f7ff f986 bl 80287c4 chains its data on this pbuf as well. If the segment was a FIN, we set the TF_GOT_FIN flag that will be used to indicate to the application that the remote side has closed its end of the connection. */ if (inseg.p->tot_len > 0) { 80294b8: 4b1f ldr r3, [pc, #124] ; (8029538 ) 80294ba: 685a ldr r2, [r3, #4] 80294bc: 8911 ldrh r1, [r2, #8] 80294be: b119 cbz r1, 80294c8 recv_data = inseg.p; 80294c0: 491e ldr r1, [pc, #120] ; (802953c ) 80294c2: 600a str r2, [r1, #0] /* Since this pbuf now is the responsibility of the application, we delete our reference to it so that we won't (mistakingly) deallocate it. */ inseg.p = NULL; 80294c4: 2200 movs r2, #0 80294c6: 605a str r2, [r3, #4] } if (TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) { 80294c8: 68db ldr r3, [r3, #12] 80294ca: 8998 ldrh r0, [r3, #12] 80294cc: f7fd fdcb bl 8027066 80294d0: 07c1 lsls r1, r0, #31 80294d2: d504 bpl.n 80294de LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_receive: received FIN.\n")); recv_flags |= TF_GOT_FIN; 80294d4: 4b1a ldr r3, [pc, #104] ; (8029540 ) 80294d6: 781a ldrb r2, [r3, #0] 80294d8: f042 0220 orr.w r2, r2, #32 80294dc: 701a strb r2, [r3, #0] } #endif /* TCP_QUEUE_OOSEQ */ /* Acknowledge the segment(s). */ tcp_ack(pcb); 80294de: 7fa3 ldrb r3, [r4, #30] 80294e0: 07da lsls r2, r3, #31 80294e2: d502 bpl.n 80294ea 80294e4: f023 0301 bic.w r3, r3, #1 80294e8: e013 b.n 8029512 80294ea: f043 0301 orr.w r3, r3, #1 80294ee: e012 b.n 8029516 } else { /* We get here if the incoming segment is out-of-sequence. */ tcp_send_empty_ack(pcb); 80294f0: 4620 mov r0, r4 TCP_SEQ_GEQ(seqno, pcb->rcv_nxt + pcb->rcv_wnd)) {*/ if(!TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd-1)){ tcp_ack_now(pcb); } } } 80294f2: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} /* Acknowledge the segment(s). */ tcp_ack(pcb); } else { /* We get here if the incoming segment is out-of-sequence. */ tcp_send_empty_ack(pcb); 80294f6: f000 bf09 b.w 802a30c } else { /* Segments with length 0 is taken care of here. Segments that fall out of the window are ACKed. */ /*if (TCP_SEQ_GT(pcb->rcv_nxt, seqno) || TCP_SEQ_GEQ(seqno, pcb->rcv_nxt + pcb->rcv_wnd)) {*/ if(!TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt + pcb->rcv_wnd-1)){ 80294fa: 6812 ldr r2, [r2, #0] 80294fc: 6aa3 ldr r3, [r4, #40] ; 0x28 80294fe: 1ad1 subs r1, r2, r3 8029500: 2900 cmp r1, #0 8029502: db05 blt.n 8029510 8029504: 3201 adds r2, #1 8029506: 8da1 ldrh r1, [r4, #44] ; 0x2c 8029508: 1ad3 subs r3, r2, r3 802950a: 1a5b subs r3, r3, r1 802950c: 2b00 cmp r3, #0 802950e: dd09 ble.n 8029524 tcp_ack_now(pcb); 8029510: 7fa3 ldrb r3, [r4, #30] 8029512: f043 0302 orr.w r3, r3, #2 8029516: 77a3 strb r3, [r4, #30] 8029518: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } } /* If Clause (1) or more is true, but not a duplicate ack, reset * count of consecutive duplicate acks */ if (!found_dupack) { pcb->dupacks = 0; 802951c: 2300 movs r3, #0 802951e: f884 3047 strb.w r3, [r4, #71] ; 0x47 8029522: e6dd b.n 80292e0 8029524: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 8029528: 2000db68 .word 0x2000db68 802952c: 200104c8 .word 0x200104c8 8029530: 2000db64 .word 0x2000db64 8029534: 2000db60 .word 0x2000db60 8029538: 2000db78 .word 0x2000db78 802953c: 2000db70 .word 0x2000db70 8029540: 2000db6d .word 0x2000db6d 08029544 : * @param p received TCP segment to process (p->payload pointing to the IP header) * @param inp network interface on which this segment was received */ void tcp_input(struct pbuf *p, struct netif *inp) { 8029544: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 8029548: 4606 mov r6, r0 802954a: 460f mov r7, r1 err_t err; PERF_START; TCP_STATS_INC(tcp.recv); snmp_inc_tcpinsegs(); 802954c: f003 fc9c bl 802ce88 iphdr = (struct ip_hdr *)p->payload; 8029550: 6873 ldr r3, [r6, #4] 8029552: 4aa7 ldr r2, [pc, #668] ; (80297f0 ) tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4); 8029554: 4ca7 ldr r4, [pc, #668] ; (80297f4 ) PERF_START; TCP_STATS_INC(tcp.recv); snmp_inc_tcpinsegs(); iphdr = (struct ip_hdr *)p->payload; 8029556: 6013 str r3, [r2, #0] tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4); 8029558: 781a ldrb r2, [r3, #0] 802955a: f002 020f and.w r2, r2, #15 #if TCP_INPUT_DEBUG tcp_debug_print(tcphdr); #endif /* remove header from payload */ if (pbuf_header(p, -((s16_t)(IPH_HL(iphdr) * 4))) || (p->tot_len < sizeof(struct tcp_hdr))) { 802955e: 0091 lsls r1, r2, #2 TCP_STATS_INC(tcp.recv); snmp_inc_tcpinsegs(); iphdr = (struct ip_hdr *)p->payload; tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4); 8029560: eb03 0382 add.w r3, r3, r2, lsl #2 #if TCP_INPUT_DEBUG tcp_debug_print(tcphdr); #endif /* remove header from payload */ if (pbuf_header(p, -((s16_t)(IPH_HL(iphdr) * 4))) || (p->tot_len < sizeof(struct tcp_hdr))) { 8029564: 4630 mov r0, r6 8029566: 4249 negs r1, r1 TCP_STATS_INC(tcp.recv); snmp_inc_tcpinsegs(); iphdr = (struct ip_hdr *)p->payload; tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4); 8029568: 6023 str r3, [r4, #0] #if TCP_INPUT_DEBUG tcp_debug_print(tcphdr); #endif /* remove header from payload */ if (pbuf_header(p, -((s16_t)(IPH_HL(iphdr) * 4))) || (p->tot_len < sizeof(struct tcp_hdr))) { 802956a: f7fe fe8a bl 8028282 802956e: 2800 cmp r0, #0 8029570: f040 83ce bne.w 8029d10 8029574: 8933 ldrh r3, [r6, #8] 8029576: 2b13 cmp r3, #19 8029578: f240 83ca bls.w 8029d10 TCP_STATS_INC(tcp.lenerr); goto dropped; } /* Don't even process incoming broadcasts/multicasts. */ if (ip_addr_isbroadcast(¤t_iphdr_dest, inp) || 802957c: 4d9e ldr r5, [pc, #632] ; (80297f8 ) 802957e: 4639 mov r1, r7 8029580: 6828 ldr r0, [r5, #0] 8029582: f001 fd43 bl 802b00c 8029586: 2800 cmp r0, #0 8029588: f040 83c2 bne.w 8029d10 ip_addr_ismulticast(¤t_iphdr_dest)) { 802958c: 682b ldr r3, [r5, #0] 802958e: f003 03f0 and.w r3, r3, #240 ; 0xf0 TCP_STATS_INC(tcp.lenerr); goto dropped; } /* Don't even process incoming broadcasts/multicasts. */ if (ip_addr_isbroadcast(¤t_iphdr_dest, inp) || 8029592: 2be0 cmp r3, #224 ; 0xe0 8029594: f000 83bc beq.w 8029d10 } #endif /* Move the payload pointer in the pbuf so that it points to the TCP data instead of the TCP header. */ hdrlen = TCPH_HDRLEN(tcphdr); 8029598: 6823 ldr r3, [r4, #0] 802959a: 8998 ldrh r0, [r3, #12] 802959c: f7fd fd63 bl 8027066 if(pbuf_header(p, -(hdrlen * 4))){ 80295a0: f06f 0103 mvn.w r1, #3 80295a4: f3c0 3307 ubfx r3, r0, #12, #8 80295a8: 4359 muls r1, r3 80295aa: 4630 mov r0, r6 80295ac: f7fe fe69 bl 8028282 80295b0: 4683 mov fp, r0 80295b2: 2800 cmp r0, #0 80295b4: f040 83ac bne.w 8029d10 TCP_STATS_INC(tcp.lenerr); goto dropped; } /* Convert fields in TCP header to host byte order. */ tcphdr->src = ntohs(tcphdr->src); 80295b8: 6827 ldr r7, [r4, #0] 80295ba: 8838 ldrh r0, [r7, #0] 80295bc: f7fd fd53 bl 8027066 80295c0: 8038 strh r0, [r7, #0] tcphdr->dest = ntohs(tcphdr->dest); 80295c2: 6827 ldr r7, [r4, #0] 80295c4: 8878 ldrh r0, [r7, #2] 80295c6: f7fd fd4e bl 8027066 80295ca: 8078 strh r0, [r7, #2] seqno = tcphdr->seqno = ntohl(tcphdr->seqno); 80295cc: 6827 ldr r7, [r4, #0] 80295ce: 6878 ldr r0, [r7, #4] 80295d0: f7fd fd50 bl 8027074 80295d4: 4b89 ldr r3, [pc, #548] ; (80297fc ) 80295d6: 6078 str r0, [r7, #4] ackno = tcphdr->ackno = ntohl(tcphdr->ackno); 80295d8: 6827 ldr r7, [r4, #0] } /* Convert fields in TCP header to host byte order. */ tcphdr->src = ntohs(tcphdr->src); tcphdr->dest = ntohs(tcphdr->dest); seqno = tcphdr->seqno = ntohl(tcphdr->seqno); 80295da: 6018 str r0, [r3, #0] ackno = tcphdr->ackno = ntohl(tcphdr->ackno); 80295dc: 68b8 ldr r0, [r7, #8] 80295de: f7fd fd49 bl 8027074 80295e2: 4b87 ldr r3, [pc, #540] ; (8029800 ) 80295e4: 60b8 str r0, [r7, #8] tcphdr->wnd = ntohs(tcphdr->wnd); 80295e6: 6827 ldr r7, [r4, #0] /* Convert fields in TCP header to host byte order. */ tcphdr->src = ntohs(tcphdr->src); tcphdr->dest = ntohs(tcphdr->dest); seqno = tcphdr->seqno = ntohl(tcphdr->seqno); ackno = tcphdr->ackno = ntohl(tcphdr->ackno); 80295e8: 6018 str r0, [r3, #0] tcphdr->wnd = ntohs(tcphdr->wnd); 80295ea: 89f8 ldrh r0, [r7, #14] 80295ec: f7fd fd3b bl 8027066 80295f0: 81f8 strh r0, [r7, #14] flags = TCPH_FLAGS(tcphdr); 80295f2: 6823 ldr r3, [r4, #0] 80295f4: 8998 ldrh r0, [r3, #12] 80295f6: f7fd fd36 bl 8027066 80295fa: 4b82 ldr r3, [pc, #520] ; (8029804 ) tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 80295fc: f8b6 8008 ldrh.w r8, [r6, #8] for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); if (pcb->remote_port == tcphdr->src && 8029600: 6827 ldr r7, [r4, #0] seqno = tcphdr->seqno = ntohl(tcphdr->seqno); ackno = tcphdr->ackno = ntohl(tcphdr->ackno); tcphdr->wnd = ntohs(tcphdr->wnd); flags = TCPH_FLAGS(tcphdr); tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 8029602: f010 0c03 ands.w ip, r0, #3 tcphdr->dest = ntohs(tcphdr->dest); seqno = tcphdr->seqno = ntohl(tcphdr->seqno); ackno = tcphdr->ackno = ntohl(tcphdr->ackno); tcphdr->wnd = ntohs(tcphdr->wnd); flags = TCPH_FLAGS(tcphdr); 8029606: f000 013f and.w r1, r0, #63 ; 0x3f tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 802960a: bf18 it ne 802960c: f04f 0c01 movne.w ip, #1 tcphdr->dest = ntohs(tcphdr->dest); seqno = tcphdr->seqno = ntohl(tcphdr->seqno); ackno = tcphdr->ackno = ntohl(tcphdr->ackno); tcphdr->wnd = ntohs(tcphdr->wnd); flags = TCPH_FLAGS(tcphdr); 8029610: 7019 strb r1, [r3, #0] tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 8029612: 44c4 add ip, r8 8029614: 4b7c ldr r3, [pc, #496] ; (8029808 ) LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); if (pcb->remote_port == tcphdr->src && pcb->local_port == tcphdr->dest && ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src) && ip_addr_cmp(&(pcb->local_ip), ¤t_iphdr_dest)) { 8029616: 6829 ldr r1, [r5, #0] seqno = tcphdr->seqno = ntohl(tcphdr->seqno); ackno = tcphdr->ackno = ntohl(tcphdr->ackno); tcphdr->wnd = ntohs(tcphdr->wnd); flags = TCPH_FLAGS(tcphdr); tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); 8029618: fa1f fc8c uxth.w ip, ip 802961c: f8a3 c000 strh.w ip, [r3] /* Demultiplex an incoming segment. First, we check if it is destined for an active connection. */ prev = NULL; for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 8029620: 4b7a ldr r3, [pc, #488] ; (802980c ) 8029622: f8d3 a000 ldr.w sl, [r3] LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); if (pcb->remote_port == tcphdr->src && pcb->local_port == tcphdr->dest && ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src) && 8029626: 4b7a ldr r3, [pc, #488] ; (8029810 ) tcphdr->dest = ntohs(tcphdr->dest); seqno = tcphdr->seqno = ntohl(tcphdr->seqno); ackno = tcphdr->ackno = ntohl(tcphdr->ackno); tcphdr->wnd = ntohs(tcphdr->wnd); flags = TCPH_FLAGS(tcphdr); 8029628: 4602 mov r2, r0 LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); if (pcb->remote_port == tcphdr->src && pcb->local_port == tcphdr->dest && ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src) && 802962a: f8d3 9000 ldr.w r9, [r3] /* Demultiplex an incoming segment. First, we check if it is destined for an active connection. */ prev = NULL; for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 802962e: 4654 mov r4, sl flags = TCPH_FLAGS(tcphdr); tcplen = p->tot_len + ((flags & (TCP_FIN | TCP_SYN)) ? 1 : 0); /* Demultiplex an incoming segment. First, we check if it is destined for an active connection. */ prev = NULL; 8029630: 4658 mov r0, fp for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 8029632: e019 b.n 8029668 LWIP_ASSERT("tcp_input: active pcb->state != CLOSED", pcb->state != CLOSED); LWIP_ASSERT("tcp_input: active pcb->state != TIME-WAIT", pcb->state != TIME_WAIT); LWIP_ASSERT("tcp_input: active pcb->state != LISTEN", pcb->state != LISTEN); if (pcb->remote_port == tcphdr->src && 8029634: 8ba5 ldrh r5, [r4, #28] 8029636: 883b ldrh r3, [r7, #0] 8029638: 429d cmp r5, r3 802963a: d113 bne.n 8029664 802963c: 8b65 ldrh r5, [r4, #26] 802963e: 887b ldrh r3, [r7, #2] 8029640: 429d cmp r5, r3 8029642: d10f bne.n 8029664 pcb->local_port == tcphdr->dest && 8029644: 6863 ldr r3, [r4, #4] 8029646: 454b cmp r3, r9 8029648: d10c bne.n 8029664 ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src) && 802964a: 6823 ldr r3, [r4, #0] 802964c: 428b cmp r3, r1 802964e: d109 bne.n 8029664 /* Move this PCB to the front of the list so that subsequent lookups will be faster (we exploit locality in TCP segment arrivals). */ LWIP_ASSERT("tcp_input: pcb->next != pcb (before cache)", pcb->next != pcb); if (prev != NULL) { 8029650: 2800 cmp r0, #0 8029652: f000 8382 beq.w 8029d5a prev->next = pcb->next; 8029656: 68e3 ldr r3, [r4, #12] 8029658: 60c3 str r3, [r0, #12] pcb->next = tcp_active_pcbs; tcp_active_pcbs = pcb; 802965a: 4b6c ldr r3, [pc, #432] ; (802980c ) lookups will be faster (we exploit locality in TCP segment arrivals). */ LWIP_ASSERT("tcp_input: pcb->next != pcb (before cache)", pcb->next != pcb); if (prev != NULL) { prev->next = pcb->next; pcb->next = tcp_active_pcbs; 802965c: f8c4 a00c str.w sl, [r4, #12] tcp_active_pcbs = pcb; 8029660: 601c str r4, [r3, #0] 8029662: e37a b.n 8029d5a 8029664: 4620 mov r0, r4 /* Demultiplex an incoming segment. First, we check if it is destined for an active connection. */ prev = NULL; for(pcb = tcp_active_pcbs; pcb != NULL; pcb = pcb->next) { 8029666: 68e4 ldr r4, [r4, #12] 8029668: 2c00 cmp r4, #0 802966a: d1e3 bne.n 8029634 802966c: e372 b.n 8029d54 if (pcb == NULL) { /* If it did not go to an active connection, we check the connections in the TIME-WAIT state. */ for(pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); if (pcb->remote_port == tcphdr->src && 802966e: 8b98 ldrh r0, [r3, #28] 8029670: 883c ldrh r4, [r7, #0] 8029672: 4284 cmp r4, r0 8029674: d130 bne.n 80296d8 pcb->local_port == tcphdr->dest && 8029676: 8b58 ldrh r0, [r3, #26] if (pcb == NULL) { /* If it did not go to an active connection, we check the connections in the TIME-WAIT state. */ for(pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { LWIP_ASSERT("tcp_input: TIME-WAIT pcb->state == TIME-WAIT", pcb->state == TIME_WAIT); if (pcb->remote_port == tcphdr->src && 8029678: 887d ldrh r5, [r7, #2] 802967a: 4285 cmp r5, r0 802967c: d12c bne.n 80296d8 pcb->local_port == tcphdr->dest && 802967e: 6858 ldr r0, [r3, #4] 8029680: 4548 cmp r0, r9 8029682: d129 bne.n 80296d8 ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src) && 8029684: 6818 ldr r0, [r3, #0] 8029686: 4288 cmp r0, r1 8029688: d126 bne.n 80296d8 /* RFC 1337: in TIME_WAIT, ignore RST and ACK FINs + any 'acceptable' segments */ /* RFC 793 3.9 Event Processing - Segment Arrives: * - first check sequence number - we skip that one in TIME_WAIT (always * acceptable since we only send ACKs) * - second check the RST bit (... return) */ if (flags & TCP_RST) { 802968a: f002 0104 and.w r1, r2, #4 802968e: b2c9 uxtb r1, r1 8029690: 2900 cmp r1, #0 8029692: f040 833f bne.w 8029d14 return ERR_OK; } /* - fourth, check the SYN bit, */ if (flags & TCP_SYN) { 8029696: f002 0102 and.w r1, r2, #2 802969a: b2c9 uxtb r1, r1 802969c: b159 cbz r1, 80296b6 /* If an incoming segment is not acceptable, an acknowledgment should be sent in reply */ if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, pcb->rcv_nxt+pcb->rcv_wnd)) { 802969e: 4a57 ldr r2, [pc, #348] ; (80297fc ) 80296a0: 6811 ldr r1, [r2, #0] 80296a2: 6a9a ldr r2, [r3, #40] ; 0x28 80296a4: 1a8a subs r2, r1, r2 80296a6: d40b bmi.n 80296c0 80296a8: 8d98 ldrh r0, [r3, #44] ; 0x2c 80296aa: 1a12 subs r2, r2, r0 80296ac: 2a00 cmp r2, #0 80296ae: dc07 bgt.n 80296c0 /* If the SYN is in the window it is an error, send a reset */ tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), ip_current_src_addr(), 80296b0: 9500 str r5, [sp, #0] 80296b2: 9401 str r4, [sp, #4] 80296b4: e041 b.n 802973a tcphdr->dest, tcphdr->src); return ERR_OK; } } else if (flags & TCP_FIN) { 80296b6: 07d2 lsls r2, r2, #31 80296b8: d502 bpl.n 80296c0 /* - eighth, check the FIN bit: Remain in the TIME-WAIT state. Restart the 2 MSL time-wait timeout.*/ pcb->tmr = tcp_ticks; 80296ba: 4a56 ldr r2, [pc, #344] ; (8029814 ) 80296bc: 6812 ldr r2, [r2, #0] 80296be: 625a str r2, [r3, #36] ; 0x24 } if ((tcplen > 0)) { 80296c0: f1bc 0f00 cmp.w ip, #0 80296c4: f000 8326 beq.w 8029d14 /* Acknowledge data, FIN or out-of-window SYN */ pcb->flags |= TF_ACK_NOW; 80296c8: 7f9a ldrb r2, [r3, #30] 80296ca: f042 0202 orr.w r2, r2, #2 80296ce: 779a strb r2, [r3, #30] return tcp_output(pcb); 80296d0: 4618 mov r0, r3 80296d2: f000 fe3d bl 802a350 80296d6: e31d b.n 8029d14 } if (pcb == NULL) { /* If it did not go to an active connection, we check the connections in the TIME-WAIT state. */ for(pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 80296d8: 68db ldr r3, [r3, #12] 80296da: 2b00 cmp r3, #0 80296dc: d1c7 bne.n 802966e } /* Finally, if we still did not get a match, we check all PCBs that are LISTENing for incoming connections. */ prev = NULL; for(lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 80296de: 484e ldr r0, [pc, #312] ; (8029818 ) 80296e0: 6804 ldr r4, [r0, #0] 80296e2: 4625 mov r5, r4 80296e4: e00f b.n 8029706 if (lpcb->local_port == tcphdr->dest) { 80296e6: 8b68 ldrh r0, [r5, #26] 80296e8: f8b7 8002 ldrh.w r8, [r7, #2] 80296ec: 4580 cmp r8, r0 80296ee: d108 bne.n 8029702 /* found an ANY-match */ lpcb_any = lpcb; lpcb_prev = prev; } #else /* SO_REUSE */ if (ip_addr_cmp(&(lpcb->local_ip), ¤t_iphdr_dest) || 80296f0: f8d5 8000 ldr.w r8, [r5] 80296f4: 4588 cmp r8, r1 80296f6: f000 8342 beq.w 8029d7e ip_addr_isany(&(lpcb->local_ip))) { 80296fa: f1b8 0f00 cmp.w r8, #0 80296fe: f000 833e beq.w 8029d7e 8029702: 462b mov r3, r5 } /* Finally, if we still did not get a match, we check all PCBs that are LISTENing for incoming connections. */ prev = NULL; for(lpcb = tcp_listen_pcbs.listen_pcbs; lpcb != NULL; lpcb = lpcb->next) { 8029704: 68ed ldr r5, [r5, #12] 8029706: 2d00 cmp r5, #0 8029708: d1ed bne.n 80296e6 802970a: e33c b.n 8029d86 if (lpcb != NULL) { /* Move this PCB to the front of the list so that subsequent lookups will be faster (we exploit locality in TCP segment arrivals). */ if (prev != NULL) { ((struct tcp_pcb_listen *)prev)->next = lpcb->next; 802970c: 68e9 ldr r1, [r5, #12] 802970e: 60d9 str r1, [r3, #12] /* our successor is the remainder of the listening list */ lpcb->next = tcp_listen_pcbs.listen_pcbs; /* put this listening pcb at the head of the listening list */ tcp_listen_pcbs.listen_pcbs = lpcb; 8029710: 4b41 ldr r3, [pc, #260] ; (8029818 ) lookups will be faster (we exploit locality in TCP segment arrivals). */ if (prev != NULL) { ((struct tcp_pcb_listen *)prev)->next = lpcb->next; /* our successor is the remainder of the listening list */ lpcb->next = tcp_listen_pcbs.listen_pcbs; 8029712: 60ec str r4, [r5, #12] /* put this listening pcb at the head of the listening list */ tcp_listen_pcbs.listen_pcbs = lpcb; 8029714: 601d str r5, [r3, #0] tcp_listen_input(struct tcp_pcb_listen *pcb) { struct tcp_pcb *npcb; err_t rc; if (flags & TCP_RST) { 8029716: f002 0304 and.w r3, r2, #4 802971a: b2db uxtb r3, r3 802971c: 2b00 cmp r3, #0 802971e: f040 82f9 bne.w 8029d14 return ERR_OK; } /* In the LISTEN state, we check for incoming SYN segments, creates a new PCB, and responds with a SYN|ACK. */ if (flags & TCP_ACK) { 8029722: f002 0810 and.w r8, r2, #16 8029726: fa5f f888 uxtb.w r8, r8 802972a: f1b8 0f00 cmp.w r8, #0 802972e: d00c beq.n 802974a /* For incoming segments with the ACK flag set, respond with a RST. */ LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_listen_input: ACK in LISTEN, sending reset\n")); tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), 8029730: 4b32 ldr r3, [pc, #200] ; (80297fc ) 8029732: 6819 ldr r1, [r3, #0] 8029734: 9000 str r0, [sp, #0] 8029736: 883b ldrh r3, [r7, #0] 8029738: 9301 str r3, [sp, #4] 802973a: 4b31 ldr r3, [pc, #196] ; (8029800 ) 802973c: 6818 ldr r0, [r3, #0] 802973e: 4461 add r1, ip 8029740: 4a2d ldr r2, [pc, #180] ; (80297f8 ) 8029742: 4b33 ldr r3, [pc, #204] ; (8029810 ) 8029744: f000 ff28 bl 802a598 8029748: e2e4 b.n 8029d14 ip_current_src_addr(), tcphdr->dest, tcphdr->src); } else if (flags & TCP_SYN) { 802974a: f002 0202 and.w r2, r2, #2 802974e: b2d2 uxtb r2, r2 8029750: 2a00 cmp r2, #0 8029752: f000 82df beq.w 8029d14 if (pcb->accepts_pending >= pcb->backlog) { LWIP_DEBUGF(TCP_DEBUG, ("tcp_listen_input: listen backlog exceeded for port %"U16_F"\n", tcphdr->dest)); return ERR_ABRT; } #endif /* TCP_LISTEN_BACKLOG */ npcb = tcp_alloc(pcb->prio); 8029756: 7e68 ldrb r0, [r5, #25] 8029758: f7ff fbc6 bl 8028ee8 /* If a new PCB could not be created (probably due to lack of memory), we don't do anything, but rely on the sender will retransmit the SYN at a time when we have more memory available. */ if (npcb == NULL) { 802975c: 4604 mov r4, r0 802975e: 2800 cmp r0, #0 8029760: f000 82d8 beq.w 8029d14 } #if TCP_LISTEN_BACKLOG pcb->accepts_pending++; #endif /* TCP_LISTEN_BACKLOG */ /* Set up the new PCB. */ ip_addr_copy(npcb->local_ip, current_iphdr_dest); 8029764: 4b24 ldr r3, [pc, #144] ; (80297f8 ) 8029766: 681b ldr r3, [r3, #0] 8029768: 6003 str r3, [r0, #0] npcb->local_port = pcb->local_port; 802976a: 8b6b ldrh r3, [r5, #26] 802976c: 8343 strh r3, [r0, #26] ip_addr_copy(npcb->remote_ip, current_iphdr_src); 802976e: 4b28 ldr r3, [pc, #160] ; (8029810 ) 8029770: 681b ldr r3, [r3, #0] 8029772: 6043 str r3, [r0, #4] npcb->remote_port = tcphdr->src; 8029774: 4b1f ldr r3, [pc, #124] ; (80297f4 ) 8029776: 681b ldr r3, [r3, #0] 8029778: 7859 ldrb r1, [r3, #1] 802977a: 781a ldrb r2, [r3, #0] 802977c: ea42 2201 orr.w r2, r2, r1, lsl #8 8029780: 8382 strh r2, [r0, #28] npcb->state = SYN_RCVD; 8029782: 2203 movs r2, #3 8029784: 7602 strb r2, [r0, #24] npcb->rcv_nxt = seqno + 1; 8029786: 4a1d ldr r2, [pc, #116] ; (80297fc ) 8029788: 6812 ldr r2, [r2, #0] 802978a: 1c51 adds r1, r2, #1 802978c: 6281 str r1, [r0, #40] ; 0x28 npcb->rcv_ann_right_edge = npcb->rcv_nxt; 802978e: 6301 str r1, [r0, #48] ; 0x30 npcb->snd_wnd = tcphdr->wnd; 8029790: 89db ldrh r3, [r3, #14] 8029792: f8a0 3060 strh.w r3, [r0, #96] ; 0x60 npcb->snd_wnd_max = tcphdr->wnd; 8029796: f8a0 3062 strh.w r3, [r0, #98] ; 0x62 npcb->ssthresh = npcb->snd_wnd; 802979a: f8a0 304e strh.w r3, [r0, #78] ; 0x4e npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */ npcb->callback_arg = pcb->callback_arg; 802979e: 692b ldr r3, [r5, #16] 80297a0: 6103 str r3, [r0, #16] #if LWIP_CALLBACK_API npcb->accept = pcb->accept; 80297a2: 696b ldr r3, [r5, #20] npcb->rcv_nxt = seqno + 1; npcb->rcv_ann_right_edge = npcb->rcv_nxt; npcb->snd_wnd = tcphdr->wnd; npcb->snd_wnd_max = tcphdr->wnd; npcb->ssthresh = npcb->snd_wnd; npcb->snd_wl1 = seqno - 1;/* initialise to seqno-1 to force window update */ 80297a4: 3a01 subs r2, #1 80297a6: 6542 str r2, [r0, #84] ; 0x54 npcb->callback_arg = pcb->callback_arg; #if LWIP_CALLBACK_API npcb->accept = pcb->accept; 80297a8: 6143 str r3, [r0, #20] #endif /* LWIP_CALLBACK_API */ /* inherit socket options */ npcb->so_options = pcb->so_options & SOF_INHERITED; 80297aa: 7a2b ldrb r3, [r5, #8] 80297ac: f023 0373 bic.w r3, r3, #115 ; 0x73 80297b0: 7203 strb r3, [r0, #8] /* Register the new PCB so that we can begin receiving segments for it. */ TCP_REG_ACTIVE(npcb); 80297b2: 4b16 ldr r3, [pc, #88] ; (802980c ) 80297b4: 681a ldr r2, [r3, #0] 80297b6: 6018 str r0, [r3, #0] 80297b8: 60c2 str r2, [r0, #12] 80297ba: f001 f887 bl 802a8cc 80297be: 4b17 ldr r3, [pc, #92] ; (802981c ) 80297c0: 2201 movs r2, #1 /* Parse any options in the SYN. */ tcp_parseopt(npcb); 80297c2: 4620 mov r0, r4 #endif /* LWIP_CALLBACK_API */ /* inherit socket options */ npcb->so_options = pcb->so_options & SOF_INHERITED; /* Register the new PCB so that we can begin receiving segments for it. */ TCP_REG_ACTIVE(npcb); 80297c4: 701a strb r2, [r3, #0] /* Parse any options in the SYN. */ tcp_parseopt(npcb); 80297c6: f7ff fc29 bl 802901c #if TCP_CALCULATE_EFF_SEND_MSS npcb->mss = tcp_eff_send_mss(npcb->mss, &(npcb->remote_ip)); 80297ca: 1d21 adds r1, r4, #4 80297cc: 8ee0 ldrh r0, [r4, #54] ; 0x36 80297ce: f7ff fc16 bl 8028ffe 80297d2: 86e0 strh r0, [r4, #54] ; 0x36 #endif /* TCP_CALCULATE_EFF_SEND_MSS */ snmp_inc_tcppassiveopens(); 80297d4: f003 fb40 bl 802ce58 /* Send a SYN|ACK together with the MSS option. */ rc = tcp_enqueue_flags(npcb, TCP_SYN | TCP_ACK); 80297d8: 4620 mov r0, r4 80297da: 2112 movs r1, #18 80297dc: f000 fd28 bl 802a230 if (rc != ERR_OK) { 80297e0: b120 cbz r0, 80297ec tcp_abandon(npcb, 0); 80297e2: 4620 mov r0, r4 80297e4: 4641 mov r1, r8 80297e6: f7ff f9e1 bl 8028bac 80297ea: e293 b.n 8029d14 return rc; } return tcp_output(npcb); 80297ec: 4620 mov r0, r4 80297ee: e770 b.n 80296d2 80297f0: 2000db74 .word 0x2000db74 80297f4: 2000db5c .word 0x2000db5c 80297f8: 200104ec .word 0x200104ec 80297fc: 2000db60 .word 0x2000db60 8029800: 2000db68 .word 0x2000db68 8029804: 2000db6c .word 0x2000db6c 8029808: 2000db64 .word 0x2000db64 802980c: 200104c4 .word 0x200104c4 8029810: 200104e4 .word 0x200104e4 8029814: 200104c8 .word 0x200104c8 8029818: 200104cc .word 0x200104cc 802981c: 200104c0 .word 0x200104c0 recv_data = NULL; recv_flags = 0; if (flags & TCP_PSH) { p->flags |= PBUF_FLAG_PUSH; 8029820: 7b73 ldrb r3, [r6, #13] 8029822: f043 0301 orr.w r3, r3, #1 8029826: 7373 strb r3, [r6, #13] } /* If there is data which was previously "refused" by upper layer */ if (pcb->refused_data != NULL) { 8029828: 6f63 ldr r3, [r4, #116] ; 0x74 802982a: b163 cbz r3, 8029846 if ((tcp_process_refused_data(pcb) == ERR_ABRT) || 802982c: 4620 mov r0, r4 802982e: f7ff fad1 bl 8028dd4 8029832: 300a adds r0, #10 8029834: d004 beq.n 8029840 8029836: 6f63 ldr r3, [r4, #116] ; 0x74 8029838: b12b cbz r3, 8029846 ((pcb->refused_data != NULL) && (tcplen > 0))) { 802983a: 4b9f ldr r3, [pc, #636] ; (8029ab8 ) 802983c: 881b ldrh r3, [r3, #0] 802983e: b113 cbz r3, 8029846 /* pcb has been aborted or refused data is still refused and the new segment contains data */ TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); 8029840: f003 fb3a bl 802ceb8 goto aborted; 8029844: e249 b.n 8029cda } } tcp_input_pcb = pcb; 8029846: 4b9d ldr r3, [pc, #628] ; (8029abc ) 8029848: 601c str r4, [r3, #0] err_t err; err = ERR_OK; /* Process incoming RST segments. */ if (flags & TCP_RST) { 802984a: 4b9d ldr r3, [pc, #628] ; (8029ac0 ) 802984c: 781b ldrb r3, [r3, #0] 802984e: f003 0204 and.w r2, r3, #4 8029852: b2d2 uxtb r2, r2 8029854: b1aa cbz r2, 8029882 /* First, determine if the reset is acceptable. */ if (pcb->state == SYN_SENT) { 8029856: 7e23 ldrb r3, [r4, #24] 8029858: 2b02 cmp r3, #2 802985a: d106 bne.n 802986a if (ackno == pcb->snd_nxt) { 802985c: 4b99 ldr r3, [pc, #612] ; (8029ac4 ) 802985e: 681a ldr r2, [r3, #0] 8029860: 6d23 ldr r3, [r4, #80] ; 0x50 8029862: 429a cmp r2, r3 8029864: f040 82a1 bne.w 8029daa 8029868: e296 b.n 8029d98 acceptable = 1; } } else { if (TCP_SEQ_BETWEEN(seqno, pcb->rcv_nxt, 802986a: 4b97 ldr r3, [pc, #604] ; (8029ac8 ) 802986c: 681a ldr r2, [r3, #0] 802986e: 6aa3 ldr r3, [r4, #40] ; 0x28 8029870: 1ad3 subs r3, r2, r3 8029872: f100 829a bmi.w 8029daa 8029876: 8da1 ldrh r1, [r4, #44] ; 0x2c 8029878: 1a5b subs r3, r3, r1 802987a: 2b00 cmp r3, #0 802987c: f300 8295 bgt.w 8029daa 8029880: e28a b.n 8029d98 seqno, pcb->rcv_nxt)); return ERR_OK; } } if ((flags & TCP_SYN) && (pcb->state != SYN_SENT && pcb->state != SYN_RCVD)) { 8029882: f003 0302 and.w r3, r3, #2 8029886: b2db uxtb r3, r3 8029888: b123 cbz r3, 8029894 802988a: 7e23 ldrb r3, [r4, #24] 802988c: 3b02 subs r3, #2 802988e: 2b01 cmp r3, #1 8029890: d900 bls.n 8029894 8029892: e06b b.n 802996c /* Cope with new connection attempt after remote end crashed */ tcp_ack_now(pcb); return ERR_OK; } if ((pcb->flags & TF_RXCLOSED) == 0) { 8029894: 7fa3 ldrb r3, [r4, #30] 8029896: f003 0310 and.w r3, r3, #16 802989a: b2db uxtb r3, r3 802989c: b913 cbnz r3, 80298a4 /* Update the PCB (in)activity timer unless rx is closed (see tcp_shutdown) */ pcb->tmr = tcp_ticks; 802989e: 4b8b ldr r3, [pc, #556] ; (8029acc ) 80298a0: 681b ldr r3, [r3, #0] 80298a2: 6263 str r3, [r4, #36] ; 0x24 } pcb->keep_cnt_sent = 0; 80298a4: 2300 movs r3, #0 80298a6: f884 3092 strb.w r3, [r4, #146] ; 0x92 tcp_parseopt(pcb); 80298aa: 4620 mov r0, r4 80298ac: f7ff fbb6 bl 802901c /* Do different things depending on the TCP state. */ switch (pcb->state) { 80298b0: 7e23 ldrb r3, [r4, #24] 80298b2: 3b02 subs r3, #2 80298b4: 2b07 cmp r3, #7 80298b6: f200 8278 bhi.w 8029daa 80298ba: e8df f013 tbh [pc, r3, lsl #1] 80298be: 0008 .short 0x0008 80298c0: 00c90077 .word 0x00c90077 80298c4: 013000da .word 0x013000da 80298c8: 015200c9 .word 0x015200c9 80298cc: 0186 .short 0x0186 case SYN_SENT: LWIP_DEBUGF(TCP_INPUT_DEBUG, ("SYN-SENT: ackno %"U32_F" pcb->snd_nxt %"U32_F" unacked %"U32_F"\n", ackno, pcb->snd_nxt, ntohl(pcb->unacked->tcphdr->seqno))); /* received SYN ACK with expected sequence number? */ if ((flags & TCP_ACK) && (flags & TCP_SYN) 80298ce: 4b7c ldr r3, [pc, #496] ; (8029ac0 ) 80298d0: 781b ldrb r3, [r3, #0] 80298d2: f003 0312 and.w r3, r3, #18 80298d6: 2b12 cmp r3, #18 80298d8: d153 bne.n 8029982 && ackno == ntohl(pcb->unacked->tcphdr->seqno) + 1) { 80298da: 6f23 ldr r3, [r4, #112] ; 0x70 80298dc: 4d79 ldr r5, [pc, #484] ; (8029ac4 ) 80298de: 68db ldr r3, [r3, #12] 80298e0: 682e ldr r6, [r5, #0] 80298e2: 6858 ldr r0, [r3, #4] 80298e4: f7fd fbc6 bl 8027074 80298e8: 3001 adds r0, #1 80298ea: 4286 cmp r6, r0 80298ec: d149 bne.n 8029982 pcb->snd_buf++; 80298ee: f8b4 3066 ldrh.w r3, [r4, #102] ; 0x66 pcb->snd_wnd_max = tcphdr->wnd; pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ pcb->state = ESTABLISHED; #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss(pcb->mss, &(pcb->remote_ip)); 80298f2: 8ee0 ldrh r0, [r4, #54] ; 0x36 LWIP_DEBUGF(TCP_INPUT_DEBUG, ("SYN-SENT: ackno %"U32_F" pcb->snd_nxt %"U32_F" unacked %"U32_F"\n", ackno, pcb->snd_nxt, ntohl(pcb->unacked->tcphdr->seqno))); /* received SYN ACK with expected sequence number? */ if ((flags & TCP_ACK) && (flags & TCP_SYN) && ackno == ntohl(pcb->unacked->tcphdr->seqno) + 1) { pcb->snd_buf++; 80298f4: 3301 adds r3, #1 80298f6: f8a4 3066 strh.w r3, [r4, #102] ; 0x66 pcb->rcv_nxt = seqno + 1; 80298fa: 4b73 ldr r3, [pc, #460] ; (8029ac8 ) 80298fc: 681b ldr r3, [r3, #0] 80298fe: 1c5a adds r2, r3, #1 8029900: 62a2 str r2, [r4, #40] ; 0x28 pcb->rcv_ann_right_edge = pcb->rcv_nxt; 8029902: 6322 str r2, [r4, #48] ; 0x30 pcb->lastack = ackno; 8029904: 682a ldr r2, [r5, #0] 8029906: 64a2 str r2, [r4, #72] ; 0x48 pcb->snd_wnd = tcphdr->wnd; 8029908: 4a71 ldr r2, [pc, #452] ; (8029ad0 ) 802990a: 6812 ldr r2, [r2, #0] pcb->snd_wnd_max = tcphdr->wnd; pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ 802990c: 3b01 subs r3, #1 && ackno == ntohl(pcb->unacked->tcphdr->seqno) + 1) { pcb->snd_buf++; pcb->rcv_nxt = seqno + 1; pcb->rcv_ann_right_edge = pcb->rcv_nxt; pcb->lastack = ackno; pcb->snd_wnd = tcphdr->wnd; 802990e: 89d2 ldrh r2, [r2, #14] pcb->snd_wnd_max = tcphdr->wnd; pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ 8029910: 6563 str r3, [r4, #84] ; 0x54 pcb->state = ESTABLISHED; 8029912: 2304 movs r3, #4 8029914: 7623 strb r3, [r4, #24] #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss(pcb->mss, &(pcb->remote_ip)); 8029916: 18e1 adds r1, r4, r3 && ackno == ntohl(pcb->unacked->tcphdr->seqno) + 1) { pcb->snd_buf++; pcb->rcv_nxt = seqno + 1; pcb->rcv_ann_right_edge = pcb->rcv_nxt; pcb->lastack = ackno; pcb->snd_wnd = tcphdr->wnd; 8029918: f8a4 2060 strh.w r2, [r4, #96] ; 0x60 pcb->snd_wnd_max = tcphdr->wnd; 802991c: f8a4 2062 strh.w r2, [r4, #98] ; 0x62 pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ pcb->state = ESTABLISHED; #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss(pcb->mss, &(pcb->remote_ip)); 8029920: f7ff fb6d bl 8028ffe #endif /* TCP_CALCULATE_EFF_SEND_MSS */ /* Set ssthresh again after changing pcb->mss (already set in tcp_connect * but for the default value of pcb->mss) */ pcb->ssthresh = pcb->mss * 10; 8029924: 230a movs r3, #10 8029926: 4343 muls r3, r0 8029928: f8a4 304e strh.w r3, [r4, #78] ; 0x4e pcb->cwnd = ((pcb->cwnd == 1) ? (pcb->mss * 2) : pcb->mss); 802992c: f8b4 304c ldrh.w r3, [r4, #76] ; 0x4c pcb->snd_wnd_max = tcphdr->wnd; pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ pcb->state = ESTABLISHED; #if TCP_CALCULATE_EFF_SEND_MSS pcb->mss = tcp_eff_send_mss(pcb->mss, &(pcb->remote_ip)); 8029930: 86e0 strh r0, [r4, #54] ; 0x36 /* Set ssthresh again after changing pcb->mss (already set in tcp_connect * but for the default value of pcb->mss) */ pcb->ssthresh = pcb->mss * 10; pcb->cwnd = ((pcb->cwnd == 1) ? (pcb->mss * 2) : pcb->mss); 8029932: 2b01 cmp r3, #1 8029934: d101 bne.n 802993a 8029936: 0040 lsls r0, r0, #1 8029938: b280 uxth r0, r0 LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0)); --pcb->snd_queuelen; 802993a: f8b4 3068 ldrh.w r3, [r4, #104] ; 0x68 /* Set ssthresh again after changing pcb->mss (already set in tcp_connect * but for the default value of pcb->mss) */ pcb->ssthresh = pcb->mss * 10; pcb->cwnd = ((pcb->cwnd == 1) ? (pcb->mss * 2) : pcb->mss); 802993e: f8a4 004c strh.w r0, [r4, #76] ; 0x4c LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0)); --pcb->snd_queuelen; LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_process: SYN-SENT --queuelen %"U16_F"\n", (u16_t)pcb->snd_queuelen)); rseg = pcb->unacked; 8029942: 6f20 ldr r0, [r4, #112] ; 0x70 * but for the default value of pcb->mss) */ pcb->ssthresh = pcb->mss * 10; pcb->cwnd = ((pcb->cwnd == 1) ? (pcb->mss * 2) : pcb->mss); LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0)); --pcb->snd_queuelen; 8029944: 3b01 subs r3, #1 8029946: f8a4 3068 strh.w r3, [r4, #104] ; 0x68 LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_process: SYN-SENT --queuelen %"U16_F"\n", (u16_t)pcb->snd_queuelen)); rseg = pcb->unacked; pcb->unacked = rseg->next; 802994a: 6803 ldr r3, [r0, #0] 802994c: 6723 str r3, [r4, #112] ; 0x70 tcp_seg_free(rseg); 802994e: f7fe ff70 bl 8028832 /* If there's nothing left to acknowledge, stop the retransmit timer, otherwise reset it to start again */ if(pcb->unacked == NULL) 8029952: 6f23 ldr r3, [r4, #112] ; 0x70 8029954: b91b cbnz r3, 802995e pcb->rtime = -1; 8029956: f64f 73ff movw r3, #65535 ; 0xffff 802995a: 86a3 strh r3, [r4, #52] ; 0x34 802995c: e003 b.n 8029966 else { pcb->rtime = 0; 802995e: 2300 movs r3, #0 8029960: 86a3 strh r3, [r4, #52] ; 0x34 pcb->nrtx = 0; 8029962: f884 3046 strb.w r3, [r4, #70] ; 0x46 } /* Call the user specified function to call when sucessfully * connected. */ TCP_EVENT_CONNECTED(pcb, ERR_OK, err); 8029966: f8d4 3080 ldr.w r3, [r4, #128] ; 0x80 802996a: b91b cbnz r3, 8029974 if (err == ERR_ABRT) { return ERR_ABRT; } tcp_ack_now(pcb); 802996c: 7fa3 ldrb r3, [r4, #30] 802996e: f043 0302 orr.w r3, r3, #2 8029972: e219 b.n 8029da8 pcb->nrtx = 0; } /* Call the user specified function to call when sucessfully * connected. */ TCP_EVENT_CONNECTED(pcb, ERR_OK, err); 8029974: 2200 movs r2, #0 8029976: 6920 ldr r0, [r4, #16] 8029978: 4621 mov r1, r4 802997a: 4798 blx r3 if (err == ERR_ABRT) { 802997c: 300a adds r0, #10 802997e: d1f5 bne.n 802996c 8029980: e1ab b.n 8029cda return ERR_ABRT; } tcp_ack_now(pcb); } /* received ACK? possibly a half-open connection */ else if (flags & TCP_ACK) { 8029982: 4b4f ldr r3, [pc, #316] ; (8029ac0 ) 8029984: 781b ldrb r3, [r3, #0] 8029986: f003 0310 and.w r3, r3, #16 802998a: b2db uxtb r3, r3 802998c: 2b00 cmp r3, #0 802998e: f000 820c beq.w 8029daa /* send a RST to bring the other side in a non-synchronized state. */ tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), ip_current_src_addr(), tcphdr->dest, tcphdr->src); 8029992: 4b4f ldr r3, [pc, #316] ; (8029ad0 ) tcp_ack_now(pcb); } /* received ACK? possibly a half-open connection */ else if (flags & TCP_ACK) { /* send a RST to bring the other side in a non-synchronized state. */ tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), ip_current_src_addr(), 8029994: 4a48 ldr r2, [pc, #288] ; (8029ab8 ) tcphdr->dest, tcphdr->src); 8029996: 681b ldr r3, [r3, #0] tcp_ack_now(pcb); } /* received ACK? possibly a half-open connection */ else if (flags & TCP_ACK) { /* send a RST to bring the other side in a non-synchronized state. */ tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), ip_current_src_addr(), 8029998: 8811 ldrh r1, [r2, #0] 802999a: 8858 ldrh r0, [r3, #2] 802999c: 4a4a ldr r2, [pc, #296] ; (8029ac8 ) 802999e: 6812 ldr r2, [r2, #0] 80299a0: 9000 str r0, [sp, #0] 80299a2: 881b ldrh r3, [r3, #0] 80299a4: 9301 str r3, [sp, #4] 80299a6: 4b47 ldr r3, [pc, #284] ; (8029ac4 ) 80299a8: 6818 ldr r0, [r3, #0] 80299aa: e03a b.n 8029a22 tcphdr->dest, tcphdr->src); } break; case SYN_RCVD: if (flags & TCP_ACK) { 80299ac: 4b44 ldr r3, [pc, #272] ; (8029ac0 ) 80299ae: 781b ldrb r3, [r3, #0] 80299b0: f003 0210 and.w r2, r3, #16 80299b4: b2d2 uxtb r2, r2 80299b6: 2a00 cmp r2, #0 80299b8: d039 beq.n 8029a2e /* expected ACK number? */ if (TCP_SEQ_BETWEEN(ackno, pcb->lastack+1, pcb->snd_nxt)) { 80299ba: 4b42 ldr r3, [pc, #264] ; (8029ac4 ) 80299bc: 6818 ldr r0, [r3, #0] 80299be: 6ca3 ldr r3, [r4, #72] ; 0x48 80299c0: 43db mvns r3, r3 80299c2: 42c3 cmn r3, r0 80299c4: d423 bmi.n 8029a0e 80299c6: 6d23 ldr r3, [r4, #80] ; 0x50 80299c8: 1ac3 subs r3, r0, r3 80299ca: 2b00 cmp r3, #0 80299cc: dc1f bgt.n 8029a0e u16_t old_cwnd; pcb->state = ESTABLISHED; 80299ce: 2304 movs r3, #4 80299d0: 7623 strb r3, [r4, #24] LWIP_DEBUGF(TCP_DEBUG, ("TCP connection established %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); #if LWIP_CALLBACK_API LWIP_ASSERT("pcb->accept != NULL", pcb->accept != NULL); #endif /* Call the accept function. */ TCP_EVENT_ACCEPT(pcb, ERR_OK, err); 80299d2: 6963 ldr r3, [r4, #20] 80299d4: b903 cbnz r3, 80299d8 80299d6: e147 b.n 8029c68 80299d8: 6920 ldr r0, [r4, #16] 80299da: 4621 mov r1, r4 80299dc: 2200 movs r2, #0 80299de: 4798 blx r3 if (err != ERR_OK) { 80299e0: b118 cbz r0, 80299ea /* If the accept function returns with an error, we abort * the connection. */ /* Already aborted? */ if (err != ERR_ABRT) { 80299e2: 300a adds r0, #10 80299e4: f040 8140 bne.w 8029c68 80299e8: e177 b.n 8029cda return ERR_ABRT; } old_cwnd = pcb->cwnd; /* If there was any data contained within this ACK, * we'd better pass it on to the application as well. */ tcp_receive(pcb); 80299ea: 4620 mov r0, r4 if (err != ERR_ABRT) { tcp_abort(pcb); } return ERR_ABRT; } old_cwnd = pcb->cwnd; 80299ec: f8b4 504c ldrh.w r5, [r4, #76] ; 0x4c /* If there was any data contained within this ACK, * we'd better pass it on to the application as well. */ tcp_receive(pcb); 80299f0: f7ff fb54 bl 802909c /* Prevent ACK for SYN to generate a sent event */ if (pcb->acked != 0) { 80299f4: f8b4 3064 ldrh.w r3, [r4, #100] ; 0x64 80299f8: b113 cbz r3, 8029a00 pcb->acked--; 80299fa: 3b01 subs r3, #1 80299fc: f8a4 3064 strh.w r3, [r4, #100] ; 0x64 } pcb->cwnd = ((old_cwnd == 1) ? (pcb->mss * 2) : pcb->mss); 8029a00: 8ee3 ldrh r3, [r4, #54] ; 0x36 8029a02: 2d01 cmp r5, #1 8029a04: bf08 it eq 8029a06: 005b lsleq r3, r3, #1 8029a08: f8a4 304c strh.w r3, [r4, #76] ; 0x4c 8029a0c: e023 b.n 8029a56 pcb->state = CLOSE_WAIT; } } else { /* incorrect ACK number, send RST */ tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), ip_current_src_addr(), tcphdr->dest, tcphdr->src); 8029a0e: 4b30 ldr r3, [pc, #192] ; (8029ad0 ) tcp_ack_now(pcb); pcb->state = CLOSE_WAIT; } } else { /* incorrect ACK number, send RST */ tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), ip_current_src_addr(), 8029a10: 4a29 ldr r2, [pc, #164] ; (8029ab8 ) tcphdr->dest, tcphdr->src); 8029a12: 681b ldr r3, [r3, #0] tcp_ack_now(pcb); pcb->state = CLOSE_WAIT; } } else { /* incorrect ACK number, send RST */ tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), ip_current_src_addr(), 8029a14: 8811 ldrh r1, [r2, #0] 8029a16: 885d ldrh r5, [r3, #2] 8029a18: 4a2b ldr r2, [pc, #172] ; (8029ac8 ) 8029a1a: 6812 ldr r2, [r2, #0] 8029a1c: 9500 str r5, [sp, #0] 8029a1e: 881b ldrh r3, [r3, #0] 8029a20: 9301 str r3, [sp, #4] 8029a22: 1889 adds r1, r1, r2 8029a24: 4b2b ldr r3, [pc, #172] ; (8029ad4 ) 8029a26: 4a2c ldr r2, [pc, #176] ; (8029ad8 ) 8029a28: f000 fdb6 bl 802a598 8029a2c: e1bd b.n 8029daa tcphdr->dest, tcphdr->src); } } else if ((flags & TCP_SYN) && (seqno == pcb->rcv_nxt - 1)) { 8029a2e: f003 0302 and.w r3, r3, #2 8029a32: b2db uxtb r3, r3 8029a34: 2b00 cmp r3, #0 8029a36: f000 81b8 beq.w 8029daa 8029a3a: 4a23 ldr r2, [pc, #140] ; (8029ac8 ) 8029a3c: 6aa3 ldr r3, [r4, #40] ; 0x28 8029a3e: 6812 ldr r2, [r2, #0] 8029a40: 3b01 subs r3, #1 8029a42: 429a cmp r2, r3 8029a44: f040 81b1 bne.w 8029daa /* Looks like another copy of the SYN - retransmit our SYN-ACK */ tcp_rexmit(pcb); 8029a48: 4620 mov r0, r4 8029a4a: f000 fe03 bl 802a654 8029a4e: e1ac b.n 8029daa } break; case CLOSE_WAIT: /* FALLTHROUGH */ case ESTABLISHED: tcp_receive(pcb); 8029a50: 4620 mov r0, r4 8029a52: f7ff fb23 bl 802909c if (recv_flags & TF_GOT_FIN) { /* passive close */ 8029a56: 4b21 ldr r3, [pc, #132] ; (8029adc ) 8029a58: 781b ldrb r3, [r3, #0] 8029a5a: f003 0320 and.w r3, r3, #32 8029a5e: b2db uxtb r3, r3 8029a60: 2b00 cmp r3, #0 8029a62: f000 81a2 beq.w 8029daa tcp_ack_now(pcb); 8029a66: 7fa3 ldrb r3, [r4, #30] 8029a68: f043 0302 orr.w r3, r3, #2 8029a6c: 77a3 strb r3, [r4, #30] pcb->state = CLOSE_WAIT; 8029a6e: 2307 movs r3, #7 8029a70: e053 b.n 8029b1a } break; case FIN_WAIT_1: tcp_receive(pcb); 8029a72: 4620 mov r0, r4 8029a74: f7ff fb12 bl 802909c if (recv_flags & TF_GOT_FIN) { 8029a78: 4b18 ldr r3, [pc, #96] ; (8029adc ) 8029a7a: 781a ldrb r2, [r3, #0] 8029a7c: 4b10 ldr r3, [pc, #64] ; (8029ac0 ) if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 8029a7e: 781b ldrb r3, [r3, #0] pcb->state = CLOSE_WAIT; } break; case FIN_WAIT_1: tcp_receive(pcb); if (recv_flags & TF_GOT_FIN) { 8029a80: f002 0220 and.w r2, r2, #32 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 8029a84: f003 0310 and.w r3, r3, #16 pcb->state = CLOSE_WAIT; } break; case FIN_WAIT_1: tcp_receive(pcb); if (recv_flags & TF_GOT_FIN) { 8029a88: b2d2 uxtb r2, r2 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 8029a8a: b2db uxtb r3, r3 pcb->state = CLOSE_WAIT; } break; case FIN_WAIT_1: tcp_receive(pcb); if (recv_flags & TF_GOT_FIN) { 8029a8c: 2a00 cmp r2, #0 8029a8e: d03a beq.n 8029b06 if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 8029a90: 2b00 cmp r3, #0 8029a92: d032 beq.n 8029afa 8029a94: 4b0b ldr r3, [pc, #44] ; (8029ac4 ) 8029a96: 681a ldr r2, [r3, #0] 8029a98: 6d23 ldr r3, [r4, #80] ; 0x50 8029a9a: 429a cmp r2, r3 8029a9c: d12d bne.n 8029afa LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: FIN_WAIT_1 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); tcp_ack_now(pcb); 8029a9e: 7fa3 ldrb r3, [r4, #30] 8029aa0: f043 0302 orr.w r3, r3, #2 8029aa4: 77a3 strb r3, [r4, #30] tcp_pcb_purge(pcb); 8029aa6: 4620 mov r0, r4 8029aa8: f7fe feea bl 8028880 TCP_RMV_ACTIVE(pcb); 8029aac: 4a0c ldr r2, [pc, #48] ; (8029ae0 ) 8029aae: 6813 ldr r3, [r2, #0] 8029ab0: 42a3 cmp r3, r4 8029ab2: d117 bne.n 8029ae4 8029ab4: e06d b.n 8029b92 8029ab6: bf00 nop 8029ab8: 2000db64 .word 0x2000db64 8029abc: 200104dc .word 0x200104dc 8029ac0: 2000db6c .word 0x2000db6c 8029ac4: 2000db68 .word 0x2000db68 8029ac8: 2000db60 .word 0x2000db60 8029acc: 200104c8 .word 0x200104c8 8029ad0: 2000db5c .word 0x2000db5c 8029ad4: 200104e4 .word 0x200104e4 8029ad8: 200104ec .word 0x200104ec 8029adc: 2000db6d .word 0x2000db6d 8029ae0: 200104c4 .word 0x200104c4 8029ae4: 4a8e ldr r2, [pc, #568] ; (8029d20 ) 8029ae6: 6013 str r3, [r2, #0] 8029ae8: e004 b.n 8029af4 8029aea: 68d9 ldr r1, [r3, #12] 8029aec: 42a1 cmp r1, r4 8029aee: d100 bne.n 8029af2 8029af0: e057 b.n 8029ba2 8029af2: 460b mov r3, r1 8029af4: 2b00 cmp r3, #0 8029af6: d1f8 bne.n 8029aea 8029af8: e05a b.n 8029bb0 pcb->state = TIME_WAIT; TCP_REG(&tcp_tw_pcbs, pcb); } else { tcp_ack_now(pcb); 8029afa: 7fa3 ldrb r3, [r4, #30] 8029afc: f043 0302 orr.w r3, r3, #2 8029b00: 77a3 strb r3, [r4, #30] pcb->state = CLOSING; 8029b02: 2308 movs r3, #8 8029b04: e009 b.n 8029b1a } } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) { 8029b06: 2b00 cmp r3, #0 8029b08: f000 814f beq.w 8029daa 8029b0c: 4b85 ldr r3, [pc, #532] ; (8029d24 ) 8029b0e: 681a ldr r2, [r3, #0] 8029b10: 6d23 ldr r3, [r4, #80] ; 0x50 8029b12: 429a cmp r2, r3 8029b14: f040 8149 bne.w 8029daa pcb->state = FIN_WAIT_2; 8029b18: 2306 movs r3, #6 8029b1a: 7623 strb r3, [r4, #24] 8029b1c: e145 b.n 8029daa } break; case FIN_WAIT_2: tcp_receive(pcb); 8029b1e: 4620 mov r0, r4 8029b20: f7ff fabc bl 802909c if (recv_flags & TF_GOT_FIN) { 8029b24: 4b80 ldr r3, [pc, #512] ; (8029d28 ) 8029b26: 781b ldrb r3, [r3, #0] 8029b28: f003 0320 and.w r3, r3, #32 8029b2c: b2db uxtb r3, r3 8029b2e: 2b00 cmp r3, #0 8029b30: f000 813b beq.w 8029daa LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: FIN_WAIT_2 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); tcp_ack_now(pcb); 8029b34: 7fa3 ldrb r3, [r4, #30] 8029b36: f043 0302 orr.w r3, r3, #2 8029b3a: 77a3 strb r3, [r4, #30] tcp_pcb_purge(pcb); 8029b3c: 4620 mov r0, r4 8029b3e: f7fe fe9f bl 8028880 TCP_RMV_ACTIVE(pcb); 8029b42: 4a7a ldr r2, [pc, #488] ; (8029d2c ) 8029b44: 6813 ldr r3, [r2, #0] 8029b46: 42a3 cmp r3, r4 8029b48: d100 bne.n 8029b4c 8029b4a: e022 b.n 8029b92 8029b4c: 4a74 ldr r2, [pc, #464] ; (8029d20 ) 8029b4e: 6013 str r3, [r2, #0] 8029b50: e004 b.n 8029b5c 8029b52: 68d9 ldr r1, [r3, #12] 8029b54: 42a1 cmp r1, r4 8029b56: d100 bne.n 8029b5a 8029b58: e023 b.n 8029ba2 8029b5a: 460b mov r3, r1 8029b5c: 2b00 cmp r3, #0 8029b5e: d1f8 bne.n 8029b52 8029b60: e026 b.n 8029bb0 pcb->state = TIME_WAIT; TCP_REG(&tcp_tw_pcbs, pcb); } break; case CLOSING: tcp_receive(pcb); 8029b62: 4620 mov r0, r4 8029b64: f7ff fa9a bl 802909c if (flags & TCP_ACK && ackno == pcb->snd_nxt) { 8029b68: 4b71 ldr r3, [pc, #452] ; (8029d30 ) 8029b6a: 781b ldrb r3, [r3, #0] 8029b6c: f003 0310 and.w r3, r3, #16 8029b70: b2db uxtb r3, r3 8029b72: 2b00 cmp r3, #0 8029b74: f000 8119 beq.w 8029daa 8029b78: 4b6a ldr r3, [pc, #424] ; (8029d24 ) 8029b7a: 681a ldr r2, [r3, #0] 8029b7c: 6d23 ldr r3, [r4, #80] ; 0x50 8029b7e: 429a cmp r2, r3 8029b80: f040 8113 bne.w 8029daa LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); tcp_pcb_purge(pcb); 8029b84: 4620 mov r0, r4 8029b86: f7fe fe7b bl 8028880 TCP_RMV_ACTIVE(pcb); 8029b8a: 4a68 ldr r2, [pc, #416] ; (8029d2c ) 8029b8c: 6813 ldr r3, [r2, #0] 8029b8e: 42a3 cmp r3, r4 8029b90: d101 bne.n 8029b96 8029b92: 68e3 ldr r3, [r4, #12] 8029b94: e00c b.n 8029bb0 8029b96: 4a62 ldr r2, [pc, #392] ; (8029d20 ) 8029b98: 6013 str r3, [r2, #0] 8029b9a: e007 b.n 8029bac 8029b9c: 68d9 ldr r1, [r3, #12] 8029b9e: 42a1 cmp r1, r4 8029ba0: d103 bne.n 8029baa 8029ba2: 6013 str r3, [r2, #0] 8029ba4: 68e2 ldr r2, [r4, #12] 8029ba6: 60da str r2, [r3, #12] 8029ba8: e003 b.n 8029bb2 8029baa: 460b mov r3, r1 8029bac: 2b00 cmp r3, #0 8029bae: d1f5 bne.n 8029b9c 8029bb0: 6013 str r3, [r2, #0] 8029bb2: 4b60 ldr r3, [pc, #384] ; (8029d34 ) 8029bb4: 2201 movs r2, #1 8029bb6: 701a strb r2, [r3, #0] pcb->state = TIME_WAIT; 8029bb8: 230a movs r3, #10 8029bba: 7623 strb r3, [r4, #24] TCP_REG(&tcp_tw_pcbs, pcb); 8029bbc: 4b5e ldr r3, [pc, #376] ; (8029d38 ) 8029bbe: 681a ldr r2, [r3, #0] 8029bc0: 601c str r4, [r3, #0] 8029bc2: 60e2 str r2, [r4, #12] 8029bc4: f000 fe82 bl 802a8cc 8029bc8: e0ef b.n 8029daa } break; case LAST_ACK: tcp_receive(pcb); 8029bca: 4620 mov r0, r4 8029bcc: f7ff fa66 bl 802909c if (flags & TCP_ACK && ackno == pcb->snd_nxt) { 8029bd0: 4b57 ldr r3, [pc, #348] ; (8029d30 ) 8029bd2: 781b ldrb r3, [r3, #0] 8029bd4: f003 0310 and.w r3, r3, #16 8029bd8: b2db uxtb r3, r3 8029bda: 2b00 cmp r3, #0 8029bdc: f000 80e5 beq.w 8029daa 8029be0: 4b50 ldr r3, [pc, #320] ; (8029d24 ) 8029be2: 681a ldr r2, [r3, #0] 8029be4: 6d23 ldr r3, [r4, #80] ; 0x50 8029be6: 429a cmp r2, r3 8029be8: f040 80df bne.w 8029daa LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: LAST_ACK %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest)); /* bugfix #21699: don't set pcb->state to CLOSED here or we risk leaking segments */ recv_flags |= TF_CLOSED; 8029bec: 4b4e ldr r3, [pc, #312] ; (8029d28 ) 8029bee: 781a ldrb r2, [r3, #0] 8029bf0: f042 0210 orr.w r2, r2, #16 8029bf4: 701a strb r2, [r3, #0] 8029bf6: e0d8 b.n 8029daa if (recv_flags & TF_RESET) { /* TF_RESET means that the connection was reset by the other end. We then call the error callback to inform the application that the connection is dead before we deallocate the PCB. */ TCP_EVENT_ERR(pcb->errf, pcb->callback_arg, ERR_RST); 8029bf8: f8d4 3088 ldr.w r3, [r4, #136] ; 0x88 8029bfc: b19b cbz r3, 8029c26 8029bfe: 6920 ldr r0, [r4, #16] 8029c00: f06f 010a mvn.w r1, #10 8029c04: e00e b.n 8029c24 tcp_pcb_remove(&tcp_active_pcbs, pcb); memp_free(MEMP_TCP_PCB, pcb); } else if (recv_flags & TF_CLOSED) { 8029c06: f003 0310 and.w r3, r3, #16 8029c0a: b2db uxtb r3, r3 8029c0c: b1a3 cbz r3, 8029c38 /* The connection has been closed and we will deallocate the PCB. */ if (!(pcb->flags & TF_RXCLOSED)) { 8029c0e: 7fa3 ldrb r3, [r4, #30] 8029c10: f003 0310 and.w r3, r3, #16 8029c14: b2db uxtb r3, r3 8029c16: b933 cbnz r3, 8029c26 /* Connection closed although the application has only shut down the tx side: call the PCB's err callback and indicate the closure to ensure the application doesn't continue using the PCB. */ TCP_EVENT_ERR(pcb->errf, pcb->callback_arg, ERR_CLSD); 8029c18: f8d4 3088 ldr.w r3, [r4, #136] ; 0x88 8029c1c: b11b cbz r3, 8029c26 8029c1e: 6920 ldr r0, [r4, #16] 8029c20: f06f 010b mvn.w r1, #11 8029c24: 4798 blx r3 } tcp_pcb_remove(&tcp_active_pcbs, pcb); 8029c26: 4621 mov r1, r4 8029c28: 4840 ldr r0, [pc, #256] ; (8029d2c ) 8029c2a: f7fe ff91 bl 8028b50 memp_free(MEMP_TCP_PCB, pcb); 8029c2e: 2002 movs r0, #2 8029c30: 4621 mov r1, r4 8029c32: f7fe fa47 bl 80280c4 8029c36: e050 b.n 8029cda } else { err = ERR_OK; /* If the application has registered a "sent" function to be called when new send buffer space is available, we call it now. */ if (pcb->acked > 0) { 8029c38: f8b4 2064 ldrh.w r2, [r4, #100] ; 0x64 8029c3c: b91a cbnz r2, 8029c46 if (err == ERR_ABRT) { goto aborted; } } if (recv_data != NULL) { 8029c3e: 4b3f ldr r3, [pc, #252] ; (8029d3c ) 8029c40: 681a ldr r2, [r3, #0] 8029c42: b94a cbnz r2, 8029c58 8029c44: e026 b.n 8029c94 err = ERR_OK; /* If the application has registered a "sent" function to be called when new send buffer space is available, we call it now. */ if (pcb->acked > 0) { TCP_EVENT_SENT(pcb, pcb->acked, err); 8029c46: 6fa3 ldr r3, [r4, #120] ; 0x78 8029c48: 2b00 cmp r3, #0 8029c4a: d0f8 beq.n 8029c3e 8029c4c: 6920 ldr r0, [r4, #16] 8029c4e: 4621 mov r1, r4 8029c50: 4798 blx r3 if (err == ERR_ABRT) { 8029c52: 300a adds r0, #10 8029c54: d1f3 bne.n 8029c3e 8029c56: e040 b.n 8029cda } } if (recv_data != NULL) { LWIP_ASSERT("pcb->refused_data == NULL", pcb->refused_data == NULL); if (pcb->flags & TF_RXCLOSED) { 8029c58: 7fa3 ldrb r3, [r4, #30] 8029c5a: f003 0310 and.w r3, r3, #16 8029c5e: b2db uxtb r3, r3 8029c60: b133 cbz r3, 8029c70 /* received data although already closed -> abort (send RST) to notify the remote host that not all data has been processed */ pbuf_free(recv_data); 8029c62: 4610 mov r0, r2 8029c64: f7fe fb38 bl 80282d8 tcp_abort(pcb); 8029c68: 4620 mov r0, r4 8029c6a: f7fe ffe5 bl 8028c38 goto aborted; 8029c6e: e034 b.n 8029cda } /* Notify application that data has been received. */ TCP_EVENT_RECV(pcb, recv_data, ERR_OK, err); 8029c70: 6fe5 ldr r5, [r4, #124] ; 0x7c 8029c72: b11d cbz r5, 8029c7c 8029c74: 6920 ldr r0, [r4, #16] 8029c76: 4621 mov r1, r4 8029c78: 47a8 blx r5 8029c7a: e004 b.n 8029c86 8029c7c: 4628 mov r0, r5 8029c7e: 4621 mov r1, r4 8029c80: 462b mov r3, r5 8029c82: f7ff f895 bl 8028db0 if (err == ERR_ABRT) { 8029c86: b243 sxtb r3, r0 8029c88: 330a adds r3, #10 8029c8a: d026 beq.n 8029cda goto aborted; } /* If the upper layer can't receive this data, store it */ if (err != ERR_OK) { 8029c8c: b110 cbz r0, 8029c94 pcb->refused_data = recv_data; 8029c8e: 4b2b ldr r3, [pc, #172] ; (8029d3c ) 8029c90: 681b ldr r3, [r3, #0] 8029c92: 6763 str r3, [r4, #116] ; 0x74 } } /* If a FIN segment was received, we call the callback function with a NULL buffer to indicate EOF. */ if (recv_flags & TF_GOT_FIN) { 8029c94: 4b24 ldr r3, [pc, #144] ; (8029d28 ) 8029c96: 781b ldrb r3, [r3, #0] 8029c98: f003 0320 and.w r3, r3, #32 8029c9c: b2db uxtb r3, r3 8029c9e: b1b3 cbz r3, 8029cce if (pcb->refused_data != NULL) { 8029ca0: 6f63 ldr r3, [r4, #116] ; 0x74 8029ca2: b123 cbz r3, 8029cae /* Delay this if we have refused data. */ pcb->refused_data->flags |= PBUF_FLAG_TCP_FIN; 8029ca4: 7b5a ldrb r2, [r3, #13] 8029ca6: f042 0220 orr.w r2, r2, #32 8029caa: 735a strb r2, [r3, #13] 8029cac: e00f b.n 8029cce } else { /* correct rcv_wnd as the application won't call tcp_recved() for the FIN's seqno */ if (pcb->rcv_wnd != TCP_WND) { 8029cae: 8da3 ldrh r3, [r4, #44] ; 0x2c 8029cb0: f241 62d0 movw r2, #5840 ; 0x16d0 8029cb4: 4293 cmp r3, r2 8029cb6: d001 beq.n 8029cbc pcb->rcv_wnd++; 8029cb8: 3301 adds r3, #1 8029cba: 85a3 strh r3, [r4, #44] ; 0x2c } TCP_EVENT_CLOSED(pcb, err); 8029cbc: 6fe5 ldr r5, [r4, #124] ; 0x7c 8029cbe: b135 cbz r5, 8029cce 8029cc0: 2200 movs r2, #0 8029cc2: 6920 ldr r0, [r4, #16] 8029cc4: 4621 mov r1, r4 8029cc6: 4613 mov r3, r2 8029cc8: 47a8 blx r5 if (err == ERR_ABRT) { 8029cca: 300a adds r0, #10 8029ccc: d005 beq.n 8029cda goto aborted; } } } tcp_input_pcb = NULL; 8029cce: 4b1c ldr r3, [pc, #112] ; (8029d40 ) 8029cd0: 2200 movs r2, #0 /* Try to send something out. */ tcp_output(pcb); 8029cd2: 4620 mov r0, r4 goto aborted; } } } tcp_input_pcb = NULL; 8029cd4: 601a str r2, [r3, #0] /* Try to send something out. */ tcp_output(pcb); 8029cd6: f000 fb3b bl 802a350 } } /* Jump target if pcb has been aborted in a callback (by calling tcp_abort()). Below this line, 'pcb' may not be dereferenced! */ aborted: tcp_input_pcb = NULL; 8029cda: 4b19 ldr r3, [pc, #100] ; (8029d40 ) recv_data = NULL; /* give up our reference to inseg.p */ if (inseg.p != NULL) 8029cdc: 4d19 ldr r5, [pc, #100] ; (8029d44 ) } } /* Jump target if pcb has been aborted in a callback (by calling tcp_abort()). Below this line, 'pcb' may not be dereferenced! */ aborted: tcp_input_pcb = NULL; 8029cde: 2400 movs r4, #0 8029ce0: 601c str r4, [r3, #0] recv_data = NULL; /* give up our reference to inseg.p */ if (inseg.p != NULL) 8029ce2: 6868 ldr r0, [r5, #4] } /* Jump target if pcb has been aborted in a callback (by calling tcp_abort()). Below this line, 'pcb' may not be dereferenced! */ aborted: tcp_input_pcb = NULL; recv_data = NULL; 8029ce4: 4b15 ldr r3, [pc, #84] ; (8029d3c ) 8029ce6: 601c str r4, [r3, #0] /* give up our reference to inseg.p */ if (inseg.p != NULL) 8029ce8: 2800 cmp r0, #0 8029cea: d067 beq.n 8029dbc { pbuf_free(inseg.p); 8029cec: f7fe faf4 bl 80282d8 inseg.p = NULL; 8029cf0: 606c str r4, [r5, #4] 8029cf2: e063 b.n 8029dbc if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) { TCP_STATS_INC(tcp.proterr); TCP_STATS_INC(tcp.drop); tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(), ip_current_src_addr(), tcphdr->dest, tcphdr->src); 8029cf4: 4b14 ldr r3, [pc, #80] ; (8029d48 ) sender. */ LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_input: no PCB match found, resetting.\n")); if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) { TCP_STATS_INC(tcp.proterr); TCP_STATS_INC(tcp.drop); tcp_rst(ackno, seqno + tcplen, 8029cf6: 4a15 ldr r2, [pc, #84] ; (8029d4c ) ip_current_dest_addr(), ip_current_src_addr(), tcphdr->dest, tcphdr->src); 8029cf8: 681b ldr r3, [r3, #0] sender. */ LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_input: no PCB match found, resetting.\n")); if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) { TCP_STATS_INC(tcp.proterr); TCP_STATS_INC(tcp.drop); tcp_rst(ackno, seqno + tcplen, 8029cfa: 8811 ldrh r1, [r2, #0] 8029cfc: 8858 ldrh r0, [r3, #2] 8029cfe: 4a14 ldr r2, [pc, #80] ; (8029d50 ) 8029d00: 6812 ldr r2, [r2, #0] 8029d02: 9000 str r0, [sp, #0] 8029d04: 881b ldrh r3, [r3, #0] 8029d06: 9301 str r3, [sp, #4] 8029d08: 4b06 ldr r3, [pc, #24] ; (8029d24 ) 8029d0a: 1889 adds r1, r1, r2 8029d0c: 6818 ldr r0, [r3, #0] 8029d0e: e517 b.n 8029740 LWIP_ASSERT("tcp_input: tcp_pcbs_sane()", tcp_pcbs_sane()); PERF_STOP("tcp_input"); return; dropped: TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); 8029d10: f003 f8d2 bl 802ceb8 pbuf_free(p); 8029d14: 4630 mov r0, r6 } 8029d16: b003 add sp, #12 8029d18: e8bd 4ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} PERF_STOP("tcp_input"); return; dropped: TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); pbuf_free(p); 8029d1c: f7fe badc b.w 80282d8 8029d20: 200104d0 .word 0x200104d0 8029d24: 2000db68 .word 0x2000db68 8029d28: 2000db6d .word 0x2000db6d 8029d2c: 200104c4 .word 0x200104c4 8029d30: 2000db6c .word 0x2000db6c 8029d34: 200104c0 .word 0x200104c0 8029d38: 200104d8 .word 0x200104d8 8029d3c: 2000db70 .word 0x2000db70 8029d40: 200104dc .word 0x200104dc 8029d44: 2000db78 .word 0x2000db78 8029d48: 2000db5c .word 0x2000db5c 8029d4c: 2000db64 .word 0x2000db64 8029d50: 2000db60 .word 0x2000db60 } if (pcb == NULL) { /* If it did not go to an active connection, we check the connections in the TIME-WAIT state. */ for(pcb = tcp_tw_pcbs; pcb != NULL; pcb = pcb->next) { 8029d54: 4b1b ldr r3, [pc, #108] ; (8029dc4 ) 8029d56: 681b ldr r3, [r3, #0] 8029d58: e4bf b.n 80296da tcp_debug_print_state(pcb->state); #endif /* TCP_DEBUG */ #endif /* TCP_INPUT_DEBUG */ /* Set up a tcp_seg structure. */ inseg.next = NULL; 8029d5a: 4b1b ldr r3, [pc, #108] ; (8029dc8 ) 8029d5c: 2100 movs r1, #0 8029d5e: 6019 str r1, [r3, #0] inseg.len = p->tot_len; 8029d60: f8a3 8008 strh.w r8, [r3, #8] inseg.p = p; 8029d64: 605e str r6, [r3, #4] inseg.tcphdr = tcphdr; 8029d66: 60df str r7, [r3, #12] recv_data = NULL; 8029d68: 4b18 ldr r3, [pc, #96] ; (8029dcc ) recv_flags = 0; if (flags & TCP_PSH) { 8029d6a: f002 0208 and.w r2, r2, #8 inseg.next = NULL; inseg.len = p->tot_len; inseg.p = p; inseg.tcphdr = tcphdr; recv_data = NULL; 8029d6e: 6019 str r1, [r3, #0] recv_flags = 0; 8029d70: 4b17 ldr r3, [pc, #92] ; (8029dd0 ) if (flags & TCP_PSH) { 8029d72: b2d2 uxtb r2, r2 inseg.len = p->tot_len; inseg.p = p; inseg.tcphdr = tcphdr; recv_data = NULL; recv_flags = 0; 8029d74: 7019 strb r1, [r3, #0] if (flags & TCP_PSH) { 8029d76: 2a00 cmp r2, #0 8029d78: f47f ad52 bne.w 8029820 8029d7c: e554 b.n 8029828 #endif /* SO_REUSE */ if (lpcb != NULL) { /* Move this PCB to the front of the list so that subsequent lookups will be faster (we exploit locality in TCP segment arrivals). */ if (prev != NULL) { 8029d7e: 2b00 cmp r3, #0 8029d80: f47f acc4 bne.w 802970c 8029d84: e4c7 b.n 8029716 } else { /* If no matching PCB was found, send a TCP RST (reset) to the sender. */ LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_input: no PCB match found, resetting.\n")); if (!(TCPH_FLAGS(tcphdr) & TCP_RST)) { 8029d86: 89b8 ldrh r0, [r7, #12] 8029d88: f7fd f96d bl 8027066 8029d8c: f000 0004 and.w r0, r0, #4 8029d90: b280 uxth r0, r0 8029d92: 2800 cmp r0, #0 8029d94: d1be bne.n 8029d14 8029d96: e7ad b.n 8029cf4 } if (acceptable) { LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_process: Connection RESET\n")); LWIP_ASSERT("tcp_input: pcb->state != CLOSED", pcb->state != CLOSED); recv_flags |= TF_RESET; 8029d98: 4b0d ldr r3, [pc, #52] ; (8029dd0 ) 8029d9a: 781a ldrb r2, [r3, #0] 8029d9c: f042 0208 orr.w r2, r2, #8 8029da0: 701a strb r2, [r3, #0] pcb->flags &= ~TF_ACK_DELAY; 8029da2: 7fa3 ldrb r3, [r4, #30] 8029da4: f023 0301 bic.w r3, r3, #1 8029da8: 77a3 strb r3, [r4, #30] tcp_input_pcb = pcb; err = tcp_process(pcb); /* A return value of ERR_ABRT means that tcp_abort() was called and that the pcb has been freed. If so, we don't do anything. */ if (err != ERR_ABRT) { if (recv_flags & TF_RESET) { 8029daa: 4b09 ldr r3, [pc, #36] ; (8029dd0 ) 8029dac: 781b ldrb r3, [r3, #0] 8029dae: f003 0208 and.w r2, r3, #8 8029db2: b2d2 uxtb r2, r2 8029db4: 2a00 cmp r2, #0 8029db6: f47f af1f bne.w 8029bf8 8029dba: e724 b.n 8029c06 return; dropped: TCP_STATS_INC(tcp.drop); snmp_inc_tcpinerrs(); pbuf_free(p); } 8029dbc: b003 add sp, #12 8029dbe: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 8029dc2: bf00 nop 8029dc4: 200104d8 .word 0x200104d8 8029dc8: 2000db78 .word 0x2000db78 8029dcc: 2000db70 .word 0x2000db70 8029dd0: 2000db6d .word 0x2000db6d 08029dd4 : #if TCP_OVERSIZE static struct pbuf * tcp_pbuf_prealloc(pbuf_layer layer, u16_t length, u16_t max_length, u16_t *oversize, struct tcp_pcb *pcb, u8_t apiflags, u8_t first_seg) { 8029dd4: b570 push {r4, r5, r6, lr} LWIP_UNUSED_ARG(apiflags); LWIP_UNUSED_ARG(first_seg); /* always create MSS-sized pbufs */ alloc = max_length; #else /* LWIP_NETIF_TX_SINGLE_PBUF */ if (length < max_length) { 8029dd6: 4291 cmp r1, r2 #if TCP_OVERSIZE static struct pbuf * tcp_pbuf_prealloc(pbuf_layer layer, u16_t length, u16_t max_length, u16_t *oversize, struct tcp_pcb *pcb, u8_t apiflags, u8_t first_seg) { 8029dd8: 460c mov r4, r1 8029dda: 461e mov r6, r3 8029ddc: 9d04 ldr r5, [sp, #16] LWIP_UNUSED_ARG(apiflags); LWIP_UNUSED_ARG(first_seg); /* always create MSS-sized pbufs */ alloc = max_length; #else /* LWIP_NETIF_TX_SINGLE_PBUF */ if (length < max_length) { 8029dde: d21a bcs.n 8029e16 * * Did the user set TCP_WRITE_FLAG_MORE? * * Will the Nagle algorithm defer transmission of this segment? */ if ((apiflags & TCP_WRITE_FLAG_MORE) || 8029de0: f89d 3014 ldrb.w r3, [sp, #20] 8029de4: f003 0302 and.w r3, r3, #2 8029de8: b2db uxtb r3, r3 8029dea: b95b cbnz r3, 8029e04 (!(pcb->flags & TF_NODELAY) && 8029dec: 7fab ldrb r3, [r5, #30] * * Did the user set TCP_WRITE_FLAG_MORE? * * Will the Nagle algorithm defer transmission of this segment? */ if ((apiflags & TCP_WRITE_FLAG_MORE) || 8029dee: f003 0340 and.w r3, r3, #64 ; 0x40 8029df2: b2db uxtb r3, r3 8029df4: b97b cbnz r3, 8029e16 (!(pcb->flags & TF_NODELAY) && 8029df6: f89d 3018 ldrb.w r3, [sp, #24] 8029dfa: b11b cbz r3, 8029e04 (!first_seg || 8029dfc: 6ee9 ldr r1, [r5, #108] ; 0x6c 8029dfe: b909 cbnz r1, 8029e04 pcb->unsent != NULL || 8029e00: 6f2b ldr r3, [r5, #112] ; 0x70 8029e02: b143 cbz r3, 8029e16 pcb->unacked != NULL))) { alloc = LWIP_MIN(max_length, LWIP_MEM_ALIGN_SIZE(length + TCP_OVERSIZE)); 8029e04: f204 51b7 addw r1, r4, #1463 ; 0x5b7 8029e08: f021 0103 bic.w r1, r1, #3 8029e0c: 4291 cmp r1, r2 8029e0e: bfa8 it ge 8029e10: 4611 movge r1, r2 8029e12: b289 uxth r1, r1 8029e14: e000 b.n 8029e18 * Will the Nagle algorithm defer transmission of this segment? */ if ((apiflags & TCP_WRITE_FLAG_MORE) || (!(pcb->flags & TF_NODELAY) && (!first_seg || pcb->unsent != NULL || 8029e16: 4621 mov r1, r4 pcb->unacked != NULL))) { alloc = LWIP_MIN(max_length, LWIP_MEM_ALIGN_SIZE(length + TCP_OVERSIZE)); } } #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ p = pbuf_alloc(layer, alloc, PBUF_RAM); 8029e18: 2200 movs r2, #0 8029e1a: f7fe faaa bl 8028372 if (p == NULL) { 8029e1e: b120 cbz r0, 8029e2a return NULL; } LWIP_ASSERT("need unchained pbuf", p->next == NULL); *oversize = p->len - length; 8029e20: 8943 ldrh r3, [r0, #10] 8029e22: 1b1b subs r3, r3, r4 8029e24: 8033 strh r3, [r6, #0] /* trim p->len to the currently used size */ p->len = p->tot_len = length; 8029e26: 8104 strh r4, [r0, #8] 8029e28: 8144 strh r4, [r0, #10] return p; } 8029e2a: bd70 pop {r4, r5, r6, pc} 08029e2c : * The TCP header is filled in except ackno and wnd. * p is freed on failure. */ static struct tcp_seg * tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno, u8_t optflags) { 8029e2c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 8029e30: f89d 6020 ldrb.w r6, [sp, #32] struct tcp_seg *seg; u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); 8029e34: f006 0702 and.w r7, r6, #2 8029e38: f016 0f01 tst.w r6, #1 8029e3c: b2ff uxtb r7, r7 * The TCP header is filled in except ackno and wnd. * p is freed on failure. */ static struct tcp_seg * tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno, u8_t optflags) { 8029e3e: 4680 mov r8, r0 8029e40: 469a mov sl, r3 struct tcp_seg *seg; u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); 8029e42: bf0c ite eq 8029e44: 2300 moveq r3, #0 8029e46: 2304 movne r3, #4 8029e48: 2f00 cmp r7, #0 8029e4a: bf14 ite ne 8029e4c: 270c movne r7, #12 8029e4e: 2700 moveq r7, #0 if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { 8029e50: 2004 movs r0, #4 * The TCP header is filled in except ackno and wnd. * p is freed on failure. */ static struct tcp_seg * tcp_create_segment(struct tcp_pcb *pcb, struct pbuf *p, u8_t flags, u32_t seqno, u8_t optflags) { 8029e52: 460d mov r5, r1 8029e54: 4691 mov r9, r2 struct tcp_seg *seg; u8_t optlen = LWIP_TCP_OPT_LENGTH(optflags); 8029e56: 18ff adds r7, r7, r3 if ((seg = (struct tcp_seg *)memp_malloc(MEMP_TCP_SEG)) == NULL) { 8029e58: f7fe f91e bl 8028098 8029e5c: 4604 mov r4, r0 8029e5e: b918 cbnz r0, 8029e68 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_create_segment: no memory.\n")); pbuf_free(p); 8029e60: 4628 mov r0, r5 8029e62: f7fe fa39 bl 80282d8 return NULL; 8029e66: e030 b.n 8029eca } seg->flags = optflags; 8029e68: 7286 strb r6, [r0, #10] seg->next = NULL; seg->p = p; seg->len = p->tot_len - optlen; 8029e6a: 892b ldrh r3, [r5, #8] pbuf_free(p); return NULL; } seg->flags = optflags; seg->next = NULL; seg->p = p; 8029e6c: 6045 str r5, [r0, #4] seg->len = p->tot_len - optlen; 8029e6e: 1bdb subs r3, r3, r7 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_create_segment: no memory.\n")); pbuf_free(p); return NULL; } seg->flags = optflags; seg->next = NULL; 8029e70: 2600 movs r6, #0 8029e72: 6006 str r6, [r0, #0] seg->p = p; seg->len = p->tot_len - optlen; 8029e74: 8103 strh r3, [r0, #8] LWIP_ASSERT("invalid optflags passed: TF_SEG_DATA_CHECKSUMMED", (optflags & TF_SEG_DATA_CHECKSUMMED) == 0); #endif /* TCP_CHECKSUM_ON_COPY */ /* build TCP header */ if (pbuf_header(p, TCP_HLEN)) { 8029e76: 2114 movs r1, #20 8029e78: 4628 mov r0, r5 8029e7a: f7fe fa02 bl 8028282 8029e7e: 4605 mov r5, r0 8029e80: b120 cbz r0, 8029e8c LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_create_segment: no room for TCP header in pbuf.\n")); TCP_STATS_INC(tcp.err); tcp_seg_free(seg); 8029e82: 4620 mov r0, r4 8029e84: f7fe fcd5 bl 8028832 return NULL; 8029e88: 4634 mov r4, r6 8029e8a: e01e b.n 8029eca } seg->tcphdr = (struct tcp_hdr *)seg->p->payload; 8029e8c: 6863 ldr r3, [r4, #4] seg->tcphdr->src = htons(pcb->local_port); 8029e8e: f8b8 001a ldrh.w r0, [r8, #26] LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_create_segment: no room for TCP header in pbuf.\n")); TCP_STATS_INC(tcp.err); tcp_seg_free(seg); return NULL; } seg->tcphdr = (struct tcp_hdr *)seg->p->payload; 8029e92: 685e ldr r6, [r3, #4] 8029e94: 60e6 str r6, [r4, #12] seg->tcphdr->src = htons(pcb->local_port); 8029e96: f7fd f8e1 bl 802705c 8029e9a: 8030 strh r0, [r6, #0] seg->tcphdr->dest = htons(pcb->remote_port); 8029e9c: f8b8 001c ldrh.w r0, [r8, #28] 8029ea0: 68e6 ldr r6, [r4, #12] 8029ea2: f7fd f8db bl 802705c 8029ea6: 8070 strh r0, [r6, #2] seg->tcphdr->seqno = htonl(seqno); 8029ea8: 4650 mov r0, sl 8029eaa: 68e6 ldr r6, [r4, #12] 8029eac: f7fd f8e0 bl 8027070 /* ackno is set in tcp_output */ TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), flags); 8029eb0: 02bf lsls r7, r7, #10 return NULL; } seg->tcphdr = (struct tcp_hdr *)seg->p->payload; seg->tcphdr->src = htons(pcb->local_port); seg->tcphdr->dest = htons(pcb->remote_port); seg->tcphdr->seqno = htonl(seqno); 8029eb2: 6070 str r0, [r6, #4] /* ackno is set in tcp_output */ TCPH_HDRLEN_FLAGS_SET(seg->tcphdr, (5 + optlen / 4), flags); 8029eb4: f507 40a0 add.w r0, r7, #20480 ; 0x5000 8029eb8: ea40 0009 orr.w r0, r0, r9 8029ebc: 68e6 ldr r6, [r4, #12] 8029ebe: f7fd f8cd bl 802705c 8029ec2: 81b0 strh r0, [r6, #12] /* wnd and chksum are set in tcp_output */ seg->tcphdr->urgp = 0; 8029ec4: 68e3 ldr r3, [r4, #12] 8029ec6: 749d strb r5, [r3, #18] 8029ec8: 74dd strb r5, [r3, #19] return seg; } 8029eca: 4620 mov r0, r4 8029ecc: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 08029ed0 : static struct pbuf * tcp_output_alloc_header(struct tcp_pcb *pcb, u16_t optlen, u16_t datalen, u32_t seqno_be /* already in network byte order */) { struct tcp_hdr *tcphdr; struct pbuf *p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM); 8029ed0: 3114 adds r1, #20 * @param datalen length of tcp data to reserve in pbuf * @param seqno_be seqno in network byte order (big-endian) * @return pbuf with p->payload being the tcp_hdr */ static struct pbuf * tcp_output_alloc_header(struct tcp_pcb *pcb, u16_t optlen, u16_t datalen, 8029ed2: b5f8 push {r3, r4, r5, r6, r7, lr} u32_t seqno_be /* already in network byte order */) { struct tcp_hdr *tcphdr; struct pbuf *p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM); 8029ed4: b289 uxth r1, r1 * @param datalen length of tcp data to reserve in pbuf * @param seqno_be seqno in network byte order (big-endian) * @return pbuf with p->payload being the tcp_hdr */ static struct pbuf * tcp_output_alloc_header(struct tcp_pcb *pcb, u16_t optlen, u16_t datalen, 8029ed6: 4605 mov r5, r0 8029ed8: 4617 mov r7, r2 u32_t seqno_be /* already in network byte order */) { struct tcp_hdr *tcphdr; struct pbuf *p = pbuf_alloc(PBUF_IP, TCP_HLEN + optlen + datalen, PBUF_RAM); 8029eda: 2001 movs r0, #1 8029edc: 2200 movs r2, #0 8029ede: f7fe fa48 bl 8028372 if (p != NULL) { 8029ee2: 4606 mov r6, r0 8029ee4: b1f8 cbz r0, 8029f26 LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", (p->len >= TCP_HLEN + optlen)); tcphdr = (struct tcp_hdr *)p->payload; 8029ee6: 6844 ldr r4, [r0, #4] tcphdr->src = htons(pcb->local_port); 8029ee8: 8b68 ldrh r0, [r5, #26] 8029eea: f7fd f8b7 bl 802705c 8029eee: 8020 strh r0, [r4, #0] tcphdr->dest = htons(pcb->remote_port); 8029ef0: 8ba8 ldrh r0, [r5, #28] 8029ef2: f7fd f8b3 bl 802705c tcphdr->seqno = seqno_be; 8029ef6: 6067 str r7, [r4, #4] if (p != NULL) { LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", (p->len >= TCP_HLEN + optlen)); tcphdr = (struct tcp_hdr *)p->payload; tcphdr->src = htons(pcb->local_port); tcphdr->dest = htons(pcb->remote_port); 8029ef8: 8060 strh r0, [r4, #2] tcphdr->seqno = seqno_be; tcphdr->ackno = htonl(pcb->rcv_nxt); 8029efa: 6aa8 ldr r0, [r5, #40] ; 0x28 8029efc: f7fd f8b8 bl 8027070 8029f00: 60a0 str r0, [r4, #8] TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), TCP_ACK); 8029f02: f245 0010 movw r0, #20496 ; 0x5010 8029f06: f7fd f8a9 bl 802705c 8029f0a: 81a0 strh r0, [r4, #12] tcphdr->wnd = htons(pcb->rcv_ann_wnd); 8029f0c: 8de8 ldrh r0, [r5, #46] ; 0x2e 8029f0e: f7fd f8a5 bl 802705c tcphdr->chksum = 0; 8029f12: 2300 movs r3, #0 tcphdr->src = htons(pcb->local_port); tcphdr->dest = htons(pcb->remote_port); tcphdr->seqno = seqno_be; tcphdr->ackno = htonl(pcb->rcv_nxt); TCPH_HDRLEN_FLAGS_SET(tcphdr, (5 + optlen / 4), TCP_ACK); tcphdr->wnd = htons(pcb->rcv_ann_wnd); 8029f14: 81e0 strh r0, [r4, #14] tcphdr->chksum = 0; 8029f16: 7423 strb r3, [r4, #16] 8029f18: 7463 strb r3, [r4, #17] tcphdr->urgp = 0; 8029f1a: 74a3 strb r3, [r4, #18] 8029f1c: 74e3 strb r3, [r4, #19] /* If we're sending a packet, update the announced right window edge */ pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 8029f1e: 8dea ldrh r2, [r5, #46] ; 0x2e 8029f20: 6aab ldr r3, [r5, #40] ; 0x28 8029f22: 18d3 adds r3, r2, r3 8029f24: 632b str r3, [r5, #48] ; 0x30 } return p; } 8029f26: 4630 mov r0, r6 8029f28: bdf8 pop {r3, r4, r5, r6, r7, pc} 08029f2a : * - TCP_WRITE_FLAG_MORE (0x02) for TCP connection, PSH flag will be set on last segment sent, * @return ERR_OK if enqueued, another err_t on error */ err_t tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) { 8029f2a: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8029f2e: b08f sub sp, #60 ; 0x3c 8029f30: 4691 mov r9, r2 8029f32: 9307 str r3, [sp, #28] u16_t pos = 0; /* position in 'arg' data */ u16_t queuelen; u8_t optlen = 0; u8_t optflags = 0; #if TCP_OVERSIZE u16_t oversize = 0; 8029f34: 2300 movs r3, #0 8029f36: f8ad 3036 strh.w r3, [sp, #54] ; 0x36 * - TCP_WRITE_FLAG_MORE (0x02) for TCP connection, PSH flag will be set on last segment sent, * @return ERR_OK if enqueued, another err_t on error */ err_t tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) { 8029f3a: 4604 mov r4, r0 u8_t concat_chksum_swapped = 0; u16_t concat_chksummed = 0; #endif /* TCP_CHECKSUM_ON_COPY */ err_t err; /* don't allocate segments bigger than half the maximum window we ever received */ u16_t mss_local = LWIP_MIN(pcb->mss, pcb->snd_wnd_max/2); 8029f3c: f8b0 2062 ldrh.w r2, [r0, #98] ; 0x62 8029f40: 8ec3 ldrh r3, [r0, #54] ; 0x36 apiflags |= TCP_WRITE_FLAG_COPY; #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_write(pcb=%p, data=%p, len=%"U16_F", apiflags=%"U16_F")\n", (void *)pcb, arg, len, (u16_t)apiflags)); LWIP_ERROR("tcp_write: arg == NULL (programmer violates API)", 8029f42: 9106 str r1, [sp, #24] 8029f44: 2900 cmp r1, #0 8029f46: f000 8168 beq.w 802a21a 8029f4a: 7e01 ldrb r1, [r0, #24] 8029f4c: 2907 cmp r1, #7 8029f4e: f200 8166 bhi.w 802a21e 8029f52: f990 1018 ldrsb.w r1, [r0, #24] 8029f56: f04f 5064 mov.w r0, #956301312 ; 0x39000000 8029f5a: 4088 lsls r0, r1 8029f5c: f140 815f bpl.w 802a21e (pcb->state != CLOSE_WAIT) && (pcb->state != SYN_SENT) && (pcb->state != SYN_RCVD)) { LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_STATE | LWIP_DBG_LEVEL_SEVERE, ("tcp_write() called in invalid state\n")); return ERR_CONN; } else if (len == 0) { 8029f60: f1b9 0f00 cmp.w r9, #0 8029f64: d00d beq.n 8029f82 return ERR_OK; } /* fail on too much data */ if (len > pcb->snd_buf) { 8029f66: f8b4 1066 ldrh.w r1, [r4, #102] ; 0x66 8029f6a: 4549 cmp r1, r9 8029f6c: d200 bcs.n 8029f70 8029f6e: e003 b.n 8029f78 LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_write: queuelen: %"U16_F"\n", (u16_t)pcb->snd_queuelen)); /* If total number of pbufs on the unsent/unacked queues exceeds the * configured maximum, return an error */ /* check for configured max queuelen and possible overflow */ if ((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) { 8029f70: f8b4 1068 ldrh.w r1, [r4, #104] ; 0x68 8029f74: 2947 cmp r1, #71 ; 0x47 8029f76: d904 bls.n 8029f82 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 3, ("tcp_write: too long queue %"U16_F" (max %"U16_F")\n", pcb->snd_queuelen, TCP_SND_QUEUELEN)); TCP_STATS_INC(tcp.memerr); pcb->flags |= TF_NAGLEMEMERR; 8029f78: 7fa3 ldrb r3, [r4, #30] 8029f7a: f063 037f orn r3, r3, #127 ; 0x7f 8029f7e: 77a3 strb r3, [r4, #30] 8029f80: e151 b.n 802a226 u8_t concat_chksum_swapped = 0; u16_t concat_chksummed = 0; #endif /* TCP_CHECKSUM_ON_COPY */ err_t err; /* don't allocate segments bigger than half the maximum window we ever received */ u16_t mss_local = LWIP_MIN(pcb->mss, pcb->snd_wnd_max/2); 8029f82: 0852 lsrs r2, r2, #1 * * pos records progress as data is segmented. */ /* Find the tail of the unsent queue. */ if (pcb->unsent != NULL) { 8029f84: 6ee6 ldr r6, [r4, #108] ; 0x6c err = tcp_write_checks(pcb, len); if (err != ERR_OK) { return err; } queuelen = pcb->snd_queuelen; 8029f86: f8b4 b068 ldrh.w fp, [r4, #104] ; 0x68 u8_t concat_chksum_swapped = 0; u16_t concat_chksummed = 0; #endif /* TCP_CHECKSUM_ON_COPY */ err_t err; /* don't allocate segments bigger than half the maximum window we ever received */ u16_t mss_local = LWIP_MIN(pcb->mss, pcb->snd_wnd_max/2); 8029f8a: 429a cmp r2, r3 8029f8c: bf28 it cs 8029f8e: 461a movcs r2, r3 8029f90: 920a str r2, [sp, #40] ; 0x28 * * pos records progress as data is segmented. */ /* Find the tail of the unsent queue. */ if (pcb->unsent != NULL) { 8029f92: b90e cbnz r6, 8029f98 8029f94: e066 b.n 802a064 u16_t space; u16_t unsent_optlen; /* @todo: this could be sped up by keeping last_unsent in the pcb */ for (last_unsent = pcb->unsent; last_unsent->next != NULL; last_unsent = last_unsent->next); 8029f96: 461e mov r6, r3 if (pcb->unsent != NULL) { u16_t space; u16_t unsent_optlen; /* @todo: this could be sped up by keeping last_unsent in the pcb */ for (last_unsent = pcb->unsent; last_unsent->next != NULL; 8029f98: 6833 ldr r3, [r6, #0] 8029f9a: 2b00 cmp r3, #0 8029f9c: d1fb bne.n 8029f96 last_unsent = last_unsent->next); /* Usable space at the end of the last unsent segment */ unsent_optlen = LWIP_TCP_OPT_LENGTH(last_unsent->flags); 8029f9e: 7ab3 ldrb r3, [r6, #10] space = mss_local - (last_unsent->len + unsent_optlen); 8029fa0: 8937 ldrh r7, [r6, #8] /* @todo: this could be sped up by keeping last_unsent in the pcb */ for (last_unsent = pcb->unsent; last_unsent->next != NULL; last_unsent = last_unsent->next); /* Usable space at the end of the last unsent segment */ unsent_optlen = LWIP_TCP_OPT_LENGTH(last_unsent->flags); 8029fa2: 980a ldr r0, [sp, #40] ; 0x28 #if TCP_OVERSIZE_DBGCHECK /* check that pcb->unsent_oversize matches last_unsent->unsent_oversize */ LWIP_ASSERT("unsent_oversize mismatch (pcb vs. last_unsent)", pcb->unsent_oversize == last_unsent->oversize_left); #endif /* TCP_OVERSIZE_DBGCHECK */ oversize = pcb->unsent_oversize; 8029fa4: f8b4 506a ldrh.w r5, [r4, #106] ; 0x6a /* @todo: this could be sped up by keeping last_unsent in the pcb */ for (last_unsent = pcb->unsent; last_unsent->next != NULL; last_unsent = last_unsent->next); /* Usable space at the end of the last unsent segment */ unsent_optlen = LWIP_TCP_OPT_LENGTH(last_unsent->flags); 8029fa8: f013 0f01 tst.w r3, #1 8029fac: f003 0302 and.w r3, r3, #2 8029fb0: bf0c ite eq 8029fb2: 2100 moveq r1, #0 8029fb4: 2104 movne r1, #4 8029fb6: b2db uxtb r3, r3 8029fb8: 1bc2 subs r2, r0, r7 8029fba: 2b00 cmp r3, #0 8029fbc: bf14 ite ne 8029fbe: 230c movne r3, #12 8029fc0: 2300 moveq r3, #0 space = mss_local - (last_unsent->len + unsent_optlen); 8029fc2: 1a52 subs r2, r2, r1 8029fc4: 1ad2 subs r2, r2, r3 8029fc6: b292 uxth r2, r2 /* check that pcb->unsent_oversize matches last_unsent->unsent_oversize */ LWIP_ASSERT("unsent_oversize mismatch (pcb vs. last_unsent)", pcb->unsent_oversize == last_unsent->oversize_left); #endif /* TCP_OVERSIZE_DBGCHECK */ oversize = pcb->unsent_oversize; if (oversize > 0) { 8029fc8: b91d cbnz r5, 8029fd2 #if TCP_OVERSIZE_DBGCHECK /* check that pcb->unsent_oversize matches last_unsent->unsent_oversize */ LWIP_ASSERT("unsent_oversize mismatch (pcb vs. last_unsent)", pcb->unsent_oversize == last_unsent->oversize_left); #endif /* TCP_OVERSIZE_DBGCHECK */ oversize = pcb->unsent_oversize; 8029fca: f8ad 5036 strh.w r5, [sp, #54] ; 0x36 */ err_t tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) { struct pbuf *concat_p = NULL; struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; 8029fce: 462b mov r3, r5 8029fd0: e00a b.n 8029fe8 #endif /* TCP_OVERSIZE_DBGCHECK */ oversize = pcb->unsent_oversize; if (oversize > 0) { LWIP_ASSERT("inconsistent oversize vs. space", oversize_used <= space); seg = last_unsent; oversize_used = oversize < len ? oversize : len; 8029fd2: 45a9 cmp r9, r5 8029fd4: bf34 ite cc 8029fd6: 464b movcc r3, r9 8029fd8: 462b movcs r3, r5 pos += oversize_used; oversize -= oversize_used; 8029fda: 1aed subs r5, r5, r3 space -= oversize_used; 8029fdc: 1ad2 subs r2, r2, r3 if (oversize > 0) { LWIP_ASSERT("inconsistent oversize vs. space", oversize_used <= space); seg = last_unsent; oversize_used = oversize < len ? oversize : len; pos += oversize_used; oversize -= oversize_used; 8029fde: f8ad 5036 strh.w r5, [sp, #54] ; 0x36 space -= oversize_used; 8029fe2: b292 uxth r2, r2 oversize = pcb->unsent_oversize; if (oversize > 0) { LWIP_ASSERT("inconsistent oversize vs. space", oversize_used <= space); seg = last_unsent; oversize_used = oversize < len ? oversize : len; pos += oversize_used; 8029fe4: 461d mov r5, r3 oversize -= oversize_used; space -= oversize_used; 8029fe6: 4633 mov r3, r6 * * We don't extend segments containing SYN/FIN flags or options * (len==0). The new pbuf is kept in concat_p and pbuf_cat'ed at * the end. */ if ((pos < len) && (space > 0) && (last_unsent->len > 0)) { 8029fe8: 454d cmp r5, r9 8029fea: d23f bcs.n 802a06c 8029fec: 2a00 cmp r2, #0 8029fee: d03d beq.n 802a06c 8029ff0: 2f00 cmp r7, #0 8029ff2: d03e beq.n 802a072 seg = last_unsent; /* Create a pbuf with a copy or reference to seglen bytes. We * can use PBUF_RAW here since the data appears in the middle of * a segment. A header will never be prepended. */ if (apiflags & TCP_WRITE_FLAG_COPY) { 8029ff4: 9907 ldr r1, [sp, #28] * We don't extend segments containing SYN/FIN flags or options * (len==0). The new pbuf is kept in concat_p and pbuf_cat'ed at * the end. */ if ((pos < len) && (space > 0) && (last_unsent->len > 0)) { u16_t seglen = space < len - pos ? space : len - pos; 8029ff6: ebc5 0a09 rsb sl, r5, r9 8029ffa: 4592 cmp sl, r2 8029ffc: bfa8 it ge 8029ffe: 4692 movge sl, r2 seg = last_unsent; /* Create a pbuf with a copy or reference to seglen bytes. We * can use PBUF_RAW here since the data appears in the middle of * a segment. A header will never be prepended. */ if (apiflags & TCP_WRITE_FLAG_COPY) { 802a000: 07cb lsls r3, r1, #31 * We don't extend segments containing SYN/FIN flags or options * (len==0). The new pbuf is kept in concat_p and pbuf_cat'ed at * the end. */ if ((pos < len) && (space > 0) && (last_unsent->len > 0)) { u16_t seglen = space < len - pos ? space : len - pos; 802a002: fa1f f88a uxth.w r8, sl seg = last_unsent; /* Create a pbuf with a copy or reference to seglen bytes. We * can use PBUF_RAW here since the data appears in the middle of * a segment. A header will never be prepended. */ if (apiflags & TCP_WRITE_FLAG_COPY) { 802a006: d514 bpl.n 802a032 /* Data is copied */ if ((concat_p = tcp_pbuf_prealloc(PBUF_RAW, seglen, space, &oversize, pcb, apiflags, 1)) == NULL) { 802a008: 2301 movs r3, #1 802a00a: 9101 str r1, [sp, #4] 802a00c: 9302 str r3, [sp, #8] 802a00e: 9400 str r4, [sp, #0] 802a010: 2003 movs r0, #3 802a012: 4641 mov r1, r8 802a014: f10d 0336 add.w r3, sp, #54 ; 0x36 802a018: f7ff fedc bl 8029dd4 802a01c: 4607 mov r7, r0 802a01e: 2800 cmp r0, #0 802a020: f000 80e9 beq.w 802a1f6 goto memerr; } #if TCP_OVERSIZE_DBGCHECK last_unsent->oversize_left += oversize; #endif /* TCP_OVERSIZE_DBGCHECK */ TCP_DATA_COPY2(concat_p->payload, (u8_t*)arg + pos, seglen, &concat_chksum, &concat_chksum_swapped); 802a024: 9a06 ldr r2, [sp, #24] 802a026: 6840 ldr r0, [r0, #4] 802a028: 1951 adds r1, r2, r5 802a02a: 4642 mov r2, r8 802a02c: f7f7 faae bl 802158c 802a030: e00b b.n 802a04a #if TCP_CHECKSUM_ON_COPY concat_chksummed += seglen; #endif /* TCP_CHECKSUM_ON_COPY */ } else { /* Data is not copied */ if ((concat_p = pbuf_alloc(PBUF_RAW, seglen, PBUF_ROM)) == NULL) { 802a032: 2003 movs r0, #3 802a034: 4641 mov r1, r8 802a036: 2201 movs r2, #1 802a038: f7fe f99b bl 8028372 802a03c: 4607 mov r7, r0 802a03e: 2800 cmp r0, #0 802a040: f000 80d9 beq.w 802a1f6 tcp_seg_add_chksum(~inet_chksum((u8_t*)arg + pos, seglen), seglen, &concat_chksum, &concat_chksum_swapped); concat_chksummed += seglen; #endif /* TCP_CHECKSUM_ON_COPY */ /* reference the non-volatile payload data */ concat_p->payload = (u8_t*)arg + pos; 802a044: 9806 ldr r0, [sp, #24] 802a046: 1943 adds r3, r0, r5 802a048: 607b str r3, [r7, #4] } pos += seglen; queuelen += pbuf_clen(concat_p); 802a04a: 4638 mov r0, r7 802a04c: f7fe fa18 bl 8028480 #endif /* TCP_CHECKSUM_ON_COPY */ /* reference the non-volatile payload data */ concat_p->payload = (u8_t*)arg + pos; } pos += seglen; 802a050: 44a8 add r8, r5 802a052: fa1f f888 uxth.w r8, r8 queuelen += pbuf_clen(concat_p); 802a056: 4458 add r0, fp 802a058: 46aa mov sl, r5 802a05a: fa1f fb80 uxth.w fp, r0 #endif /* TCP_CHECKSUM_ON_COPY */ /* reference the non-volatile payload data */ concat_p->payload = (u8_t*)arg + pos; } pos += seglen; 802a05e: 4645 mov r5, r8 queuelen += pbuf_clen(concat_p); 802a060: 4633 mov r3, r6 802a062: e007 b.n 802a074 u16_t queuelen; u8_t optlen = 0; u8_t optflags = 0; #if TCP_OVERSIZE u16_t oversize = 0; u16_t oversize_used = 0; 802a064: 46b2 mov sl, r6 err_t tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) { struct pbuf *concat_p = NULL; struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; u16_t pos = 0; /* position in 'arg' data */ 802a066: 4635 mov r5, r6 */ err_t tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) { struct pbuf *concat_p = NULL; struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; 802a068: 4633 mov r3, r6 802a06a: e000 b.n 802a06e * * We don't extend segments containing SYN/FIN flags or options * (len==0). The new pbuf is kept in concat_p and pbuf_cat'ed at * the end. */ if ((pos < len) && (space > 0) && (last_unsent->len > 0)) { 802a06c: 46aa mov sl, r5 * @return ERR_OK if enqueued, another err_t on error */ err_t tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) { struct pbuf *concat_p = NULL; 802a06e: 2700 movs r7, #0 802a070: e000 b.n 802a074 * * We don't extend segments containing SYN/FIN flags or options * (len==0). The new pbuf is kept in concat_p and pbuf_cat'ed at * the end. */ if ((pos < len) && (space > 0) && (last_unsent->len > 0)) { 802a072: 46aa mov sl, r5 #if TCP_CHECKSUM_ON_COPY u16_t chksum = 0; u8_t chksum_swapped = 0; #endif /* TCP_CHECKSUM_ON_COPY */ if (apiflags & TCP_WRITE_FLAG_COPY) { 802a074: 9907 ldr r1, [sp, #28] seg->chksum_swapped = chksum_swapped; seg->flags |= TF_SEG_DATA_CHECKSUMMED; #endif /* TCP_CHECKSUM_ON_COPY */ /* first segment of to-be-queued data? */ if (queue == NULL) { 802a076: f04f 0800 mov.w r8, #0 #if TCP_CHECKSUM_ON_COPY u16_t chksum = 0; u8_t chksum_swapped = 0; #endif /* TCP_CHECKSUM_ON_COPY */ if (apiflags & TCP_WRITE_FLAG_COPY) { 802a07a: f001 0101 and.w r1, r1, #1 seg->chksum_swapped = chksum_swapped; seg->flags |= TF_SEG_DATA_CHECKSUMMED; #endif /* TCP_CHECKSUM_ON_COPY */ /* first segment of to-be-queued data? */ if (queue == NULL) { 802a07e: f8cd 802c str.w r8, [sp, #44] ; 0x2c #if TCP_CHECKSUM_ON_COPY u16_t chksum = 0; u8_t chksum_swapped = 0; #endif /* TCP_CHECKSUM_ON_COPY */ if (apiflags & TCP_WRITE_FLAG_COPY) { 802a082: 9108 str r1, [sp, #32] 802a084: e068 b.n 802a158 * The new segments are chained together in the local 'queue' * variable, ready to be appended to pcb->unsent. */ while (pos < len) { struct pbuf *p; u16_t left = len - pos; 802a086: ebc5 0309 rsb r3, r5, r9 u16_t max_len = mss_local - optlen; u16_t seglen = left > max_len ? max_len : left; 802a08a: 9a0a ldr r2, [sp, #40] ; 0x28 802a08c: b29b uxth r3, r3 802a08e: 4293 cmp r3, r2 802a090: bf38 it cc 802a092: 461a movcc r2, r3 #if TCP_CHECKSUM_ON_COPY u16_t chksum = 0; u8_t chksum_swapped = 0; #endif /* TCP_CHECKSUM_ON_COPY */ if (apiflags & TCP_WRITE_FLAG_COPY) { 802a094: 9b08 ldr r3, [sp, #32] */ while (pos < len) { struct pbuf *p; u16_t left = len - pos; u16_t max_len = mss_local - optlen; u16_t seglen = left > max_len ? max_len : left; 802a096: 9209 str r2, [sp, #36] ; 0x24 #if TCP_CHECKSUM_ON_COPY u16_t chksum = 0; u8_t chksum_swapped = 0; #endif /* TCP_CHECKSUM_ON_COPY */ if (apiflags & TCP_WRITE_FLAG_COPY) { 802a098: b1db cbz r3, 802a0d2 /* If copy is set, memory should be allocated and data copied * into pbuf */ if ((p = tcp_pbuf_prealloc(PBUF_TRANSPORT, seglen + optlen, mss_local, &oversize, pcb, apiflags, queue == NULL)) == NULL) { 802a09a: f1d8 0301 rsbs r3, r8, #1 802a09e: 9807 ldr r0, [sp, #28] 802a0a0: 9400 str r4, [sp, #0] 802a0a2: bf38 it cc 802a0a4: 2300 movcc r3, #0 802a0a6: 9001 str r0, [sp, #4] 802a0a8: 9302 str r3, [sp, #8] 802a0aa: 4611 mov r1, r2 802a0ac: 2000 movs r0, #0 802a0ae: 9a0a ldr r2, [sp, #40] ; 0x28 802a0b0: f10d 0336 add.w r3, sp, #54 ; 0x36 802a0b4: f7ff fe8e bl 8029dd4 802a0b8: 4684 mov ip, r0 802a0ba: 2800 cmp r0, #0 802a0bc: f000 809e beq.w 802a1fc LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_write : could not allocate memory for pbuf copy size %"U16_F"\n", seglen)); goto memerr; } LWIP_ASSERT("tcp_write: check that first pbuf can hold the complete seglen", (p->len >= seglen)); TCP_DATA_COPY2((char *)p->payload + optlen, (u8_t*)arg + pos, seglen, &chksum, &chksum_swapped); 802a0c0: 9a06 ldr r2, [sp, #24] 802a0c2: 6840 ldr r0, [r0, #4] 802a0c4: f8cd c014 str.w ip, [sp, #20] 802a0c8: 1951 adds r1, r2, r5 802a0ca: 9a09 ldr r2, [sp, #36] ; 0x24 802a0cc: f7f7 fa5e bl 802158c 802a0d0: e019 b.n 802a106 */ struct pbuf *p2; #if TCP_OVERSIZE LWIP_ASSERT("oversize == 0", oversize == 0); #endif /* TCP_OVERSIZE */ if ((p2 = pbuf_alloc(PBUF_TRANSPORT, seglen, PBUF_ROM)) == NULL) { 802a0d2: 9808 ldr r0, [sp, #32] 802a0d4: 9909 ldr r1, [sp, #36] ; 0x24 802a0d6: 2201 movs r2, #1 802a0d8: f7fe f94b bl 8028372 802a0dc: 4603 mov r3, r0 802a0de: 2800 cmp r0, #0 802a0e0: f000 808c beq.w 802a1fc #if TCP_CHECKSUM_ON_COPY /* calculate the checksum of nocopy-data */ chksum = ~inet_chksum((u8_t*)arg + pos, seglen); #endif /* TCP_CHECKSUM_ON_COPY */ /* reference the non-volatile payload data */ p2->payload = (u8_t*)arg + pos; 802a0e4: 9806 ldr r0, [sp, #24] 802a0e6: 1942 adds r2, r0, r5 /* Second, allocate a pbuf for the headers. */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 802a0e8: 9808 ldr r0, [sp, #32] #if TCP_CHECKSUM_ON_COPY /* calculate the checksum of nocopy-data */ chksum = ~inet_chksum((u8_t*)arg + pos, seglen); #endif /* TCP_CHECKSUM_ON_COPY */ /* reference the non-volatile payload data */ p2->payload = (u8_t*)arg + pos; 802a0ea: 605a str r2, [r3, #4] /* Second, allocate a pbuf for the headers. */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 802a0ec: 4601 mov r1, r0 802a0ee: 4602 mov r2, r0 802a0f0: 9305 str r3, [sp, #20] 802a0f2: f7fe f93e bl 8028372 802a0f6: 9b05 ldr r3, [sp, #20] 802a0f8: b908 cbnz r0, 802a0fe /* If allocation fails, we have to deallocate the data pbuf as * well. */ pbuf_free(p2); 802a0fa: 4618 mov r0, r3 802a0fc: e013 b.n 802a126 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_write: could not allocate memory for header pbuf\n")); goto memerr; } /* Concatenate the headers and data pbufs together. */ pbuf_cat(p/*header*/, p2/*data*/); 802a0fe: 4619 mov r1, r3 802a100: 9005 str r0, [sp, #20] 802a102: f7fe f9d3 bl 80284ac 802a106: f8dd c014 ldr.w ip, [sp, #20] } queuelen += pbuf_clen(p); 802a10a: 4660 mov r0, ip 802a10c: f8cd c014 str.w ip, [sp, #20] 802a110: f7fe f9b6 bl 8028480 802a114: 4458 add r0, fp 802a116: fa1f fb80 uxth.w fp, r0 /* Now that there are more segments queued, we check again if the * length of the queue exceeds the configured maximum or * overflows. */ if ((queuelen > TCP_SND_QUEUELEN) || (queuelen > TCP_SNDQUEUELEN_OVERFLOW)) { 802a11a: f1bb 0f48 cmp.w fp, #72 ; 0x48 802a11e: f8dd c014 ldr.w ip, [sp, #20] 802a122: d903 bls.n 802a12c LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 2, ("tcp_write: queue too long %"U16_F" (%"U16_F")\n", queuelen, TCP_SND_QUEUELEN)); pbuf_free(p); 802a124: 4660 mov r0, ip 802a126: f7fe f8d7 bl 80282d8 goto memerr; 802a12a: e067 b.n 802a1fc } if ((seg = tcp_create_segment(pcb, p, 0, pcb->snd_lbb + pos, optflags)) == NULL) { 802a12c: 6de3 ldr r3, [r4, #92] ; 0x5c 802a12e: 2200 movs r2, #0 802a130: 18eb adds r3, r5, r3 802a132: 9200 str r2, [sp, #0] 802a134: 4620 mov r0, r4 802a136: 4661 mov r1, ip 802a138: f7ff fe78 bl 8029e2c 802a13c: 4603 mov r3, r0 802a13e: 2800 cmp r0, #0 802a140: d05c beq.n 802a1fc seg->chksum_swapped = chksum_swapped; seg->flags |= TF_SEG_DATA_CHECKSUMMED; #endif /* TCP_CHECKSUM_ON_COPY */ /* first segment of to-be-queued data? */ if (queue == NULL) { 802a142: f1b8 0f00 cmp.w r8, #0 802a146: d002 beq.n 802a14e queue = seg; } else { /* Attach the segment to the end of the queued segments */ LWIP_ASSERT("prev_seg != NULL", prev_seg != NULL); prev_seg->next = seg; 802a148: 990b ldr r1, [sp, #44] ; 0x2c 802a14a: 6008 str r0, [r1, #0] 802a14c: e000 b.n 802a150 seg->chksum_swapped = chksum_swapped; seg->flags |= TF_SEG_DATA_CHECKSUMMED; #endif /* TCP_CHECKSUM_ON_COPY */ /* first segment of to-be-queued data? */ if (queue == NULL) { 802a14e: 4680 mov r8, r0 LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_TRACE, ("tcp_write: queueing %"U32_F":%"U32_F"\n", ntohl(seg->tcphdr->seqno), ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg))); pos += seglen; 802a150: 9a09 ldr r2, [sp, #36] ; 0x24 802a152: 930b str r3, [sp, #44] ; 0x2c 802a154: 1955 adds r5, r2, r5 802a156: b2ad uxth r5, r5 * Phase 3: Create new segments. * * The new segments are chained together in the local 'queue' * variable, ready to be appended to pcb->unsent. */ while (pos < len) { 802a158: 454d cmp r5, r9 802a15a: d394 bcc.n 802a086 /* * Phase 1: If data has been added to the preallocated tail of * last_unsent, we update the length fields of the pbuf chain. */ #if TCP_OVERSIZE if (oversize_used > 0) { 802a15c: f1ba 0f00 cmp.w sl, #0 802a160: d019 beq.n 802a196 struct pbuf *p; /* Bump tot_len of whole chain, len of tail */ for (p = last_unsent->p; p; p = p->next) { 802a162: 6875 ldr r5, [r6, #4] 802a164: e011 b.n 802a18a p->tot_len += oversize_used; 802a166: 892a ldrh r2, [r5, #8] 802a168: 4452 add r2, sl 802a16a: 812a strh r2, [r5, #8] if (p->next == NULL) { 802a16c: 682a ldr r2, [r5, #0] 802a16e: b95a cbnz r2, 802a188 TCP_DATA_COPY((char *)p->payload + p->len, arg, oversize_used, last_unsent); 802a170: 686a ldr r2, [r5, #4] 802a172: 8968 ldrh r0, [r5, #10] 802a174: 9906 ldr r1, [sp, #24] 802a176: 9305 str r3, [sp, #20] 802a178: 1810 adds r0, r2, r0 802a17a: 4652 mov r2, sl 802a17c: f7f7 fa06 bl 802158c p->len += oversize_used; 802a180: 896a ldrh r2, [r5, #10] 802a182: 9b05 ldr r3, [sp, #20] 802a184: 4452 add r2, sl 802a186: 816a strh r2, [r5, #10] */ #if TCP_OVERSIZE if (oversize_used > 0) { struct pbuf *p; /* Bump tot_len of whole chain, len of tail */ for (p = last_unsent->p; p; p = p->next) { 802a188: 682d ldr r5, [r5, #0] 802a18a: 2d00 cmp r5, #0 802a18c: d1eb bne.n 802a166 if (p->next == NULL) { TCP_DATA_COPY((char *)p->payload + p->len, arg, oversize_used, last_unsent); p->len += oversize_used; } } last_unsent->len += oversize_used; 802a18e: 8932 ldrh r2, [r6, #8] 802a190: 4492 add sl, r2 802a192: f8a6 a008 strh.w sl, [r6, #8] LWIP_ASSERT("last_unsent->oversize_left >= oversize_used", last_unsent->oversize_left >= oversize_used); last_unsent->oversize_left -= oversize_used; #endif /* TCP_OVERSIZE_DBGCHECK */ } pcb->unsent_oversize = oversize; 802a196: f8bd 2036 ldrh.w r2, [sp, #54] ; 0x36 802a19a: f8a4 206a strh.w r2, [r4, #106] ; 0x6a #endif /* TCP_OVERSIZE */ /* * Phase 2: concat_p can be concatenated onto last_unsent->p */ if (concat_p != NULL) { 802a19e: b157 cbz r7, 802a1b6 LWIP_ASSERT("tcp_write: cannot concatenate when pcb->unsent is empty", (last_unsent != NULL)); pbuf_cat(last_unsent->p, concat_p); 802a1a0: 6870 ldr r0, [r6, #4] 802a1a2: 9305 str r3, [sp, #20] 802a1a4: 4639 mov r1, r7 802a1a6: f7fe f981 bl 80284ac last_unsent->len += concat_p->tot_len; 802a1aa: 8939 ldrh r1, [r7, #8] 802a1ac: 8932 ldrh r2, [r6, #8] 802a1ae: 9b05 ldr r3, [sp, #20] 802a1b0: 188a adds r2, r1, r2 802a1b2: 8132 strh r2, [r6, #8] 802a1b4: e003 b.n 802a1be /* * Phase 3: Append queue to pcb->unsent. Queue may be NULL, but that * is harmless */ if (last_unsent == NULL) { 802a1b6: b916 cbnz r6, 802a1be pcb->unsent = queue; 802a1b8: f8c4 806c str.w r8, [r4, #108] ; 0x6c 802a1bc: e001 b.n 802a1c2 } else { last_unsent->next = queue; 802a1be: f8c6 8000 str.w r8, [r6] } /* * Finally update the pcb state. */ pcb->snd_lbb += len; 802a1c2: 6de2 ldr r2, [r4, #92] ; 0x5c pcb->snd_buf -= len; pcb->snd_queuelen = queuelen; 802a1c4: f8a4 b068 strh.w fp, [r4, #104] ; 0x68 } /* * Finally update the pcb state. */ pcb->snd_lbb += len; 802a1c8: 444a add r2, r9 802a1ca: 65e2 str r2, [r4, #92] ; 0x5c pcb->snd_buf -= len; 802a1cc: f8b4 2066 ldrh.w r2, [r4, #102] ; 0x66 802a1d0: ebc9 0902 rsb r9, r9, r2 802a1d4: f8a4 9066 strh.w r9, [r4, #102] ; 0x66 LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL || pcb->unsent != NULL); } /* Set the PSH flag in the last segment that we enqueued. */ if (seg != NULL && seg->tcphdr != NULL && ((apiflags & TCP_WRITE_FLAG_MORE)==0)) { 802a1d8: b333 cbz r3, 802a228 802a1da: 68dc ldr r4, [r3, #12] 802a1dc: b30c cbz r4, 802a222 802a1de: 9b07 ldr r3, [sp, #28] 802a1e0: f003 0502 and.w r5, r3, #2 802a1e4: b2ed uxtb r5, r5 802a1e6: b9e5 cbnz r5, 802a222 TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); 802a1e8: 2008 movs r0, #8 802a1ea: 89a6 ldrh r6, [r4, #12] 802a1ec: f7fc ff36 bl 802705c 802a1f0: 4330 orrs r0, r6 802a1f2: 81a0 strh r0, [r4, #12] 802a1f4: e015 b.n 802a222 */ err_t tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) { struct pbuf *concat_p = NULL; struct tcp_seg *last_unsent = NULL, *seg = NULL, *prev_seg = NULL, *queue = NULL; 802a1f6: f04f 0800 mov.w r8, #0 802a1fa: 4647 mov r7, r8 TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); } return ERR_OK; memerr: pcb->flags |= TF_NAGLEMEMERR; 802a1fc: 7fa3 ldrb r3, [r4, #30] 802a1fe: f063 037f orn r3, r3, #127 ; 0x7f 802a202: 77a3 strb r3, [r4, #30] TCP_STATS_INC(tcp.memerr); if (concat_p != NULL) { 802a204: b117 cbz r7, 802a20c pbuf_free(concat_p); 802a206: 4638 mov r0, r7 802a208: f7fe f866 bl 80282d8 } if (queue != NULL) { 802a20c: f1b8 0f00 cmp.w r8, #0 802a210: d009 beq.n 802a226 tcp_segs_free(queue); 802a212: 4640 mov r0, r8 802a214: f7fe fb1b bl 802884e 802a218: e005 b.n 802a226 apiflags |= TCP_WRITE_FLAG_COPY; #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_write(pcb=%p, data=%p, len=%"U16_F", apiflags=%"U16_F")\n", (void *)pcb, arg, len, (u16_t)apiflags)); LWIP_ERROR("tcp_write: arg == NULL (programmer violates API)", 802a21a: 23f2 movs r3, #242 ; 0xf2 802a21c: e004 b.n 802a228 if ((pcb->state != ESTABLISHED) && (pcb->state != CLOSE_WAIT) && (pcb->state != SYN_SENT) && (pcb->state != SYN_RCVD)) { LWIP_DEBUGF(TCP_OUTPUT_DEBUG | LWIP_DBG_STATE | LWIP_DBG_LEVEL_SEVERE, ("tcp_write() called in invalid state\n")); return ERR_CONN; 802a21e: 23f3 movs r3, #243 ; 0xf3 802a220: e002 b.n 802a228 /* Set the PSH flag in the last segment that we enqueued. */ if (seg != NULL && seg->tcphdr != NULL && ((apiflags & TCP_WRITE_FLAG_MORE)==0)) { TCPH_SET_FLAG(seg->tcphdr, TCP_PSH); } return ERR_OK; 802a222: 2300 movs r3, #0 802a224: e000 b.n 802a228 if (pcb->snd_queuelen != 0) { LWIP_ASSERT("tcp_write: valid queue length", pcb->unacked != NULL || pcb->unsent != NULL); } LWIP_DEBUGF(TCP_QLEN_DEBUG | LWIP_DBG_STATE, ("tcp_write: %"S16_F" (with mem err)\n", pcb->snd_queuelen)); return ERR_MEM; 802a226: 23ff movs r3, #255 ; 0xff 802a228: b258 sxtb r0, r3 } 802a22a: b00f add sp, #60 ; 0x3c 802a22c: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0802a230 : LWIP_ASSERT("tcp_enqueue_flags: need either TCP_SYN or TCP_FIN in flags (programmer violates API)", (flags & (TCP_SYN | TCP_FIN)) != 0); /* check for configured max queuelen and possible overflow */ if ((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) { 802a230: f8b0 3068 ldrh.w r3, [r0, #104] ; 0x68 802a234: 2b47 cmp r3, #71 ; 0x47 * @param optdata pointer to TCP options, or NULL. * @param optlen length of TCP options in bytes. */ err_t tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags) { 802a236: b573 push {r0, r1, r4, r5, r6, lr} 802a238: 4604 mov r4, r0 802a23a: 460d mov r5, r1 LWIP_ASSERT("tcp_enqueue_flags: need either TCP_SYN or TCP_FIN in flags (programmer violates API)", (flags & (TCP_SYN | TCP_FIN)) != 0); /* check for configured max queuelen and possible overflow */ if ((pcb->snd_queuelen >= TCP_SND_QUEUELEN) || (pcb->snd_queuelen > TCP_SNDQUEUELEN_OVERFLOW)) { 802a23c: d900 bls.n 802a240 802a23e: e014 b.n 802a26a /* tcp_enqueue_flags is always called with either SYN or FIN in flags. * We need one available snd_buf byte to do that. * This means we can't send FIN while snd_buf==0. A better fix would be to * not include SYN and FIN sequence numbers in the snd_buf count. */ if (pcb->snd_buf == 0) { 802a240: f8b0 3066 ldrh.w r3, [r0, #102] ; 0x66 err_t tcp_enqueue_flags(struct tcp_pcb *pcb, u8_t flags) { struct pbuf *p; struct tcp_seg *seg; u8_t optflags = 0; 802a244: f3c1 0640 ubfx r6, r1, #1, #1 #if LWIP_TCP_TIMESTAMPS if ((pcb->flags & TF_TIMESTAMP)) { optflags |= TF_SEG_OPTS_TS; } #endif /* LWIP_TCP_TIMESTAMPS */ optlen = LWIP_TCP_OPT_LENGTH(optflags); 802a248: 00b1 lsls r1, r6, #2 /* tcp_enqueue_flags is always called with either SYN or FIN in flags. * We need one available snd_buf byte to do that. * This means we can't send FIN while snd_buf==0. A better fix would be to * not include SYN and FIN sequence numbers in the snd_buf count. */ if (pcb->snd_buf == 0) { 802a24a: 2b00 cmp r3, #0 802a24c: d038 beq.n 802a2c0 TCP_STATS_INC(tcp.memerr); return ERR_MEM; } /* Allocate pbuf with room for TCP header + options */ if ((p = pbuf_alloc(PBUF_TRANSPORT, optlen, PBUF_RAM)) == NULL) { 802a24e: 2000 movs r0, #0 802a250: 4602 mov r2, r0 802a252: f7fe f88e bl 8028372 802a256: 4601 mov r1, r0 802a258: b900 cbnz r0, 802a25c 802a25a: e006 b.n 802a26a } LWIP_ASSERT("tcp_enqueue_flags: check that first pbuf can hold optlen", (p->len >= optlen)); /* Allocate memory for tcp_seg, and fill in fields. */ if ((seg = tcp_create_segment(pcb, p, flags, pcb->snd_lbb, optflags)) == NULL) { 802a25c: 9600 str r6, [sp, #0] 802a25e: 4620 mov r0, r4 802a260: 462a mov r2, r5 802a262: 6de3 ldr r3, [r4, #92] ; 0x5c 802a264: f7ff fde2 bl 8029e2c 802a268: b920 cbnz r0, 802a274 pcb->flags |= TF_NAGLEMEMERR; 802a26a: 7fa3 ldrb r3, [r4, #30] 802a26c: f063 037f orn r3, r3, #127 ; 0x7f 802a270: 77a3 strb r3, [r4, #30] 802a272: e025 b.n 802a2c0 ntohl(seg->tcphdr->seqno), ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg), (u16_t)flags)); /* Now append seg to pcb->unsent queue */ if (pcb->unsent == NULL) { 802a274: 6ee3 ldr r3, [r4, #108] ; 0x6c 802a276: b913 cbnz r3, 802a27e pcb->unsent = seg; 802a278: 66e0 str r0, [r4, #108] ; 0x6c 802a27a: e004 b.n 802a286 } else { struct tcp_seg *useg; for (useg = pcb->unsent; useg->next != NULL; useg = useg->next); 802a27c: 4613 mov r3, r2 802a27e: 681a ldr r2, [r3, #0] 802a280: 2a00 cmp r2, #0 802a282: d1fb bne.n 802a27c useg->next = seg; 802a284: 6018 str r0, [r3, #0] } #if TCP_OVERSIZE /* The new unsent tail has no space */ pcb->unsent_oversize = 0; 802a286: 2300 movs r3, #0 #endif /* TCP_OVERSIZE */ /* SYN and FIN bump the sequence number */ if ((flags & TCP_SYN) || (flags & TCP_FIN)) { 802a288: 07a9 lsls r1, r5, #30 for (useg = pcb->unsent; useg->next != NULL; useg = useg->next); useg->next = seg; } #if TCP_OVERSIZE /* The new unsent tail has no space */ pcb->unsent_oversize = 0; 802a28a: f8a4 306a strh.w r3, [r4, #106] ; 0x6a #endif /* TCP_OVERSIZE */ /* SYN and FIN bump the sequence number */ if ((flags & TCP_SYN) || (flags & TCP_FIN)) { 802a28e: d007 beq.n 802a2a0 pcb->snd_lbb++; 802a290: 6de3 ldr r3, [r4, #92] ; 0x5c 802a292: 3301 adds r3, #1 802a294: 65e3 str r3, [r4, #92] ; 0x5c /* optlen does not influence snd_buf */ pcb->snd_buf--; 802a296: f8b4 3066 ldrh.w r3, [r4, #102] ; 0x66 802a29a: 3b01 subs r3, #1 802a29c: f8a4 3066 strh.w r3, [r4, #102] ; 0x66 } if (flags & TCP_FIN) { 802a2a0: 07ea lsls r2, r5, #31 802a2a2: d503 bpl.n 802a2ac pcb->flags |= TF_FIN; 802a2a4: 7fa3 ldrb r3, [r4, #30] 802a2a6: f043 0320 orr.w r3, r3, #32 802a2aa: 77a3 strb r3, [r4, #30] } /* update number of segments on the queues */ pcb->snd_queuelen += pbuf_clen(seg->p); 802a2ac: 6840 ldr r0, [r0, #4] 802a2ae: f8b4 5068 ldrh.w r5, [r4, #104] ; 0x68 802a2b2: f7fe f8e5 bl 8028480 802a2b6: 1940 adds r0, r0, r5 802a2b8: f8a4 0068 strh.w r0, [r4, #104] ; 0x68 if (pcb->snd_queuelen != 0) { LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", pcb->unacked != NULL || pcb->unsent != NULL); } return ERR_OK; 802a2bc: 2000 movs r0, #0 802a2be: e000 b.n 802a2c2 * This means we can't send FIN while snd_buf==0. A better fix would be to * not include SYN and FIN sequence numbers in the snd_buf count. */ if (pcb->snd_buf == 0) { LWIP_DEBUGF(TCP_OUTPUT_DEBUG | 3, ("tcp_enqueue_flags: no send buffer available\n")); TCP_STATS_INC(tcp.memerr); return ERR_MEM; 802a2c0: 20ff movs r0, #255 ; 0xff LWIP_ASSERT("tcp_enqueue_flags: invalid queue length", pcb->unacked != NULL || pcb->unsent != NULL); } return ERR_OK; } 802a2c2: b240 sxtb r0, r0 802a2c4: bd7c pop {r2, r3, r4, r5, r6, pc} 0802a2c6 : * @param pcb the tcp_pcb over which to send a segment * @return ERR_OK if sent, another err_t otherwise */ err_t tcp_send_fin(struct tcp_pcb *pcb) { 802a2c6: b5f8 push {r3, r4, r5, r6, r7, lr} /* first, try to add the fin to the last unsent segment */ if (pcb->unsent != NULL) { 802a2c8: 6ec4 ldr r4, [r0, #108] ; 0x6c * @param pcb the tcp_pcb over which to send a segment * @return ERR_OK if sent, another err_t otherwise */ err_t tcp_send_fin(struct tcp_pcb *pcb) { 802a2ca: 4605 mov r5, r0 /* first, try to add the fin to the last unsent segment */ if (pcb->unsent != NULL) { 802a2cc: b90c cbnz r4, 802a2d2 802a2ce: e00a b.n 802a2e6 struct tcp_seg *last_unsent; for (last_unsent = pcb->unsent; last_unsent->next != NULL; last_unsent = last_unsent->next); 802a2d0: 461c mov r4, r3 tcp_send_fin(struct tcp_pcb *pcb) { /* first, try to add the fin to the last unsent segment */ if (pcb->unsent != NULL) { struct tcp_seg *last_unsent; for (last_unsent = pcb->unsent; last_unsent->next != NULL; 802a2d2: 6823 ldr r3, [r4, #0] 802a2d4: 2b00 cmp r3, #0 802a2d6: d1fb bne.n 802a2d0 last_unsent = last_unsent->next); if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { 802a2d8: 68e3 ldr r3, [r4, #12] 802a2da: 8998 ldrh r0, [r3, #12] 802a2dc: f7fc fec3 bl 8027066 802a2e0: f010 0607 ands.w r6, r0, #7 802a2e4: d005 beq.n 802a2f2 pcb->flags |= TF_FIN; return ERR_OK; } } /* no data, no length, flags, copy=1, no optdata */ return tcp_enqueue_flags(pcb, TCP_FIN); 802a2e6: 4628 mov r0, r5 802a2e8: 2101 movs r1, #1 } 802a2ea: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr} pcb->flags |= TF_FIN; return ERR_OK; } } /* no data, no length, flags, copy=1, no optdata */ return tcp_enqueue_flags(pcb, TCP_FIN); 802a2ee: f7ff bf9f b.w 802a230 for (last_unsent = pcb->unsent; last_unsent->next != NULL; last_unsent = last_unsent->next); if ((TCPH_FLAGS(last_unsent->tcphdr) & (TCP_SYN | TCP_FIN | TCP_RST)) == 0) { /* no SYN/FIN/RST flag in the header, we can add the FIN flag */ TCPH_SET_FLAG(last_unsent->tcphdr, TCP_FIN); 802a2f2: 68e4 ldr r4, [r4, #12] 802a2f4: 2001 movs r0, #1 802a2f6: 89a7 ldrh r7, [r4, #12] 802a2f8: f7fc feb0 bl 802705c 802a2fc: 4338 orrs r0, r7 802a2fe: 81a0 strh r0, [r4, #12] pcb->flags |= TF_FIN; 802a300: 7fab ldrb r3, [r5, #30] 802a302: f043 0320 orr.w r3, r3, #32 802a306: 77ab strb r3, [r5, #30] return ERR_OK; } } /* no data, no length, flags, copy=1, no optdata */ return tcp_enqueue_flags(pcb, TCP_FIN); } 802a308: 4630 mov r0, r6 802a30a: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802a30c : * * @param pcb Protocol control block for the TCP connection to send the ACK */ err_t tcp_send_empty_ack(struct tcp_pcb *pcb) { 802a30c: b537 push {r0, r1, r2, r4, r5, lr} 802a30e: 4604 mov r4, r0 if (pcb->flags & TF_TIMESTAMP) { optlen = LWIP_TCP_OPT_LENGTH(TF_SEG_OPTS_TS); } #endif p = tcp_output_alloc_header(pcb, optlen, 0, htonl(pcb->snd_nxt)); 802a310: 6d00 ldr r0, [r0, #80] ; 0x50 802a312: f7fc fead bl 8027070 802a316: 2100 movs r1, #0 802a318: 4602 mov r2, r0 802a31a: 4620 mov r0, r4 802a31c: f7ff fdd8 bl 8029ed0 if (p == NULL) { 802a320: 4605 mov r5, r0 802a322: b188 cbz r0, 802a348 } tcphdr = (struct tcp_hdr *)p->payload; LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: sending ACK for %"U32_F"\n", pcb->rcv_nxt)); /* remove ACK flags from the PCB, as we send an empty ACK now */ pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); 802a324: 7fa3 ldrb r3, [r4, #30] #endif #if LWIP_NETIF_HWADDRHINT ip_output_hinted(p, &(pcb->local_ip), &(pcb->remote_ip), pcb->ttl, pcb->tos, IP_PROTO_TCP, &(pcb->addr_hint)); #else /* LWIP_NETIF_HWADDRHINT*/ ip_output(p, &(pcb->local_ip), &(pcb->remote_ip), pcb->ttl, pcb->tos, 802a326: 7a62 ldrb r2, [r4, #9] } tcphdr = (struct tcp_hdr *)p->payload; LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: sending ACK for %"U32_F"\n", pcb->rcv_nxt)); /* remove ACK flags from the PCB, as we send an empty ACK now */ pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); 802a328: f023 0303 bic.w r3, r3, #3 #endif #if LWIP_NETIF_HWADDRHINT ip_output_hinted(p, &(pcb->local_ip), &(pcb->remote_ip), pcb->ttl, pcb->tos, IP_PROTO_TCP, &(pcb->addr_hint)); #else /* LWIP_NETIF_HWADDRHINT*/ ip_output(p, &(pcb->local_ip), &(pcb->remote_ip), pcb->ttl, pcb->tos, 802a32c: 9200 str r2, [sp, #0] 802a32e: 2206 movs r2, #6 } tcphdr = (struct tcp_hdr *)p->payload; LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: sending ACK for %"U32_F"\n", pcb->rcv_nxt)); /* remove ACK flags from the PCB, as we send an empty ACK now */ pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); 802a330: 77a3 strb r3, [r4, #30] #endif #if LWIP_NETIF_HWADDRHINT ip_output_hinted(p, &(pcb->local_ip), &(pcb->remote_ip), pcb->ttl, pcb->tos, IP_PROTO_TCP, &(pcb->addr_hint)); #else /* LWIP_NETIF_HWADDRHINT*/ ip_output(p, &(pcb->local_ip), &(pcb->remote_ip), pcb->ttl, pcb->tos, 802a332: 9201 str r2, [sp, #4] 802a334: 7aa3 ldrb r3, [r4, #10] 802a336: 4621 mov r1, r4 802a338: 1d22 adds r2, r4, #4 802a33a: f001 f8ab bl 802b494 IP_PROTO_TCP); #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 802a33e: 4628 mov r0, r5 802a340: f7fd ffca bl 80282d8 return ERR_OK; 802a344: 2000 movs r0, #0 802a346: e000 b.n 802a34a #endif p = tcp_output_alloc_header(pcb, optlen, 0, htonl(pcb->snd_nxt)); if (p == NULL) { LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output: (ACK) could not allocate pbuf\n")); return ERR_BUF; 802a348: 20fe movs r0, #254 ; 0xfe IP_PROTO_TCP); #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); return ERR_OK; } 802a34a: b240 sxtb r0, r0 802a34c: bd3e pop {r1, r2, r3, r4, r5, pc} 802a34e: 0000 movs r0, r0 0802a350 : /* First, check if we are invoked by the TCP input processing code. If so, we do not output anything. Instead, we rely on the input processing code to call us when input processing is done with. */ if (tcp_input_pcb == pcb) { 802a350: 4b8f ldr r3, [pc, #572] ; (802a590 ) 802a352: 681b ldr r3, [r3, #0] 802a354: 4283 cmp r3, r0 * @return ERR_OK if data has been sent or nothing to send * another err_t on error */ err_t tcp_output(struct tcp_pcb *pcb) { 802a356: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 802a35a: 4604 mov r4, r0 /* First, check if we are invoked by the TCP input processing code. If so, we do not output anything. Instead, we rely on the input processing code to call us when input processing is done with. */ if (tcp_input_pcb == pcb) { 802a35c: f000 8113 beq.w 802a586 return ERR_OK; } wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); 802a360: f8b0 304c ldrh.w r3, [r0, #76] ; 0x4c 802a364: f8b0 9060 ldrh.w r9, [r0, #96] ; 0x60 seg = pcb->unsent; 802a368: 6ec5 ldr r5, [r0, #108] ; 0x6c with. */ if (tcp_input_pcb == pcb) { return ERR_OK; } wnd = LWIP_MIN(pcb->snd_wnd, pcb->cwnd); 802a36a: 4599 cmp r9, r3 802a36c: bf28 it cs 802a36e: 4699 movcs r9, r3 * because the ->unsent queue is empty or because the window does * not allow it), construct an empty ACK segment and send it. * * If data is to be sent, we will just piggyback the ACK (see below). */ if (pcb->flags & TF_ACK_NOW && 802a370: 7f83 ldrb r3, [r0, #30] 802a372: f003 0302 and.w r3, r3, #2 802a376: b2db uxtb r3, r3 802a378: b183 cbz r3, 802a39c 802a37a: b92d cbnz r5, 802a388 (seg == NULL || ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) { return tcp_send_empty_ack(pcb); 802a37c: 4620 mov r0, r4 } #endif /* TCP_OVERSIZE */ pcb->flags &= ~TF_NAGLEMEMERR; return ERR_OK; } 802a37e: b003 add sp, #12 802a380: e8bd 4ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} * If data is to be sent, we will just piggyback the ACK (see below). */ if (pcb->flags & TF_ACK_NOW && (seg == NULL || ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) { return tcp_send_empty_ack(pcb); 802a384: f7ff bfc2 b.w 802a30c * * If data is to be sent, we will just piggyback the ACK (see below). */ if (pcb->flags & TF_ACK_NOW && (seg == NULL || ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) { 802a388: 68eb ldr r3, [r5, #12] 802a38a: 6858 ldr r0, [r3, #4] 802a38c: f7fc fe72 bl 8027074 802a390: 892a ldrh r2, [r5, #8] 802a392: 6ca3 ldr r3, [r4, #72] ; 0x48 802a394: 1ad3 subs r3, r2, r3 802a396: 1818 adds r0, r3, r0 * not allow it), construct an empty ACK segment and send it. * * If data is to be sent, we will just piggyback the ACK (see below). */ if (pcb->flags & TF_ACK_NOW && (seg == NULL || 802a398: 4548 cmp r0, r9 802a39a: d8ef bhi.n 802a37c ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len > wnd)) { return tcp_send_empty_ack(pcb); } /* useg should point to last segment on unacked queue */ useg = pcb->unacked; 802a39c: 6f26 ldr r6, [r4, #112] ; 0x70 if (useg != NULL) { 802a39e: b90e cbnz r6, 802a3a4 802a3a0: e0d1 b.n 802a546 for (; useg->next != NULL; useg = useg->next); 802a3a2: 461e mov r6, r3 802a3a4: 6833 ldr r3, [r6, #0] 802a3a6: 2b00 cmp r3, #0 802a3a8: d1fb bne.n 802a3a2 802a3aa: e0cc b.n 802a546 } #endif /* TCP_CWND_DEBUG */ /* data available and window allows it to be sent? */ while (seg != NULL && ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { LWIP_ASSERT("RST not expected here!", 802a3ac: 68eb ldr r3, [r5, #12] 802a3ae: 8998 ldrh r0, [r3, #12] 802a3b0: f7fc fe59 bl 8027066 * - if tcp_write had a memory error before (prevent delayed ACK timeout) or * - if FIN was already enqueued for this PCB (SYN is always alone in a segment - * either seg->next != NULL or pcb->unacked == NULL; * RST is no sent using tcp_write/tcp_output. */ if((tcp_do_output_nagle(pcb) == 0) && 802a3b4: 6f23 ldr r3, [r4, #112] ; 0x70 802a3b6: b19b cbz r3, 802a3e0 802a3b8: 7fa2 ldrb r2, [r4, #30] 802a3ba: f012 0f44 tst.w r2, #68 ; 0x44 802a3be: d10f bne.n 802a3e0 802a3c0: 6ee3 ldr r3, [r4, #108] ; 0x6c 802a3c2: b12b cbz r3, 802a3d0 802a3c4: 6819 ldr r1, [r3, #0] 802a3c6: b959 cbnz r1, 802a3e0 802a3c8: 8919 ldrh r1, [r3, #8] 802a3ca: 8ee3 ldrh r3, [r4, #54] ; 0x36 802a3cc: 4299 cmp r1, r3 802a3ce: d207 bcs.n 802a3e0 802a3d0: f8b4 3066 ldrh.w r3, [r4, #102] ; 0x66 802a3d4: b123 cbz r3, 802a3e0 802a3d6: f8b4 3068 ldrh.w r3, [r4, #104] ; 0x68 802a3da: 2b47 cmp r3, #71 ; 0x47 802a3dc: f240 80ce bls.w 802a57c pcb->lastack, ntohl(seg->tcphdr->seqno), pcb->lastack, i)); ++i; #endif /* TCP_CWND_DEBUG */ pcb->unsent = seg->next; 802a3e0: 682b ldr r3, [r5, #0] 802a3e2: 66e3 str r3, [r4, #108] ; 0x6c if (pcb->state != SYN_SENT) { 802a3e4: 7e23 ldrb r3, [r4, #24] 802a3e6: 2b02 cmp r3, #2 802a3e8: d00c beq.n 802a404 TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); 802a3ea: 68ef ldr r7, [r5, #12] 802a3ec: 2010 movs r0, #16 802a3ee: f8b7 b00c ldrh.w fp, [r7, #12] 802a3f2: f7fc fe33 bl 802705c 802a3f6: ea40 000b orr.w r0, r0, fp 802a3fa: 81b8 strh r0, [r7, #12] pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); 802a3fc: 7fa3 ldrb r3, [r4, #30] 802a3fe: f023 0303 bic.w r3, r3, #3 802a402: 77a3 strb r3, [r4, #30] u16_t len; struct netif *netif; u32_t *opts; /** @bug Exclude retransmitted segments from this count. */ snmp_inc_tcpoutsegs(); 802a404: f002 fd48 bl 802ce98 /* The TCP header has already been constructed, but the ackno and wnd fields remain. */ seg->tcphdr->ackno = htonl(pcb->rcv_nxt); 802a408: 6aa0 ldr r0, [r4, #40] ; 0x28 802a40a: 68ef ldr r7, [r5, #12] 802a40c: f7fc fe30 bl 8027070 802a410: 60b8 str r0, [r7, #8] /* advertise our receive window size in this TCP segment */ seg->tcphdr->wnd = htons(pcb->rcv_ann_wnd); 802a412: 8de0 ldrh r0, [r4, #46] ; 0x2e 802a414: 68ef ldr r7, [r5, #12] 802a416: f7fc fe21 bl 802705c 802a41a: 81f8 strh r0, [r7, #14] pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 802a41c: 8de2 ldrh r2, [r4, #46] ; 0x2e 802a41e: 6aa3 ldr r3, [r4, #40] ; 0x28 /* Add any requested options. NB MSS option is only set on SYN packets, so ignore it here */ opts = (u32_t *)(void *)(seg->tcphdr + 1); 802a420: 68ef ldr r7, [r5, #12] seg->tcphdr->ackno = htonl(pcb->rcv_nxt); /* advertise our receive window size in this TCP segment */ seg->tcphdr->wnd = htons(pcb->rcv_ann_wnd); pcb->rcv_ann_right_edge = pcb->rcv_nxt + pcb->rcv_ann_wnd; 802a422: 18d3 adds r3, r2, r3 802a424: 6323 str r3, [r4, #48] ; 0x30 /* Add any requested options. NB MSS option is only set on SYN packets, so ignore it here */ opts = (u32_t *)(void *)(seg->tcphdr + 1); if (seg->flags & TF_SEG_OPTS_MSS) { 802a426: 7aab ldrb r3, [r5, #10] 802a428: 07d8 lsls r0, r3, #31 802a42a: d509 bpl.n 802a440 u16_t mss; #if TCP_CALCULATE_EFF_SEND_MSS mss = tcp_eff_send_mss(TCP_MSS, &pcb->remote_ip); 802a42c: 4641 mov r1, r8 802a42e: f240 50b4 movw r0, #1460 ; 0x5b4 802a432: f7fe fde4 bl 8028ffe #else /* TCP_CALCULATE_EFF_SEND_MSS */ mss = TCP_MSS; #endif /* TCP_CALCULATE_EFF_SEND_MSS */ *opts = TCP_BUILD_MSS_OPTION(mss); 802a436: f040 7001 orr.w r0, r0, #33816576 ; 0x2040000 802a43a: f7fc fe19 bl 8027070 802a43e: 6178 str r0, [r7, #20] } #endif /* Set retransmission timer running if it is not currently enabled This must be set before checking the route. */ if (pcb->rtime == -1) { 802a440: f9b4 3034 ldrsh.w r3, [r4, #52] ; 0x34 802a444: 3301 adds r3, #1 802a446: d101 bne.n 802a44c pcb->rtime = 0; 802a448: 2300 movs r3, #0 802a44a: 86a3 strh r3, [r4, #52] ; 0x34 } /* If we don't have a local IP address, we get one by calling ip_route(). */ if (ip_addr_isany(&(pcb->local_ip))) { 802a44c: 6823 ldr r3, [r4, #0] 802a44e: b92b cbnz r3, 802a45c netif = ip_route(&(pcb->remote_ip)); 802a450: 4640 mov r0, r8 802a452: f000 fecb bl 802b1ec if (netif == NULL) { 802a456: b310 cbz r0, 802a49e return; } ip_addr_copy(pcb->local_ip, netif->ip_addr); 802a458: 6843 ldr r3, [r0, #4] 802a45a: 6023 str r3, [r4, #0] } if (pcb->rttest == 0) { 802a45c: 6ba3 ldr r3, [r4, #56] ; 0x38 802a45e: b93b cbnz r3, 802a470 pcb->rttest = tcp_ticks; 802a460: f8da 3000 ldr.w r3, [sl] 802a464: 63a3 str r3, [r4, #56] ; 0x38 pcb->rtseq = ntohl(seg->tcphdr->seqno); 802a466: 68eb ldr r3, [r5, #12] 802a468: 6858 ldr r0, [r3, #4] 802a46a: f7fc fe03 bl 8027074 802a46e: 63e0 str r0, [r4, #60] ; 0x3c } LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output_segment: %"U32_F":%"U32_F"\n", htonl(seg->tcphdr->seqno), htonl(seg->tcphdr->seqno) + seg->len)); len = (u16_t)((u8_t *)seg->tcphdr - (u8_t *)seg->p->payload); 802a470: 6868 ldr r0, [r5, #4] 802a472: 68eb ldr r3, [r5, #12] 802a474: 6842 ldr r2, [r0, #4] seg->p->len -= len; 802a476: 8941 ldrh r1, [r0, #10] seg->p->tot_len -= len; seg->p->payload = seg->tcphdr; 802a478: 6043 str r3, [r0, #4] } LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_output_segment: %"U32_F":%"U32_F"\n", htonl(seg->tcphdr->seqno), htonl(seg->tcphdr->seqno) + seg->len)); len = (u16_t)((u8_t *)seg->tcphdr - (u8_t *)seg->p->payload); 802a47a: 1a9a subs r2, r3, r2 seg->p->len -= len; 802a47c: 1a89 subs r1, r1, r2 802a47e: 8141 strh r1, [r0, #10] seg->p->tot_len -= len; 802a480: 8901 ldrh r1, [r0, #8] 802a482: 1a8a subs r2, r1, r2 802a484: 8102 strh r2, [r0, #8] seg->p->payload = seg->tcphdr; seg->tcphdr->chksum = 0; 802a486: 2200 movs r2, #0 802a488: 741a strb r2, [r3, #16] 802a48a: 745a strb r2, [r3, #17] #if LWIP_NETIF_HWADDRHINT ip_output_hinted(seg->p, &(pcb->local_ip), &(pcb->remote_ip), pcb->ttl, pcb->tos, IP_PROTO_TCP, &(pcb->addr_hint)); #else /* LWIP_NETIF_HWADDRHINT*/ ip_output(seg->p, &(pcb->local_ip), &(pcb->remote_ip), pcb->ttl, pcb->tos, 802a48c: 7a62 ldrb r2, [r4, #9] 802a48e: 7aa3 ldrb r3, [r4, #10] 802a490: 9200 str r2, [sp, #0] 802a492: 2206 movs r2, #6 802a494: 9201 str r2, [sp, #4] 802a496: 4621 mov r1, r4 802a498: 4642 mov r2, r8 802a49a: f000 fffb bl 802b494 TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); } tcp_output_segment(seg, pcb); snd_nxt = ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); 802a49e: 68eb ldr r3, [r5, #12] 802a4a0: 6858 ldr r0, [r3, #4] 802a4a2: f7fc fde7 bl 8027074 802a4a6: 68ea ldr r2, [r5, #12] 802a4a8: f8b5 b008 ldrh.w fp, [r5, #8] 802a4ac: 4607 mov r7, r0 802a4ae: 8990 ldrh r0, [r2, #12] 802a4b0: f7fc fdd9 bl 8027066 802a4b4: f010 0003 ands.w r0, r0, #3 802a4b8: bf18 it ne 802a4ba: 2001 movne r0, #1 if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 802a4bc: 6d22 ldr r2, [r4, #80] ; 0x50 TCPH_SET_FLAG(seg->tcphdr, TCP_ACK); pcb->flags &= ~(TF_ACK_DELAY | TF_ACK_NOW); } tcp_output_segment(seg, pcb); snd_nxt = ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg); 802a4be: eb0b 0300 add.w r3, fp, r0 802a4c2: 19db adds r3, r3, r7 if (TCP_SEQ_LT(pcb->snd_nxt, snd_nxt)) { 802a4c4: 1ad2 subs r2, r2, r3 802a4c6: 2a00 cmp r2, #0 pcb->snd_nxt = snd_nxt; 802a4c8: bfb8 it lt 802a4ca: 6523 strlt r3, [r4, #80] ; 0x50 } /* put segment on unacknowledged list if length > 0 */ if (TCP_TCPLEN(seg) > 0) { 802a4cc: 68eb ldr r3, [r5, #12] 802a4ce: 892f ldrh r7, [r5, #8] 802a4d0: 8998 ldrh r0, [r3, #12] 802a4d2: f7fc fdc8 bl 8027066 802a4d6: f010 0003 ands.w r0, r0, #3 802a4da: bf18 it ne 802a4dc: 2001 movne r0, #1 802a4de: 1838 adds r0, r7, r0 802a4e0: b360 cbz r0, 802a53c seg->next = NULL; 802a4e2: 2300 movs r3, #0 802a4e4: 602b str r3, [r5, #0] /* unacked list is empty? */ if (pcb->unacked == NULL) { 802a4e6: 6f23 ldr r3, [r4, #112] ; 0x70 802a4e8: b90b cbnz r3, 802a4ee pcb->unacked = seg; 802a4ea: 6725 str r5, [r4, #112] ; 0x70 802a4ec: e024 b.n 802a538 /* unacked list is not empty? */ } else { /* In the case of fast retransmit, the packet should not go to the tail * of the unacked queue, but rather somewhere before it. We need to check for * this case. -STJ Jul 27, 2004 */ if (TCP_SEQ_LT(ntohl(seg->tcphdr->seqno), ntohl(useg->tcphdr->seqno))) { 802a4ee: 68eb ldr r3, [r5, #12] 802a4f0: 6858 ldr r0, [r3, #4] 802a4f2: f7fc fdbf bl 8027074 802a4f6: 68f3 ldr r3, [r6, #12] 802a4f8: 4607 mov r7, r0 802a4fa: 6858 ldr r0, [r3, #4] 802a4fc: f7fc fdba bl 8027074 802a500: 1a38 subs r0, r7, r0 802a502: 2800 cmp r0, #0 802a504: da17 bge.n 802a536 /* add segment to before tail of unacked list, keeping the list sorted */ struct tcp_seg **cur_seg = &(pcb->unacked); 802a506: f104 0770 add.w r7, r4, #112 ; 0x70 while (*cur_seg && 802a50a: e000 b.n 802a50e TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 802a50c: 683f ldr r7, [r7, #0] * of the unacked queue, but rather somewhere before it. We need to check for * this case. -STJ Jul 27, 2004 */ if (TCP_SEQ_LT(ntohl(seg->tcphdr->seqno), ntohl(useg->tcphdr->seqno))) { /* add segment to before tail of unacked list, keeping the list sorted */ struct tcp_seg **cur_seg = &(pcb->unacked); while (*cur_seg && 802a50e: 683b ldr r3, [r7, #0] 802a510: b91b cbnz r3, 802a51a TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); } seg->next = (*cur_seg); 802a512: 683b ldr r3, [r7, #0] 802a514: 602b str r3, [r5, #0] (*cur_seg) = seg; 802a516: 603d str r5, [r7, #0] 802a518: e013 b.n 802a542 * this case. -STJ Jul 27, 2004 */ if (TCP_SEQ_LT(ntohl(seg->tcphdr->seqno), ntohl(useg->tcphdr->seqno))) { /* add segment to before tail of unacked list, keeping the list sorted */ struct tcp_seg **cur_seg = &(pcb->unacked); while (*cur_seg && TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { 802a51a: 68db ldr r3, [r3, #12] 802a51c: 6858 ldr r0, [r3, #4] 802a51e: f7fc fda9 bl 8027074 802a522: 68eb ldr r3, [r5, #12] 802a524: 4683 mov fp, r0 802a526: 6858 ldr r0, [r3, #4] 802a528: f7fc fda4 bl 8027074 802a52c: ebc0 000b rsb r0, r0, fp * of the unacked queue, but rather somewhere before it. We need to check for * this case. -STJ Jul 27, 2004 */ if (TCP_SEQ_LT(ntohl(seg->tcphdr->seqno), ntohl(useg->tcphdr->seqno))) { /* add segment to before tail of unacked list, keeping the list sorted */ struct tcp_seg **cur_seg = &(pcb->unacked); while (*cur_seg && 802a530: 2800 cmp r0, #0 802a532: dbeb blt.n 802a50c 802a534: e7ed b.n 802a512 } seg->next = (*cur_seg); (*cur_seg) = seg; } else { /* add segment to tail of unacked list */ useg->next = seg; 802a536: 6035 str r5, [r6, #0] 802a538: 462e mov r6, r5 802a53a: e002 b.n 802a542 useg = useg->next; } } /* do not queue empty segments on the unacked list */ } else { tcp_seg_free(seg); 802a53c: 4628 mov r0, r5 802a53e: f7fe f978 bl 8028832 } seg = pcb->unsent; 802a542: 6ee5 ldr r5, [r4, #108] ; 0x6c 802a544: e003 b.n 802a54e } ip_addr_copy(pcb->local_ip, netif->ip_addr); } if (pcb->rttest == 0) { pcb->rttest = tcp_ticks; 802a546: f8df a04c ldr.w sl, [pc, #76] ; 802a594 packets, so ignore it here */ opts = (u32_t *)(void *)(seg->tcphdr + 1); if (seg->flags & TF_SEG_OPTS_MSS) { u16_t mss; #if TCP_CALCULATE_EFF_SEND_MSS mss = tcp_eff_send_mss(TCP_MSS, &pcb->remote_ip); 802a54a: f104 0804 add.w r8, r4, #4 ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len, ntohl(seg->tcphdr->seqno), pcb->lastack)); } #endif /* TCP_CWND_DEBUG */ /* data available and window allows it to be sent? */ while (seg != NULL && 802a54e: b915 cbnz r5, 802a556 tcp_seg_free(seg); } seg = pcb->unsent; } #if TCP_OVERSIZE if (pcb->unsent == NULL) { 802a550: 6ee3 ldr r3, [r4, #108] ; 0x6c 802a552: b973 cbnz r3, 802a572 802a554: e00b b.n 802a56e ntohl(seg->tcphdr->seqno), pcb->lastack)); } #endif /* TCP_CWND_DEBUG */ /* data available and window allows it to be sent? */ while (seg != NULL && ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len <= wnd) { 802a556: 68eb ldr r3, [r5, #12] 802a558: 6858 ldr r0, [r3, #4] 802a55a: f7fc fd8b bl 8027074 802a55e: 892a ldrh r2, [r5, #8] 802a560: 6ca3 ldr r3, [r4, #72] ; 0x48 802a562: 1ad3 subs r3, r2, r3 802a564: 1818 adds r0, r3, r0 ntohl(seg->tcphdr->seqno) - pcb->lastack + seg->len, ntohl(seg->tcphdr->seqno), pcb->lastack)); } #endif /* TCP_CWND_DEBUG */ /* data available and window allows it to be sent? */ while (seg != NULL && 802a566: 4548 cmp r0, r9 802a568: f67f af20 bls.w 802a3ac 802a56c: e7f0 b.n 802a550 seg = pcb->unsent; } #if TCP_OVERSIZE if (pcb->unsent == NULL) { /* last unsent has been removed, reset unsent_oversize */ pcb->unsent_oversize = 0; 802a56e: f8a4 306a strh.w r3, [r4, #106] ; 0x6a } #endif /* TCP_OVERSIZE */ pcb->flags &= ~TF_NAGLEMEMERR; 802a572: 7fa3 ldrb r3, [r4, #30] 802a574: f003 037f and.w r3, r3, #127 ; 0x7f 802a578: 77a3 strb r3, [r4, #30] return ERR_OK; 802a57a: e004 b.n 802a586 * - if tcp_write had a memory error before (prevent delayed ACK timeout) or * - if FIN was already enqueued for this PCB (SYN is always alone in a segment - * either seg->next != NULL or pcb->unacked == NULL; * RST is no sent using tcp_write/tcp_output. */ if((tcp_do_output_nagle(pcb) == 0) && 802a57c: f012 0fa0 tst.w r2, #160 ; 0xa0 802a580: f47f af2e bne.w 802a3e0 802a584: e7e4 b.n 802a550 } #endif /* TCP_OVERSIZE */ pcb->flags &= ~TF_NAGLEMEMERR; return ERR_OK; } 802a586: 2000 movs r0, #0 802a588: b003 add sp, #12 802a58a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802a58e: bf00 nop 802a590: 200104dc .word 0x200104dc 802a594: 200104c8 .word 0x200104c8 0802a598 : */ void tcp_rst(u32_t seqno, u32_t ackno, ip_addr_t *local_ip, ip_addr_t *remote_ip, u16_t local_port, u16_t remote_port) { 802a598: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} 802a59c: 4681 mov r9, r0 802a59e: 460d mov r5, r1 802a5a0: 4690 mov r8, r2 struct pbuf *p; struct tcp_hdr *tcphdr; p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM); 802a5a2: 2001 movs r0, #1 802a5a4: 2114 movs r1, #20 802a5a6: 2200 movs r2, #0 */ void tcp_rst(u32_t seqno, u32_t ackno, ip_addr_t *local_ip, ip_addr_t *remote_ip, u16_t local_port, u16_t remote_port) { 802a5a8: 461f mov r7, r3 802a5aa: f8bd b030 ldrh.w fp, [sp, #48] ; 0x30 802a5ae: f8bd a034 ldrh.w sl, [sp, #52] ; 0x34 struct pbuf *p; struct tcp_hdr *tcphdr; p = pbuf_alloc(PBUF_IP, TCP_HLEN, PBUF_RAM); 802a5b2: f7fd fede bl 8028372 if (p == NULL) { 802a5b6: 4606 mov r6, r0 802a5b8: 2800 cmp r0, #0 802a5ba: d030 beq.n 802a61e return; } LWIP_ASSERT("check that first pbuf can hold struct tcp_hdr", (p->len >= sizeof(struct tcp_hdr))); tcphdr = (struct tcp_hdr *)p->payload; 802a5bc: 6844 ldr r4, [r0, #4] tcphdr->src = htons(local_port); 802a5be: 4658 mov r0, fp 802a5c0: f7fc fd4c bl 802705c 802a5c4: 8020 strh r0, [r4, #0] tcphdr->dest = htons(remote_port); 802a5c6: 4650 mov r0, sl 802a5c8: f7fc fd48 bl 802705c 802a5cc: 8060 strh r0, [r4, #2] tcphdr->seqno = htonl(seqno); 802a5ce: 4648 mov r0, r9 802a5d0: f7fc fd4e bl 8027070 802a5d4: 6060 str r0, [r4, #4] tcphdr->ackno = htonl(ackno); 802a5d6: 4628 mov r0, r5 802a5d8: f7fc fd4a bl 8027070 802a5dc: 60a0 str r0, [r4, #8] TCPH_HDRLEN_FLAGS_SET(tcphdr, TCP_HLEN/4, TCP_RST | TCP_ACK); 802a5de: f245 0014 movw r0, #20500 ; 0x5014 802a5e2: f7fc fd3b bl 802705c tcphdr->wnd = PP_HTONS(TCP_WND); 802a5e6: 2316 movs r3, #22 802a5e8: 2500 movs r5, #0 802a5ea: 73a3 strb r3, [r4, #14] 802a5ec: f06f 032f mvn.w r3, #47 ; 0x2f tcphdr = (struct tcp_hdr *)p->payload; tcphdr->src = htons(local_port); tcphdr->dest = htons(remote_port); tcphdr->seqno = htonl(seqno); tcphdr->ackno = htonl(ackno); TCPH_HDRLEN_FLAGS_SET(tcphdr, TCP_HLEN/4, TCP_RST | TCP_ACK); 802a5f0: 81a0 strh r0, [r4, #12] tcphdr->wnd = PP_HTONS(TCP_WND); 802a5f2: 73e3 strb r3, [r4, #15] tcphdr->chksum = 0; 802a5f4: 7425 strb r5, [r4, #16] 802a5f6: 7465 strb r5, [r4, #17] tcphdr->urgp = 0; 802a5f8: 74a5 strb r5, [r4, #18] 802a5fa: 74e5 strb r5, [r4, #19] #if CHECKSUM_GEN_TCP tcphdr->chksum = inet_chksum_pseudo(p, local_ip, remote_ip, IP_PROTO_TCP, p->tot_len); #endif TCP_STATS_INC(tcp.xmit); snmp_inc_tcpoutrsts(); 802a5fc: f002 fc64 bl 802cec8 /* Send output with hardcoded TTL since we have no access to the pcb */ ip_output(p, local_ip, remote_ip, TCP_TTL, 0, IP_PROTO_TCP); 802a600: 2306 movs r3, #6 802a602: 9301 str r3, [sp, #4] 802a604: 9500 str r5, [sp, #0] 802a606: 4630 mov r0, r6 802a608: 4641 mov r1, r8 802a60a: 463a mov r2, r7 802a60c: 23ff movs r3, #255 ; 0xff 802a60e: f000 ff41 bl 802b494 pbuf_free(p); 802a612: 4630 mov r0, r6 LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); } 802a614: b003 add sp, #12 802a616: e8bd 4ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} #endif TCP_STATS_INC(tcp.xmit); snmp_inc_tcpoutrsts(); /* Send output with hardcoded TTL since we have no access to the pcb */ ip_output(p, local_ip, remote_ip, TCP_TTL, 0, IP_PROTO_TCP); pbuf_free(p); 802a61a: f7fd be5d b.w 80282d8 LWIP_DEBUGF(TCP_RST_DEBUG, ("tcp_rst: seqno %"U32_F" ackno %"U32_F".\n", seqno, ackno)); } 802a61e: b003 add sp, #12 802a620: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0802a624 : void tcp_rexmit_rto(struct tcp_pcb *pcb) { struct tcp_seg *seg; if (pcb->unacked == NULL) { 802a624: 6f02 ldr r2, [r0, #112] ; 0x70 * * @param pcb the tcp_pcb for which to re-enqueue all unacked segments */ void tcp_rexmit_rto(struct tcp_pcb *pcb) { 802a626: b510 push {r4, lr} struct tcp_seg *seg; if (pcb->unacked == NULL) { 802a628: b19a cbz r2, 802a652 802a62a: 4611 mov r1, r2 802a62c: e000 b.n 802a630 return; } /* Move all unacked segments to the head of the unsent queue */ for (seg = pcb->unacked; seg->next != NULL; seg = seg->next); 802a62e: 4619 mov r1, r3 802a630: 680b ldr r3, [r1, #0] 802a632: 2b00 cmp r3, #0 802a634: d1fb bne.n 802a62e /* concatenate unsent queue after unacked queue */ seg->next = pcb->unsent; 802a636: 6ec4 ldr r4, [r0, #108] ; 0x6c 802a638: 600c str r4, [r1, #0] /* unsent queue is the concatenated queue (of unacked, unsent) */ pcb->unsent = pcb->unacked; 802a63a: 66c2 str r2, [r0, #108] ; 0x6c /* unacked queue is now empty */ pcb->unacked = NULL; /* last unsent hasn't changed, no need to reset unsent_oversize */ /* increment number of retransmissions */ ++pcb->nrtx; 802a63c: f890 2046 ldrb.w r2, [r0, #70] ; 0x46 /* concatenate unsent queue after unacked queue */ seg->next = pcb->unsent; /* unsent queue is the concatenated queue (of unacked, unsent) */ pcb->unsent = pcb->unacked; /* unacked queue is now empty */ pcb->unacked = NULL; 802a640: 6703 str r3, [r0, #112] ; 0x70 /* last unsent hasn't changed, no need to reset unsent_oversize */ /* increment number of retransmissions */ ++pcb->nrtx; 802a642: 3201 adds r2, #1 802a644: f880 2046 strb.w r2, [r0, #70] ; 0x46 /* Don't take any RTT measurements after retransmitting. */ pcb->rttest = 0; 802a648: 6383 str r3, [r0, #56] ; 0x38 /* Do the actual retransmission */ tcp_output(pcb); } 802a64a: e8bd 4010 ldmia.w sp!, {r4, lr} /* Don't take any RTT measurements after retransmitting. */ pcb->rttest = 0; /* Do the actual retransmission */ tcp_output(pcb); 802a64e: f7ff be7f b.w 802a350 802a652: bd10 pop {r4, pc} 0802a654 : * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ void tcp_rexmit(struct tcp_pcb *pcb) { 802a654: b5f8 push {r3, r4, r5, r6, r7, lr} struct tcp_seg *seg; struct tcp_seg **cur_seg; if (pcb->unacked == NULL) { 802a656: 6f05 ldr r5, [r0, #112] ; 0x70 * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ void tcp_rexmit(struct tcp_pcb *pcb) { 802a658: 4604 mov r4, r0 struct tcp_seg *seg; struct tcp_seg **cur_seg; if (pcb->unacked == NULL) { 802a65a: 2d00 cmp r5, #0 802a65c: d027 beq.n 802a6ae } /* Move the first unacked segment to the unsent queue */ /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; 802a65e: 682b ldr r3, [r5, #0] cur_seg = &(pcb->unsent); 802a660: f100 066c add.w r6, r0, #108 ; 0x6c } /* Move the first unacked segment to the unsent queue */ /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; 802a664: 6703 str r3, [r0, #112] ; 0x70 cur_seg = &(pcb->unsent); while (*cur_seg && 802a666: e000 b.n 802a66a TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); 802a668: 6836 ldr r6, [r6, #0] /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; cur_seg = &(pcb->unsent); while (*cur_seg && 802a66a: 6833 ldr r3, [r6, #0] 802a66c: b92b cbnz r3, 802a67a TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { cur_seg = &((*cur_seg)->next ); } seg->next = *cur_seg; 802a66e: 6833 ldr r3, [r6, #0] 802a670: 602b str r3, [r5, #0] *cur_seg = seg; 802a672: 6035 str r5, [r6, #0] #if TCP_OVERSIZE if (seg->next == NULL) { 802a674: 682b ldr r3, [r5, #0] 802a676: b97b cbnz r3, 802a698 802a678: e00c b.n 802a694 seg = pcb->unacked; pcb->unacked = seg->next; cur_seg = &(pcb->unsent); while (*cur_seg && TCP_SEQ_LT(ntohl((*cur_seg)->tcphdr->seqno), ntohl(seg->tcphdr->seqno))) { 802a67a: 68db ldr r3, [r3, #12] 802a67c: 6858 ldr r0, [r3, #4] 802a67e: f7fc fcf9 bl 8027074 802a682: 68eb ldr r3, [r5, #12] 802a684: 4607 mov r7, r0 802a686: 6858 ldr r0, [r3, #4] 802a688: f7fc fcf4 bl 8027074 802a68c: 1a38 subs r0, r7, r0 /* Keep the unsent queue sorted. */ seg = pcb->unacked; pcb->unacked = seg->next; cur_seg = &(pcb->unsent); while (*cur_seg && 802a68e: 2800 cmp r0, #0 802a690: dbea blt.n 802a668 802a692: e7ec b.n 802a66e seg->next = *cur_seg; *cur_seg = seg; #if TCP_OVERSIZE if (seg->next == NULL) { /* the retransmitted segment is last in unsent, so reset unsent_oversize */ pcb->unsent_oversize = 0; 802a694: f8a4 306a strh.w r3, [r4, #106] ; 0x6a } #endif /* TCP_OVERSIZE */ ++pcb->nrtx; 802a698: f894 3046 ldrb.w r3, [r4, #70] ; 0x46 802a69c: 3301 adds r3, #1 802a69e: f884 3046 strb.w r3, [r4, #70] ; 0x46 /* Don't take any rtt measurements after retransmitting. */ pcb->rttest = 0; 802a6a2: 2300 movs r3, #0 802a6a4: 63a3 str r3, [r4, #56] ; 0x38 /* Do the actual retransmission. */ snmp_inc_tcpretranssegs(); /* No need to call tcp_output: we are always called from tcp_input() and thus tcp_output directly returns. */ } 802a6a6: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr} /* Don't take any rtt measurements after retransmitting. */ pcb->rttest = 0; /* Do the actual retransmission. */ snmp_inc_tcpretranssegs(); 802a6aa: f002 bbfd b.w 802cea8 802a6ae: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802a6b0 : * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ void tcp_rexmit_fast(struct tcp_pcb *pcb) { if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) { 802a6b0: 6f03 ldr r3, [r0, #112] ; 0x70 * * @param pcb the tcp_pcb for which to retransmit the first unacked segment */ void tcp_rexmit_fast(struct tcp_pcb *pcb) { 802a6b2: b510 push {r4, lr} 802a6b4: 4604 mov r4, r0 if (pcb->unacked != NULL && !(pcb->flags & TF_INFR)) { 802a6b6: b333 cbz r3, 802a706 802a6b8: 7f83 ldrb r3, [r0, #30] 802a6ba: f003 0304 and.w r3, r3, #4 802a6be: b2db uxtb r3, r3 802a6c0: bb0b cbnz r3, 802a706 LWIP_DEBUGF(TCP_FR_DEBUG, ("tcp_receive: dupacks %"U16_F" (%"U32_F "), fast retransmit %"U32_F"\n", (u16_t)pcb->dupacks, pcb->lastack, ntohl(pcb->unacked->tcphdr->seqno))); tcp_rexmit(pcb); 802a6c2: f7ff ffc7 bl 802a654 /* Set ssthresh to half of the minimum of the current * cwnd and the advertised window */ if (pcb->cwnd > pcb->snd_wnd) { 802a6c6: f8b4 304c ldrh.w r3, [r4, #76] ; 0x4c 802a6ca: f8b4 2060 ldrh.w r2, [r4, #96] ; 0x60 802a6ce: 4293 cmp r3, r2 802a6d0: d903 bls.n 802a6da pcb->ssthresh = pcb->snd_wnd / 2; 802a6d2: 0852 lsrs r2, r2, #1 802a6d4: f8a4 204e strh.w r2, [r4, #78] ; 0x4e 802a6d8: e002 b.n 802a6e0 } else { pcb->ssthresh = pcb->cwnd / 2; 802a6da: 085b lsrs r3, r3, #1 802a6dc: f8a4 304e strh.w r3, [r4, #78] ; 0x4e } /* The minimum value for ssthresh should be 2 MSS */ if (pcb->ssthresh < 2*pcb->mss) { 802a6e0: 8ee3 ldrh r3, [r4, #54] ; 0x36 802a6e2: f8b4 104e ldrh.w r1, [r4, #78] ; 0x4e 802a6e6: 005a lsls r2, r3, #1 802a6e8: 4291 cmp r1, r2 LWIP_DEBUGF(TCP_FR_DEBUG, ("tcp_receive: The minimum value for ssthresh %"U16_F " should be min 2 mss %"U16_F"...\n", pcb->ssthresh, 2*pcb->mss)); pcb->ssthresh = 2*pcb->mss; 802a6ea: bfb8 it lt 802a6ec: f8a4 204e strhlt.w r2, [r4, #78] ; 0x4e } pcb->cwnd = pcb->ssthresh + 3 * pcb->mss; 802a6f0: f8b4 204e ldrh.w r2, [r4, #78] ; 0x4e 802a6f4: 2103 movs r1, #3 802a6f6: fb01 2303 mla r3, r1, r3, r2 802a6fa: f8a4 304c strh.w r3, [r4, #76] ; 0x4c pcb->flags |= TF_INFR; 802a6fe: 7fa3 ldrb r3, [r4, #30] 802a700: f043 0304 orr.w r3, r3, #4 802a704: 77a3 strb r3, [r4, #30] 802a706: bd10 pop {r4, pc} 0802a708 : * * @param pcb the tcp_pcb for which to send a keepalive packet */ void tcp_keepalive(struct tcp_pcb *pcb) { 802a708: b537 push {r0, r1, r2, r4, r5, lr} 802a70a: 4604 mov r4, r0 ip4_addr3_16(&pcb->remote_ip), ip4_addr4_16(&pcb->remote_ip))); LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: tcp_ticks %"U32_F" pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n", tcp_ticks, pcb->tmr, pcb->keep_cnt_sent)); p = tcp_output_alloc_header(pcb, 0, 0, htonl(pcb->snd_nxt - 1)); 802a70c: 6d00 ldr r0, [r0, #80] ; 0x50 802a70e: 3801 subs r0, #1 802a710: f7fc fcae bl 8027070 802a714: 2100 movs r1, #0 802a716: 4602 mov r2, r0 802a718: 4620 mov r0, r4 802a71a: f7ff fbd9 bl 8029ed0 if(p == NULL) { 802a71e: 4605 mov r5, r0 802a720: b178 cbz r0, 802a742 /* Send output to IP */ #if LWIP_NETIF_HWADDRHINT ip_output_hinted(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP, &(pcb->addr_hint)); #else /* LWIP_NETIF_HWADDRHINT*/ ip_output(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP); 802a722: 2200 movs r2, #0 802a724: f04f 0e06 mov.w lr, #6 802a728: e88d 4004 stmia.w sp, {r2, lr} 802a72c: 7aa3 ldrb r3, [r4, #10] 802a72e: 4621 mov r1, r4 802a730: 1d22 adds r2, r4, #4 802a732: f000 feaf bl 802b494 #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 802a736: 4628 mov r0, r5 LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: seqno %"U32_F" ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 802a738: b003 add sp, #12 802a73a: e8bd 4030 ldmia.w sp!, {r4, r5, lr} &(pcb->addr_hint)); #else /* LWIP_NETIF_HWADDRHINT*/ ip_output(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP); #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 802a73e: f7fd bdcb b.w 80282d8 LWIP_DEBUGF(TCP_DEBUG, ("tcp_keepalive: seqno %"U32_F" ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 802a742: b003 add sp, #12 802a744: bd30 pop {r4, r5, pc} 0802a746 : * * @param pcb the tcp_pcb for which to send a zero-window probe packet */ void tcp_zero_window_probe(struct tcp_pcb *pcb) { 802a746: e92d 41f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, lr} LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: tcp_ticks %"U32_F " pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n", tcp_ticks, pcb->tmr, pcb->keep_cnt_sent)); seg = pcb->unacked; 802a74a: 6f04 ldr r4, [r0, #112] ; 0x70 * * @param pcb the tcp_pcb for which to send a zero-window probe packet */ void tcp_zero_window_probe(struct tcp_pcb *pcb) { 802a74c: 4605 mov r5, r0 " pcb->tmr %"U32_F" pcb->keep_cnt_sent %"U16_F"\n", tcp_ticks, pcb->tmr, pcb->keep_cnt_sent)); seg = pcb->unacked; if(seg == NULL) { 802a74e: b914 cbnz r4, 802a756 seg = pcb->unsent; 802a750: 6ec4 ldr r4, [r0, #108] ; 0x6c } if(seg == NULL) { 802a752: 2c00 cmp r4, #0 802a754: d042 beq.n 802a7dc return; } is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 802a756: 68e3 ldr r3, [r4, #12] 802a758: 8998 ldrh r0, [r3, #12] 802a75a: f7fc fc84 bl 8027066 802a75e: f010 0001 ands.w r0, r0, #1 802a762: d005 beq.n 802a770 802a764: 8921 ldrh r1, [r4, #8] 802a766: f1d1 0101 rsbs r1, r1, #1 802a76a: bf38 it cc 802a76c: 2100 movcc r1, #0 802a76e: e000 b.n 802a772 802a770: 4601 mov r1, r0 /* we want to send one seqno: either FIN or data (no options) */ len = is_fin ? 0 : 1; p = tcp_output_alloc_header(pcb, 0, len, seg->tcphdr->seqno); 802a772: 68e3 ldr r3, [r4, #12] } if(seg == NULL) { return; } is_fin = ((TCPH_FLAGS(seg->tcphdr) & TCP_FIN) != 0) && (seg->len == 0); 802a774: fa5f f881 uxtb.w r8, r1 /* we want to send one seqno: either FIN or data (no options) */ len = is_fin ? 0 : 1; p = tcp_output_alloc_header(pcb, 0, len, seg->tcphdr->seqno); 802a778: 4628 mov r0, r5 802a77a: f081 0101 eor.w r1, r1, #1 802a77e: 685a ldr r2, [r3, #4] 802a780: f7ff fba6 bl 8029ed0 if(p == NULL) { 802a784: 4606 mov r6, r0 802a786: 2800 cmp r0, #0 802a788: d028 beq.n 802a7dc LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: no memory for pbuf\n")); return; } tcphdr = (struct tcp_hdr *)p->payload; 802a78a: 6847 ldr r7, [r0, #4] if (is_fin) { 802a78c: f1b8 0f00 cmp.w r8, #0 802a790: d009 beq.n 802a7a6 /* FIN segment, no data */ TCPH_FLAGS_SET(tcphdr, TCP_ACK | TCP_FIN); 802a792: 89bc ldrh r4, [r7, #12] 802a794: 2011 movs r0, #17 802a796: f7fc fc61 bl 802705c 802a79a: f424 547c bic.w r4, r4, #16128 ; 0x3f00 802a79e: b2a4 uxth r4, r4 802a7a0: 4320 orrs r0, r4 802a7a2: 81b8 strh r0, [r7, #12] 802a7a4: e009 b.n 802a7ba /* Data segment, copy in one byte from the head of the unacked queue */ char *d = ((char *)p->payload + TCP_HLEN); /* Depending on whether the segment has already been sent (unacked) or not (unsent), seg->p->payload points to the IP header or TCP header. Ensure we copy the first TCP data byte: */ pbuf_copy_partial(seg->p, d, 1, seg->p->tot_len - seg->len); 802a7a6: 6860 ldr r0, [r4, #4] 802a7a8: 8923 ldrh r3, [r4, #8] 802a7aa: 8902 ldrh r2, [r0, #8] 802a7ac: 1ad3 subs r3, r2, r3 802a7ae: f107 0114 add.w r1, r7, #20 802a7b2: 2201 movs r2, #1 802a7b4: b29b uxth r3, r3 802a7b6: f7fd fedd bl 8028574 /* Send output to IP */ #if LWIP_NETIF_HWADDRHINT ip_output_hinted(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP, &(pcb->addr_hint)); #else /* LWIP_NETIF_HWADDRHINT*/ ip_output(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP); 802a7ba: 2200 movs r2, #0 802a7bc: f04f 0c06 mov.w ip, #6 802a7c0: e88d 1004 stmia.w sp, {r2, ip} 802a7c4: 7aab ldrb r3, [r5, #10] 802a7c6: 4630 mov r0, r6 802a7c8: 4629 mov r1, r5 802a7ca: 1d2a adds r2, r5, #4 802a7cc: f000 fe62 bl 802b494 #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 802a7d0: 4630 mov r0, r6 LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: seqno %"U32_F " ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 802a7d2: b002 add sp, #8 802a7d4: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} &(pcb->addr_hint)); #else /* LWIP_NETIF_HWADDRHINT*/ ip_output(p, &pcb->local_ip, &pcb->remote_ip, pcb->ttl, 0, IP_PROTO_TCP); #endif /* LWIP_NETIF_HWADDRHINT*/ pbuf_free(p); 802a7d8: f7fd bd7e b.w 80282d8 LWIP_DEBUGF(TCP_DEBUG, ("tcp_zero_window_probe: seqno %"U32_F " ackno %"U32_F".\n", pcb->snd_nxt - 1, pcb->rcv_nxt)); } 802a7dc: b002 add sp, #8 802a7de: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802a7e2: 0000 movs r0, r0 0802a7e4 : sys_timeout_debug(u32_t msecs, sys_timeout_handler handler, void *arg, const char* handler_name) #else /* LWIP_DEBUG_TIMERNAMES */ void sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg) #endif /* LWIP_DEBUG_TIMERNAMES */ { 802a7e4: b570 push {r4, r5, r6, lr} 802a7e6: 4604 mov r4, r0 struct sys_timeo *timeout, *t; timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); 802a7e8: 2009 movs r0, #9 sys_timeout_debug(u32_t msecs, sys_timeout_handler handler, void *arg, const char* handler_name) #else /* LWIP_DEBUG_TIMERNAMES */ void sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg) #endif /* LWIP_DEBUG_TIMERNAMES */ { 802a7ea: 460d mov r5, r1 802a7ec: 4616 mov r6, r2 struct sys_timeo *timeout, *t; timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); 802a7ee: f7fd fc53 bl 8028098 if (timeout == NULL) { 802a7f2: 4603 mov r3, r0 802a7f4: b308 cbz r0, 802a83a timeout->handler_name = handler_name; LWIP_DEBUGF(TIMERS_DEBUG, ("sys_timeout: %p msecs=%"U32_F" handler=%s arg=%p\n", (void *)timeout, msecs, handler_name, (void *)arg)); #endif /* LWIP_DEBUG_TIMERNAMES */ if (next_timeout == NULL) { 802a7f6: 4911 ldr r1, [pc, #68] ; (802a83c ) timeout = (struct sys_timeo *)memp_malloc(MEMP_SYS_TIMEOUT); if (timeout == NULL) { LWIP_ASSERT("sys_timeout: timeout != NULL, pool MEMP_SYS_TIMEOUT is empty", timeout != NULL); return; } timeout->next = NULL; 802a7f8: 2200 movs r2, #0 timeout->h = handler; timeout->arg = arg; timeout->time = msecs; 802a7fa: e880 0074 stmia.w r0, {r2, r4, r5, r6} timeout->handler_name = handler_name; LWIP_DEBUGF(TIMERS_DEBUG, ("sys_timeout: %p msecs=%"U32_F" handler=%s arg=%p\n", (void *)timeout, msecs, handler_name, (void *)arg)); #endif /* LWIP_DEBUG_TIMERNAMES */ if (next_timeout == NULL) { 802a7fe: 680a ldr r2, [r1, #0] 802a800: b902 cbnz r2, 802a804 802a802: e005 b.n 802a810 next_timeout = timeout; return; } if (next_timeout->time > msecs) { 802a804: 6850 ldr r0, [r2, #4] 802a806: 42a0 cmp r0, r4 802a808: d90c bls.n 802a824 next_timeout->time -= msecs; 802a80a: 1b04 subs r4, r0, r4 802a80c: 6054 str r4, [r2, #4] timeout->next = next_timeout; 802a80e: 601a str r2, [r3, #0] next_timeout = timeout; 802a810: 600b str r3, [r1, #0] 802a812: bd70 pop {r4, r5, r6, pc} } else { for(t = next_timeout; t != NULL; t = t->next) { timeout->time -= t->time; if (t->next == NULL || t->next->time > timeout->time) { 802a814: 684c ldr r4, [r1, #4] 802a816: 4284 cmp r4, r0 802a818: d80c bhi.n 802a834 802a81a: 460a mov r2, r1 802a81c: e002 b.n 802a824 if (t->next != NULL) { t->next->time -= timeout->time; } timeout->next = t->next; 802a81e: 6019 str r1, [r3, #0] t->next = timeout; 802a820: 6013 str r3, [r2, #0] break; 802a822: bd70 pop {r4, r5, r6, pc} next_timeout->time -= msecs; timeout->next = next_timeout; next_timeout = timeout; } else { for(t = next_timeout; t != NULL; t = t->next) { timeout->time -= t->time; 802a824: 6851 ldr r1, [r2, #4] 802a826: 6858 ldr r0, [r3, #4] 802a828: 1a40 subs r0, r0, r1 if (t->next == NULL || t->next->time > timeout->time) { 802a82a: 6811 ldr r1, [r2, #0] next_timeout->time -= msecs; timeout->next = next_timeout; next_timeout = timeout; } else { for(t = next_timeout; t != NULL; t = t->next) { timeout->time -= t->time; 802a82c: 6058 str r0, [r3, #4] if (t->next == NULL || t->next->time > timeout->time) { 802a82e: 2900 cmp r1, #0 802a830: d1f0 bne.n 802a814 802a832: e7f4 b.n 802a81e if (t->next != NULL) { t->next->time -= timeout->time; 802a834: 1a20 subs r0, r4, r0 802a836: 6048 str r0, [r1, #4] 802a838: e7f1 b.n 802a81e 802a83a: bd70 pop {r4, r5, r6, pc} 802a83c: 2000db8c .word 0x2000db8c 0802a840 : } #endif /* LWIP_DNS */ /** Initialize this module */ void sys_timeouts_init(void) { 802a840: b508 push {r3, lr} #if IP_REASSEMBLY sys_timeout(IP_TMR_INTERVAL, ip_reass_timer, NULL); #endif /* IP_REASSEMBLY */ #if LWIP_ARP sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 802a842: 2200 movs r2, #0 802a844: f241 3088 movw r0, #5000 ; 0x1388 802a848: 4908 ldr r1, [pc, #32] ; (802a86c ) 802a84a: f7ff ffcb bl 802a7e4 #endif /* LWIP_ARP */ #if LWIP_DHCP sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL); 802a84e: 2200 movs r2, #0 802a850: f64e 2060 movw r0, #60000 ; 0xea60 802a854: 4906 ldr r1, [pc, #24] ; (802a870 ) 802a856: f7ff ffc5 bl 802a7e4 sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL); 802a85a: 4906 ldr r1, [pc, #24] ; (802a874 ) 802a85c: f44f 70fa mov.w r0, #500 ; 0x1f4 802a860: 2200 movs r2, #0 #if NO_SYS /* Initialise timestamp for sys_check_timeouts */ timeouts_last_time = sys_now(); #endif } 802a862: e8bd 4008 ldmia.w sp!, {r3, lr} #if LWIP_ARP sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); #endif /* LWIP_ARP */ #if LWIP_DHCP sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL); sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL); 802a866: f7ff bfbd b.w 802a7e4 802a86a: bf00 nop 802a86c: 0802a8b1 .word 0x0802a8b1 802a870: 0802a895 .word 0x0802a895 802a874: 0802a879 .word 0x0802a879 0802a878 : * * @param arg unused argument */ static void dhcp_timer_fine(void *arg) { 802a878: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dhcp_fine_tmr()\n")); dhcp_fine_tmr(); 802a87a: f7fd f9c9 bl 8027c10 sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL); 802a87e: 4904 ldr r1, [pc, #16] ; (802a890 ) 802a880: f44f 70fa mov.w r0, #500 ; 0x1f4 802a884: 2200 movs r2, #0 } 802a886: e8bd 4008 ldmia.w sp!, {r3, lr} dhcp_timer_fine(void *arg) { LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dhcp_fine_tmr()\n")); dhcp_fine_tmr(); sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_timer_fine, NULL); 802a88a: f7ff bfab b.w 802a7e4 802a88e: bf00 nop 802a890: 0802a879 .word 0x0802a879 0802a894 : * * @param arg unused argument */ static void dhcp_timer_coarse(void *arg) { 802a894: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dhcp_coarse_tmr()\n")); dhcp_coarse_tmr(); 802a896: f7fd f939 bl 8027b0c sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL); 802a89a: 4904 ldr r1, [pc, #16] ; (802a8ac ) 802a89c: f64e 2060 movw r0, #60000 ; 0xea60 802a8a0: 2200 movs r2, #0 } 802a8a2: e8bd 4008 ldmia.w sp!, {r3, lr} dhcp_timer_coarse(void *arg) { LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: dhcp_coarse_tmr()\n")); dhcp_coarse_tmr(); sys_timeout(DHCP_COARSE_TIMER_MSECS, dhcp_timer_coarse, NULL); 802a8a6: f7ff bf9d b.w 802a7e4 802a8aa: bf00 nop 802a8ac: 0802a895 .word 0x0802a895 0802a8b0 : * * @param arg unused argument */ static void arp_timer(void *arg) { 802a8b0: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: etharp_tmr()\n")); etharp_tmr(); 802a8b2: f004 fcfb bl 802f2ac sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 802a8b6: 4904 ldr r1, [pc, #16] ; (802a8c8 ) 802a8b8: f241 3088 movw r0, #5000 ; 0x1388 802a8bc: 2200 movs r2, #0 } 802a8be: e8bd 4008 ldmia.w sp!, {r3, lr} arp_timer(void *arg) { LWIP_UNUSED_ARG(arg); LWIP_DEBUGF(TIMERS_DEBUG, ("tcpip: etharp_tmr()\n")); etharp_tmr(); sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 802a8c2: f7ff bf8f b.w 802a7e4 802a8c6: bf00 nop 802a8c8: 0802a8b1 .word 0x0802a8b1 0802a8cc : */ void tcp_timer_needed(void) { /* timer is off but needed again? */ if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { 802a8cc: 4b08 ldr r3, [pc, #32] ; (802a8f0 ) 802a8ce: 681b ldr r3, [r3, #0] 802a8d0: b96b cbnz r3, 802a8ee 802a8d2: 4b08 ldr r3, [pc, #32] ; (802a8f4 ) 802a8d4: 681b ldr r3, [r3, #0] 802a8d6: b913 cbnz r3, 802a8de 802a8d8: 4b07 ldr r3, [pc, #28] ; (802a8f8 ) 802a8da: 681b ldr r3, [r3, #0] 802a8dc: b13b cbz r3, 802a8ee /* enable and start timer */ tcpip_tcp_timer_active = 1; 802a8de: 4b04 ldr r3, [pc, #16] ; (802a8f0 ) sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 802a8e0: 4906 ldr r1, [pc, #24] ; (802a8fc ) tcp_timer_needed(void) { /* timer is off but needed again? */ if (!tcpip_tcp_timer_active && (tcp_active_pcbs || tcp_tw_pcbs)) { /* enable and start timer */ tcpip_tcp_timer_active = 1; 802a8e2: 2201 movs r2, #1 802a8e4: 601a str r2, [r3, #0] sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 802a8e6: 20fa movs r0, #250 ; 0xfa 802a8e8: 2200 movs r2, #0 802a8ea: f7ff bf7b b.w 802a7e4 802a8ee: 4770 bx lr 802a8f0: 2000db88 .word 0x2000db88 802a8f4: 200104c4 .word 0x200104c4 802a8f8: 200104d8 .word 0x200104d8 802a8fc: 0802a901 .word 0x0802a901 0802a900 : * * @param arg unused argument */ static void tcpip_tcp_timer(void *arg) { 802a900: b508 push {r3, lr} LWIP_UNUSED_ARG(arg); /* call TCP timer handler */ tcp_tmr(); 802a902: f7fe fad3 bl 8028eac /* timer still needed? */ if (tcp_active_pcbs || tcp_tw_pcbs) { 802a906: 4b08 ldr r3, [pc, #32] ; (802a928 ) 802a908: 681b ldr r3, [r3, #0] 802a90a: b913 cbnz r3, 802a912 802a90c: 4b07 ldr r3, [pc, #28] ; (802a92c ) 802a90e: 681b ldr r3, [r3, #0] 802a910: b133 cbz r3, 802a920 /* restart timer */ sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 802a912: 4907 ldr r1, [pc, #28] ; (802a930 ) 802a914: 20fa movs r0, #250 ; 0xfa 802a916: 2200 movs r2, #0 } else { /* disable timer */ tcpip_tcp_timer_active = 0; } } 802a918: e8bd 4008 ldmia.w sp!, {r3, lr} /* call TCP timer handler */ tcp_tmr(); /* timer still needed? */ if (tcp_active_pcbs || tcp_tw_pcbs) { /* restart timer */ sys_timeout(TCP_TMR_INTERVAL, tcpip_tcp_timer, NULL); 802a91c: f7ff bf62 b.w 802a7e4 } else { /* disable timer */ tcpip_tcp_timer_active = 0; 802a920: 4a04 ldr r2, [pc, #16] ; (802a934 ) 802a922: 6013 str r3, [r2, #0] 802a924: bd08 pop {r3, pc} 802a926: bf00 nop 802a928: 200104c4 .word 0x200104c4 802a92c: 200104d8 .word 0x200104d8 802a930: 0802a901 .word 0x0802a901 802a934: 2000db88 .word 0x2000db88 0802a938 : void sys_untimeout(sys_timeout_handler handler, void *arg) { struct sys_timeo *prev_t, *t; if (next_timeout == NULL) { 802a938: 4b10 ldr r3, [pc, #64] ; (802a97c ) 802a93a: 681b ldr r3, [r3, #0] * @param handler callback function that would be called by the timeout * @param arg callback argument that would be passed to handler */ void sys_untimeout(sys_timeout_handler handler, void *arg) { 802a93c: b510 push {r4, lr} struct sys_timeo *prev_t, *t; if (next_timeout == NULL) { 802a93e: b1e3 cbz r3, 802a97a 802a940: 2200 movs r2, #0 802a942: e000 b.n 802a946 return; } for (t = next_timeout, prev_t = NULL; t != NULL; prev_t = t, t = t->next) { 802a944: 4623 mov r3, r4 if ((t->h == handler) && (t->arg == arg)) { 802a946: 689c ldr r4, [r3, #8] 802a948: 4284 cmp r4, r0 802a94a: d112 bne.n 802a972 802a94c: 68dc ldr r4, [r3, #12] 802a94e: 428c cmp r4, r1 802a950: d10f bne.n 802a972 802a952: 6819 ldr r1, [r3, #0] /* We have a match */ /* Unlink from previous in list */ if (prev_t == NULL) { 802a954: b902 cbnz r2, 802a958 next_timeout = t->next; 802a956: 4a09 ldr r2, [pc, #36] ; (802a97c ) } else { prev_t->next = t->next; 802a958: 6011 str r1, [r2, #0] } /* If not the last one, add time of this one back to next */ if (t->next != NULL) { 802a95a: 681a ldr r2, [r3, #0] 802a95c: b11a cbz r2, 802a966 t->next->time += t->time; 802a95e: 6850 ldr r0, [r2, #4] 802a960: 6859 ldr r1, [r3, #4] 802a962: 1841 adds r1, r0, r1 802a964: 6051 str r1, [r2, #4] } memp_free(MEMP_SYS_TIMEOUT, t); 802a966: 2009 movs r0, #9 802a968: 4619 mov r1, r3 return; } } return; } 802a96a: e8bd 4010 ldmia.w sp!, {r4, lr} } /* If not the last one, add time of this one back to next */ if (t->next != NULL) { t->next->time += t->time; } memp_free(MEMP_SYS_TIMEOUT, t); 802a96e: f7fd bba9 b.w 80280c4 if (next_timeout == NULL) { return; } for (t = next_timeout, prev_t = NULL; t != NULL; prev_t = t, t = t->next) { 802a972: 681c ldr r4, [r3, #0] 802a974: 461a mov r2, r3 802a976: 2c00 cmp r4, #0 802a978: d1e4 bne.n 802a944 802a97a: bd10 pop {r4, pc} 802a97c: 2000db8c .word 0x2000db8c 0802a980 : * @param mbox the mbox to fetch the message from * @param msg the place to store the message */ void sys_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg) { 802a980: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} struct sys_timeo *tmptimeout; sys_timeout_handler handler; void *arg; again: if (!next_timeout) { 802a984: 4e18 ldr r6, [pc, #96] ; (802a9e8 ) * @param mbox the mbox to fetch the message from * @param msg the place to store the message */ void sys_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg) { 802a986: 4604 mov r4, r0 802a988: 460d mov r5, r1 802a98a: 4637 mov r7, r6 struct sys_timeo *tmptimeout; sys_timeout_handler handler; void *arg; again: if (!next_timeout) { 802a98c: 6832 ldr r2, [r6, #0] 802a98e: b92a cbnz r2, 802a99c time_needed = sys_arch_mbox_fetch(mbox, msg, 0); 802a990: 4620 mov r0, r4 802a992: 4629 mov r1, r5 } else { next_timeout->time = 0; } } } } 802a994: e8bd 43f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, lr} sys_timeout_handler handler; void *arg; again: if (!next_timeout) { time_needed = sys_arch_mbox_fetch(mbox, msg, 0); 802a998: f005 b8b4 b.w 802fb04 } else { if (next_timeout->time > 0) { 802a99c: 6852 ldr r2, [r2, #4] 802a99e: b96a cbnz r2, 802a9bc if (time_needed == SYS_ARCH_TIMEOUT) { /* If time == SYS_ARCH_TIMEOUT, a timeout occured before a message could be fetched. We should now call the timeout handler and deallocate the memory allocated for the timeout. */ tmptimeout = next_timeout; 802a9a0: 6839 ldr r1, [r7, #0] next_timeout = tmptimeout->next; 802a9a2: 680a ldr r2, [r1, #0] handler = tmptimeout->h; 802a9a4: f8d1 8008 ldr.w r8, [r1, #8] if (time_needed == SYS_ARCH_TIMEOUT) { /* If time == SYS_ARCH_TIMEOUT, a timeout occured before a message could be fetched. We should now call the timeout handler and deallocate the memory allocated for the timeout. */ tmptimeout = next_timeout; next_timeout = tmptimeout->next; 802a9a8: 603a str r2, [r7, #0] if (handler != NULL) { LWIP_DEBUGF(TIMERS_DEBUG, ("stmf calling h=%s arg=%p\n", tmptimeout->handler_name, arg)); } #endif /* LWIP_DEBUG_TIMERNAMES */ memp_free(MEMP_SYS_TIMEOUT, tmptimeout); 802a9aa: 2009 movs r0, #9 could be fetched. We should now call the timeout handler and deallocate the memory allocated for the timeout. */ tmptimeout = next_timeout; next_timeout = tmptimeout->next; handler = tmptimeout->h; arg = tmptimeout->arg; 802a9ac: f8d1 900c ldr.w r9, [r1, #12] if (handler != NULL) { LWIP_DEBUGF(TIMERS_DEBUG, ("stmf calling h=%s arg=%p\n", tmptimeout->handler_name, arg)); } #endif /* LWIP_DEBUG_TIMERNAMES */ memp_free(MEMP_SYS_TIMEOUT, tmptimeout); 802a9b0: f7fd fb88 bl 80280c4 if (handler != NULL) { 802a9b4: f1b8 0f00 cmp.w r8, #0 802a9b8: d0e8 beq.n 802a98c 802a9ba: e006 b.n 802a9ca again: if (!next_timeout) { time_needed = sys_arch_mbox_fetch(mbox, msg, 0); } else { if (next_timeout->time > 0) { time_needed = sys_arch_mbox_fetch(mbox, msg, next_timeout->time); 802a9bc: 4620 mov r0, r4 802a9be: 4629 mov r1, r5 802a9c0: f005 f8a0 bl 802fb04 } else { time_needed = SYS_ARCH_TIMEOUT; } if (time_needed == SYS_ARCH_TIMEOUT) { 802a9c4: 1c43 adds r3, r0, #1 802a9c6: d0eb beq.n 802a9a0 802a9c8: e002 b.n 802a9d0 memp_free(MEMP_SYS_TIMEOUT, tmptimeout); if (handler != NULL) { /* For LWIP_TCPIP_CORE_LOCKING, lock the core before calling the timeout handler function. */ LOCK_TCPIP_CORE(); handler(arg); 802a9ca: 4648 mov r0, r9 802a9cc: 47c0 blx r8 802a9ce: e7dd b.n 802a98c goto again; } else { /* If time != SYS_ARCH_TIMEOUT, a message was received before the timeout occured. The time variable is set to the number of milliseconds we waited for the message. */ if (time_needed < next_timeout->time) { 802a9d0: 4b05 ldr r3, [pc, #20] ; (802a9e8 ) 802a9d2: 681b ldr r3, [r3, #0] 802a9d4: 6859 ldr r1, [r3, #4] 802a9d6: 4288 cmp r0, r1 next_timeout->time -= time_needed; 802a9d8: bf34 ite cc 802a9da: ebc0 0201 rsbcc r2, r0, r1 } else { next_timeout->time = 0; 802a9de: 2200 movcs r2, #0 802a9e0: 605a str r2, [r3, #4] 802a9e2: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802a9e6: bf00 nop 802a9e8: 2000db8c .word 0x2000db8c 0802a9ec : /** * Initialize this module. */ void udp_init(void) { 802a9ec: 4770 bx lr 802a9ee: 0000 movs r0, r0 0802a9f0 : * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 802a9f0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} PERF_START; UDP_STATS_INC(udp.recv); iphdr = (struct ip_hdr *)p->payload; 802a9f4: f8d0 9004 ldr.w r9, [r0, #4] /* Check minimum length (IP header + UDP header) * and move payload pointer to UDP header */ if (p->tot_len < (IPH_HL(iphdr) * 4 + UDP_HLEN) || pbuf_header(p, -(s16_t)(IPH_HL(iphdr) * 4))) { 802a9f8: 8903 ldrh r3, [r0, #8] * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 802a9fa: 460e mov r6, r1 iphdr = (struct ip_hdr *)p->payload; /* Check minimum length (IP header + UDP header) * and move payload pointer to UDP header */ if (p->tot_len < (IPH_HL(iphdr) * 4 + UDP_HLEN) || pbuf_header(p, -(s16_t)(IPH_HL(iphdr) * 4))) { 802a9fc: f899 1000 ldrb.w r1, [r9] 802aa00: f001 010f and.w r1, r1, #15 802aa04: 1c8a adds r2, r1, #2 802aa06: ebb3 0f82 cmp.w r3, r2, lsl #2 * @param inp network interface on which the datagram was received. * */ void udp_input(struct pbuf *p, struct netif *inp) { 802aa0a: b085 sub sp, #20 802aa0c: 4605 mov r5, r0 iphdr = (struct ip_hdr *)p->payload; /* Check minimum length (IP header + UDP header) * and move payload pointer to UDP header */ if (p->tot_len < (IPH_HL(iphdr) * 4 + UDP_HLEN) || pbuf_header(p, -(s16_t)(IPH_HL(iphdr) * 4))) { 802aa0e: db05 blt.n 802aa1c 802aa10: 0089 lsls r1, r1, #2 802aa12: 4249 negs r1, r1 802aa14: f7fd fc35 bl 8028282 802aa18: 4683 mov fp, r0 802aa1a: b110 cbz r0, 802aa22 /* drop short packets */ LWIP_DEBUGF(UDP_DEBUG, ("udp_input: short UDP datagram (%"U16_F" bytes) discarded\n", p->tot_len)); UDP_STATS_INC(udp.lenerr); UDP_STATS_INC(udp.drop); snmp_inc_udpinerrors(); 802aa1c: f002 fa6c bl 802cef8 802aa20: e096 b.n 802ab50 } udphdr = (struct udp_hdr *)p->payload; /* is broadcast packet ? */ broadcast = ip_addr_isbroadcast(¤t_iphdr_dest, inp); 802aa22: f8df a150 ldr.w sl, [pc, #336] ; 802ab74 snmp_inc_udpinerrors(); pbuf_free(p); goto end; } udphdr = (struct udp_hdr *)p->payload; 802aa26: 686c ldr r4, [r5, #4] /* is broadcast packet ? */ broadcast = ip_addr_isbroadcast(¤t_iphdr_dest, inp); 802aa28: f8da 0000 ldr.w r0, [sl] 802aa2c: 4631 mov r1, r6 802aa2e: f000 faed bl 802b00c 802aa32: 4680 mov r8, r0 LWIP_DEBUGF(UDP_DEBUG, ("udp_input: received datagram of length %"U16_F"\n", p->tot_len)); /* convert src and dest ports to host byte order */ src = ntohs(udphdr->src); 802aa34: 8820 ldrh r0, [r4, #0] 802aa36: f7fc fb16 bl 8027066 802aa3a: 4607 mov r7, r0 dest = ntohs(udphdr->dest); 802aa3c: 8860 ldrh r0, [r4, #2] 802aa3e: f7fc fb12 bl 8027066 #if LWIP_DHCP pcb = NULL; /* when LWIP_DHCP is active, packets to DHCP_CLIENT_PORT may only be processed by the dhcp module, no other UDP pcb may use the local UDP port DHCP_CLIENT_PORT */ if (dest == DHCP_CLIENT_PORT) { 802aa42: 2844 cmp r0, #68 ; 0x44 802aa44: d10f bne.n 802aa66 /* all packets for DHCP_CLIENT_PORT not coming from DHCP_SERVER_PORT are dropped! */ if (src == DHCP_SERVER_PORT) { 802aa46: 2f43 cmp r7, #67 ; 0x43 802aa48: d14f bne.n 802aaea if ((inp->dhcp != NULL) && (inp->dhcp->pcb != NULL)) { 802aa4a: 6a33 ldr r3, [r6, #32] 802aa4c: 2b00 cmp r3, #0 802aa4e: d04c beq.n 802aaea 802aa50: 685c ldr r4, [r3, #4] 802aa52: 2c00 cmp r4, #0 802aa54: d049 beq.n 802aaea /* accept the packe if (- broadcast or directed to us) -> DHCP is link-layer-addressed, local ip is always ANY! - inp->dhcp->pcb->remote == ANY or iphdr->src */ if ((ip_addr_isany(&inp->dhcp->pcb->remote_ip) || 802aa56: 6863 ldr r3, [r4, #4] 802aa58: 2b00 cmp r3, #0 802aa5a: d04e beq.n 802aafa ip_addr_cmp(&(inp->dhcp->pcb->remote_ip), ¤t_iphdr_src))) { 802aa5c: 4a43 ldr r2, [pc, #268] ; (802ab6c ) if (src == DHCP_SERVER_PORT) { if ((inp->dhcp != NULL) && (inp->dhcp->pcb != NULL)) { /* accept the packe if (- broadcast or directed to us) -> DHCP is link-layer-addressed, local ip is always ANY! - inp->dhcp->pcb->remote == ANY or iphdr->src */ if ((ip_addr_isany(&inp->dhcp->pcb->remote_ip) || 802aa5e: 6812 ldr r2, [r2, #0] 802aa60: 4293 cmp r3, r2 802aa62: d142 bne.n 802aaea 802aa64: e049 b.n 802aafa uncon_pcb = NULL; /* Iterate through the UDP pcb list for a matching pcb. * 'Perfect match' pcbs (connected to the remote port & ip address) are * preferred. If no perfect match is found, the first unconnected pcb that * matches the local port and ip address gets the datagram. */ for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 802aa66: 4b42 ldr r3, [pc, #264] ; (802ab70 ) /* compare PCB local addr+port to UDP destination addr+port */ if (pcb->local_port == dest) { if ( (!broadcast && ip_addr_isany(&pcb->local_ip)) || ip_addr_cmp(&(pcb->local_ip), ¤t_iphdr_dest) || 802aa68: f8da a000 ldr.w sl, [sl] uncon_pcb = NULL; /* Iterate through the UDP pcb list for a matching pcb. * 'Perfect match' pcbs (connected to the remote port & ip address) are * preferred. If no perfect match is found, the first unconnected pcb that * matches the local port and ip address gets the datagram. */ for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 802aa6c: f8d3 c000 ldr.w ip, [r3] } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && (pcb->remote_port == src) && (ip_addr_isany(&pcb->remote_ip) || ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src))) { 802aa70: 4b3e ldr r3, [pc, #248] ; (802ab6c ) 802aa72: 681b ldr r3, [r3, #0] uncon_pcb = NULL; /* Iterate through the UDP pcb list for a matching pcb. * 'Perfect match' pcbs (connected to the remote port & ip address) are * preferred. If no perfect match is found, the first unconnected pcb that * matches the local port and ip address gets the datagram. */ for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 802aa74: 4664 mov r4, ip } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && (pcb->remote_port == src) && (ip_addr_isany(&pcb->remote_ip) || ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src))) { 802aa76: 9303 str r3, [sp, #12] } } } else #endif /* LWIP_DHCP */ { prev = NULL; 802aa78: 4659 mov r1, fp local_match = 0; uncon_pcb = NULL; 802aa7a: 465b mov r3, fp /* Iterate through the UDP pcb list for a matching pcb. * 'Perfect match' pcbs (connected to the remote port & ip address) are * preferred. If no perfect match is found, the first unconnected pcb that * matches the local port and ip address gets the datagram. */ for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 802aa7c: e032 b.n 802aae4 ip4_addr3_16(&pcb->local_ip), ip4_addr4_16(&pcb->local_ip), pcb->local_port, ip4_addr1_16(&pcb->remote_ip), ip4_addr2_16(&pcb->remote_ip), ip4_addr3_16(&pcb->remote_ip), ip4_addr4_16(&pcb->remote_ip), pcb->remote_port)); /* compare PCB local addr+port to UDP destination addr+port */ if (pcb->local_port == dest) { 802aa7e: 8a62 ldrh r2, [r4, #18] 802aa80: 4282 cmp r2, r0 802aa82: d12d bne.n 802aae0 802aa84: 6822 ldr r2, [r4, #0] if ( 802aa86: f1b8 0f00 cmp.w r8, #0 802aa8a: d100 bne.n 802aa8e (!broadcast && ip_addr_isany(&pcb->local_ip)) || 802aa8c: b15a cbz r2, 802aaa6 802aa8e: 4552 cmp r2, sl 802aa90: d009 beq.n 802aaa6 ip_addr_cmp(&(pcb->local_ip), ¤t_iphdr_dest) || 802aa92: f1b8 0f00 cmp.w r8, #0 802aa96: d023 beq.n 802aae0 (broadcast && ip_get_option(pcb, SOF_BROADCAST) && (ip_addr_isany(&pcb->local_ip) || ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(), &inp->netmask)))) { #else /* IP_SOF_BROADCAST_RECV */ (broadcast && (ip_addr_isany(&pcb->local_ip) || 802aa98: b12a cbz r2, 802aaa6 ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(), &inp->netmask)))) { 802aa9a: ea8a 0b02 eor.w fp, sl, r2 802aa9e: 68b2 ldr r2, [r6, #8] (broadcast && ip_get_option(pcb, SOF_BROADCAST) && (ip_addr_isany(&pcb->local_ip) || ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(), &inp->netmask)))) { #else /* IP_SOF_BROADCAST_RECV */ (broadcast && (ip_addr_isany(&pcb->local_ip) || 802aaa0: ea1b 0f02 tst.w fp, r2 802aaa4: d11c bne.n 802aae0 ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(), &inp->netmask)))) { #endif /* IP_SOF_BROADCAST_RECV */ local_match = 1; if ((uncon_pcb == NULL) && 802aaa6: 2b00 cmp r3, #0 802aaa8: d158 bne.n 802ab5c ((pcb->flags & UDP_FLAGS_CONNECTED) == 0)) { 802aaaa: 7c23 ldrb r3, [r4, #16] (broadcast && (ip_addr_isany(&pcb->local_ip) || ip_addr_netcmp(&pcb->local_ip, ip_current_dest_addr(), &inp->netmask)))) { #endif /* IP_SOF_BROADCAST_RECV */ local_match = 1; if ((uncon_pcb == NULL) && 802aaac: f003 0304 and.w r3, r3, #4 802aab0: b2db uxtb r3, r3 802aab2: 2b00 cmp r3, #0 802aab4: bf0c ite eq 802aab6: 4623 moveq r3, r4 802aab8: 2300 movne r3, #0 802aaba: e04f b.n 802ab5c } } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && (pcb->remote_port == src) && (ip_addr_isany(&pcb->remote_ip) || 802aabc: f8d4 b004 ldr.w fp, [r4, #4] 802aac0: f1bb 0f00 cmp.w fp, #0 802aac4: d101 bne.n 802aaca ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src))) { /* the first fully matching PCB */ if (prev != NULL) { 802aac6: b921 cbnz r1, 802aad2 802aac8: e017 b.n 802aafa } } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && (pcb->remote_port == src) && (ip_addr_isany(&pcb->remote_ip) || 802aaca: 9a03 ldr r2, [sp, #12] 802aacc: 4593 cmp fp, r2 802aace: d107 bne.n 802aae0 802aad0: e7f9 b.n 802aac6 ip_addr_cmp(&(pcb->remote_ip), ¤t_iphdr_src))) { /* the first fully matching PCB */ if (prev != NULL) { /* move the pcb to the front of udp_pcbs so that is found faster next time */ prev->next = pcb->next; 802aad2: 68e3 ldr r3, [r4, #12] 802aad4: 60cb str r3, [r1, #12] pcb->next = udp_pcbs; udp_pcbs = pcb; 802aad6: 4b26 ldr r3, [pc, #152] ; (802ab70 ) /* the first fully matching PCB */ if (prev != NULL) { /* move the pcb to the front of udp_pcbs so that is found faster next time */ prev->next = pcb->next; pcb->next = udp_pcbs; 802aad8: f8c4 c00c str.w ip, [r4, #12] udp_pcbs = pcb; 802aadc: 601c str r4, [r3, #0] 802aade: e00c b.n 802aafa 802aae0: 4621 mov r1, r4 uncon_pcb = NULL; /* Iterate through the UDP pcb list for a matching pcb. * 'Perfect match' pcbs (connected to the remote port & ip address) are * preferred. If no perfect match is found, the first unconnected pcb that * matches the local port and ip address gets the datagram. */ for (pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 802aae2: 68e4 ldr r4, [r4, #12] 802aae4: 2c00 cmp r4, #0 802aae6: d1ca bne.n 802aa7e pcb = uncon_pcb; } } /* Check checksum if this is a match or if it was directed at us. */ if (pcb != NULL || ip_addr_cmp(&inp->ip_addr, ¤t_iphdr_dest)) { 802aae8: b933 cbnz r3, 802aaf8 802aaea: 4b22 ldr r3, [pc, #136] ; (802ab74 ) 802aaec: 6872 ldr r2, [r6, #4] 802aaee: 681b ldr r3, [r3, #0] 802aaf0: 429a cmp r2, r3 802aaf2: d12d bne.n 802ab50 802aaf4: 2400 movs r4, #0 802aaf6: e000 b.n 802aafa 802aaf8: 461c mov r4, r3 goto end; } } #endif /* CHECKSUM_CHECK_UDP */ } if(pbuf_header(p, -UDP_HLEN)) { 802aafa: 4628 mov r0, r5 802aafc: f06f 0107 mvn.w r1, #7 802ab00: f7fd fbbf bl 8028282 802ab04: 2800 cmp r0, #0 802ab06: d189 bne.n 802aa1c UDP_STATS_INC(udp.drop); snmp_inc_udpinerrors(); pbuf_free(p); goto end; } if (pcb != NULL) { 802ab08: b154 cbz r4, 802ab20 snmp_inc_udpindatagrams(); 802ab0a: f002 f9e5 bl 802ced8 pbuf_header(p, -(s16_t)((IPH_HL(iphdr) * 4) + UDP_HLEN)); } } #endif /* SO_REUSE && SO_REUSE_RXTOALL */ /* callback */ if (pcb->recv != NULL) { 802ab0e: 69a6 ldr r6, [r4, #24] 802ab10: b1f6 cbz r6, 802ab50 /* now the recv function is responsible for freeing p */ pcb->recv(pcb->recv_arg, pcb, p, ip_current_src_addr(), src); 802ab12: 9700 str r7, [sp, #0] 802ab14: 69e0 ldr r0, [r4, #28] 802ab16: 4b15 ldr r3, [pc, #84] ; (802ab6c ) 802ab18: 4621 mov r1, r4 802ab1a: 462a mov r2, r5 802ab1c: 47b0 blx r6 802ab1e: e021 b.n 802ab64 LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_input: not for us.\n")); #if LWIP_ICMP /* No match was found, send ICMP destination port unreachable unless destination address was broadcast/multicast. */ if (!broadcast && 802ab20: f1b8 0f00 cmp.w r8, #0 802ab24: d112 bne.n 802ab4c !ip_addr_ismulticast(¤t_iphdr_dest)) { 802ab26: 4b13 ldr r3, [pc, #76] ; (802ab74 ) 802ab28: 681b ldr r3, [r3, #0] 802ab2a: f003 03f0 and.w r3, r3, #240 ; 0xf0 LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_input: not for us.\n")); #if LWIP_ICMP /* No match was found, send ICMP destination port unreachable unless destination address was broadcast/multicast. */ if (!broadcast && 802ab2e: 2be0 cmp r3, #224 ; 0xe0 802ab30: d00c beq.n 802ab4c !ip_addr_ismulticast(¤t_iphdr_dest)) { /* move payload pointer back to ip header */ pbuf_header(p, (IPH_HL(iphdr) * 4) + UDP_HLEN); 802ab32: f899 1000 ldrb.w r1, [r9] 802ab36: f001 010f and.w r1, r1, #15 802ab3a: 3102 adds r1, #2 802ab3c: 0089 lsls r1, r1, #2 802ab3e: 4628 mov r0, r5 802ab40: f7fd fb9f bl 8028282 LWIP_ASSERT("p->payload == iphdr", (p->payload == iphdr)); icmp_dest_unreach(p, ICMP_DUR_PORT); 802ab44: 4628 mov r0, r5 802ab46: 2103 movs r1, #3 802ab48: f000 f9d2 bl 802aef0 } #endif /* LWIP_ICMP */ UDP_STATS_INC(udp.proterr); UDP_STATS_INC(udp.drop); snmp_inc_udpnoports(); 802ab4c: f002 f9cc bl 802cee8 pbuf_free(p); 802ab50: 4628 mov r0, r5 } else { pbuf_free(p); } end: PERF_STOP("udp_input"); } 802ab52: b005 add sp, #20 802ab54: e8bd 4ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} } #endif /* LWIP_ICMP */ UDP_STATS_INC(udp.proterr); UDP_STATS_INC(udp.drop); snmp_inc_udpnoports(); pbuf_free(p); 802ab58: f7fd bbbe b.w 80282d8 uncon_pcb = pcb; } } } /* compare PCB remote addr+port to UDP source addr+port */ if ((local_match != 0) && 802ab5c: 8aa2 ldrh r2, [r4, #20] 802ab5e: 42ba cmp r2, r7 802ab60: d1be bne.n 802aae0 802ab62: e7ab b.n 802aabc } else { pbuf_free(p); } end: PERF_STOP("udp_input"); } 802ab64: b005 add sp, #20 802ab66: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802ab6a: bf00 nop 802ab6c: 200104e4 .word 0x200104e4 802ab70: 200104e0 .word 0x200104e0 802ab74: 200104ec .word 0x200104ec 0802ab78 : * * @see udp_disconnect() */ err_t udp_bind(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 802ab78: b5f8 push {r3, r4, r5, r6, r7, lr} ip_addr_debug_print(UDP_DEBUG, ipaddr); LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, (", port = %"U16_F")\n", port)); rebind = 0; /* Check for double bind and rebind of the same pcb */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 802ab7a: 4b25 ldr r3, [pc, #148] ; (802ac10 ) * * @see udp_disconnect() */ err_t udp_bind(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 802ab7c: 4604 mov r4, r0 ip_addr_debug_print(UDP_DEBUG, ipaddr); LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, (", port = %"U16_F")\n", port)); rebind = 0; /* Check for double bind and rebind of the same pcb */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 802ab7e: 6818 ldr r0, [r3, #0] LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_bind(ipaddr = ")); ip_addr_debug_print(UDP_DEBUG, ipaddr); LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, (", port = %"U16_F")\n", port)); rebind = 0; 802ab80: 2500 movs r5, #0 /* Check for double bind and rebind of the same pcb */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 802ab82: 4603 mov r3, r0 802ab84: e012 b.n 802abac /* is this UDP PCB already on active list? */ if (pcb == ipcb) { 802ab86: 429c cmp r4, r3 802ab88: d00e beq.n 802aba8 !ip_get_option(ipcb, SOF_REUSEADDR)) { #else /* SO_REUSE */ /* port matches that of PCB in list and REUSEADDR not set -> reject */ else { #endif /* SO_REUSE */ if ((ipcb->local_port == port) && 802ab8a: 8a5e ldrh r6, [r3, #18] 802ab8c: 4296 cmp r6, r2 802ab8e: d10c bne.n 802abaa /* IP address matches, or one is IP_ADDR_ANY? */ (ip_addr_isany(&(ipcb->local_ip)) || 802ab90: 681f ldr r7, [r3, #0] 802ab92: b90f cbnz r7, 802ab98 ip_addr_isany(ipaddr) || ip_addr_cmp(&(ipcb->local_ip), ipaddr))) { /* other PCB already binds to this local IP and port */ LWIP_DEBUGF(UDP_DEBUG, ("udp_bind: local port %"U16_F" already bound by another pcb\n", port)); return ERR_USE; 802ab94: 20f8 movs r0, #248 ; 0xf8 802ab96: e039 b.n 802ac0c /* port matches that of PCB in list and REUSEADDR not set -> reject */ else { #endif /* SO_REUSE */ if ((ipcb->local_port == port) && /* IP address matches, or one is IP_ADDR_ANY? */ (ip_addr_isany(&(ipcb->local_ip)) || 802ab98: 2900 cmp r1, #0 802ab9a: d0fb beq.n 802ab94 ip_addr_isany(ipaddr) || 802ab9c: 680e ldr r6, [r1, #0] 802ab9e: 2e00 cmp r6, #0 802aba0: d0f8 beq.n 802ab94 802aba2: 42b7 cmp r7, r6 802aba4: d101 bne.n 802abaa 802aba6: e7f5 b.n 802ab94 /* is this UDP PCB already on active list? */ if (pcb == ipcb) { /* pcb may occur at most once in active list */ LWIP_ASSERT("rebind == 0", rebind == 0); /* pcb already in list, just rebind */ rebind = 1; 802aba8: 2501 movs r5, #1 ip_addr_debug_print(UDP_DEBUG, ipaddr); LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, (", port = %"U16_F")\n", port)); rebind = 0; /* Check for double bind and rebind of the same pcb */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 802abaa: 68db ldr r3, [r3, #12] 802abac: 2b00 cmp r3, #0 802abae: d1ea bne.n 802ab86 return ERR_USE; } } } ip_addr_set(&pcb->local_ip, ipaddr); 802abb0: b101 cbz r1, 802abb4 802abb2: 6809 ldr r1, [r1, #0] 802abb4: 6021 str r1, [r4, #0] /* no port specified? */ if (port == 0) { 802abb6: b9fa cbnz r2, 802abf8 802abb8: 4b16 ldr r3, [pc, #88] ; (802ac14 ) 802abba: 881a ldrh r2, [r3, #0] 802abbc: f44f 4180 mov.w r1, #16384 ; 0x4000 { u16_t n = 0; struct udp_pcb *pcb; again: if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) { 802abc0: f64f 76ff movw r6, #65535 ; 0xffff 802abc4: 42b2 cmp r2, r6 802abc6: d002 beq.n 802abce 802abc8: 3201 adds r2, #1 802abca: b292 uxth r2, r2 802abcc: e001 b.n 802abd2 udp_port = UDP_LOCAL_PORT_RANGE_START; 802abce: f44f 4240 mov.w r2, #49152 ; 0xc000 } /* Check all PCBs. */ for(pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 802abd2: 4603 mov r3, r0 802abd4: e00a b.n 802abec if (pcb->local_port == udp_port) { 802abd6: 8a5f ldrh r7, [r3, #18] 802abd8: 4297 cmp r7, r2 802abda: d106 bne.n 802abea 802abdc: 3901 subs r1, #1 802abde: b289 uxth r1, r1 if (++n > (UDP_LOCAL_PORT_RANGE_END - UDP_LOCAL_PORT_RANGE_START)) { 802abe0: 2900 cmp r1, #0 802abe2: d1ef bne.n 802abc4 802abe4: 4b0b ldr r3, [pc, #44] ; (802ac14 ) 802abe6: 801a strh r2, [r3, #0] 802abe8: e7d4 b.n 802ab94 again: if (udp_port++ == UDP_LOCAL_PORT_RANGE_END) { udp_port = UDP_LOCAL_PORT_RANGE_START; } /* Check all PCBs. */ for(pcb = udp_pcbs; pcb != NULL; pcb = pcb->next) { 802abea: 68db ldr r3, [r3, #12] 802abec: 2b00 cmp r3, #0 802abee: d1f2 bne.n 802abd6 802abf0: 4b08 ldr r3, [pc, #32] ; (802ac14 ) 802abf2: 801a strh r2, [r3, #0] ip_addr_set(&pcb->local_ip, ipaddr); /* no port specified? */ if (port == 0) { port = udp_new_port(); if (port == 0) { 802abf4: 2a00 cmp r2, #0 802abf6: d0cd beq.n 802ab94 /* no more ports available in local range */ LWIP_DEBUGF(UDP_DEBUG, ("udp_bind: out of free UDP ports\n")); return ERR_USE; } } pcb->local_port = port; 802abf8: 8262 strh r2, [r4, #18] snmp_insert_udpidx_tree(pcb); 802abfa: 4620 mov r0, r4 802abfc: f002 f98c bl 802cf18 /* pcb not active yet? */ if (rebind == 0) { 802ac00: b91d cbnz r5, 802ac0a /* place the PCB on the active list if not already there */ pcb->next = udp_pcbs; 802ac02: 4b03 ldr r3, [pc, #12] ; (802ac10 ) 802ac04: 681a ldr r2, [r3, #0] udp_pcbs = pcb; 802ac06: 601c str r4, [r3, #0] pcb->local_port = port; snmp_insert_udpidx_tree(pcb); /* pcb not active yet? */ if (rebind == 0) { /* place the PCB on the active list if not already there */ pcb->next = udp_pcbs; 802ac08: 60e2 str r2, [r4, #12] LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_STATE, ("udp_bind: bound to %"U16_F".%"U16_F".%"U16_F".%"U16_F", port %"U16_F"\n", ip4_addr1_16(&pcb->local_ip), ip4_addr2_16(&pcb->local_ip), ip4_addr3_16(&pcb->local_ip), ip4_addr4_16(&pcb->local_ip), pcb->local_port)); return ERR_OK; 802ac0a: 2000 movs r0, #0 } 802ac0c: b240 sxtb r0, r0 802ac0e: bdf8 pop {r3, r4, r5, r6, r7, pc} 802ac10: 200104e0 .word 0x200104e0 802ac14: 2000110a .word 0x2000110a 0802ac18 : * @see udp_disconnect() udp_send() */ err_t udp_sendto_if(struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif) { 802ac18: e92d 47ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr} 802ac1c: 4692 mov sl, r2 return ERR_VAL; } #endif /* IP_SOF_BROADCAST */ /* if the PCB is not yet bound to a port, bind it here */ if (pcb->local_port == 0) { 802ac1e: 8a42 ldrh r2, [r0, #18] * @see udp_disconnect() udp_send() */ err_t udp_sendto_if(struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif) { 802ac20: f8dd 8030 ldr.w r8, [sp, #48] ; 0x30 802ac24: 4605 mov r5, r0 802ac26: 460e mov r6, r1 802ac28: 4699 mov r9, r3 return ERR_VAL; } #endif /* IP_SOF_BROADCAST */ /* if the PCB is not yet bound to a port, bind it here */ if (pcb->local_port == 0) { 802ac2a: b132 cbz r2, 802ac3a return err; } } /* not enough space to add an UDP header to first pbuf in given p chain? */ if (pbuf_header(p, UDP_HLEN)) { 802ac2c: 4630 mov r0, r6 802ac2e: 2108 movs r1, #8 802ac30: f7fd fb27 bl 8028282 802ac34: b940 cbnz r0, 802ac48 802ac36: 4634 mov r4, r6 802ac38: e013 b.n 802ac62 #endif /* IP_SOF_BROADCAST */ /* if the PCB is not yet bound to a port, bind it here */ if (pcb->local_port == 0) { LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE, ("udp_send: not yet bound to a port, binding now\n")); err = udp_bind(pcb, &pcb->local_ip, pcb->local_port); 802ac3a: 4601 mov r1, r0 802ac3c: f7ff ff9c bl 802ab78 if (err != ERR_OK) { 802ac40: 4607 mov r7, r0 802ac42: 2800 cmp r0, #0 802ac44: d0f2 beq.n 802ac2c 802ac46: e044 b.n 802acd2 } /* not enough space to add an UDP header to first pbuf in given p chain? */ if (pbuf_header(p, UDP_HLEN)) { /* allocate header in a separate new pbuf */ q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM); 802ac48: 2001 movs r0, #1 802ac4a: 2108 movs r1, #8 802ac4c: 2200 movs r2, #0 802ac4e: f7fd fb90 bl 8028372 /* new header pbuf could not be allocated? */ if (q == NULL) { 802ac52: 4604 mov r4, r0 802ac54: 2800 cmp r0, #0 802ac56: d039 beq.n 802accc LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: could not allocate header\n")); return ERR_MEM; } if (p->tot_len != 0) { 802ac58: 8933 ldrh r3, [r6, #8] 802ac5a: b113 cbz r3, 802ac62 /* chain header q in front of given pbuf p (only if p contains data) */ pbuf_chain(q, p); 802ac5c: 4631 mov r1, r6 802ac5e: f7fd fc36 bl 80284ce } LWIP_ASSERT("check that first pbuf can hold struct udp_hdr", (q->len >= sizeof(struct udp_hdr))); /* q now represents the packet to be sent */ udphdr = (struct udp_hdr *)q->payload; udphdr->src = htons(pcb->local_port); 802ac62: 8a68 ldrh r0, [r5, #18] LWIP_DEBUGF(UDP_DEBUG, ("udp_send: added header in given pbuf %p\n", (void *)p)); } LWIP_ASSERT("check that first pbuf can hold struct udp_hdr", (q->len >= sizeof(struct udp_hdr))); /* q now represents the packet to be sent */ udphdr = (struct udp_hdr *)q->payload; 802ac64: 6867 ldr r7, [r4, #4] udphdr->src = htons(pcb->local_port); 802ac66: f7fc f9f9 bl 802705c 802ac6a: 8038 strh r0, [r7, #0] udphdr->dest = htons(dst_port); 802ac6c: 4648 mov r0, r9 802ac6e: f7fc f9f5 bl 802705c /* in UDP, 0 checksum means 'no checksum' */ udphdr->chksum = 0x0000; 802ac72: 2300 movs r3, #0 LWIP_ASSERT("check that first pbuf can hold struct udp_hdr", (q->len >= sizeof(struct udp_hdr))); /* q now represents the packet to be sent */ udphdr = (struct udp_hdr *)q->payload; udphdr->src = htons(pcb->local_port); udphdr->dest = htons(dst_port); 802ac74: 8078 strh r0, [r7, #2] /* in UDP, 0 checksum means 'no checksum' */ udphdr->chksum = 0x0000; 802ac76: 71bb strb r3, [r7, #6] 802ac78: 71fb strb r3, [r7, #7] } #endif /* LWIP_IGMP */ /* PCB local address is IP_ANY_ADDR? */ if (ip_addr_isany(&pcb->local_ip)) { 802ac7a: 682b ldr r3, [r5, #0] 802ac7c: b913 cbnz r3, 802ac84 /* use outgoing network interface IP address as source address */ src_ip = &(netif->ip_addr); 802ac7e: f108 0904 add.w r9, r8, #4 802ac82: e00a b.n 802ac9a } else { /* check if UDP PCB local IP address is correct * this could be an old address if netif->ip_addr has changed */ if (!ip_addr_cmp(&(pcb->local_ip), &(netif->ip_addr))) { 802ac84: f8d8 2004 ldr.w r2, [r8, #4] 802ac88: 4293 cmp r3, r2 802ac8a: d005 beq.n 802ac98 /* local_ip doesn't match, drop the packet */ if (q != p) { 802ac8c: 42b4 cmp r4, r6 802ac8e: d01f beq.n 802acd0 /* free the header pbuf */ pbuf_free(q); 802ac90: 4620 mov r0, r4 802ac92: f7fd fb21 bl 80282d8 802ac96: e01b b.n 802acd0 } #endif /* LWIP_IGMP */ /* PCB local address is IP_ANY_ADDR? */ if (ip_addr_isany(&pcb->local_ip)) { 802ac98: 46a9 mov r9, r5 NETIF_SET_HWADDRHINT(netif, NULL); } else #endif /* LWIP_UDPLITE */ { /* UDP */ LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP packet length %"U16_F"\n", q->tot_len)); udphdr->len = htons(q->tot_len); 802ac9a: 8920 ldrh r0, [r4, #8] 802ac9c: f7fc f9de bl 802705c 802aca0: 80b8 strh r0, [r7, #4] #endif /* CHECKSUM_GEN_UDP */ LWIP_DEBUGF(UDP_DEBUG, ("udp_send: UDP checksum 0x%04"X16_F"\n", udphdr->chksum)); LWIP_DEBUGF(UDP_DEBUG, ("udp_send: ip_output_if (,,,,IP_PROTO_UDP,)\n")); /* output to IP */ NETIF_SET_HWADDRHINT(netif, &pcb->addr_hint); err = ip_output_if(q, src_ip, dst_ip, pcb->ttl, pcb->tos, IP_PROTO_UDP, netif); 802aca2: 7a6a ldrb r2, [r5, #9] 802aca4: 7aab ldrb r3, [r5, #10] 802aca6: 9200 str r2, [sp, #0] 802aca8: 2211 movs r2, #17 802acaa: 9201 str r2, [sp, #4] 802acac: 4649 mov r1, r9 802acae: 4652 mov r2, sl 802acb0: f8cd 8008 str.w r8, [sp, #8] 802acb4: 4620 mov r0, r4 802acb6: f000 fb9d bl 802b3f4 802acba: 4607 mov r7, r0 NETIF_SET_HWADDRHINT(netif, NULL); } /* TODO: must this be increased even if error occured? */ snmp_inc_udpoutdatagrams(); 802acbc: f002 f924 bl 802cf08 /* did we chain a separate header pbuf earlier? */ if (q != p) { 802acc0: 42b4 cmp r4, r6 802acc2: d006 beq.n 802acd2 /* free the header pbuf */ pbuf_free(q); 802acc4: 4620 mov r0, r4 802acc6: f7fd fb07 bl 80282d8 802acca: e002 b.n 802acd2 /* allocate header in a separate new pbuf */ q = pbuf_alloc(PBUF_IP, UDP_HLEN, PBUF_RAM); /* new header pbuf could not be allocated? */ if (q == NULL) { LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: could not allocate header\n")); return ERR_MEM; 802accc: 27ff movs r7, #255 ; 0xff 802acce: e000 b.n 802acd2 /* free the header pbuf */ pbuf_free(q); q = NULL; /* p is still referenced by the caller, and will live on */ } return ERR_VAL; 802acd0: 27fa movs r7, #250 ; 0xfa /* p is still referenced by the caller, and will live on */ } UDP_STATS_INC(udp.xmit); return err; } 802acd2: b278 sxtb r0, r7 802acd4: b004 add sp, #16 802acd6: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 0802acda : * @see udp_disconnect() udp_send() */ err_t udp_sendto(struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *dst_ip, u16_t dst_port) { 802acda: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 802acdc: 4605 mov r5, r0 /* find the outgoing network interface for this packet */ #if LWIP_IGMP netif = ip_route((ip_addr_ismulticast(dst_ip))?(&(pcb->multicast_ip)):(dst_ip)); #else netif = ip_route(dst_ip); 802acde: 4610 mov r0, r2 * @see udp_disconnect() udp_send() */ err_t udp_sendto(struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *dst_ip, u16_t dst_port) { 802ace0: 460f mov r7, r1 802ace2: 4614 mov r4, r2 802ace4: 461e mov r6, r3 /* find the outgoing network interface for this packet */ #if LWIP_IGMP netif = ip_route((ip_addr_ismulticast(dst_ip))?(&(pcb->multicast_ip)):(dst_ip)); #else netif = ip_route(dst_ip); 802ace6: f000 fa81 bl 802b1ec #endif /* LWIP_IGMP */ /* no outgoing network interface could be found? */ if (netif == NULL) { 802acea: b138 cbz r0, 802acfc return ERR_RTE; } #if LWIP_CHECKSUM_ON_COPY return udp_sendto_if_chksum(pcb, p, dst_ip, dst_port, netif, have_chksum, chksum); #else /* LWIP_CHECKSUM_ON_COPY */ return udp_sendto_if(pcb, p, dst_ip, dst_port, netif); 802acec: 9000 str r0, [sp, #0] 802acee: 4639 mov r1, r7 802acf0: 4628 mov r0, r5 802acf2: 4622 mov r2, r4 802acf4: 4633 mov r3, r6 802acf6: f7ff ff8f bl 802ac18 802acfa: e000 b.n 802acfe /* no outgoing network interface could be found? */ if (netif == NULL) { LWIP_DEBUGF(UDP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("udp_send: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", ip4_addr1_16(dst_ip), ip4_addr2_16(dst_ip), ip4_addr3_16(dst_ip), ip4_addr4_16(dst_ip))); UDP_STATS_INC(udp.rterr); return ERR_RTE; 802acfc: 20fc movs r0, #252 ; 0xfc #if LWIP_CHECKSUM_ON_COPY return udp_sendto_if_chksum(pcb, p, dst_ip, dst_port, netif, have_chksum, chksum); #else /* LWIP_CHECKSUM_ON_COPY */ return udp_sendto_if(pcb, p, dst_ip, dst_port, netif); #endif /* LWIP_CHECKSUM_ON_COPY */ } 802acfe: b240 sxtb r0, r0 802ad00: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 0802ad02 : */ err_t udp_send(struct udp_pcb *pcb, struct pbuf *p) { /* send to the packet using remote ip and port stored in the pcb */ return udp_sendto(pcb, p, &pcb->remote_ip, pcb->remote_port); 802ad02: 8a83 ldrh r3, [r0, #20] 802ad04: 1d02 adds r2, r0, #4 802ad06: f7ff bfe8 b.w 802acda 802ad0a: 0000 movs r0, r0 0802ad0c : * * @see udp_disconnect() */ err_t udp_connect(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 802ad0c: b570 push {r4, r5, r6, lr} 802ad0e: 4616 mov r6, r2 struct udp_pcb *ipcb; if (pcb->local_port == 0) { 802ad10: 8a42 ldrh r2, [r0, #18] * * @see udp_disconnect() */ err_t udp_connect(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { 802ad12: 4604 mov r4, r0 802ad14: 460d mov r5, r1 struct udp_pcb *ipcb; if (pcb->local_port == 0) { 802ad16: b10a cbz r2, 802ad1c if (err != ERR_OK) { return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); 802ad18: b935 cbnz r5, 802ad28 802ad1a: e006 b.n 802ad2a udp_connect(struct udp_pcb *pcb, ip_addr_t *ipaddr, u16_t port) { struct udp_pcb *ipcb; if (pcb->local_port == 0) { err_t err = udp_bind(pcb, &pcb->local_ip, pcb->local_port); 802ad1c: 4601 mov r1, r0 802ad1e: f7ff ff2b bl 802ab78 if (err != ERR_OK) { 802ad22: 2800 cmp r0, #0 802ad24: d0f8 beq.n 802ad18 802ad26: e013 b.n 802ad50 return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); 802ad28: 682d ldr r5, [r5, #0] pcb->remote_port = port; pcb->flags |= UDP_FLAGS_CONNECTED; 802ad2a: 7c23 ldrb r3, [r4, #16] ip4_addr1_16(&pcb->local_ip), ip4_addr2_16(&pcb->local_ip), ip4_addr3_16(&pcb->local_ip), ip4_addr4_16(&pcb->local_ip), pcb->local_port)); /* Insert UDP PCB into the list of active UDP PCBs. */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 802ad2c: 4a09 ldr r2, [pc, #36] ; (802ad54 ) if (err != ERR_OK) { return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); 802ad2e: 6065 str r5, [r4, #4] pcb->remote_port = port; pcb->flags |= UDP_FLAGS_CONNECTED; 802ad30: f043 0304 orr.w r3, r3, #4 802ad34: 7423 strb r3, [r4, #16] ip4_addr1_16(&pcb->local_ip), ip4_addr2_16(&pcb->local_ip), ip4_addr3_16(&pcb->local_ip), ip4_addr4_16(&pcb->local_ip), pcb->local_port)); /* Insert UDP PCB into the list of active UDP PCBs. */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 802ad36: 6813 ldr r3, [r2, #0] return err; } } ip_addr_set(&pcb->remote_ip, ipaddr); pcb->remote_port = port; 802ad38: 82a6 strh r6, [r4, #20] ip4_addr1_16(&pcb->local_ip), ip4_addr2_16(&pcb->local_ip), ip4_addr3_16(&pcb->local_ip), ip4_addr4_16(&pcb->local_ip), pcb->local_port)); /* Insert UDP PCB into the list of active UDP PCBs. */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 802ad3a: 4618 mov r0, r3 802ad3c: e002 b.n 802ad44 if (pcb == ipcb) { 802ad3e: 4284 cmp r4, r0 802ad40: d005 beq.n 802ad4e ip4_addr1_16(&pcb->local_ip), ip4_addr2_16(&pcb->local_ip), ip4_addr3_16(&pcb->local_ip), ip4_addr4_16(&pcb->local_ip), pcb->local_port)); /* Insert UDP PCB into the list of active UDP PCBs. */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { 802ad42: 68c0 ldr r0, [r0, #12] 802ad44: 2800 cmp r0, #0 802ad46: d1fa bne.n 802ad3e /* already on the list, just return */ return ERR_OK; } } /* PCB not yet on the list, add PCB now */ pcb->next = udp_pcbs; 802ad48: 60e3 str r3, [r4, #12] udp_pcbs = pcb; 802ad4a: 6014 str r4, [r2, #0] return ERR_OK; 802ad4c: e000 b.n 802ad50 /* Insert UDP PCB into the list of active UDP PCBs. */ for (ipcb = udp_pcbs; ipcb != NULL; ipcb = ipcb->next) { if (pcb == ipcb) { /* already on the list, just return */ return ERR_OK; 802ad4e: 2000 movs r0, #0 } /* PCB not yet on the list, add PCB now */ pcb->next = udp_pcbs; udp_pcbs = pcb; return ERR_OK; } 802ad50: b240 sxtb r0, r0 802ad52: bd70 pop {r4, r5, r6, pc} 802ad54: 200104e0 .word 0x200104e0 0802ad58 : */ void udp_disconnect(struct udp_pcb *pcb) { /* reset remote address association */ ip_addr_set_any(&pcb->remote_ip); 802ad58: 2300 movs r3, #0 802ad5a: 6043 str r3, [r0, #4] pcb->remote_port = 0; 802ad5c: 8283 strh r3, [r0, #20] /* mark PCB as unconnected */ pcb->flags &= ~UDP_FLAGS_CONNECTED; 802ad5e: 7c03 ldrb r3, [r0, #16] 802ad60: f023 0304 bic.w r3, r3, #4 802ad64: 7403 strb r3, [r0, #16] 802ad66: 4770 bx lr 0802ad68 : */ void udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg) { /* remember recv() callback and user data */ pcb->recv = recv; 802ad68: 6181 str r1, [r0, #24] pcb->recv_arg = recv_arg; 802ad6a: 61c2 str r2, [r0, #28] 802ad6c: 4770 bx lr 802ad6e: 0000 movs r0, r0 0802ad70 : * * @see udp_new() */ void udp_remove(struct udp_pcb *pcb) { 802ad70: b510 push {r4, lr} 802ad72: 4604 mov r4, r0 struct udp_pcb *pcb2; snmp_delete_udpidx_tree(pcb); 802ad74: f002 f914 bl 802cfa0 /* pcb to be removed is first in list? */ if (udp_pcbs == pcb) { 802ad78: 4a0a ldr r2, [pc, #40] ; (802ada4 ) 802ad7a: 6813 ldr r3, [r2, #0] 802ad7c: 42a3 cmp r3, r4 802ad7e: d109 bne.n 802ad94 /* make list start at 2nd pcb */ udp_pcbs = udp_pcbs->next; 802ad80: 68e3 ldr r3, [r4, #12] 802ad82: 6013 str r3, [r2, #0] 802ad84: e008 b.n 802ad98 /* pcb not 1st in list */ } else { for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { /* find pcb in udp_pcbs list */ if (pcb2->next != NULL && pcb2->next == pcb) { 802ad86: 68da ldr r2, [r3, #12] 802ad88: b11a cbz r2, 802ad92 802ad8a: 42a2 cmp r2, r4 /* remove pcb from list */ pcb2->next = pcb->next; 802ad8c: bf04 itt eq 802ad8e: 68e2 ldreq r2, [r4, #12] 802ad90: 60da streq r2, [r3, #12] if (udp_pcbs == pcb) { /* make list start at 2nd pcb */ udp_pcbs = udp_pcbs->next; /* pcb not 1st in list */ } else { for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { 802ad92: 68db ldr r3, [r3, #12] 802ad94: 2b00 cmp r3, #0 802ad96: d1f6 bne.n 802ad86 /* remove pcb from list */ pcb2->next = pcb->next; } } } memp_free(MEMP_UDP_PCB, pcb); 802ad98: 2001 movs r0, #1 802ad9a: 4621 mov r1, r4 } 802ad9c: e8bd 4010 ldmia.w sp!, {r4, lr} /* remove pcb from list */ pcb2->next = pcb->next; } } } memp_free(MEMP_UDP_PCB, pcb); 802ada0: f7fd b990 b.w 80280c4 802ada4: 200104e0 .word 0x200104e0 0802ada8 : * * @see udp_remove() */ struct udp_pcb * udp_new(void) { 802ada8: b510 push {r4, lr} struct udp_pcb *pcb; pcb = (struct udp_pcb *)memp_malloc(MEMP_UDP_PCB); 802adaa: 2001 movs r0, #1 802adac: f7fd f974 bl 8028098 /* could allocate UDP PCB? */ if (pcb != NULL) { 802adb0: 4604 mov r4, r0 802adb2: b128 cbz r0, 802adc0 /* UDP Lite: by initializing to all zeroes, chksum_len is set to 0 * which means checksum is generated over the whole datagram per default * (recommended as default by RFC 3828). */ /* initialize PCB to all zeroes */ memset(pcb, 0, sizeof(struct udp_pcb)); 802adb4: 2100 movs r1, #0 802adb6: 2220 movs r2, #32 802adb8: f7f6 fca2 bl 8021700 pcb->ttl = UDP_TTL; 802adbc: 23ff movs r3, #255 ; 0xff 802adbe: 72a3 strb r3, [r4, #10] } return pcb; } 802adc0: 4620 mov r0, r4 802adc2: bd10 pop {r4, pc} 0802adc4 : * @param p the icmp echo request packet, p->payload pointing to the ip header * @param inp the netif on which this packet was received */ void icmp_input(struct pbuf *p, struct netif *inp) { 802adc4: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 802adc8: 4604 mov r4, r0 802adca: b085 sub sp, #20 802adcc: 460f mov r7, r1 struct icmp_echo_hdr *iecho; struct ip_hdr *iphdr; s16_t hlen; ICMP_STATS_INC(icmp.recv); snmp_inc_icmpinmsgs(); 802adce: f002 f81b bl 802ce08 iphdr = (struct ip_hdr *)p->payload; 802add2: 6865 ldr r5, [r4, #4] hlen = IPH_HL(iphdr) * 4; 802add4: f895 8000 ldrb.w r8, [r5] 802add8: f008 080f and.w r8, r8, #15 802addc: ea4f 0888 mov.w r8, r8, lsl #2 if (pbuf_header(p, -hlen) || (p->tot_len < sizeof(u16_t)*2)) { 802ade0: f1c8 0900 rsb r9, r8, #0 802ade4: 4620 mov r0, r4 802ade6: fa0f f189 sxth.w r1, r9 802adea: f7fd fa4a bl 8028282 802adee: 2800 cmp r0, #0 802adf0: d172 bne.n 802aed8 802adf2: 8923 ldrh r3, [r4, #8] 802adf4: 2b03 cmp r3, #3 802adf6: d96f bls.n 802aed8 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: short ICMP (%"U16_F" bytes) received\n", p->tot_len)); goto lenerr; } type = *((u8_t *)p->payload); 802adf8: 6863 ldr r3, [r4, #4] #ifdef LWIP_DEBUG code = *(((u8_t *)p->payload)+1); #endif /* LWIP_DEBUG */ switch (type) { 802adfa: 781b ldrb r3, [r3, #0] 802adfc: 2b08 cmp r3, #8 802adfe: d165 bne.n 802aecc #if !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING { int accepted = 1; #if !LWIP_MULTICAST_PING /* multicast destination address? */ if (ip_addr_ismulticast(¤t_iphdr_dest)) { 802ae00: 4b39 ldr r3, [pc, #228] ; (802aee8 ) 802ae02: 681e ldr r6, [r3, #0] accepted = 0; } #endif /* LWIP_MULTICAST_PING */ #if !LWIP_BROADCAST_PING /* broadcast destination address? */ if (ip_addr_isbroadcast(¤t_iphdr_dest, inp)) { 802ae04: 4639 mov r1, r7 802ae06: 4630 mov r0, r6 802ae08: f000 f900 bl 802b00c 802ae0c: 2800 cmp r0, #0 802ae0e: d15d bne.n 802aecc #if !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING { int accepted = 1; #if !LWIP_MULTICAST_PING /* multicast destination address? */ if (ip_addr_ismulticast(¤t_iphdr_dest)) { 802ae10: f006 06f0 and.w r6, r6, #240 ; 0xf0 if (ip_addr_isbroadcast(¤t_iphdr_dest, inp)) { accepted = 0; } #endif /* LWIP_BROADCAST_PING */ /* broadcast or multicast destination address not acceptd? */ if (!accepted) { 802ae14: 2ee0 cmp r6, #224 ; 0xe0 802ae16: d100 bne.n 802ae1a 802ae18: e058 b.n 802aecc return; } } #endif /* !LWIP_MULTICAST_PING || !LWIP_BROADCAST_PING */ LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ping\n")); if (p->tot_len < sizeof(struct icmp_echo_hdr)) { 802ae1a: 8923 ldrh r3, [r4, #8] 802ae1c: 2b07 cmp r3, #7 802ae1e: d95b bls.n 802aed8 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: bad ICMP echo received\n")); goto lenerr; } if (inet_chksum_pbuf(p) != 0) { 802ae20: 4620 mov r0, r4 802ae22: f000 f8cf bl 802afc4 802ae26: b100 cbz r0, 802ae2a 802ae28: e056 b.n 802aed8 ICMP_STATS_INC(icmp.chkerr); snmp_inc_icmpinerrors(); return; } #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN if (pbuf_header(p, (PBUF_IP_HLEN + PBUF_LINK_HLEN))) { 802ae2a: 4620 mov r0, r4 802ae2c: 2122 movs r1, #34 ; 0x22 ICMP_STATS_INC(icmp.recv); snmp_inc_icmpinmsgs(); iphdr = (struct ip_hdr *)p->payload; hlen = IPH_HL(iphdr) * 4; 802ae2e: fa1f f888 uxth.w r8, r8 ICMP_STATS_INC(icmp.chkerr); snmp_inc_icmpinerrors(); return; } #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN if (pbuf_header(p, (PBUF_IP_HLEN + PBUF_LINK_HLEN))) { 802ae32: f7fd fa26 bl 8028282 802ae36: b1f8 cbz r0, 802ae78 /* p is not big enough to contain link headers * allocate a new one and copy p into it */ struct pbuf *r; /* switch p->payload to ip header */ if (pbuf_header(p, hlen)) { 802ae38: 4620 mov r0, r4 802ae3a: 4641 mov r1, r8 802ae3c: f7fd fa21 bl 8028282 802ae40: 4602 mov r2, r0 802ae42: 2800 cmp r0, #0 802ae44: d148 bne.n 802aed8 LWIP_ASSERT("icmp_input: moving p->payload to ip header failed\n", 0); goto memerr; } /* allocate new packet buffer with space for link headers */ r = pbuf_alloc(PBUF_LINK, p->tot_len, PBUF_RAM); 802ae46: 2002 movs r0, #2 802ae48: 8921 ldrh r1, [r4, #8] 802ae4a: f7fd fa92 bl 8028372 if (r == NULL) { 802ae4e: 4606 mov r6, r0 802ae50: 2800 cmp r0, #0 802ae52: d041 beq.n 802aed8 goto memerr; } LWIP_ASSERT("check that first pbuf can hold struct the ICMP header", (r->len >= hlen + sizeof(struct icmp_echo_hdr))); /* copy the whole packet including ip header */ if (pbuf_copy(r, p) != ERR_OK) { 802ae54: 4621 mov r1, r4 802ae56: f7fd fb43 bl 80284e0 802ae5a: 2800 cmp r0, #0 802ae5c: d13c bne.n 802aed8 LWIP_ASSERT("icmp_input: copying to new pbuf failed\n", 0); goto memerr; } iphdr = (struct ip_hdr *)r->payload; /* switch r->payload back to icmp header */ if (pbuf_header(r, -hlen)) { 802ae5e: 4630 mov r0, r6 802ae60: fa0f f189 sxth.w r1, r9 /* copy the whole packet including ip header */ if (pbuf_copy(r, p) != ERR_OK) { LWIP_ASSERT("icmp_input: copying to new pbuf failed\n", 0); goto memerr; } iphdr = (struct ip_hdr *)r->payload; 802ae64: 6875 ldr r5, [r6, #4] /* switch r->payload back to icmp header */ if (pbuf_header(r, -hlen)) { 802ae66: f7fd fa0c bl 8028282 802ae6a: 2800 cmp r0, #0 802ae6c: d134 bne.n 802aed8 LWIP_ASSERT("icmp_input: restoring original p->payload failed\n", 0); goto memerr; } /* free the original p */ pbuf_free(p); 802ae6e: 4620 mov r0, r4 802ae70: f7fd fa32 bl 80282d8 802ae74: 4634 mov r4, r6 802ae76: e006 b.n 802ae86 /* we now have an identical copy of p that has room for link headers */ p = r; } else { /* restore p->payload to point to icmp header */ if (pbuf_header(p, -(s16_t)(PBUF_IP_HLEN + PBUF_LINK_HLEN))) { 802ae78: 4620 mov r0, r4 802ae7a: f06f 0121 mvn.w r1, #33 ; 0x21 802ae7e: f7fd fa00 bl 8028282 802ae82: 2800 cmp r0, #0 802ae84: d128 bne.n 802aed8 #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ /* At this point, all checks are OK. */ /* We generate an answer by switching the dest and src ip addresses, * setting the icmp type to ECHO_RESPONSE and updating the checksum. */ iecho = (struct icmp_echo_hdr *)p->payload; ip_addr_copy(iphdr->src, *ip_current_dest_addr()); 802ae86: f8df 9060 ldr.w r9, [pc, #96] ; 802aee8 } #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ /* At this point, all checks are OK. */ /* We generate an answer by switching the dest and src ip addresses, * setting the icmp type to ECHO_RESPONSE and updating the checksum. */ iecho = (struct icmp_echo_hdr *)p->payload; 802ae8a: 6863 ldr r3, [r4, #4] ip_addr_copy(iphdr->src, *ip_current_dest_addr()); 802ae8c: f8d9 2000 ldr.w r2, [r9] 802ae90: 60ea str r2, [r5, #12] ip_addr_copy(iphdr->dest, *ip_current_src_addr()); 802ae92: 4a16 ldr r2, [pc, #88] ; (802aeec ) 802ae94: 6812 ldr r2, [r2, #0] #else // CHECKSUM_GEN_ICMP iecho->chksum = 0; #endif // CHECKSUM_GEN_ICMP */ /* Set the correct TTL and recalculate the header checksum. */ IPH_TTL_SET(iphdr, ICMP_TTL); 802ae96: 26ff movs r6, #255 ; 0xff /* At this point, all checks are OK. */ /* We generate an answer by switching the dest and src ip addresses, * setting the icmp type to ECHO_RESPONSE and updating the checksum. */ iecho = (struct icmp_echo_hdr *)p->payload; ip_addr_copy(iphdr->src, *ip_current_dest_addr()); ip_addr_copy(iphdr->dest, *ip_current_src_addr()); 802ae98: 612a str r2, [r5, #16] ICMPH_TYPE_SET(iecho, ICMP_ER); 802ae9a: 2200 movs r2, #0 802ae9c: 701a strb r2, [r3, #0] //----------------------------------------------------------- // Добавил фикс 15.08.15. // Фикс исправляет баг с пингом. #ifdef CHECKSUM_BY_HARDWARE iecho->chksum = 0; 802ae9e: 709a strb r2, [r3, #2] 802aea0: 70da strb r2, [r3, #3] iecho->chksum = 0; #endif // CHECKSUM_GEN_ICMP */ /* Set the correct TTL and recalculate the header checksum. */ IPH_TTL_SET(iphdr, ICMP_TTL); IPH_CHKSUM_SET(iphdr, 0); 802aea2: 72aa strb r2, [r5, #10] 802aea4: 72ea strb r2, [r5, #11] #else // CHECKSUM_GEN_ICMP iecho->chksum = 0; #endif // CHECKSUM_GEN_ICMP */ /* Set the correct TTL and recalculate the header checksum. */ IPH_TTL_SET(iphdr, ICMP_TTL); 802aea6: 722e strb r6, [r5, #8] IPH_CHKSUM_SET(iphdr, inet_chksum(iphdr, IP_HLEN)); #endif /* CHECKSUM_GEN_IP */ ICMP_STATS_INC(icmp.xmit); /* increase number of messages attempted to send */ snmp_inc_icmpoutmsgs(); 802aea8: f001 ffbe bl 802ce28 /* increase number of echo replies attempted to send */ snmp_inc_icmpoutechoreps(); 802aeac: f001 ffcc bl 802ce48 if(pbuf_header(p, hlen)) { 802aeb0: 4620 mov r0, r4 802aeb2: 4641 mov r1, r8 802aeb4: f7fd f9e5 bl 8028282 802aeb8: 4602 mov r2, r0 802aeba: b938 cbnz r0, 802aecc LWIP_ASSERT("Can't move over header in packet", 0); } else { err_t ret; /* send an ICMP packet, src addr is the dest addr of the curren packet */ ret = ip_output_if(p, ip_current_dest_addr(), IP_HDRINCL, 802aebc: 2301 movs r3, #1 802aebe: e88d 0089 stmia.w sp, {r0, r3, r7} 802aec2: 4620 mov r0, r4 802aec4: 4649 mov r1, r9 802aec6: 4633 mov r3, r6 802aec8: f000 fa94 bl 802b3f4 LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n", (s16_t)type, (s16_t)code)); ICMP_STATS_INC(icmp.proterr); ICMP_STATS_INC(icmp.drop); } pbuf_free(p); 802aecc: 4620 mov r0, r4 pbuf_free(p); ICMP_STATS_INC(icmp.err); snmp_inc_icmpinerrors(); return; #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ } 802aece: b005 add sp, #20 802aed0: e8bd 43f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, lr} LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n", (s16_t)type, (s16_t)code)); ICMP_STATS_INC(icmp.proterr); ICMP_STATS_INC(icmp.drop); } pbuf_free(p); 802aed4: f7fd ba00 b.w 80282d8 ICMP_STATS_INC(icmp.lenerr); snmp_inc_icmpinerrors(); return; #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN memerr: pbuf_free(p); 802aed8: 4620 mov r0, r4 802aeda: f7fd f9fd bl 80282d8 ICMP_STATS_INC(icmp.err); snmp_inc_icmpinerrors(); return; #endif /* LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN */ } 802aede: b005 add sp, #20 802aee0: e8bd 43f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, lr} return; #if LWIP_ICMP_ECHO_CHECK_INPUT_PBUF_LEN memerr: pbuf_free(p); ICMP_STATS_INC(icmp.err); snmp_inc_icmpinerrors(); 802aee4: f001 bf98 b.w 802ce18 802aee8: 200104ec .word 0x200104ec 802aeec: 200104e4 .word 0x200104e4 0802aef0 : * p->payload pointing to the IP header * @param t type of the 'unreachable' packet */ void icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t) { 802aef0: e92d 41ff stmdb sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, lr} 802aef4: 4607 mov r7, r0 802aef6: 460d mov r5, r1 /* we can use the echo header here */ struct icmp_echo_hdr *icmphdr; ip_addr_t iphdr_src; /* ICMP header + IP header + 8 bytes of data */ q = pbuf_alloc(PBUF_IP, sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE, 802aef8: 2001 movs r0, #1 802aefa: 2124 movs r1, #36 ; 0x24 802aefc: 2200 movs r2, #0 802aefe: f7fd fa38 bl 8028372 PBUF_RAM); if (q == NULL) { 802af02: 4606 mov r6, r0 802af04: b358 cbz r0, 802af5e ip_addr_debug_print(ICMP_DEBUG, &(iphdr->src)); LWIP_DEBUGF(ICMP_DEBUG, (" to ")); ip_addr_debug_print(ICMP_DEBUG, &(iphdr->dest)); LWIP_DEBUGF(ICMP_DEBUG, ("\n")); icmphdr = (struct icmp_echo_hdr *)q->payload; 802af06: 6844 ldr r4, [r0, #4] return; } LWIP_ASSERT("check that first pbuf can hold icmp message", (q->len >= (sizeof(struct icmp_echo_hdr) + IP_HLEN + ICMP_DEST_UNREACH_DATASIZE))); iphdr = (struct ip_hdr *)p->payload; 802af08: f8d7 8004 ldr.w r8, [r7, #4] ip_addr_debug_print(ICMP_DEBUG, &(iphdr->dest)); LWIP_DEBUGF(ICMP_DEBUG, ("\n")); icmphdr = (struct icmp_echo_hdr *)q->payload; icmphdr->type = type; icmphdr->code = code; 802af0c: 7065 strb r5, [r4, #1] LWIP_DEBUGF(ICMP_DEBUG, (" to ")); ip_addr_debug_print(ICMP_DEBUG, &(iphdr->dest)); LWIP_DEBUGF(ICMP_DEBUG, ("\n")); icmphdr = (struct icmp_echo_hdr *)q->payload; icmphdr->type = type; 802af0e: 2303 movs r3, #3 icmphdr->code = code; icmphdr->id = 0; 802af10: 2500 movs r5, #0 LWIP_DEBUGF(ICMP_DEBUG, (" to ")); ip_addr_debug_print(ICMP_DEBUG, &(iphdr->dest)); LWIP_DEBUGF(ICMP_DEBUG, ("\n")); icmphdr = (struct icmp_echo_hdr *)q->payload; icmphdr->type = type; 802af12: 7023 strb r3, [r4, #0] icmphdr->code = code; icmphdr->id = 0; 802af14: 7125 strb r5, [r4, #4] 802af16: 7165 strb r5, [r4, #5] icmphdr->seqno = 0; 802af18: 71a5 strb r5, [r4, #6] 802af1a: 71e5 strb r5, [r4, #7] /* copy fields from original packet */ SMEMCPY((u8_t *)q->payload + sizeof(struct icmp_echo_hdr), (u8_t *)p->payload, 802af1c: 6840 ldr r0, [r0, #4] 802af1e: 6879 ldr r1, [r7, #4] 802af20: 221c movs r2, #28 802af22: 3008 adds r0, #8 802af24: f7f6 fb32 bl 802158c IP_HLEN + ICMP_DEST_UNREACH_DATASIZE); /* calculate checksum */ icmphdr->chksum = 0; 802af28: 70a5 strb r5, [r4, #2] 802af2a: 70e5 strb r5, [r4, #3] icmphdr->chksum = inet_chksum(icmphdr, q->len); 802af2c: 8971 ldrh r1, [r6, #10] 802af2e: 4620 mov r0, r4 802af30: f000 f842 bl 802afb8 802af34: 8060 strh r0, [r4, #2] ICMP_STATS_INC(icmp.xmit); /* increase number of messages attempted to send */ snmp_inc_icmpoutmsgs(); 802af36: f001 ff77 bl 802ce28 /* increase number of destination unreachable messages attempted to send */ snmp_inc_icmpouttimeexcds(); 802af3a: f001 ff7d bl 802ce38 ip_addr_copy(iphdr_src, iphdr->src); 802af3e: f8d8 300c ldr.w r3, [r8, #12] 802af42: aa04 add r2, sp, #16 ip_output(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP); 802af44: 4630 mov r0, r6 ICMP_STATS_INC(icmp.xmit); /* increase number of messages attempted to send */ snmp_inc_icmpoutmsgs(); /* increase number of destination unreachable messages attempted to send */ snmp_inc_icmpouttimeexcds(); ip_addr_copy(iphdr_src, iphdr->src); 802af46: f842 3d04 str.w r3, [r2, #-4]! ip_output(q, NULL, &iphdr_src, ICMP_TTL, 0, IP_PROTO_ICMP); 802af4a: 2301 movs r3, #1 802af4c: 9301 str r3, [sp, #4] 802af4e: 9500 str r5, [sp, #0] 802af50: 4629 mov r1, r5 802af52: 23ff movs r3, #255 ; 0xff 802af54: f000 fa9e bl 802b494 pbuf_free(q); 802af58: 4630 mov r0, r6 802af5a: f7fd f9bd bl 80282d8 */ void icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t) { icmp_send_response(p, ICMP_DUR, t); } 802af5e: e8bd 81ff ldmia.w sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, pc} 0802af62 : * @return host order (!) lwip checksum (non-inverted Internet sum) */ static u16_t lwip_standard_chksum(void *dataptr, int len) { 802af62: b513 push {r0, r1, r4, lr} u8_t *pb = (u8_t *)dataptr; u16_t *ps, t = 0; 802af64: 2300 movs r3, #0 u32_t sum = 0; int odd = ((mem_ptr_t)pb & 1); /* Get aligned to u16_t */ if (odd && len > 0) { 802af66: f010 0201 ands.w r2, r0, #1 static u16_t lwip_standard_chksum(void *dataptr, int len) { u8_t *pb = (u8_t *)dataptr; u16_t *ps, t = 0; 802af6a: f8ad 3006 strh.w r3, [sp, #6] u32_t sum = 0; int odd = ((mem_ptr_t)pb & 1); /* Get aligned to u16_t */ if (odd && len > 0) { 802af6e: d006 beq.n 802af7e 802af70: 4299 cmp r1, r3 802af72: dd04 ble.n 802af7e ((u8_t *)&t)[1] = *pb++; 802af74: f810 3b01 ldrb.w r3, [r0], #1 len--; 802af78: 3901 subs r1, #1 u32_t sum = 0; int odd = ((mem_ptr_t)pb & 1); /* Get aligned to u16_t */ if (odd && len > 0) { ((u8_t *)&t)[1] = *pb++; 802af7a: f88d 3007 strb.w r3, [sp, #7] static u16_t lwip_standard_chksum(void *dataptr, int len) { u8_t *pb = (u8_t *)dataptr; u16_t *ps, t = 0; u32_t sum = 0; 802af7e: 2300 movs r3, #0 len--; } /* Add the bulk of the data */ ps = (u16_t *)(void *)pb; while (len > 1) { 802af80: e003 b.n 802af8a sum += *ps++; 802af82: f830 4b02 ldrh.w r4, [r0], #2 len -= 2; 802af86: 3902 subs r1, #2 } /* Add the bulk of the data */ ps = (u16_t *)(void *)pb; while (len > 1) { sum += *ps++; 802af88: 191b adds r3, r3, r4 len--; } /* Add the bulk of the data */ ps = (u16_t *)(void *)pb; while (len > 1) { 802af8a: 2901 cmp r1, #1 802af8c: dcf9 bgt.n 802af82 len -= 2; } /* Consume left-over byte, if any */ if (len > 0) { ((u8_t *)&t)[0] = *(u8_t *)ps; 802af8e: bf04 itt eq 802af90: 7801 ldrbeq r1, [r0, #0] 802af92: f88d 1006 strbeq.w r1, [sp, #6] } /* Add end bytes */ sum += t; 802af96: f8bd 0006 ldrh.w r0, [sp, #6] 802af9a: 181b adds r3, r3, r0 /* Fold 32-bit sum to 16 bits calling this twice is propably faster than if statements... */ sum = FOLD_U32T(sum); 802af9c: b298 uxth r0, r3 802af9e: eb00 4313 add.w r3, r0, r3, lsr #16 sum = FOLD_U32T(sum); 802afa2: b298 uxth r0, r3 802afa4: eb00 4013 add.w r0, r0, r3, lsr #16 /* Swap if alignment was odd */ if (odd) { 802afa8: b122 cbz r2, 802afb4 sum = SWAP_BYTES_IN_WORD(sum); 802afaa: 0603 lsls r3, r0, #24 802afac: f3c0 2007 ubfx r0, r0, #8, #8 802afb0: ea40 4013 orr.w r0, r0, r3, lsr #16 } return (u16_t)sum; } 802afb4: b280 uxth r0, r0 802afb6: bd1c pop {r2, r3, r4, pc} 0802afb8 : * @return checksum (as u16_t) to be saved directly in the protocol header */ u16_t inet_chksum(void *dataptr, u16_t len) { 802afb8: b508 push {r3, lr} return ~LWIP_CHKSUM(dataptr, len); 802afba: f7ff ffd2 bl 802af62 802afbe: 43c0 mvns r0, r0 } 802afc0: b280 uxth r0, r0 802afc2: bd08 pop {r3, pc} 0802afc4 : * @param p pbuf chain over that the checksum should be calculated * @return checksum (as u16_t) to be saved directly in the protocol header */ u16_t inet_chksum_pbuf(struct pbuf *p) { 802afc4: b570 push {r4, r5, r6, lr} u32_t acc; struct pbuf *q; u8_t swapped; acc = 0; swapped = 0; 802afc6: 2600 movs r6, #0 * @param p pbuf chain over that the checksum should be calculated * @return checksum (as u16_t) to be saved directly in the protocol header */ u16_t inet_chksum_pbuf(struct pbuf *p) { 802afc8: 4605 mov r5, r0 u32_t acc; struct pbuf *q; u8_t swapped; acc = 0; 802afca: 4634 mov r4, r6 swapped = 0; for(q = p; q != NULL; q = q->next) { 802afcc: e013 b.n 802aff6 acc += LWIP_CHKSUM(q->payload, q->len); 802afce: 8969 ldrh r1, [r5, #10] 802afd0: 6868 ldr r0, [r5, #4] 802afd2: f7ff ffc6 bl 802af62 acc = FOLD_U32T(acc); if (q->len % 2 != 0) { 802afd6: 896b ldrh r3, [r5, #10] u8_t swapped; acc = 0; swapped = 0; for(q = p; q != NULL; q = q->next) { acc += LWIP_CHKSUM(q->payload, q->len); 802afd8: 1900 adds r0, r0, r4 acc = FOLD_U32T(acc); 802afda: b284 uxth r4, r0 if (q->len % 2 != 0) { 802afdc: 07d9 lsls r1, r3, #31 acc = 0; swapped = 0; for(q = p; q != NULL; q = q->next) { acc += LWIP_CHKSUM(q->payload, q->len); acc = FOLD_U32T(acc); 802afde: eb04 4410 add.w r4, r4, r0, lsr #16 if (q->len % 2 != 0) { 802afe2: d507 bpl.n 802aff4 swapped = 1 - swapped; acc = SWAP_BYTES_IN_WORD(acc); 802afe4: 0623 lsls r3, r4, #24 swapped = 0; for(q = p; q != NULL; q = q->next) { acc += LWIP_CHKSUM(q->payload, q->len); acc = FOLD_U32T(acc); if (q->len % 2 != 0) { swapped = 1 - swapped; 802afe6: f1c6 0601 rsb r6, r6, #1 acc = SWAP_BYTES_IN_WORD(acc); 802afea: f3c4 2407 ubfx r4, r4, #8, #8 swapped = 0; for(q = p; q != NULL; q = q->next) { acc += LWIP_CHKSUM(q->payload, q->len); acc = FOLD_U32T(acc); if (q->len % 2 != 0) { swapped = 1 - swapped; 802afee: b2f6 uxtb r6, r6 acc = SWAP_BYTES_IN_WORD(acc); 802aff0: ea44 4413 orr.w r4, r4, r3, lsr #16 struct pbuf *q; u8_t swapped; acc = 0; swapped = 0; for(q = p; q != NULL; q = q->next) { 802aff4: 682d ldr r5, [r5, #0] 802aff6: 2d00 cmp r5, #0 802aff8: d1e9 bne.n 802afce swapped = 1 - swapped; acc = SWAP_BYTES_IN_WORD(acc); } } if (swapped) { 802affa: b126 cbz r6, 802b006 acc = SWAP_BYTES_IN_WORD(acc); 802affc: 0623 lsls r3, r4, #24 802affe: f3c4 2407 ubfx r4, r4, #8, #8 802b002: ea44 4413 orr.w r4, r4, r3, lsr #16 } return (u16_t)~(acc & 0xffffUL); 802b006: 43e0 mvns r0, r4 } 802b008: b280 uxth r0, r0 802b00a: bd70 pop {r4, r5, r6, pc} 0802b00c : { ip_addr_t ipaddr; ip4_addr_set_u32(&ipaddr, addr); /* all ones (broadcast) or all zeroes (old skool broadcast) */ if ((~addr == IPADDR_ANY) || 802b00c: 1e43 subs r3, r0, #1 802b00e: 3303 adds r3, #3 802b010: d811 bhi.n 802b036 (addr == IPADDR_ANY)) { return 1; /* no broadcast support on this network interface? */ } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) { 802b012: f891 302d ldrb.w r3, [r1, #45] ; 0x2d 802b016: f003 0302 and.w r3, r3, #2 802b01a: b2db uxtb r3, r3 802b01c: b16b cbz r3, 802b03a /* the given address cannot be a broadcast address * nor can we check against any broadcast addresses */ return 0; /* address matches network interface address exactly? => no broadcast */ } else if (addr == ip4_addr_get_u32(&netif->ip_addr)) { 802b01e: 684a ldr r2, [r1, #4] 802b020: 4290 cmp r0, r2 802b022: d00a beq.n 802b03a return 0; /* on the same (sub) network... */ } else if (ip_addr_netcmp(&ipaddr, &(netif->ip_addr), &(netif->netmask)) 802b024: 688b ldr r3, [r1, #8] 802b026: 4042 eors r2, r0 802b028: 421a tst r2, r3 802b02a: d000 beq.n 802b02e 802b02c: e005 b.n 802b03a /* ...and host identifier bits are all ones? =>... */ && ((addr & ~ip4_addr_get_u32(&netif->netmask)) == 802b02e: 43db mvns r3, r3 802b030: 4018 ands r0, r3 802b032: 4298 cmp r0, r3 802b034: d101 bne.n 802b03a ip4_addr_set_u32(&ipaddr, addr); /* all ones (broadcast) or all zeroes (old skool broadcast) */ if ((~addr == IPADDR_ANY) || (addr == IPADDR_ANY)) { return 1; 802b036: 2001 movs r0, #1 802b038: 4770 bx lr /* no broadcast support on this network interface? */ } else if ((netif->flags & NETIF_FLAG_BROADCAST) == 0) { /* the given address cannot be a broadcast address * nor can we check against any broadcast addresses */ return 0; 802b03a: 2000 movs r0, #0 /* => network broadcast address */ return 1; } else { return 0; } } 802b03c: 4770 bx lr 0802b03e : * @param addr pointer to which to save the ip address in network order * @return 1 if cp could be converted to addr, 0 on failure */ int ipaddr_aton(const char *cp, ip_addr_t *addr) { 802b03e: b5f0 push {r4, r5, r6, r7, lr} u8_t base; char c; u32_t parts[4]; u32_t *pp = parts; c = *cp; 802b040: 7803 ldrb r3, [r0, #0] * @param addr pointer to which to save the ip address in network order * @return 1 if cp could be converted to addr, 0 on failure */ int ipaddr_aton(const char *cp, ip_addr_t *addr) { 802b042: b085 sub sp, #20 802b044: 460e mov r6, r1 u8_t base; char c; u32_t parts[4]; u32_t *pp = parts; c = *cp; 802b046: 2400 movs r4, #0 * @param cp IP address in ascii represenation (e.g. "127.0.0.1") * @param addr pointer to which to save the ip address in network order * @return 1 if cp could be converted to addr, 0 on failure */ int ipaddr_aton(const char *cp, ip_addr_t *addr) 802b048: aa00 add r2, sp, #0 802b04a: 18a7 adds r7, r4, r2 /* * Collect number up to ``.''. * Values are specified as for C: * 0x=hex, 0=octal, 1-9=decimal. */ if (!isdigit(c)) 802b04c: f1a3 0230 sub.w r2, r3, #48 ; 0x30 802b050: 2a09 cmp r2, #9 802b052: d86d bhi.n 802b130 return (0); val = 0; base = 10; if (c == '0') { 802b054: 2b30 cmp r3, #48 ; 0x30 802b056: d10b bne.n 802b070 c = *++cp; 802b058: 7843 ldrb r3, [r0, #1] if (c == 'x' || c == 'X') { 802b05a: 2b78 cmp r3, #120 ; 0x78 802b05c: d004 beq.n 802b068 802b05e: 2b58 cmp r3, #88 ; 0x58 802b060: d002 beq.n 802b068 if (!isdigit(c)) return (0); val = 0; base = 10; if (c == '0') { c = *++cp; 802b062: 3001 adds r0, #1 if (c == 'x' || c == 'X') { base = 16; c = *++cp; } else base = 8; 802b064: 2508 movs r5, #8 802b066: e004 b.n 802b072 base = 10; if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') { base = 16; c = *++cp; 802b068: 7883 ldrb r3, [r0, #2] val = 0; base = 10; if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') { base = 16; 802b06a: 2510 movs r5, #16 c = *++cp; 802b06c: 3002 adds r0, #2 802b06e: e000 b.n 802b072 * 0x=hex, 0=octal, 1-9=decimal. */ if (!isdigit(c)) return (0); val = 0; base = 10; 802b070: 250a movs r5, #10 802b072: 4602 mov r2, r0 if (c == '0') { c = *++cp; if (c == 'x' || c == 'X') { base = 16; 802b074: 2000 movs r0, #0 802b076: e000 b.n 802b07a 802b078: 3201 adds r2, #1 c = *++cp; } else base = 8; } for (;;) { if (isdigit(c)) { 802b07a: f1a3 0130 sub.w r1, r3, #48 ; 0x30 802b07e: 2909 cmp r1, #9 802b080: d803 bhi.n 802b08a val = (val * base) + (int)(c - '0'); 802b082: fb05 3000 mla r0, r5, r0, r3 802b086: 3830 subs r0, #48 ; 0x30 802b088: e013 b.n 802b0b2 c = *++cp; } else if (base == 16 && isxdigit(c)) { 802b08a: 2d10 cmp r5, #16 802b08c: d113 bne.n 802b0b6 802b08e: f1a3 0161 sub.w r1, r3, #97 ; 0x61 802b092: b2c9 uxtb r1, r1 802b094: 2905 cmp r1, #5 802b096: d904 bls.n 802b0a2 802b098: f1a3 0c41 sub.w ip, r3, #65 ; 0x41 802b09c: f1bc 0f05 cmp.w ip, #5 802b0a0: d809 bhi.n 802b0b6 val = (val << 4) | (int)(c + 10 - (islower(c) ? 'a' : 'A')); 802b0a2: 330a adds r3, #10 802b0a4: 2919 cmp r1, #25 802b0a6: bf8c ite hi 802b0a8: 2141 movhi r1, #65 ; 0x41 802b0aa: 2161 movls r1, #97 ; 0x61 802b0ac: 1a5b subs r3, r3, r1 802b0ae: ea43 1000 orr.w r0, r3, r0, lsl #4 c = *++cp; 802b0b2: 7853 ldrb r3, [r2, #1] 802b0b4: e7e0 b.n 802b078 } else break; } if (c == '.') { 802b0b6: 2b2e cmp r3, #46 ; 0x2e 802b0b8: d107 bne.n 802b0ca * Internet format: * a.b.c.d * a.b.c (with c treated as 16 bits) * a.b (with b treated as 24 bits) */ if (pp >= parts + 3) { 802b0ba: 2c0c cmp r4, #12 802b0bc: d038 beq.n 802b130 return (0); } *pp++ = val; 802b0be: f84d 0004 str.w r0, [sp, r4] c = *++cp; 802b0c2: 7853 ldrb r3, [r2, #1] 802b0c4: 1c50 adds r0, r2, #1 802b0c6: 3404 adds r4, #4 } else break; } 802b0c8: e7be b.n 802b048 802b0ca: 2b0d cmp r3, #13 802b0cc: d803 bhi.n 802b0d6 802b0ce: 2b09 cmp r3, #9 802b0d0: d203 bcs.n 802b0da 802b0d2: b113 cbz r3, 802b0da 802b0d4: e02c b.n 802b130 802b0d6: 2b20 cmp r3, #32 802b0d8: d12a bne.n 802b130 } /* * Concoct the address according to * the number of parts specified. */ switch (pp - parts + 1) { 802b0da: 466b mov r3, sp 802b0dc: 1afb subs r3, r7, r3 802b0de: 109b asrs r3, r3, #2 802b0e0: 3301 adds r3, #1 802b0e2: 2b04 cmp r3, #4 802b0e4: d81f bhi.n 802b126 802b0e6: e8df f003 tbb [pc, r3] 802b0ea: 1e23 .short 0x1e23 802b0ec: 0a03 .short 0x0a03 802b0ee: 13 .byte 0x13 802b0ef: 00 .byte 0x00 case 1: /* a -- 32 bits */ break; case 2: /* a.b -- 8.24 bits */ if (val > 0xffffffUL) { 802b0f0: f1b0 7f80 cmp.w r0, #16777216 ; 0x1000000 802b0f4: d21c bcs.n 802b130 return (0); } val |= parts[0] << 24; 802b0f6: 9b00 ldr r3, [sp, #0] 802b0f8: ea40 6003 orr.w r0, r0, r3, lsl #24 break; 802b0fc: e013 b.n 802b126 case 3: /* a.b.c -- 8.8.16 bits */ if (val > 0xffff) { 802b0fe: f5b0 3f80 cmp.w r0, #65536 ; 0x10000 802b102: d215 bcs.n 802b130 return (0); } val |= (parts[0] << 24) | (parts[1] << 16); 802b104: 9b00 ldr r3, [sp, #0] 802b106: 061a lsls r2, r3, #24 802b108: 9b01 ldr r3, [sp, #4] 802b10a: ea42 4303 orr.w r3, r2, r3, lsl #16 802b10e: e009 b.n 802b124 break; case 4: /* a.b.c.d -- 8.8.8.8 bits */ if (val > 0xff) { 802b110: 28ff cmp r0, #255 ; 0xff 802b112: d80d bhi.n 802b130 return (0); } val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); 802b114: 9b00 ldr r3, [sp, #0] 802b116: 061a lsls r2, r3, #24 802b118: 9b01 ldr r3, [sp, #4] 802b11a: ea42 4203 orr.w r2, r2, r3, lsl #16 802b11e: 9b02 ldr r3, [sp, #8] 802b120: ea42 2303 orr.w r3, r2, r3, lsl #8 802b124: 4318 orrs r0, r3 break; default: LWIP_ASSERT("unhandled", 0); break; } if (addr) { 802b126: b12e cbz r6, 802b134 ip4_addr_set_u32(addr, htonl(val)); 802b128: f7fb ffa2 bl 8027070 802b12c: 6030 str r0, [r6, #0] 802b12e: e001 b.n 802b134 * Collect number up to ``.''. * Values are specified as for C: * 0x=hex, 0=octal, 1-9=decimal. */ if (!isdigit(c)) return (0); 802b130: 2000 movs r0, #0 802b132: e000 b.n 802b136 break; } if (addr) { ip4_addr_set_u32(addr, htonl(val)); } return (1); 802b134: 2001 movs r0, #1 } 802b136: b005 add sp, #20 802b138: bdf0 pop {r4, r5, r6, r7, pc} 0802b13a : * @param cp IP address in ascii represenation (e.g. "127.0.0.1") * @return ip address in network order */ u32_t ipaddr_addr(const char *cp) { 802b13a: b507 push {r0, r1, r2, lr} ip_addr_t val; if (ipaddr_aton(cp, &val)) { 802b13c: a901 add r1, sp, #4 802b13e: f7ff ff7e bl 802b03e 802b142: b108 cbz r0, 802b148 return ip4_addr_get_u32(&val); 802b144: 9801 ldr r0, [sp, #4] 802b146: e001 b.n 802b14c } return (IPADDR_NONE); 802b148: f04f 30ff mov.w r0, #4294967295 } 802b14c: bd0e pop {r1, r2, r3, pc} 0802b14e : * @param buflen length of buf * @return either pointer to buf which now holds the ASCII * representation of addr or NULL if buf was too small */ char *ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen) { 802b14e: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} u8_t rem; u8_t n; u8_t i; int len = 0; s_addr = ip4_addr_get_u32(addr); 802b152: 6803 ldr r3, [r0, #0] 802b154: a802 add r0, sp, #8 * @param buf target buffer where the string is stored * @param buflen length of buf * @return either pointer to buf which now holds the ASCII * representation of addr or NULL if buf was too small */ char *ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen) 802b156: f10d 0807 add.w r8, sp, #7 u8_t rem; u8_t n; u8_t i; int len = 0; s_addr = ip4_addr_get_u32(addr); 802b15a: f840 3d04 str.w r3, [r0, #-4]! rp = buf; 802b15e: 460c mov r4, r1 * @param buf target buffer where the string is stored * @param buflen length of buf * @return either pointer to buf which now holds the ASCII * representation of addr or NULL if buf was too small */ char *ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen) 802b160: 3801 subs r0, #1 char *rp; u8_t *ap; u8_t rem; u8_t n; u8_t i; int len = 0; 802b162: 2700 movs r7, #0 rp = buf; ap = (u8_t *)&s_addr; for(n = 0; n < 4; n++) { i = 0; do { rem = *ap % (u8_t)10; 802b164: f04f 0c0a mov.w ip, #10 *rp++ = inv[i]; } if (len++ >= buflen) { return NULL; } *rp++ = '.'; 802b168: f04f 092e mov.w r9, #46 ; 0x2e 802b16c: 7843 ldrb r3, [r0, #1] * @param buf target buffer where the string is stored * @param buflen length of buf * @return either pointer to buf which now holds the ASCII * representation of addr or NULL if buf was too small */ char *ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen) 802b16e: 2500 movs r5, #0 rp = buf; ap = (u8_t *)&s_addr; for(n = 0; n < 4; n++) { i = 0; do { rem = *ap % (u8_t)10; 802b170: fbb3 f6fc udiv r6, r3, ip *ap /= (u8_t)10; inv[i++] = '0' + rem; 802b174: f10d 0b08 add.w fp, sp, #8 rp = buf; ap = (u8_t *)&s_addr; for(n = 0; n < 4; n++) { i = 0; do { rem = *ap % (u8_t)10; 802b178: fb0c 3a16 mls sl, ip, r6, r3 *ap /= (u8_t)10; inv[i++] = '0' + rem; 802b17c: eb0b 0305 add.w r3, fp, r5 802b180: f10a 0a30 add.w sl, sl, #48 ; 0x30 802b184: 3501 adds r5, #1 802b186: f803 ac08 strb.w sl, [r3, #-8] } while(*ap); 802b18a: f016 03ff ands.w r3, r6, #255 ; 0xff for(n = 0; n < 4; n++) { i = 0; do { rem = *ap % (u8_t)10; *ap /= (u8_t)10; inv[i++] = '0' + rem; 802b18e: b2ed uxtb r5, r5 } while(*ap); 802b190: d1ee bne.n 802b170 802b192: 3d01 subs r5, #1 * @param buf target buffer where the string is stored * @param buflen length of buf * @return either pointer to buf which now holds the ASCII * representation of addr or NULL if buf was too small */ char *ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen) 802b194: 1be6 subs r6, r4, r7 802b196: f800 3f01 strb.w r3, [r0, #1]! 802b19a: b2ed uxtb r5, r5 802b19c: 463b mov r3, r7 802b19e: 4637 mov r7, r6 802b1a0: e00b b.n 802b1ba 802b1a2: 1e6c subs r4, r5, #1 rem = *ap % (u8_t)10; *ap /= (u8_t)10; inv[i++] = '0' + rem; } while(*ap); while(i--) { if (len++ >= buflen) { 802b1a4: 4293 cmp r3, r2 802b1a6: b2e4 uxtb r4, r4 802b1a8: da16 bge.n 802b1d8 return NULL; } *rp++ = inv[i]; 802b1aa: f10d 0a08 add.w sl, sp, #8 802b1ae: 4455 add r5, sl 802b1b0: f815 5c08 ldrb.w r5, [r5, #-8] 802b1b4: 54fd strb r5, [r7, r3] 802b1b6: 3301 adds r3, #1 802b1b8: 4625 mov r5, r4 do { rem = *ap % (u8_t)10; *ap /= (u8_t)10; inv[i++] = '0' + rem; } while(*ap); while(i--) { 802b1ba: 2dff cmp r5, #255 ; 0xff * @param buf target buffer where the string is stored * @param buflen length of buf * @return either pointer to buf which now holds the ASCII * representation of addr or NULL if buf was too small */ char *ipaddr_ntoa_r(const ip_addr_t *addr, char *buf, int buflen) 802b1bc: eb06 0403 add.w r4, r6, r3 do { rem = *ap % (u8_t)10; *ap /= (u8_t)10; inv[i++] = '0' + rem; } while(*ap); while(i--) { 802b1c0: d1ef bne.n 802b1a2 if (len++ >= buflen) { return NULL; } *rp++ = inv[i]; } if (len++ >= buflen) { 802b1c2: 1c5f adds r7, r3, #1 802b1c4: 4293 cmp r3, r2 802b1c6: da07 bge.n 802b1d8 s_addr = ip4_addr_get_u32(addr); rp = buf; ap = (u8_t *)&s_addr; for(n = 0; n < 4; n++) { 802b1c8: 4540 cmp r0, r8 *rp++ = inv[i]; } if (len++ >= buflen) { return NULL; } *rp++ = '.'; 802b1ca: f804 9b01 strb.w r9, [r4], #1 s_addr = ip4_addr_get_u32(addr); rp = buf; ap = (u8_t *)&s_addr; for(n = 0; n < 4; n++) { 802b1ce: d1cd bne.n 802b16c return NULL; } *rp++ = '.'; ap++; } *--rp = 0; 802b1d0: 2300 movs r3, #0 802b1d2: f804 3c01 strb.w r3, [r4, #-1] 802b1d6: e000 b.n 802b1da *ap /= (u8_t)10; inv[i++] = '0' + rem; } while(*ap); while(i--) { if (len++ >= buflen) { return NULL; 802b1d8: 2100 movs r1, #0 *rp++ = '.'; ap++; } *--rp = 0; return buf; } 802b1da: 4608 mov r0, r1 802b1dc: e8bd 8ffe ldmia.w sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 0802b1e0 : */ char * ipaddr_ntoa(const ip_addr_t *addr) { static char str[16]; return ipaddr_ntoa_r(addr, str, 16); 802b1e0: 4901 ldr r1, [pc, #4] ; (802b1e8 ) 802b1e2: 2210 movs r2, #16 802b1e4: f7ff bfb3 b.w 802b14e 802b1e8: 2000db90 .word 0x2000db90 0802b1ec : return netif; } #endif /* iterate through netifs */ for (netif = netif_list; netif != NULL; netif = netif->next) { 802b1ec: 4b0f ldr r3, [pc, #60] ; (802b22c ) * @param dest the destination IP address for which to find the route * @return the netif on which to send to reach dest */ struct netif * ip_route(ip_addr_t *dest) { 802b1ee: b510 push {r4, lr} return netif; } #endif /* iterate through netifs */ for (netif = netif_list; netif != NULL; netif = netif->next) { 802b1f0: 681c ldr r4, [r3, #0] 802b1f2: e00a b.n 802b20a /* network mask matches? */ if (netif_is_up(netif)) { 802b1f4: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 802b1f8: 07d9 lsls r1, r3, #31 802b1fa: d505 bpl.n 802b208 if (ip_addr_netcmp(dest, &(netif->ip_addr), &(netif->netmask))) { 802b1fc: 6803 ldr r3, [r0, #0] 802b1fe: 6862 ldr r2, [r4, #4] 802b200: 405a eors r2, r3 802b202: 68a3 ldr r3, [r4, #8] 802b204: 421a tst r2, r3 802b206: d00e beq.n 802b226 return netif; } #endif /* iterate through netifs */ for (netif = netif_list; netif != NULL; netif = netif->next) { 802b208: 6824 ldr r4, [r4, #0] 802b20a: 2c00 cmp r4, #0 802b20c: d1f2 bne.n 802b1f4 /* return netif on which to forward IP packet */ return netif; } } } if ((netif_default == NULL) || (!netif_is_up(netif_default))) { 802b20e: 4b08 ldr r3, [pc, #32] ; (802b230 ) 802b210: 681b ldr r3, [r3, #0] 802b212: b12b cbz r3, 802b220 802b214: f893 202d ldrb.w r2, [r3, #45] ; 0x2d 802b218: 07d2 lsls r2, r2, #31 802b21a: bf48 it mi 802b21c: 461c movmi r4, r3 802b21e: d402 bmi.n 802b226 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip_route: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); IP_STATS_INC(ip.rterr); snmp_inc_ipoutnoroutes(); 802b220: f001 fcbc bl 802cb9c return NULL; 802b224: e7ff b.n 802b226 } /* no matching netif found, use default netif */ return netif_default; } 802b226: 4620 mov r0, r4 802b228: bd10 pop {r4, pc} 802b22a: bf00 nop 802b22c: 200104b8 .word 0x200104b8 802b230: 200104bc .word 0x200104bc 0802b234 : * @return ERR_OK if the packet was processed (could return ERR_* if it wasn't * processed, but currently always returns ERR_OK) */ err_t ip_input(struct pbuf *p, struct netif *inp) { 802b234: e92d 4ff8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 802b238: 4604 mov r4, r0 802b23a: 460f mov r7, r1 #if IP_ACCEPT_LINK_LAYER_ADDRESSING int check_ip_src=1; #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ IP_STATS_INC(ip.recv); snmp_inc_ipinreceives(); 802b23c: f001 fc6e bl 802cb1c /* identify the IP header */ iphdr = (struct ip_hdr *)p->payload; 802b240: 6866 ldr r6, [r4, #4] if (IPH_V(iphdr) != 4) { 802b242: f896 8000 ldrb.w r8, [r6] 802b246: ea4f 1318 mov.w r3, r8, lsr #4 802b24a: 2b04 cmp r3, #4 802b24c: d005 beq.n 802b25a LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_WARNING, ("IP packet dropped due to bad version number %"U16_F"\n", IPH_V(iphdr))); ip_debug_print(p); pbuf_free(p); 802b24e: 4620 mov r0, r4 802b250: f7fd f842 bl 80282d8 IP_STATS_INC(ip.err); IP_STATS_INC(ip.drop); snmp_inc_ipinhdrerrors(); 802b254: f001 fc6a bl 802cb2c return ERR_OK; 802b258: e0be b.n 802b3d8 /* obtain IP header length in number of 32-bit words */ iphdr_hlen = IPH_HL(iphdr); /* calculate IP header length in bytes */ iphdr_hlen *= 4; /* obtain ip length in bytes */ iphdr_len = ntohs(IPH_LEN(iphdr)); 802b25a: 8870 ldrh r0, [r6, #2] 802b25c: f7fb ff03 bl 8027066 return ERR_OK; } #endif /* obtain IP header length in number of 32-bit words */ iphdr_hlen = IPH_HL(iphdr); 802b260: f008 080f and.w r8, r8, #15 iphdr_hlen *= 4; /* obtain ip length in bytes */ iphdr_len = ntohs(IPH_LEN(iphdr)); /* header length exceeds first pbuf length, or ip length exceeds total pbuf length? */ if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len)) { 802b264: 8963 ldrh r3, [r4, #10] #endif /* obtain IP header length in number of 32-bit words */ iphdr_hlen = IPH_HL(iphdr); /* calculate IP header length in bytes */ iphdr_hlen *= 4; 802b266: ea4f 0888 mov.w r8, r8, lsl #2 /* obtain ip length in bytes */ iphdr_len = ntohs(IPH_LEN(iphdr)); /* header length exceeds first pbuf length, or ip length exceeds total pbuf length? */ if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len)) { 802b26a: 4543 cmp r3, r8 /* obtain IP header length in number of 32-bit words */ iphdr_hlen = IPH_HL(iphdr); /* calculate IP header length in bytes */ iphdr_hlen *= 4; /* obtain ip length in bytes */ iphdr_len = ntohs(IPH_LEN(iphdr)); 802b26c: 4601 mov r1, r0 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("IP (len %"U16_F") is longer than pbuf (len %"U16_F"), IP packet dropped.\n", iphdr_len, p->tot_len)); } /* free (drop) packet pbufs */ pbuf_free(p); 802b26e: 4620 mov r0, r4 iphdr_hlen *= 4; /* obtain ip length in bytes */ iphdr_len = ntohs(IPH_LEN(iphdr)); /* header length exceeds first pbuf length, or ip length exceeds total pbuf length? */ if ((iphdr_hlen > p->len) || (iphdr_len > p->tot_len)) { 802b270: d302 bcc.n 802b278 802b272: 8923 ldrh r3, [r4, #8] 802b274: 428b cmp r3, r1 802b276: d202 bcs.n 802b27e LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("IP (len %"U16_F") is longer than pbuf (len %"U16_F"), IP packet dropped.\n", iphdr_len, p->tot_len)); } /* free (drop) packet pbufs */ pbuf_free(p); 802b278: f7fd f82e bl 80282d8 802b27c: e045 b.n 802b30a } #endif /* Trim pbuf. This should have been done at the netif layer, * but we'll do it anyway just to be sure that its done. */ pbuf_realloc(p, iphdr_len); 802b27e: f7fd f852 bl 8028326 /* copy IP addresses to aligned ip_addr_t */ ip_addr_copy(current_iphdr_dest, iphdr->dest); 802b282: 6932 ldr r2, [r6, #16] 802b284: 4b56 ldr r3, [pc, #344] ; (802b3e0 ) } #endif /* LWIP_AUTOIP */ } if (first) { first = 0; netif = netif_list; 802b286: f8df b168 ldr.w fp, [pc, #360] ; 802b3f0 /* Trim pbuf. This should have been done at the netif layer, * but we'll do it anyway just to be sure that its done. */ pbuf_realloc(p, iphdr_len); /* copy IP addresses to aligned ip_addr_t */ ip_addr_copy(current_iphdr_dest, iphdr->dest); 802b28a: 601a str r2, [r3, #0] ip_addr_copy(current_iphdr_src, iphdr->src); 802b28c: 68f1 ldr r1, [r6, #12] 802b28e: 4a55 ldr r2, [pc, #340] ; (802b3e4 ) 802b290: 463d mov r5, r7 802b292: 6011 str r1, [r2, #0] #endif /* LWIP_IGMP */ { /* start trying with inp. if that's not acceptable, start walking the list of configured netifs. 'first' is used as a boolean to mark whether we started walking the list */ int first = 1; 802b294: f04f 0901 mov.w r9, #1 ip4_addr_get_u32(&iphdr->dest) & ~ip4_addr_get_u32(&netif->netmask))); /* interface is up and configured? */ if ((netif_is_up(netif)) && (!ip_addr_isany(&(netif->ip_addr)))) { /* unicast to this interface address? */ if (ip_addr_cmp(¤t_iphdr_dest, &(netif->ip_addr)) || 802b298: 469a mov sl, r3 ip4_addr_get_u32(&iphdr->dest) & ip4_addr_get_u32(&netif->netmask), ip4_addr_get_u32(&netif->ip_addr) & ip4_addr_get_u32(&netif->netmask), ip4_addr_get_u32(&iphdr->dest) & ~ip4_addr_get_u32(&netif->netmask))); /* interface is up and configured? */ if ((netif_is_up(netif)) && (!ip_addr_isany(&(netif->ip_addr)))) { 802b29a: f895 302d ldrb.w r3, [r5, #45] ; 0x2d 802b29e: 07d8 lsls r0, r3, #31 802b2a0: d403 bmi.n 802b2aa /* break out of for loop */ break; } #endif /* LWIP_AUTOIP */ } if (first) { 802b2a2: f1b9 0f00 cmp.w r9, #0 802b2a6: d10e bne.n 802b2c6 802b2a8: e010 b.n 802b2cc ip4_addr_get_u32(&iphdr->dest) & ip4_addr_get_u32(&netif->netmask), ip4_addr_get_u32(&netif->ip_addr) & ip4_addr_get_u32(&netif->netmask), ip4_addr_get_u32(&iphdr->dest) & ~ip4_addr_get_u32(&netif->netmask))); /* interface is up and configured? */ if ((netif_is_up(netif)) && (!ip_addr_isany(&(netif->ip_addr)))) { 802b2aa: 686b ldr r3, [r5, #4] 802b2ac: 2b00 cmp r3, #0 802b2ae: d0f8 beq.n 802b2a2 /* unicast to this interface address? */ if (ip_addr_cmp(¤t_iphdr_dest, &(netif->ip_addr)) || 802b2b0: f8da 0000 ldr.w r0, [sl] 802b2b4: 4298 cmp r0, r3 802b2b6: f000 8088 beq.w 802b3ca /* or broadcast on this interface network address? */ ip_addr_isbroadcast(¤t_iphdr_dest, netif)) { 802b2ba: 4629 mov r1, r5 802b2bc: f7ff fea6 bl 802b00c ip4_addr_get_u32(&iphdr->dest) & ~ip4_addr_get_u32(&netif->netmask))); /* interface is up and configured? */ if ((netif_is_up(netif)) && (!ip_addr_isany(&(netif->ip_addr)))) { /* unicast to this interface address? */ if (ip_addr_cmp(¤t_iphdr_dest, &(netif->ip_addr)) || 802b2c0: 2800 cmp r0, #0 802b2c2: d0ee beq.n 802b2a2 802b2c4: e081 b.n 802b3ca } #endif /* LWIP_AUTOIP */ } if (first) { first = 0; netif = netif_list; 802b2c6: f8db 5000 ldr.w r5, [fp] 802b2ca: e000 b.n 802b2ce } else { netif = netif->next; 802b2cc: 682d ldr r5, [r5, #0] } if (netif == inp) { 802b2ce: 42bd cmp r5, r7 netif = netif->next; 802b2d0: bf08 it eq 802b2d2: 682d ldreq r5, [r5, #0] 802b2d4: f04f 0900 mov.w r9, #0 } } while(netif != NULL); 802b2d8: 2d00 cmp r5, #0 802b2da: d1de bne.n 802b29a 802b2dc: e072 b.n 802b3c4 /* remote port is DHCP server? */ if (IPH_PROTO(iphdr) == IP_PROTO_UDP) { struct udp_hdr *udphdr = (struct udp_hdr *)((u8_t *)iphdr + iphdr_hlen); LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip_input: UDP packet to DHCP client port %"U16_F"\n", ntohs(udphdr->dest))); if (IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(udphdr->dest)) { 802b2de: eb06 0308 add.w r3, r6, r8 802b2e2: 885b ldrh r3, [r3, #2] 802b2e4: f5b3 4f88 cmp.w r3, #17408 ; 0x4400 802b2e8: d16f bne.n 802b3ca 802b2ea: e011 b.n 802b310 /* broadcast or multicast packet source address? Compliant with RFC 1122: 3.2.1.3 */ #if IP_ACCEPT_LINK_LAYER_ADDRESSING /* DHCP servers need 0.0.0.0 to be allowed as source address (RFC 1.1.2.2: 3.2.1.3/a) */ if (check_ip_src && !ip_addr_isany(¤t_iphdr_src)) #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ { if ((ip_addr_isbroadcast(¤t_iphdr_src, inp)) || 802b2ec: 4639 mov r1, r7 802b2ee: f7ff fe8d bl 802b00c 802b2f2: b928 cbnz r0, 802b300 (ip_addr_ismulticast(¤t_iphdr_src))) { 802b2f4: f8d8 3000 ldr.w r3, [r8] 802b2f8: f003 03f0 and.w r3, r3, #240 ; 0xf0 /* broadcast or multicast packet source address? Compliant with RFC 1122: 3.2.1.3 */ #if IP_ACCEPT_LINK_LAYER_ADDRESSING /* DHCP servers need 0.0.0.0 to be allowed as source address (RFC 1.1.2.2: 3.2.1.3/a) */ if (check_ip_src && !ip_addr_isany(¤t_iphdr_src)) #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ { if ((ip_addr_isbroadcast(¤t_iphdr_src, inp)) || 802b2fc: 2be0 cmp r3, #224 ; 0xe0 802b2fe: d108 bne.n 802b312 (ip_addr_ismulticast(¤t_iphdr_src))) { /* packet source is not valid */ LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_WARNING, ("ip_input: packet source is not valid.\n")); /* free (drop) packet pbufs */ pbuf_free(p); 802b300: 4620 mov r0, r4 802b302: f7fc ffe9 bl 80282d8 IP_STATS_INC(ip.drop); snmp_inc_ipinaddrerrors(); 802b306: f001 fc19 bl 802cb3c snmp_inc_ipindiscards(); 802b30a: f001 fc27 bl 802cb5c return ERR_OK; 802b30e: e063 b.n 802b3d8 /* remote port is DHCP server? */ if (IPH_PROTO(iphdr) == IP_PROTO_UDP) { struct udp_hdr *udphdr = (struct udp_hdr *)((u8_t *)iphdr + iphdr_hlen); LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_TRACE, ("ip_input: UDP packet to DHCP client port %"U16_F"\n", ntohs(udphdr->dest))); if (IP_ACCEPT_LINK_LAYER_ADDRESSED_PORT(udphdr->dest)) { 802b310: 463d mov r5, r7 return ERR_OK; } } /* packet not for us? */ if (netif == NULL) { 802b312: b93d cbnz r5, 802b324 /* try to forward IP packet on (other) interfaces */ ip_forward(p, iphdr, inp); } else #endif /* IP_FORWARD */ { snmp_inc_ipinaddrerrors(); 802b314: f001 fc12 bl 802cb3c snmp_inc_ipindiscards(); 802b318: f001 fc20 bl 802cb5c } pbuf_free(p); 802b31c: 4620 mov r0, r4 802b31e: f7fc ffdb bl 80282d8 return ERR_OK; 802b322: e059 b.n 802b3d8 } /* packet consists of multiple fragments? */ if ((IPH_OFFSET(iphdr) & PP_HTONS(IP_OFFMASK | IP_MF)) != 0) { 802b324: 88f3 ldrh r3, [r6, #6] 802b326: f023 03c0 bic.w r3, r3, #192 ; 0xc0 802b32a: b29b uxth r3, r3 802b32c: b12b cbz r3, 802b33a if (p == NULL) { return ERR_OK; } iphdr = (struct ip_hdr *)p->payload; #else /* IP_REASSEMBLY == 0, no packet fragment reassembly code present */ pbuf_free(p); 802b32e: 4620 mov r0, r4 802b330: f7fc ffd2 bl 80282d8 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("IP packet dropped since it was fragmented (0x%"X16_F") (while IP_REASSEMBLY == 0).\n", ntohs(IPH_OFFSET(iphdr)))); IP_STATS_INC(ip.opterr); IP_STATS_INC(ip.drop); /* unsupported protocol feature */ snmp_inc_ipinunknownprotos(); 802b334: f001 fc0a bl 802cb4c return ERR_OK; 802b338: e04e b.n 802b3d8 /* send to upper layers */ LWIP_DEBUGF(IP_DEBUG, ("ip_input: \n")); ip_debug_print(p); LWIP_DEBUGF(IP_DEBUG, ("ip_input: p->len %"U16_F" p->tot_len %"U16_F"\n", p->len, p->tot_len)); current_netif = inp; 802b33a: 4b2b ldr r3, [pc, #172] ; (802b3e8 ) 802b33c: 601f str r7, [r3, #0] current_header = iphdr; 802b33e: 4b2b ldr r3, [pc, #172] ; (802b3ec ) #if LWIP_RAW /* raw input did not eat the packet? */ if (raw_input(p, inp) == 0) 802b340: 4620 mov r0, r4 802b342: 4639 mov r1, r7 LWIP_DEBUGF(IP_DEBUG, ("ip_input: \n")); ip_debug_print(p); LWIP_DEBUGF(IP_DEBUG, ("ip_input: p->len %"U16_F" p->tot_len %"U16_F"\n", p->len, p->tot_len)); current_netif = inp; current_header = iphdr; 802b344: 601e str r6, [r3, #0] #if LWIP_RAW /* raw input did not eat the packet? */ if (raw_input(p, inp) == 0) 802b346: f7fd f947 bl 80285d8 802b34a: bb88 cbnz r0, 802b3b0 #endif /* LWIP_RAW */ { switch (IPH_PROTO(iphdr)) { 802b34c: 7a73 ldrb r3, [r6, #9] 802b34e: 2b06 cmp r3, #6 802b350: d00b beq.n 802b36a 802b352: 2b11 cmp r3, #17 802b354: d002 beq.n 802b35c 802b356: 2b01 cmp r3, #1 802b358: d115 bne.n 802b386 802b35a: e00d b.n 802b378 #if LWIP_UDP case IP_PROTO_UDP: #if LWIP_UDPLITE case IP_PROTO_UDPLITE: #endif /* LWIP_UDPLITE */ snmp_inc_ipindelivers(); 802b35c: f001 fc06 bl 802cb6c udp_input(p, inp); 802b360: 4620 mov r0, r4 802b362: 4639 mov r1, r7 802b364: f7ff fb44 bl 802a9f0 break; 802b368: e022 b.n 802b3b0 #endif /* LWIP_UDP */ #if LWIP_TCP case IP_PROTO_TCP: snmp_inc_ipindelivers(); 802b36a: f001 fbff bl 802cb6c tcp_input(p, inp); 802b36e: 4620 mov r0, r4 802b370: 4639 mov r1, r7 802b372: f7fe f8e7 bl 8029544 break; 802b376: e01b b.n 802b3b0 #endif /* LWIP_TCP */ #if LWIP_ICMP case IP_PROTO_ICMP: snmp_inc_ipindelivers(); 802b378: f001 fbf8 bl 802cb6c icmp_input(p, inp); 802b37c: 4620 mov r0, r4 802b37e: 4639 mov r1, r7 802b380: f7ff fd20 bl 802adc4 break; 802b384: e014 b.n 802b3b0 break; #endif /* LWIP_IGMP */ default: #if LWIP_ICMP /* send ICMP destination protocol unreachable unless is was a broadcast */ if (!ip_addr_isbroadcast(¤t_iphdr_dest, inp) && 802b386: 4d16 ldr r5, [pc, #88] ; (802b3e0 ) 802b388: 4639 mov r1, r7 802b38a: 6828 ldr r0, [r5, #0] 802b38c: f7ff fe3e bl 802b00c 802b390: b948 cbnz r0, 802b3a6 !ip_addr_ismulticast(¤t_iphdr_dest)) { 802b392: 682b ldr r3, [r5, #0] 802b394: f003 03f0 and.w r3, r3, #240 ; 0xf0 break; #endif /* LWIP_IGMP */ default: #if LWIP_ICMP /* send ICMP destination protocol unreachable unless is was a broadcast */ if (!ip_addr_isbroadcast(¤t_iphdr_dest, inp) && 802b398: 2be0 cmp r3, #224 ; 0xe0 802b39a: d004 beq.n 802b3a6 !ip_addr_ismulticast(¤t_iphdr_dest)) { p->payload = iphdr; 802b39c: 6066 str r6, [r4, #4] icmp_dest_unreach(p, ICMP_DUR_PROTO); 802b39e: 4620 mov r0, r4 802b3a0: 2102 movs r1, #2 802b3a2: f7ff fda5 bl 802aef0 } #endif /* LWIP_ICMP */ pbuf_free(p); 802b3a6: 4620 mov r0, r4 802b3a8: f7fc ff96 bl 80282d8 LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("Unsupported transport protocol %"U16_F"\n", IPH_PROTO(iphdr))); IP_STATS_INC(ip.proterr); IP_STATS_INC(ip.drop); snmp_inc_ipinunknownprotos(); 802b3ac: f001 fbce bl 802cb4c } } current_netif = NULL; 802b3b0: 4a0d ldr r2, [pc, #52] ; (802b3e8 ) 802b3b2: 2300 movs r3, #0 802b3b4: 6013 str r3, [r2, #0] current_header = NULL; 802b3b6: 4a0d ldr r2, [pc, #52] ; (802b3ec ) 802b3b8: 6013 str r3, [r2, #0] ip_addr_set_any(¤t_iphdr_src); 802b3ba: 4a0a ldr r2, [pc, #40] ; (802b3e4 ) 802b3bc: 6013 str r3, [r2, #0] ip_addr_set_any(¤t_iphdr_dest); 802b3be: 4a08 ldr r2, [pc, #32] ; (802b3e0 ) 802b3c0: 6013 str r3, [r2, #0] return ERR_OK; 802b3c2: e009 b.n 802b3d8 * * #define LWIP_IP_ACCEPT_UDP_PORT(dst_port) ((dst_port) == PP_NTOHS(12345)) */ if (netif == NULL) { /* remote port is DHCP server? */ if (IPH_PROTO(iphdr) == IP_PROTO_UDP) { 802b3c4: 7a73 ldrb r3, [r6, #9] 802b3c6: 2b11 cmp r3, #17 802b3c8: d089 beq.n 802b2de #endif /* IP_ACCEPT_LINK_LAYER_ADDRESSING */ /* broadcast or multicast packet source address? Compliant with RFC 1122: 3.2.1.3 */ #if IP_ACCEPT_LINK_LAYER_ADDRESSING /* DHCP servers need 0.0.0.0 to be allowed as source address (RFC 1.1.2.2: 3.2.1.3/a) */ if (check_ip_src && !ip_addr_isany(¤t_iphdr_src)) 802b3ca: f8df 8018 ldr.w r8, [pc, #24] ; 802b3e4 802b3ce: f8d8 0000 ldr.w r0, [r8] 802b3d2: 2800 cmp r0, #0 802b3d4: d09d beq.n 802b312 802b3d6: e789 b.n 802b2ec current_header = NULL; ip_addr_set_any(¤t_iphdr_src); ip_addr_set_any(¤t_iphdr_dest); return ERR_OK; } 802b3d8: 2000 movs r0, #0 802b3da: e8bd 8ff8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 802b3de: bf00 nop 802b3e0: 200104ec .word 0x200104ec 802b3e4: 200104e4 .word 0x200104e4 802b3e8: 200104e8 .word 0x200104e8 802b3ec: 200104f0 .word 0x200104f0 802b3f0: 200104b8 .word 0x200104b8 0802b3f4 : */ err_t ip_output_if(struct pbuf *p, ip_addr_t *src, ip_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto, struct netif *netif) { 802b3f4: e92d 47f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, r9, sl, lr} 802b3f8: 4615 mov r5, r2 802b3fa: 4606 mov r6, r0 802b3fc: 4689 mov r9, r1 802b3fe: 469a mov sl, r3 802b400: 9f0c ldr r7, [sp, #48] ; 0x30 /* pbufs passed to IP must have a ref-count of 1 as their payload pointer gets altered as the packet is passed down the stack */ LWIP_ASSERT("p->ref == 1", p->ref == 1); snmp_inc_ipoutrequests(); 802b402: f001 fbbb bl 802cb7c /* Should the IP header be generated or is it already included in p? */ if (dest != IP_HDRINCL) { 802b406: b3b5 cbz r5, 802b476 } #endif /* CHECKSUM_GEN_IP_INLINE */ } #endif /* IP_OPTIONS_SEND */ /* generate IP header */ if (pbuf_header(p, IP_HLEN)) { 802b408: 4630 mov r0, r6 802b40a: 2114 movs r1, #20 802b40c: f7fc ff39 bl 8028282 802b410: 4680 mov r8, r0 802b412: b118 cbz r0, 802b41c LWIP_DEBUGF(IP_DEBUG | LWIP_DBG_LEVEL_SERIOUS, ("ip_output: not enough room for IP header in pbuf\n")); IP_STATS_INC(ip.err); snmp_inc_ipoutdiscards(); 802b414: f001 fbba bl 802cb8c return ERR_BUF; 802b418: 20fe movs r0, #254 ; 0xfe 802b41a: e036 b.n 802b48a } iphdr = (struct ip_hdr *)p->payload; 802b41c: 6874 ldr r4, [r6, #4] LWIP_ASSERT("check that first pbuf can hold struct ip_hdr", (p->len >= sizeof(struct ip_hdr))); IPH_TTL_SET(iphdr, ttl); IPH_PROTO_SET(iphdr, proto); 802b41e: f89d 302c ldrb.w r3, [sp, #44] ; 0x2c iphdr = (struct ip_hdr *)p->payload; LWIP_ASSERT("check that first pbuf can hold struct ip_hdr", (p->len >= sizeof(struct ip_hdr))); IPH_TTL_SET(iphdr, ttl); 802b422: f884 a008 strb.w sl, [r4, #8] IPH_PROTO_SET(iphdr, proto); 802b426: 7263 strb r3, [r4, #9] #if CHECKSUM_GEN_IP_INLINE chk_sum += LWIP_MAKE_U16(proto, ttl); #endif /* CHECKSUM_GEN_IP_INLINE */ /* dest cannot be NULL here */ ip_addr_copy(iphdr->dest, *dest); 802b428: 682b ldr r3, [r5, #0] 802b42a: 6123 str r3, [r4, #16] #if CHECKSUM_GEN_IP_INLINE chk_sum += ip4_addr_get_u32(&iphdr->dest) & 0xFFFF; chk_sum += ip4_addr_get_u32(&iphdr->dest) >> 16; #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_VHL_SET(iphdr, 4, ip_hlen / 4); 802b42c: 2345 movs r3, #69 ; 0x45 802b42e: 7023 strb r3, [r4, #0] IPH_TOS_SET(iphdr, tos); 802b430: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 802b434: 7063 strb r3, [r4, #1] #if CHECKSUM_GEN_IP_INLINE chk_sum += LWIP_MAKE_U16(tos, iphdr->_v_hl); #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_LEN_SET(iphdr, htons(p->tot_len)); 802b436: 8930 ldrh r0, [r6, #8] 802b438: f7fb fe10 bl 802705c #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_len; #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_OFFSET_SET(iphdr, 0); 802b43c: f884 8006 strb.w r8, [r4, #6] 802b440: f884 8007 strb.w r8, [r4, #7] IPH_ID_SET(iphdr, htons(ip_id)); 802b444: f8df 8048 ldr.w r8, [pc, #72] ; 802b490 IPH_VHL_SET(iphdr, 4, ip_hlen / 4); IPH_TOS_SET(iphdr, tos); #if CHECKSUM_GEN_IP_INLINE chk_sum += LWIP_MAKE_U16(tos, iphdr->_v_hl); #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_LEN_SET(iphdr, htons(p->tot_len)); 802b448: 8060 strh r0, [r4, #2] #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_len; #endif /* CHECKSUM_GEN_IP_INLINE */ IPH_OFFSET_SET(iphdr, 0); IPH_ID_SET(iphdr, htons(ip_id)); 802b44a: f8b8 0000 ldrh.w r0, [r8] 802b44e: f7fb fe05 bl 802705c 802b452: 80a0 strh r0, [r4, #4] #if CHECKSUM_GEN_IP_INLINE chk_sum += iphdr->_id; #endif /* CHECKSUM_GEN_IP_INLINE */ ++ip_id; 802b454: f8b8 3000 ldrh.w r3, [r8] 802b458: 3301 adds r3, #1 802b45a: f8a8 3000 strh.w r3, [r8] if (ip_addr_isany(src)) { 802b45e: f1b9 0f00 cmp.w r9, #0 802b462: d002 beq.n 802b46a 802b464: f8d9 3000 ldr.w r3, [r9] 802b468: b903 cbnz r3, 802b46c ip_addr_copy(iphdr->src, netif->ip_addr); 802b46a: 687b ldr r3, [r7, #4] } else { /* src cannot be NULL here */ ip_addr_copy(iphdr->src, *src); 802b46c: 60e3 str r3, [r4, #12] chk_sum = (chk_sum >> 16) + (chk_sum & 0xFFFF); chk_sum = (chk_sum >> 16) + chk_sum; chk_sum = ~chk_sum; iphdr->_chksum = chk_sum; /* network order */ #else /* CHECKSUM_GEN_IP_INLINE */ IPH_CHKSUM_SET(iphdr, 0); 802b46e: 2300 movs r3, #0 802b470: 72a3 strb r3, [r4, #10] 802b472: 72e3 strb r3, [r4, #11] 802b474: e004 b.n 802b480 #endif #endif /* CHECKSUM_GEN_IP_INLINE */ } else { /* IP header already included in p */ iphdr = (struct ip_hdr *)p->payload; ip_addr_copy(dest_addr, iphdr->dest); 802b476: 6873 ldr r3, [r6, #4] 802b478: ad02 add r5, sp, #8 802b47a: 691b ldr r3, [r3, #16] 802b47c: f845 3d04 str.w r3, [r5, #-4]! return ip_frag(p, netif, dest); } #endif /* IP_FRAG */ LWIP_DEBUGF(IP_DEBUG, ("netif->output()")); return netif->output(netif, p, dest); 802b480: 697b ldr r3, [r7, #20] 802b482: 4638 mov r0, r7 802b484: 4631 mov r1, r6 802b486: 462a mov r2, r5 802b488: 4798 blx r3 } 802b48a: b240 sxtb r0, r0 802b48c: e8bd 87fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, r9, sl, pc} 802b490: 2000dba0 .word 0x2000dba0 0802b494 : * see ip_output_if() for more return values */ err_t ip_output(struct pbuf *p, ip_addr_t *src, ip_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto) { 802b494: b5f0 push {r4, r5, r6, r7, lr} 802b496: 4605 mov r5, r0 802b498: b085 sub sp, #20 /* pbufs passed to IP must have a ref-count of 1 as their payload pointer gets altered as the packet is passed down the stack */ LWIP_ASSERT("p->ref == 1", p->ref == 1); if ((netif = ip_route(dest)) == NULL) { 802b49a: 4610 mov r0, r2 * see ip_output_if() for more return values */ err_t ip_output(struct pbuf *p, ip_addr_t *src, ip_addr_t *dest, u8_t ttl, u8_t tos, u8_t proto) { 802b49c: 460f mov r7, r1 802b49e: 4614 mov r4, r2 802b4a0: 461e mov r6, r3 /* pbufs passed to IP must have a ref-count of 1 as their payload pointer gets altered as the packet is passed down the stack */ LWIP_ASSERT("p->ref == 1", p->ref == 1); if ((netif = ip_route(dest)) == NULL) { 802b4a2: f7ff fea3 bl 802b1ec 802b4a6: b168 cbz r0, 802b4c4 ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); IP_STATS_INC(ip.rterr); return ERR_RTE; } return ip_output_if(p, src, dest, ttl, tos, proto, netif); 802b4a8: f89d 3028 ldrb.w r3, [sp, #40] ; 0x28 802b4ac: 9002 str r0, [sp, #8] 802b4ae: 9300 str r3, [sp, #0] 802b4b0: f89d 302c ldrb.w r3, [sp, #44] ; 0x2c 802b4b4: 4628 mov r0, r5 802b4b6: 9301 str r3, [sp, #4] 802b4b8: 4639 mov r1, r7 802b4ba: 4622 mov r2, r4 802b4bc: 4633 mov r3, r6 802b4be: f7ff ff99 bl 802b3f4 802b4c2: e000 b.n 802b4c6 if ((netif = ip_route(dest)) == NULL) { LWIP_DEBUGF(IP_DEBUG, ("ip_output: No route to %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", ip4_addr1_16(dest), ip4_addr2_16(dest), ip4_addr3_16(dest), ip4_addr4_16(dest))); IP_STATS_INC(ip.rterr); return ERR_RTE; 802b4c4: 20fc movs r0, #252 ; 0xfc } return ip_output_if(p, src, dest, ttl, tos, proto, netif); } 802b4c6: b240 sxtb r0, r0 802b4c8: b005 add sp, #20 802b4ca: bdf0 pop {r4, r5, r6, r7, pc} 0802b4cc : * @param type return ASN1 type * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) decode */ err_t snmp_asn1_dec_type(struct pbuf *p, u16_t ofs, u8_t *type) { 802b4cc: b510 push {r4, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 802b4ce: 2300 movs r3, #0 while (p != NULL) 802b4d0: e00c b.n 802b4ec { base = plen; plen += p->len; 802b4d2: 8944 ldrh r4, [r0, #10] 802b4d4: 191c adds r4, r3, r4 802b4d6: b2a4 uxth r4, r4 if (ofs < plen) 802b4d8: 42a1 cmp r1, r4 802b4da: d205 bcs.n 802b4e8 { msg_ptr = (u8_t*)p->payload; 802b4dc: 6840 ldr r0, [r0, #4] msg_ptr += ofs - base; 802b4de: 1acb subs r3, r1, r3 *type = *msg_ptr; 802b4e0: 5cc3 ldrb r3, [r0, r3] return ERR_OK; 802b4e2: 2000 movs r0, #0 plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; *type = *msg_ptr; 802b4e4: 7013 strb r3, [r2, #0] return ERR_OK; 802b4e6: e004 b.n 802b4f2 } p = p->next; 802b4e8: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 802b4ea: 4623 mov r3, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 802b4ec: 2800 cmp r0, #0 802b4ee: d1f0 bne.n 802b4d2 return ERR_OK; } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; 802b4f0: 20f2 movs r0, #242 ; 0xf2 } 802b4f2: b240 sxtb r0, r0 802b4f4: bd10 pop {r4, pc} 0802b4f6 : * @param length return host order length, upto 64k * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) decode */ err_t snmp_asn1_dec_length(struct pbuf *p, u16_t ofs, u8_t *octets_used, u16_t *length) { 802b4f6: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 802b4f8: 2500 movs r5, #0 while (p != NULL) 802b4fa: e079 b.n 802b5f0 { base = plen; plen += p->len; 802b4fc: 8944 ldrh r4, [r0, #10] 802b4fe: 192c adds r4, r5, r4 802b500: b2a4 uxth r4, r4 if (ofs < plen) 802b502: 42a1 cmp r1, r4 802b504: d272 bcs.n 802b5ec { msg_ptr = (u8_t*)p->payload; 802b506: f8d0 c004 ldr.w ip, [r0, #4] msg_ptr += ofs - base; 802b50a: 1b4f subs r7, r1, r5 802b50c: eb0c 0507 add.w r5, ip, r7 if (*msg_ptr < 0x80) 802b510: f81c 6007 ldrb.w r6, [ip, r7] 802b514: f016 0f80 tst.w r6, #128 ; 0x80 802b518: d105 bne.n 802b526 { /* primitive definite length format */ *octets_used = 1; 802b51a: 2101 movs r1, #1 802b51c: 7011 strb r1, [r2, #0] *length = *msg_ptr; 802b51e: f81c 2007 ldrb.w r2, [ip, r7] 802b522: 801a strh r2, [r3, #0] 802b524: e05a b.n 802b5dc return ERR_OK; } else if (*msg_ptr == 0x80) 802b526: 2e80 cmp r6, #128 ; 0x80 802b528: d12a bne.n 802b580 { /* constructed indefinite length format, termination with two zero octets */ u8_t zeros; u8_t i; *length = 0; 802b52a: 2600 movs r6, #0 802b52c: 801e strh r6, [r3, #0] 802b52e: e022 b.n 802b576 { i = 2; while (i > 0) { i--; (*length) += 1; 802b530: f8b3 c000 ldrh.w ip, [r3] ofs += 1; 802b534: 3101 adds r1, #1 802b536: b289 uxth r1, r1 { i = 2; while (i > 0) { i--; (*length) += 1; 802b538: f10c 0c01 add.w ip, ip, #1 ofs += 1; if (ofs >= plen) 802b53c: 42a1 cmp r1, r4 { i = 2; while (i > 0) { i--; (*length) += 1; 802b53e: f8a3 c000 strh.w ip, [r3] ofs += 1; if (ofs >= plen) 802b542: d308 bcc.n 802b556 { /* next octet in next pbuf */ p = p->next; 802b544: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 802b546: b900 cbnz r0, 802b54a 802b548: e04e b.n 802b5e8 msg_ptr = (u8_t*)p->payload; plen += p->len; 802b54a: f8b0 c00a ldrh.w ip, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 802b54e: 6845 ldr r5, [r0, #4] plen += p->len; 802b550: 4464 add r4, ip 802b552: b2a4 uxth r4, r4 802b554: e000 b.n 802b558 } else { /* next octet in same pbuf */ msg_ptr++; 802b556: 3501 adds r5, #1 } if (*msg_ptr == 0) 802b558: f895 c000 ldrb.w ip, [r5] 802b55c: f1bc 0f00 cmp.w ip, #0 802b560: d104 bne.n 802b56c { zeros++; 802b562: 3601 adds r6, #1 802b564: b2f6 uxtb r6, r6 if (zeros == 2) 802b566: 2e02 cmp r6, #2 802b568: d101 bne.n 802b56e 802b56a: e007 b.n 802b57c i = 0; } } else { zeros = 0; 802b56c: 2600 movs r6, #0 *length = 0; zeros = 0; while (zeros != 2) { i = 2; while (i > 0) 802b56e: 42b9 cmp r1, r7 802b570: d1de bne.n 802b530 u8_t zeros; u8_t i; *length = 0; zeros = 0; while (zeros != 2) 802b572: 2e02 cmp r6, #2 802b574: d002 beq.n 802b57c * @param octets_used returns number of octets used by the length code * @param length return host order length, upto 64k * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) decode */ err_t snmp_asn1_dec_length(struct pbuf *p, u16_t ofs, u8_t *octets_used, u16_t *length) 802b576: 1c8f adds r7, r1, #2 802b578: b2bf uxth r7, r7 802b57a: e7d9 b.n 802b530 { zeros = 0; } } } *octets_used = 1; 802b57c: 2301 movs r3, #1 802b57e: e02c b.n 802b5da return ERR_OK; } else if (*msg_ptr == 0x81) 802b580: 2e81 cmp r6, #129 ; 0x81 802b582: d10c bne.n 802b59e { /* constructed definite length format, one octet */ ofs += 1; 802b584: 3101 adds r1, #1 if (ofs >= plen) 802b586: b289 uxth r1, r1 802b588: 42a1 cmp r1, r4 802b58a: d303 bcc.n 802b594 { /* next octet in next pbuf */ p = p->next; 802b58c: 6801 ldr r1, [r0, #0] if (p == NULL) { return ERR_ARG; } 802b58e: b359 cbz r1, 802b5e8 msg_ptr = (u8_t*)p->payload; 802b590: 684d ldr r5, [r1, #4] 802b592: e000 b.n 802b596 } else { /* next octet in same pbuf */ msg_ptr++; 802b594: 3501 adds r5, #1 } *length = *msg_ptr; 802b596: 7829 ldrb r1, [r5, #0] 802b598: 8019 strh r1, [r3, #0] *octets_used = 2; 802b59a: 2302 movs r3, #2 802b59c: e01d b.n 802b5da return ERR_OK; } else if (*msg_ptr == 0x82) 802b59e: 2e82 cmp r6, #130 ; 0x82 802b5a0: d11e bne.n 802b5e0 /* constructed definite length format, two octets */ i = 2; while (i > 0) { i--; ofs += 1; 802b5a2: 1c4e adds r6, r1, #1 if (ofs >= plen) 802b5a4: b2b6 uxth r6, r6 802b5a6: 42a6 cmp r6, r4 802b5a8: d201 bcs.n 802b5ae plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 802b5aa: 3501 adds r5, #1 802b5ac: e005 b.n 802b5ba i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 802b5ae: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 802b5b0: b1d0 cbz r0, 802b5e8 msg_ptr = (u8_t*)p->payload; plen += p->len; 802b5b2: 8946 ldrh r6, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 802b5b4: 6845 ldr r5, [r0, #4] plen += p->len; 802b5b6: 19a4 adds r4, r4, r6 802b5b8: b2a4 uxth r4, r4 *length |= *msg_ptr; } else { /* most significant length octet */ *length = (*msg_ptr) << 8; 802b5ba: 782e ldrb r6, [r5, #0] /* constructed definite length format, two octets */ i = 2; while (i > 0) { i--; ofs += 1; 802b5bc: 3102 adds r1, #2 if (ofs >= plen) 802b5be: b289 uxth r1, r1 *length |= *msg_ptr; } else { /* most significant length octet */ *length = (*msg_ptr) << 8; 802b5c0: 0236 lsls r6, r6, #8 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 802b5c2: 42a1 cmp r1, r4 *length |= *msg_ptr; } else { /* most significant length octet */ *length = (*msg_ptr) << 8; 802b5c4: 801e strh r6, [r3, #0] i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 802b5c6: d201 bcs.n 802b5cc plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 802b5c8: 3501 adds r5, #1 802b5ca: e002 b.n 802b5d2 i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 802b5cc: 6801 ldr r1, [r0, #0] if (p == NULL) { return ERR_ARG; } 802b5ce: b159 cbz r1, 802b5e8 msg_ptr = (u8_t*)p->payload; 802b5d0: 684d ldr r5, [r1, #4] msg_ptr++; } if (i == 0) { /* least significant length octet */ *length |= *msg_ptr; 802b5d2: 7829 ldrb r1, [r5, #0] 802b5d4: 430e orrs r6, r1 802b5d6: 801e strh r6, [r3, #0] { /* most significant length octet */ *length = (*msg_ptr) << 8; } } *octets_used = 3; 802b5d8: 2303 movs r3, #3 802b5da: 7013 strb r3, [r2, #0] return ERR_OK; 802b5dc: 2000 movs r0, #0 802b5de: e00a b.n 802b5f6 } else { /* constructed definite length format 3..127 octets, this is too big (>64k) */ /** @todo: do we need to accept inefficient codings with many leading zero's? */ *octets_used = 1 + ((*msg_ptr) & 0x7f); 802b5e0: f006 067f and.w r6, r6, #127 ; 0x7f 802b5e4: 3601 adds r6, #1 802b5e6: 7016 strb r6, [r2, #0] return ERR_ARG; 802b5e8: 20f2 movs r0, #242 ; 0xf2 802b5ea: e004 b.n 802b5f6 } } p = p->next; 802b5ec: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 802b5ee: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 802b5f0: 2800 cmp r0, #0 802b5f2: d183 bne.n 802b4fc 802b5f4: e7f8 b.n 802b5e8 p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 802b5f6: b240 sxtb r0, r0 802b5f8: bdf0 pop {r4, r5, r6, r7, pc} 0802b5fa : * as 0x00,0xFF,0xFF. Note the leading sign octet. A positive value * of 0xFFFFFFFF is preceded with 0x00 and the length is 5 octets!! */ err_t snmp_asn1_dec_u32t(struct pbuf *p, u16_t ofs, u16_t len, u32_t *value) { 802b5fa: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 802b5fe: 2500 movs r5, #0 while (p != NULL) 802b600: e049 b.n 802b696 { base = plen; plen += p->len; 802b602: 8944 ldrh r4, [r0, #10] 802b604: 192c adds r4, r5, r4 802b606: b2a4 uxth r4, r4 if (ofs < plen) 802b608: 42a1 cmp r1, r4 802b60a: d242 bcs.n 802b692 { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if ((len > 0) && (len < 6)) 802b60c: 1e56 subs r6, r2, #1 { base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; 802b60e: f8d0 c004 ldr.w ip, [r0, #4] msg_ptr += ofs - base; if ((len > 0) && (len < 6)) 802b612: b2b6 uxth r6, r6 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 802b614: 1b4f subs r7, r1, r5 if ((len > 0) && (len < 6)) 802b616: 2e04 cmp r6, #4 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 802b618: eb0c 0507 add.w r5, ip, r7 if ((len > 0) && (len < 6)) 802b61c: d901 bls.n 802b622 *value |= *msg_ptr; return ERR_OK; } else { return ERR_ARG; 802b61e: 20f2 movs r0, #242 ; 0xf2 802b620: e03c b.n 802b69c msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if ((len > 0) && (len < 6)) { /* start from zero */ *value = 0; 802b622: f04f 0800 mov.w r8, #0 802b626: f8c3 8000 str.w r8, [r3] if (*msg_ptr & 0x80) 802b62a: f81c 7007 ldrb.w r7, [ip, r7] 802b62e: f017 0f80 tst.w r7, #128 ; 0x80 802b632: d1f4 bne.n 802b61e return ERR_ARG; } else { /* positive */ if ((len > 1) && (*msg_ptr == 0)) 802b634: 2a01 cmp r2, #1 802b636: d00e beq.n 802b656 802b638: b96f cbnz r7, 802b656 { /* skip leading "sign byte" octet 0x00 */ len--; ofs += 1; 802b63a: 3101 adds r1, #1 802b63c: b289 uxth r1, r1 if (ofs >= plen) 802b63e: 42a1 cmp r1, r4 { /* positive */ if ((len > 1) && (*msg_ptr == 0)) { /* skip leading "sign byte" octet 0x00 */ len--; 802b640: 4632 mov r2, r6 ofs += 1; if (ofs >= plen) 802b642: d307 bcc.n 802b654 { /* next octet in next pbuf */ p = p->next; 802b644: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 802b646: 2800 cmp r0, #0 802b648: d0e9 beq.n 802b61e msg_ptr = (u8_t*)p->payload; plen += p->len; 802b64a: 8946 ldrh r6, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 802b64c: 6845 ldr r5, [r0, #4] plen += p->len; 802b64e: 19a4 adds r4, r4, r6 802b650: b2a4 uxth r4, r4 802b652: e000 b.n 802b656 } else { /* next octet in same pbuf */ msg_ptr++; 802b654: 3501 adds r5, #1 802b656: 1c4e adds r6, r1, #1 * @note ASN coded integers are _always_ signed. E.g. +0xFFFF is coded * as 0x00,0xFF,0xFF. Note the leading sign octet. A positive value * of 0xFFFFFFFF is preceded with 0x00 and the length is 5 octets!! */ err_t snmp_asn1_dec_u32t(struct pbuf *p, u16_t ofs, u16_t len, u32_t *value) 802b658: 188a adds r2, r1, r2 802b65a: b2b6 uxth r6, r6 802b65c: b292 uxth r2, r2 802b65e: e010 b.n 802b682 } /* OR octets with value */ while (len > 1) { len--; *value |= *msg_ptr; 802b660: 7829 ldrb r1, [r5, #0] 802b662: 430f orrs r7, r1 *value <<= 8; 802b664: 023f lsls r7, r7, #8 ofs += 1; if (ofs >= plen) 802b666: 42a6 cmp r6, r4 /* OR octets with value */ while (len > 1) { len--; *value |= *msg_ptr; *value <<= 8; 802b668: 601f str r7, [r3, #0] ofs += 1; if (ofs >= plen) 802b66a: d307 bcc.n 802b67c { /* next octet in next pbuf */ p = p->next; 802b66c: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 802b66e: 2800 cmp r0, #0 802b670: d0d5 beq.n 802b61e msg_ptr = (u8_t*)p->payload; plen += p->len; 802b672: 8941 ldrh r1, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 802b674: 6845 ldr r5, [r0, #4] plen += p->len; 802b676: 1864 adds r4, r4, r1 802b678: b2a4 uxth r4, r4 802b67a: e000 b.n 802b67e } else { /* next octet in same pbuf */ msg_ptr++; 802b67c: 3501 adds r5, #1 802b67e: 3601 adds r6, #1 802b680: b2b6 uxth r6, r6 msg_ptr++; } } } /* OR octets with value */ while (len > 1) 802b682: 4296 cmp r6, r2 802b684: 681f ldr r7, [r3, #0] 802b686: d1eb bne.n 802b660 { /* next octet in same pbuf */ msg_ptr++; } } *value |= *msg_ptr; 802b688: 782a ldrb r2, [r5, #0] 802b68a: 4317 orrs r7, r2 802b68c: 601f str r7, [r3, #0] return ERR_OK; 802b68e: 2000 movs r0, #0 802b690: e004 b.n 802b69c else { return ERR_ARG; } } p = p->next; 802b692: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 802b694: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 802b696: 2800 cmp r0, #0 802b698: d1b3 bne.n 802b602 802b69a: e7c0 b.n 802b61e } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 802b69c: b240 sxtb r0, r0 802b69e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 0802b6a2 : * * @note ASN coded integers are _always_ signed! */ err_t snmp_asn1_dec_s32t(struct pbuf *p, u16_t ofs, u16_t len, s32_t *value) { 802b6a2: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} #if BYTE_ORDER == BIG_ENDIAN u8_t *lsb_ptr = (u8_t*)value + sizeof(s32_t) - 1; #endif u8_t sign; plen = 0; 802b6a6: 2500 movs r5, #0 while (p != NULL) 802b6a8: e04e b.n 802b748 { base = plen; plen += p->len; 802b6aa: 8944 ldrh r4, [r0, #10] 802b6ac: 192c adds r4, r5, r4 802b6ae: b2a4 uxth r4, r4 if (ofs < plen) 802b6b0: 42a1 cmp r1, r4 802b6b2: d247 bcs.n 802b744 { msg_ptr = (u8_t*)p->payload; 802b6b4: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; if ((len > 0) && (len < 5)) 802b6b6: f102 3cff add.w ip, r2, #4294967295 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 802b6ba: 1b4e subs r6, r1, r5 if ((len > 0) && (len < 5)) 802b6bc: f1bc 0f03 cmp.w ip, #3 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 802b6c0: eb07 0506 add.w r5, r7, r6 if ((len > 0) && (len < 5)) 802b6c4: d901 bls.n 802b6ca } return ERR_OK; } else { return ERR_ARG; 802b6c6: 20f2 movs r0, #242 ; 0xf2 802b6c8: e041 b.n 802b74e { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if ((len > 0) && (len < 5)) { if (*msg_ptr & 0x80) 802b6ca: 57be ldrsb r6, [r7, r6] 802b6cc: 2e00 cmp r6, #0 802b6ce: da0b bge.n 802b6e8 { /* negative, start from -1 */ *value = -1; 802b6d0: f04f 36ff mov.w r6, #4294967295 802b6d4: 601e str r6, [r3, #0] sign = 1; 802b6d6: 2601 movs r6, #1 802b6d8: f101 0c01 add.w ip, r1, #1 * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) decode * * @note ASN coded integers are _always_ signed! */ err_t snmp_asn1_dec_s32t(struct pbuf *p, u16_t ofs, u16_t len, s32_t *value) 802b6dc: 1852 adds r2, r2, r1 802b6de: fa1f fc8c uxth.w ip, ip 802b6e2: b292 uxth r2, r2 len--; if (sign) { *lsb_ptr &= *msg_ptr; *value <<= 8; *lsb_ptr |= 255; 802b6e4: 21ff movs r1, #255 ; 0xff 802b6e6: e022 b.n 802b72e sign = 1; } else { /* positive, start from 0 */ *value = 0; 802b6e8: 2600 movs r6, #0 802b6ea: 601e str r6, [r3, #0] 802b6ec: e7f4 b.n 802b6d8 802b6ee: f895 8000 ldrb.w r8, [r5] } /* OR/AND octets with value */ while (len > 1) { len--; if (sign) 802b6f2: b13e cbz r6, 802b704 { *lsb_ptr &= *msg_ptr; 802b6f4: ea08 0707 and.w r7, r8, r7 802b6f8: 701f strb r7, [r3, #0] *value <<= 8; 802b6fa: 681f ldr r7, [r3, #0] 802b6fc: 023f lsls r7, r7, #8 802b6fe: 601f str r7, [r3, #0] *lsb_ptr |= 255; 802b700: 7019 strb r1, [r3, #0] 802b702: e005 b.n 802b710 } else { *lsb_ptr |= *msg_ptr; 802b704: ea48 0707 orr.w r7, r8, r7 802b708: 701f strb r7, [r3, #0] *value <<= 8; 802b70a: 681f ldr r7, [r3, #0] 802b70c: 023f lsls r7, r7, #8 802b70e: 601f str r7, [r3, #0] } ofs += 1; if (ofs >= plen) 802b710: 45a4 cmp ip, r4 802b712: d307 bcc.n 802b724 { /* next octet in next pbuf */ p = p->next; 802b714: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 802b716: 2800 cmp r0, #0 802b718: d0d5 beq.n 802b6c6 msg_ptr = (u8_t*)p->payload; plen += p->len; 802b71a: 8947 ldrh r7, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 802b71c: 6845 ldr r5, [r0, #4] plen += p->len; 802b71e: 19e4 adds r4, r4, r7 802b720: b2a4 uxth r4, r4 802b722: e000 b.n 802b726 } else { /* next octet in same pbuf */ msg_ptr++; 802b724: 3501 adds r5, #1 802b726: f10c 0c01 add.w ip, ip, #1 802b72a: fa1f fc8c uxth.w ip, ip /* positive, start from 0 */ *value = 0; sign = 0; } /* OR/AND octets with value */ while (len > 1) 802b72e: 4594 cmp ip, r2 802b730: 781f ldrb r7, [r3, #0] 802b732: d1dc bne.n 802b6ee 802b734: 782a ldrb r2, [r5, #0] { /* next octet in same pbuf */ msg_ptr++; } } if (sign) 802b736: b11e cbz r6, 802b740 { *lsb_ptr &= *msg_ptr; 802b738: 4017 ands r7, r2 802b73a: 701f strb r7, [r3, #0] } else { *lsb_ptr |= *msg_ptr; } return ERR_OK; 802b73c: 2000 movs r0, #0 802b73e: e006 b.n 802b74e { *lsb_ptr &= *msg_ptr; } else { *lsb_ptr |= *msg_ptr; 802b740: 4317 orrs r7, r2 802b742: e7fa b.n 802b73a else { return ERR_ARG; } } p = p->next; 802b744: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 802b746: 4625 mov r5, r4 u8_t *lsb_ptr = (u8_t*)value + sizeof(s32_t) - 1; #endif u8_t sign; plen = 0; while (p != NULL) 802b748: 2800 cmp r0, #0 802b74a: d1ae bne.n 802b6aa 802b74c: e7bb b.n 802b6c6 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 802b74e: b240 sxtb r0, r0 802b750: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 0802b754 : * @param oid return object identifier struct * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) decode */ err_t snmp_asn1_dec_oid(struct pbuf *p, u16_t ofs, u16_t len, struct snmp_obj_id *oid) { 802b754: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} u16_t plen, base; u8_t *msg_ptr; s32_t *oid_ptr; plen = 0; 802b758: 2600 movs r6, #0 while (p != NULL) 802b75a: e08d b.n 802b878 { base = plen; plen += p->len; 802b75c: 8944 ldrh r4, [r0, #10] 802b75e: 1934 adds r4, r6, r4 802b760: b2a4 uxth r4, r4 if (ofs < plen) 802b762: 42a1 cmp r1, r4 802b764: f080 8086 bcs.w 802b874 { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; oid->len = 0; 802b768: f04f 0800 mov.w r8, #0 { base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; 802b76c: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; oid->len = 0; 802b76e: f883 8000 strb.w r8, [r3] oid_ptr = &oid->id[0]; if (len > 0) 802b772: b90a cbnz r2, 802b778 } else { /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; 802b774: 2000 movs r0, #0 802b776: e083 b.n 802b880 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 802b778: 1b8e subs r6, r1, r6 802b77a: 19bd adds r5, r7, r6 oid->len = 0; oid_ptr = &oid->id[0]; if (len > 0) { /* first compressed octet */ if (*msg_ptr == 0x2B) 802b77c: f817 c006 ldrb.w ip, [r7, r6] 802b780: f1bc 0f2b cmp.w ip, #43 ; 0x2b 802b784: d103 bne.n 802b78e { /* (most) common case 1.3 (iso.org) */ *oid_ptr = 1; 802b786: 2601 movs r6, #1 802b788: 605e str r6, [r3, #4] oid_ptr++; *oid_ptr = 3; 802b78a: 2603 movs r6, #3 802b78c: e016 b.n 802b7bc oid_ptr++; } else if (*msg_ptr < 40) 802b78e: f1bc 0f27 cmp.w ip, #39 ; 0x27 802b792: d803 bhi.n 802b79c { *oid_ptr = 0; 802b794: f8c3 8004 str.w r8, [r3, #4] oid_ptr++; *oid_ptr = *msg_ptr; 802b798: 5dbe ldrb r6, [r7, r6] 802b79a: e00f b.n 802b7bc oid_ptr++; } else if (*msg_ptr < 80) 802b79c: f1bc 0f4f cmp.w ip, #79 ; 0x4f 802b7a0: d806 bhi.n 802b7b0 { *oid_ptr = 1; 802b7a2: f04f 0c01 mov.w ip, #1 802b7a6: f8c3 c004 str.w ip, [r3, #4] oid_ptr++; *oid_ptr = (*msg_ptr) - 40; 802b7aa: 5dbe ldrb r6, [r7, r6] 802b7ac: 3e28 subs r6, #40 ; 0x28 802b7ae: e005 b.n 802b7bc oid_ptr++; } else { *oid_ptr = 2; 802b7b0: f04f 0c02 mov.w ip, #2 802b7b4: f8c3 c004 str.w ip, [r3, #4] oid_ptr++; *oid_ptr = (*msg_ptr) - 80; 802b7b8: 5dbe ldrb r6, [r7, r6] 802b7ba: 3e50 subs r6, #80 ; 0x50 { /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; } len--; 802b7bc: 3a01 subs r2, #1 *oid_ptr = 2; oid_ptr++; *oid_ptr = (*msg_ptr) - 80; oid_ptr++; } oid->len = 2; 802b7be: 2702 movs r7, #2 { /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; } len--; 802b7c0: b292 uxth r2, r2 } else { *oid_ptr = 2; oid_ptr++; *oid_ptr = (*msg_ptr) - 80; 802b7c2: 609e str r6, [r3, #8] oid_ptr++; } oid->len = 2; 802b7c4: 701f strb r7, [r3, #0] else { *oid_ptr = 2; oid_ptr++; *oid_ptr = (*msg_ptr) - 80; oid_ptr++; 802b7c6: f103 060c add.w r6, r3, #12 /* accepting zero length identifiers e.g. for getnext operation. uncommon but valid */ return ERR_OK; } len--; if (len > 0) 802b7ca: 2a00 cmp r2, #0 802b7cc: d04b beq.n 802b866 { ofs += 1; 802b7ce: 3101 adds r1, #1 802b7d0: b289 uxth r1, r1 if (ofs >= plen) 802b7d2: 42a1 cmp r1, r4 802b7d4: d308 bcc.n 802b7e8 { /* next octet in next pbuf */ p = p->next; 802b7d6: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 802b7d8: b908 cbnz r0, 802b7de 802b7da: 20f2 movs r0, #242 ; 0xf2 802b7dc: e050 b.n 802b880 msg_ptr = (u8_t*)p->payload; plen += p->len; 802b7de: 8947 ldrh r7, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 802b7e0: 6845 ldr r5, [r0, #4] plen += p->len; 802b7e2: 19e4 adds r4, r4, r7 802b7e4: b2a4 uxth r4, r4 802b7e6: e03e b.n 802b866 } else { /* next octet in same pbuf */ msg_ptr++; 802b7e8: 3501 adds r5, #1 802b7ea: e03c b.n 802b866 } } while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN)) { /* sub-identifier uses multiple octets */ if (*msg_ptr & 0x80) 802b7ec: 782f ldrb r7, [r5, #0] 802b7ee: f017 0f80 tst.w r7, #128 ; 0x80 802b7f2: d023 beq.n 802b83c 802b7f4: e014 b.n 802b820 while ((*msg_ptr & 0x80) && (len > 1)) { len--; sub_id = (sub_id << 7) + (*msg_ptr & ~0x80); ofs += 1; 802b7f6: 3101 adds r1, #1 802b7f8: b289 uxth r1, r1 { s32_t sub_id = 0; while ((*msg_ptr & 0x80) && (len > 1)) { len--; 802b7fa: 3a01 subs r2, #1 sub_id = (sub_id << 7) + (*msg_ptr & ~0x80); 802b7fc: f02c 0c80 bic.w ip, ip, #128 ; 0x80 ofs += 1; if (ofs >= plen) 802b800: 42a1 cmp r1, r4 { s32_t sub_id = 0; while ((*msg_ptr & 0x80) && (len > 1)) { len--; 802b802: b292 uxth r2, r2 sub_id = (sub_id << 7) + (*msg_ptr & ~0x80); 802b804: eb0c 17c7 add.w r7, ip, r7, lsl #7 ofs += 1; if (ofs >= plen) 802b808: d308 bcc.n 802b81c { /* next octet in next pbuf */ p = p->next; 802b80a: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 802b80c: 2800 cmp r0, #0 802b80e: d0e4 beq.n 802b7da msg_ptr = (u8_t*)p->payload; plen += p->len; 802b810: f8b0 c00a ldrh.w ip, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 802b814: 6845 ldr r5, [r0, #4] plen += p->len; 802b816: 4464 add r4, ip 802b818: b2a4 uxth r4, r4 802b81a: e002 b.n 802b822 } else { /* next octet in same pbuf */ msg_ptr++; 802b81c: 3501 adds r5, #1 802b81e: e000 b.n 802b822 } } while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN)) { /* sub-identifier uses multiple octets */ if (*msg_ptr & 0x80) 802b820: 2700 movs r7, #0 { s32_t sub_id = 0; while ((*msg_ptr & 0x80) && (len > 1)) 802b822: f895 c000 ldrb.w ip, [r5] 802b826: f01c 0f80 tst.w ip, #128 ; 0x80 802b82a: d02c beq.n 802b886 802b82c: 2a01 cmp r2, #1 802b82e: d1e2 bne.n 802b7f6 802b830: e009 b.n 802b846 } } if (!(*msg_ptr & 0x80) && (len > 0)) { /* last octet sub-identifier */ len--; 802b832: 3a01 subs r2, #1 802b834: b292 uxth r2, r2 sub_id = (sub_id << 7) + *msg_ptr; 802b836: eb0c 17c7 add.w r7, ip, r7, lsl #7 802b83a: e001 b.n 802b840 } } else { /* !(*msg_ptr & 0x80) sub-identifier uses single octet */ len--; 802b83c: 3a01 subs r2, #1 802b83e: b292 uxth r2, r2 *oid_ptr = *msg_ptr; 802b840: f846 7c04 str.w r7, [r6, #-4] } if (len > 0) 802b844: b162 cbz r2, 802b860 { /* remaining oid bytes available ... */ ofs += 1; 802b846: 3101 adds r1, #1 802b848: b289 uxth r1, r1 if (ofs >= plen) 802b84a: 42a1 cmp r1, r4 802b84c: d307 bcc.n 802b85e { /* next octet in next pbuf */ p = p->next; 802b84e: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 802b850: 2800 cmp r0, #0 802b852: d0c2 beq.n 802b7da msg_ptr = (u8_t*)p->payload; plen += p->len; 802b854: 8947 ldrh r7, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 802b856: 6845 ldr r5, [r0, #4] plen += p->len; 802b858: 19e4 adds r4, r4, r7 802b85a: b2a4 uxth r4, r4 802b85c: e000 b.n 802b860 } else { /* next octet in same pbuf */ msg_ptr++; 802b85e: 3501 adds r5, #1 } } oid_ptr++; oid->len++; 802b860: 781f ldrb r7, [r3, #0] 802b862: 3701 adds r7, #1 802b864: 701f strb r7, [r3, #0] 802b866: 3604 adds r6, #4 { /* next octet in same pbuf */ msg_ptr++; } } while ((len > 0) && (oid->len < LWIP_SNMP_OBJ_ID_LEN)) 802b868: 2a00 cmp r2, #0 802b86a: d083 beq.n 802b774 802b86c: 781f ldrb r7, [r3, #0] 802b86e: 2f1f cmp r7, #31 802b870: d9bc bls.n 802b7ec 802b872: e7b2 b.n 802b7da /* len > 0, oid->len == LWIP_SNMP_OBJ_ID_LEN or malformed encoding */ return ERR_ARG; } } p = p->next; 802b874: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 802b876: 4626 mov r6, r4 u16_t plen, base; u8_t *msg_ptr; s32_t *oid_ptr; plen = 0; while (p != NULL) 802b878: 2800 cmp r0, #0 802b87a: f47f af6f bne.w 802b75c 802b87e: e7ac b.n 802b7da 802b880: b240 sxtb r0, r0 802b882: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} { /* next octet in same pbuf */ msg_ptr++; } } if (!(*msg_ptr & 0x80) && (len > 0)) 802b886: 2a00 cmp r2, #0 802b888: d1d3 bne.n 802b832 802b88a: e7e9 b.n 802b860 0802b88c : * @param raw return raw bytes * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) decode */ err_t snmp_asn1_dec_raw(struct pbuf *p, u16_t ofs, u16_t len, u16_t raw_len, u8_t *raw) { 802b88c: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; if (len > 0) 802b88e: 2a00 cmp r2, #0 802b890: d12d bne.n 802b8ee 802b892: e027 b.n 802b8e4 { plen = 0; while (p != NULL) { base = plen; plen += p->len; 802b894: 8944 ldrh r4, [r0, #10] 802b896: 1934 adds r4, r6, r4 802b898: b2a4 uxth r4, r4 if (ofs < plen) 802b89a: 42a1 cmp r1, r4 802b89c: d224 bcs.n 802b8e8 { msg_ptr = (u8_t*)p->payload; 802b89e: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 802b8a0: 1b8d subs r5, r1, r6 if (raw_len >= len) 802b8a2: 4293 cmp r3, r2 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 802b8a4: 443d add r5, r7 if (raw_len >= len) 802b8a6: d305 bcc.n 802b8b4 802b8a8: 9b05 ldr r3, [sp, #20] * @param raw_len length of the raw return value * @param raw return raw bytes * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) decode */ err_t snmp_asn1_dec_raw(struct pbuf *p, u16_t ofs, u16_t len, u16_t raw_len, u8_t *raw) 802b8aa: b29e uxth r6, r3 802b8ac: 18b2 adds r2, r6, r2 802b8ae: b292 uxth r2, r2 802b8b0: 1b89 subs r1, r1, r6 802b8b2: e011 b.n 802b8d8 return ERR_OK; } else { /* raw_len < len, not enough dst space */ return ERR_ARG; 802b8b4: 20f2 movs r0, #242 ; 0xf2 802b8b6: e01e b.n 802b8f6 { while (len > 1) { /* copy len - 1 octets */ len--; *raw = *msg_ptr; 802b8b8: 782e ldrb r6, [r5, #0] 802b8ba: f803 6b01 strb.w r6, [r3], #1 * @param raw_len length of the raw return value * @param raw return raw bytes * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) decode */ err_t snmp_asn1_dec_raw(struct pbuf *p, u16_t ofs, u16_t len, u16_t raw_len, u8_t *raw) 802b8be: 18ce adds r6, r1, r3 /* copy len - 1 octets */ len--; *raw = *msg_ptr; raw++; ofs += 1; if (ofs >= plen) 802b8c0: b2b6 uxth r6, r6 802b8c2: 42a6 cmp r6, r4 802b8c4: d307 bcc.n 802b8d6 { /* next octet in next pbuf */ p = p->next; 802b8c6: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 802b8c8: 2800 cmp r0, #0 802b8ca: d0f3 beq.n 802b8b4 msg_ptr = (u8_t*)p->payload; plen += p->len; 802b8cc: 8946 ldrh r6, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 802b8ce: 6845 ldr r5, [r0, #4] plen += p->len; 802b8d0: 19a4 adds r4, r4, r6 802b8d2: b2a4 uxth r4, r4 802b8d4: e000 b.n 802b8d8 } else { /* next octet in same pbuf */ msg_ptr++; 802b8d6: 3501 adds r5, #1 { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if (raw_len >= len) { while (len > 1) 802b8d8: 1ad7 subs r7, r2, r3 802b8da: b2bf uxth r7, r7 802b8dc: 2f01 cmp r7, #1 802b8de: d8eb bhi.n 802b8b8 /* next octet in same pbuf */ msg_ptr++; } } /* copy last octet */ *raw = *msg_ptr; 802b8e0: 782a ldrb r2, [r5, #0] 802b8e2: 701a strb r2, [r3, #0] return ERR_OK; 802b8e4: 2000 movs r0, #0 802b8e6: e006 b.n 802b8f6 { /* raw_len < len, not enough dst space */ return ERR_ARG; } } p = p->next; 802b8e8: 6800 ldr r0, [r0, #0] { plen = 0; while (p != NULL) { base = plen; plen += p->len; 802b8ea: 4626 mov r6, r4 802b8ec: e000 b.n 802b8f0 snmp_asn1_dec_raw(struct pbuf *p, u16_t ofs, u16_t len, u16_t raw_len, u8_t *raw) { u16_t plen, base; u8_t *msg_ptr; if (len > 0) 802b8ee: 2600 movs r6, #0 { plen = 0; while (p != NULL) 802b8f0: 2800 cmp r0, #0 802b8f2: d1cf bne.n 802b894 802b8f4: e7de b.n 802b8b4 else { /* len == 0, empty string */ return ERR_OK; } } 802b8f6: b240 sxtb r0, r0 802b8f8: bdf0 pop {r4, r5, r6, r7, pc} 0802b8fa : * @param octets_needed points to the return value */ void snmp_asn1_enc_length_cnt(u16_t length, u8_t *octets_needed) { if (length < 0x80U) 802b8fa: 287f cmp r0, #127 ; 0x7f 802b8fc: d801 bhi.n 802b902 { *octets_needed = 1; 802b8fe: 2301 movs r3, #1 802b900: e004 b.n 802b90c } else if (length < 0x100U) 802b902: 28ff cmp r0, #255 ; 0xff 802b904: d801 bhi.n 802b90a { *octets_needed = 2; 802b906: 2302 movs r3, #2 802b908: e000 b.n 802b90c } else { *octets_needed = 3; 802b90a: 2303 movs r3, #3 802b90c: 700b strb r3, [r1, #0] 802b90e: 4770 bx lr 0802b910 : * of 0xFFFFFFFF is preceded with 0x00 and the length is 5 octets!! */ void snmp_asn1_enc_u32t_cnt(u32_t value, u16_t *octets_needed) { if (value < 0x80UL) 802b910: 287f cmp r0, #127 ; 0x7f 802b912: d801 bhi.n 802b918 { *octets_needed = 1; 802b914: 2301 movs r3, #1 802b916: e00e b.n 802b936 } else if (value < 0x8000UL) 802b918: f5b0 4f00 cmp.w r0, #32768 ; 0x8000 802b91c: d201 bcs.n 802b922 { *octets_needed = 2; 802b91e: 2302 movs r3, #2 802b920: e009 b.n 802b936 } else if (value < 0x800000UL) 802b922: f5b0 0f00 cmp.w r0, #8388608 ; 0x800000 802b926: d201 bcs.n 802b92c { *octets_needed = 3; 802b928: 2303 movs r3, #3 802b92a: e004 b.n 802b936 } else if (value < 0x80000000UL) 802b92c: 2800 cmp r0, #0 802b92e: db01 blt.n 802b934 { *octets_needed = 4; 802b930: 2304 movs r3, #4 802b932: e000 b.n 802b936 } else { *octets_needed = 5; 802b934: 2305 movs r3, #5 802b936: 800b strh r3, [r1, #0] 802b938: 4770 bx lr 0802b93a : void snmp_asn1_enc_s32t_cnt(s32_t value, u16_t *octets_needed) { if (value < 0) { value = ~value; 802b93a: 43c3 mvns r3, r0 802b93c: 4283 cmp r3, r0 802b93e: bfa8 it ge 802b940: 4618 movge r0, r3 } if (value < 0x80L) 802b942: 287f cmp r0, #127 ; 0x7f 802b944: dc01 bgt.n 802b94a { *octets_needed = 1; 802b946: 2301 movs r3, #1 802b948: e00a b.n 802b960 } else if (value < 0x8000L) 802b94a: f5b0 4f00 cmp.w r0, #32768 ; 0x8000 802b94e: da01 bge.n 802b954 { *octets_needed = 2; 802b950: 2302 movs r3, #2 802b952: e005 b.n 802b960 } else if (value < 0x800000L) 802b954: f5b0 0f00 cmp.w r0, #8388608 ; 0x800000 802b958: da01 bge.n 802b95e { *octets_needed = 3; 802b95a: 2303 movs r3, #3 802b95c: e000 b.n 802b960 } else { *octets_needed = 4; 802b95e: 2304 movs r3, #4 802b960: 800b strh r3, [r1, #0] 802b962: 4770 bx lr 0802b964 : { s32_t sub_id; u8_t cnt; cnt = 0; if (ident_len > 1) 802b964: 2801 cmp r0, #1 * @param ident points to object identifier array * @param octets_needed points to the return value */ void snmp_asn1_enc_oid_cnt(u8_t ident_len, s32_t *ident, u16_t *octets_needed) { 802b966: b510 push {r4, lr} s32_t sub_id; u8_t cnt; cnt = 0; if (ident_len > 1) 802b968: d904 bls.n 802b974 { /* compressed prefix in one octet */ cnt++; ident_len -= 2; 802b96a: 3802 subs r0, #2 802b96c: b2c0 uxtb r0, r0 ident += 2; 802b96e: 3108 adds r1, #8 cnt = 0; if (ident_len > 1) { /* compressed prefix in one octet */ cnt++; 802b970: 2301 movs r3, #1 802b972: e000 b.n 802b976 snmp_asn1_enc_oid_cnt(u8_t ident_len, s32_t *ident, u16_t *octets_needed) { s32_t sub_id; u8_t cnt; cnt = 0; 802b974: 2300 movs r3, #0 * @param ident_len object identifier array length * @param ident points to object identifier array * @param octets_needed points to the return value */ void snmp_asn1_enc_oid_cnt(u8_t ident_len, s32_t *ident, u16_t *octets_needed) 802b976: 3904 subs r1, #4 802b978: e008 b.n 802b98c ident_len -= 2; ident += 2; } while(ident_len > 0) { ident_len--; 802b97a: 3801 subs r0, #1 sub_id = *ident; 802b97c: f851 4f04 ldr.w r4, [r1, #4]! ident_len -= 2; ident += 2; } while(ident_len > 0) { ident_len--; 802b980: b2c0 uxtb r0, r0 sub_id >>= 7; cnt++; while(sub_id > 0) { sub_id >>= 7; 802b982: 11e4 asrs r4, r4, #7 cnt++; 802b984: 3301 adds r3, #1 ident_len--; sub_id = *ident; sub_id >>= 7; cnt++; while(sub_id > 0) 802b986: 2c00 cmp r4, #0 { sub_id >>= 7; cnt++; 802b988: b2db uxtb r3, r3 ident_len--; sub_id = *ident; sub_id >>= 7; cnt++; while(sub_id > 0) 802b98a: dcfa bgt.n 802b982 /* compressed prefix in one octet */ cnt++; ident_len -= 2; ident += 2; } while(ident_len > 0) 802b98c: 2800 cmp r0, #0 802b98e: d1f4 bne.n 802b97a sub_id >>= 7; cnt++; } ident++; } *octets_needed = cnt; 802b990: 8013 strh r3, [r2, #0] 802b992: bd10 pop {r4, pc} 0802b994 : * @param type input ASN1 type * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode */ err_t snmp_asn1_enc_type(struct pbuf *p, u16_t ofs, u8_t type) { 802b994: b510 push {r4, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 802b996: 2300 movs r3, #0 while (p != NULL) 802b998: e00b b.n 802b9b2 { base = plen; plen += p->len; 802b99a: 8944 ldrh r4, [r0, #10] 802b99c: 191c adds r4, r3, r4 802b99e: b2a4 uxth r4, r4 if (ofs < plen) 802b9a0: 42a1 cmp r1, r4 802b9a2: d204 bcs.n 802b9ae { msg_ptr = (u8_t*)p->payload; 802b9a4: 6840 ldr r0, [r0, #4] msg_ptr += ofs - base; 802b9a6: 1acb subs r3, r1, r3 *msg_ptr = type; 802b9a8: 54c2 strb r2, [r0, r3] return ERR_OK; 802b9aa: 2000 movs r0, #0 802b9ac: e004 b.n 802b9b8 } p = p->next; 802b9ae: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 802b9b0: 4623 mov r3, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 802b9b2: 2800 cmp r0, #0 802b9b4: d1f1 bne.n 802b99a return ERR_OK; } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; 802b9b6: 20f2 movs r0, #242 ; 0xf2 } 802b9b8: b240 sxtb r0, r0 802b9ba: bd10 pop {r4, pc} 0802b9bc : * @param length is the host order length to be encoded * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode */ err_t snmp_asn1_enc_length(struct pbuf *p, u16_t ofs, u16_t length) { 802b9bc: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 802b9be: 2400 movs r4, #0 while (p != NULL) 802b9c0: e03f b.n 802ba42 { base = plen; plen += p->len; 802b9c2: 8943 ldrh r3, [r0, #10] 802b9c4: 18e3 adds r3, r4, r3 802b9c6: b29b uxth r3, r3 if (ofs < plen) 802b9c8: 4299 cmp r1, r3 802b9ca: d238 bcs.n 802ba3e { msg_ptr = (u8_t*)p->payload; 802b9cc: 6845 ldr r5, [r0, #4] msg_ptr += ofs - base; 802b9ce: 1b0c subs r4, r1, r4 if (length < 0x80) 802b9d0: 2a7f cmp r2, #127 ; 0x7f base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 802b9d2: eb05 0604 add.w r6, r5, r4 if (length < 0x80) 802b9d6: d801 bhi.n 802b9dc { *msg_ptr = (u8_t)length; 802b9d8: 552a strb r2, [r5, r4] 802b9da: e02e b.n 802ba3a return ERR_OK; } else if (length < 0x100) 802b9dc: 2aff cmp r2, #255 ; 0xff 802b9de: f101 0701 add.w r7, r1, #1 802b9e2: d80d bhi.n 802ba00 { *msg_ptr = 0x81; ofs += 1; if (ofs >= plen) 802b9e4: b2bf uxth r7, r7 *msg_ptr = (u8_t)length; return ERR_OK; } else if (length < 0x100) { *msg_ptr = 0x81; 802b9e6: 2181 movs r1, #129 ; 0x81 ofs += 1; if (ofs >= plen) 802b9e8: 429f cmp r7, r3 *msg_ptr = (u8_t)length; return ERR_OK; } else if (length < 0x100) { *msg_ptr = 0x81; 802b9ea: 5529 strb r1, [r5, r4] ofs += 1; if (ofs >= plen) 802b9ec: d305 bcc.n 802b9fa { /* next octet in next pbuf */ p = p->next; 802b9ee: 6803 ldr r3, [r0, #0] if (p == NULL) { return ERR_ARG; } 802b9f0: b90b cbnz r3, 802b9f6 802b9f2: 20f2 movs r0, #242 ; 0xf2 802b9f4: e028 b.n 802ba48 msg_ptr = (u8_t*)p->payload; 802b9f6: 685e ldr r6, [r3, #4] 802b9f8: e000 b.n 802b9fc } else { /* next octet in same pbuf */ msg_ptr++; 802b9fa: 3601 adds r6, #1 } *msg_ptr = (u8_t)length; 802b9fc: 7032 strb r2, [r6, #0] 802b9fe: e01c b.n 802ba3a i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 802ba00: b2bf uxth r7, r7 else { u8_t i; /* length >= 0x100 && length <= 0xFFFF */ *msg_ptr = 0x82; 802ba02: f04f 0c82 mov.w ip, #130 ; 0x82 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 802ba06: 429f cmp r7, r3 else { u8_t i; /* length >= 0x100 && length <= 0xFFFF */ *msg_ptr = 0x82; 802ba08: f805 c004 strb.w ip, [r5, r4] i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 802ba0c: d201 bcs.n 802ba12 plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 802ba0e: 1c74 adds r4, r6, #1 802ba10: e006 b.n 802ba20 i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 802ba12: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 802ba14: 2800 cmp r0, #0 802ba16: d0ec beq.n 802b9f2 msg_ptr = (u8_t*)p->payload; plen += p->len; 802ba18: 8945 ldrh r5, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 802ba1a: 6844 ldr r4, [r0, #4] plen += p->len; 802ba1c: 195b adds r3, r3, r5 802ba1e: b29b uxth r3, r3 *msg_ptr = 0x82; i = 2; while (i > 0) { i--; ofs += 1; 802ba20: 3102 adds r1, #2 if (ofs >= plen) 802ba22: b289 uxth r1, r1 *msg_ptr = (u8_t)length; } else { /* most significant length octet */ *msg_ptr = (u8_t)(length >> 8); 802ba24: 0a15 lsrs r5, r2, #8 i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 802ba26: 4299 cmp r1, r3 *msg_ptr = (u8_t)length; } else { /* most significant length octet */ *msg_ptr = (u8_t)(length >> 8); 802ba28: 7025 strb r5, [r4, #0] i = 2; while (i > 0) { i--; ofs += 1; if (ofs >= plen) 802ba2a: d201 bcs.n 802ba30 plen += p->len; } else { /* next octet in same pbuf */ msg_ptr++; 802ba2c: 3401 adds r4, #1 802ba2e: e003 b.n 802ba38 i--; ofs += 1; if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; 802ba30: 6803 ldr r3, [r0, #0] if (p == NULL) { return ERR_ARG; } 802ba32: 2b00 cmp r3, #0 802ba34: d0dd beq.n 802b9f2 msg_ptr = (u8_t*)p->payload; 802ba36: 685c ldr r4, [r3, #4] msg_ptr++; } if (i == 0) { /* least significant length octet */ *msg_ptr = (u8_t)length; 802ba38: 7022 strb r2, [r4, #0] { /* most significant length octet */ *msg_ptr = (u8_t)(length >> 8); } } return ERR_OK; 802ba3a: 2000 movs r0, #0 802ba3c: e004 b.n 802ba48 } } p = p->next; 802ba3e: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 802ba40: 461c mov r4, r3 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 802ba42: 2800 cmp r0, #0 802ba44: d1bd bne.n 802b9c2 802ba46: e7d4 b.n 802b9f2 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 802ba48: b240 sxtb r0, r0 802ba4a: bdf0 pop {r4, r5, r6, r7, pc} 0802ba4c : * * @see snmp_asn1_enc_u32t_cnt() */ err_t snmp_asn1_enc_u32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, u32_t value) { 802ba4c: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 802ba4e: 2500 movs r5, #0 while (p != NULL) 802ba50: e037 b.n 802bac2 { base = plen; plen += p->len; 802ba52: 8944 ldrh r4, [r0, #10] 802ba54: 192c adds r4, r5, r4 802ba56: b2a4 uxth r4, r4 if (ofs < plen) 802ba58: 42a1 cmp r1, r4 802ba5a: d230 bcs.n 802babe { msg_ptr = (u8_t*)p->payload; 802ba5c: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 802ba5e: 1b4e subs r6, r1, r5 if (octets_needed == 5) 802ba60: 2a05 cmp r2, #5 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 802ba62: eb07 0506 add.w r5, r7, r6 if (octets_needed == 5) 802ba66: d110 bne.n 802ba8a { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; *msg_ptr = 0x00; ofs += 1; 802ba68: 3101 adds r1, #1 802ba6a: b289 uxth r1, r1 if (octets_needed == 5) { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; *msg_ptr = 0x00; 802ba6c: 2200 movs r2, #0 ofs += 1; if (ofs >= plen) 802ba6e: 42a1 cmp r1, r4 if (octets_needed == 5) { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; *msg_ptr = 0x00; 802ba70: 55ba strb r2, [r7, r6] ofs += 1; if (ofs >= plen) 802ba72: d308 bcc.n 802ba86 { /* next octet in next pbuf */ p = p->next; 802ba74: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 802ba76: b908 cbnz r0, 802ba7c 802ba78: 20f2 movs r0, #242 ; 0xf2 802ba7a: e025 b.n 802bac8 msg_ptr = (u8_t*)p->payload; plen += p->len; 802ba7c: 8942 ldrh r2, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 802ba7e: 6845 ldr r5, [r0, #4] plen += p->len; 802ba80: 18a4 adds r4, r4, r2 802ba82: b2a4 uxth r4, r4 802ba84: e000 b.n 802ba88 } else { /* next octet in same pbuf */ msg_ptr++; 802ba86: 3501 adds r5, #1 msg_ptr += ofs - base; if (octets_needed == 5) { /* not enough bits in 'value' add leading 0x00 */ octets_needed--; 802ba88: 2204 movs r2, #4 * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode * * @see snmp_asn1_enc_u32t_cnt() */ err_t snmp_asn1_enc_u32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, u32_t value) 802ba8a: 1851 adds r1, r2, r1 802ba8c: e012 b.n 802bab4 msg_ptr++; } } while (octets_needed > 1) { octets_needed--; 802ba8e: 3a01 subs r2, #1 802ba90: b292 uxth r2, r2 *msg_ptr = (u8_t)(value >> (octets_needed << 3)); 802ba92: 00d6 lsls r6, r2, #3 802ba94: fa23 f606 lsr.w r6, r3, r6 802ba98: 702e strb r6, [r5, #0] * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode * * @see snmp_asn1_enc_u32t_cnt() */ err_t snmp_asn1_enc_u32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, u32_t value) 802ba9a: 1a8e subs r6, r1, r2 while (octets_needed > 1) { octets_needed--; *msg_ptr = (u8_t)(value >> (octets_needed << 3)); ofs += 1; if (ofs >= plen) 802ba9c: b2b6 uxth r6, r6 802ba9e: 42a6 cmp r6, r4 802baa0: d307 bcc.n 802bab2 { /* next octet in next pbuf */ p = p->next; 802baa2: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 802baa4: 2800 cmp r0, #0 802baa6: d0e7 beq.n 802ba78 msg_ptr = (u8_t*)p->payload; plen += p->len; 802baa8: 8946 ldrh r6, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 802baaa: 6845 ldr r5, [r0, #4] plen += p->len; 802baac: 19a4 adds r4, r4, r6 802baae: b2a4 uxth r4, r4 802bab0: e000 b.n 802bab4 } else { /* next octet in same pbuf */ msg_ptr++; 802bab2: 3501 adds r5, #1 { /* next octet in same pbuf */ msg_ptr++; } } while (octets_needed > 1) 802bab4: 2a01 cmp r2, #1 802bab6: d8ea bhi.n 802ba8e /* next octet in same pbuf */ msg_ptr++; } } /* (only) one least significant octet */ *msg_ptr = (u8_t)value; 802bab8: 702b strb r3, [r5, #0] return ERR_OK; 802baba: 2000 movs r0, #0 802babc: e004 b.n 802bac8 } p = p->next; 802babe: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 802bac0: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 802bac2: 2800 cmp r0, #0 802bac4: d1c5 bne.n 802ba52 802bac6: e7d7 b.n 802ba78 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 802bac8: b240 sxtb r0, r0 802baca: bdf0 pop {r4, r5, r6, r7, pc} 0802bacc : * * @see snmp_asn1_enc_s32t_cnt() */ err_t snmp_asn1_enc_s32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, s32_t value) { 802bacc: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 802bace: 2600 movs r6, #0 while (p != NULL) 802bad0: e024 b.n 802bb1c { base = plen; plen += p->len; 802bad2: 8944 ldrh r4, [r0, #10] 802bad4: 1934 adds r4, r6, r4 802bad6: b2a4 uxth r4, r4 if (ofs < plen) 802bad8: 42a1 cmp r1, r4 802bada: d21d bcs.n 802bb18 { msg_ptr = (u8_t*)p->payload; 802badc: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 802bade: 1b8d subs r5, r1, r6 802bae0: 197d adds r5, r7, r5 * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode * * @see snmp_asn1_enc_s32t_cnt() */ err_t snmp_asn1_enc_s32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, s32_t value) 802bae2: 1851 adds r1, r2, r1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (octets_needed > 1) 802bae4: e013 b.n 802bb0e { octets_needed--; 802bae6: 3a01 subs r2, #1 802bae8: b292 uxth r2, r2 *msg_ptr = (u8_t)(value >> (octets_needed << 3)); 802baea: 00d6 lsls r6, r2, #3 802baec: fa43 f606 asr.w r6, r3, r6 802baf0: 702e strb r6, [r5, #0] * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode * * @see snmp_asn1_enc_s32t_cnt() */ err_t snmp_asn1_enc_s32t(struct pbuf *p, u16_t ofs, u16_t octets_needed, s32_t value) 802baf2: 1a8e subs r6, r1, r2 while (octets_needed > 1) { octets_needed--; *msg_ptr = (u8_t)(value >> (octets_needed << 3)); ofs += 1; if (ofs >= plen) 802baf4: b2b6 uxth r6, r6 802baf6: 42a6 cmp r6, r4 802baf8: d308 bcc.n 802bb0c { /* next octet in next pbuf */ p = p->next; 802bafa: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 802bafc: b908 cbnz r0, 802bb02 802bafe: 20f2 movs r0, #242 ; 0xf2 802bb00: e00f b.n 802bb22 msg_ptr = (u8_t*)p->payload; plen += p->len; 802bb02: 8946 ldrh r6, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 802bb04: 6845 ldr r5, [r0, #4] plen += p->len; 802bb06: 19a4 adds r4, r4, r6 802bb08: b2a4 uxth r4, r4 802bb0a: e000 b.n 802bb0e } else { /* next octet in same pbuf */ msg_ptr++; 802bb0c: 3501 adds r5, #1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (octets_needed > 1) 802bb0e: 2a01 cmp r2, #1 802bb10: d8e9 bhi.n 802bae6 /* next octet in same pbuf */ msg_ptr++; } } /* (only) one least significant octet */ *msg_ptr = (u8_t)value; 802bb12: 702b strb r3, [r5, #0] return ERR_OK; 802bb14: 2000 movs r0, #0 802bb16: e004 b.n 802bb22 } p = p->next; 802bb18: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 802bb1a: 4626 mov r6, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 802bb1c: 2800 cmp r0, #0 802bb1e: d1d8 bne.n 802bad2 802bb20: e7ed b.n 802bafe } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 802bb22: b240 sxtb r0, r0 802bb24: bdf0 pop {r4, r5, r6, r7, pc} 0802bb26 : * @param ident points to object identifier array * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode */ err_t snmp_asn1_enc_oid(struct pbuf *p, u16_t ofs, u8_t ident_len, s32_t *ident) { 802bb26: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 802bb2a: 2500 movs r5, #0 while (p != NULL) 802bb2c: e068 b.n 802bc00 { base = plen; plen += p->len; 802bb2e: 8944 ldrh r4, [r0, #10] 802bb30: 192c adds r4, r5, r4 802bb32: b2a4 uxth r4, r4 if (ofs < plen) 802bb34: 42a1 cmp r1, r4 802bb36: d261 bcs.n 802bbfc { msg_ptr = (u8_t*)p->payload; 802bb38: 6846 ldr r6, [r0, #4] msg_ptr += ofs - base; 802bb3a: 1b4d subs r5, r1, r5 if (ident_len > 1) 802bb3c: 2a01 cmp r2, #1 base = plen; plen += p->len; if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; 802bb3e: eb06 0805 add.w r8, r6, r5 if (ident_len > 1) 802bb42: d801 bhi.n 802bb48 } else { /* @bug: allow empty varbinds for symmetry (we must decode them for getnext), allow partial compression?? */ /* ident_len <= 1, at least we need zeroDotZero (0.0) (ident_len == 2) */ return ERR_ARG; 802bb44: 20f2 movs r0, #242 ; 0xf2 802bb46: e05e b.n 802bc06 msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; if (ident_len > 1) { if ((ident[0] == 1) && (ident[1] == 3)) 802bb48: f8d3 c000 ldr.w ip, [r3] 802bb4c: f1bc 0f01 cmp.w ip, #1 802bb50: d105 bne.n 802bb5e 802bb52: 685f ldr r7, [r3, #4] 802bb54: 2f03 cmp r7, #3 802bb56: d102 bne.n 802bb5e { /* compressed (most common) prefix .iso.org */ *msg_ptr = 0x2b; 802bb58: 272b movs r7, #43 ; 0x2b 802bb5a: 5577 strb r7, [r6, r5] 802bb5c: e006 b.n 802bb6c } else { /* calculate prefix */ *msg_ptr = (u8_t)((ident[0] * 40) + ident[1]); 802bb5e: 685f ldr r7, [r3, #4] 802bb60: f04f 0928 mov.w r9, #40 ; 0x28 802bb64: fb09 7c0c mla ip, r9, ip, r7 802bb68: f806 c005 strb.w ip, [r6, r5] } ofs += 1; 802bb6c: 3101 adds r1, #1 802bb6e: b289 uxth r1, r1 if (ofs >= plen) 802bb70: 42a1 cmp r1, r4 802bb72: d307 bcc.n 802bb84 { /* next octet in next pbuf */ p = p->next; 802bb74: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 802bb76: 2800 cmp r0, #0 802bb78: d0e4 beq.n 802bb44 msg_ptr = (u8_t*)p->payload; plen += p->len; 802bb7a: 8946 ldrh r6, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 802bb7c: 6845 ldr r5, [r0, #4] plen += p->len; 802bb7e: 19a4 adds r4, r4, r6 802bb80: b2a4 uxth r4, r4 802bb82: e001 b.n 802bb88 } else { /* next octet in same pbuf */ msg_ptr++; 802bb84: f108 0501 add.w r5, r8, #1 } ident_len -= 2; 802bb88: 3a02 subs r2, #2 802bb8a: b2d2 uxtb r2, r2 * @param ident_len object identifier array length * @param ident points to object identifier array * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode */ err_t snmp_asn1_enc_oid(struct pbuf *p, u16_t ofs, u8_t ident_len, s32_t *ident) 802bb8c: 3304 adds r3, #4 { /* @bug: allow empty varbinds for symmetry (we must decode them for getnext), allow partial compression?? */ /* ident_len <= 1, at least we need zeroDotZero (0.0) (ident_len == 2) */ return ERR_ARG; } while (ident_len > 0) 802bb8e: e031 b.n 802bbf4 { s32_t sub_id; u8_t shift, tail; ident_len--; 802bb90: 3a01 subs r2, #1 sub_id = *ident; 802bb92: f853 cf04 ldr.w ip, [r3, #4]! while (ident_len > 0) { s32_t sub_id; u8_t shift, tail; ident_len--; 802bb96: b2d2 uxtb r2, r2 sub_id = *ident; 802bb98: 261c movs r6, #28 tail = 0; 802bb9a: 2700 movs r7, #0 shift = 28; while(shift > 0) { u8_t code; code = (u8_t)(sub_id >> shift); 802bb9c: fa4c f806 asr.w r8, ip, r6 if ((code != 0) || (tail != 0)) 802bba0: f018 0fff tst.w r8, #255 ; 0xff 802bba4: d100 bne.n 802bba8 802bba6: b18f cbz r7, 802bbcc { tail = 1; *msg_ptr = code | 0x80; ofs += 1; 802bba8: 3101 adds r1, #1 802bbaa: b289 uxth r1, r1 code = (u8_t)(sub_id >> shift); if ((code != 0) || (tail != 0)) { tail = 1; *msg_ptr = code | 0x80; 802bbac: f048 0880 orr.w r8, r8, #128 ; 0x80 ofs += 1; if (ofs >= plen) 802bbb0: 42a1 cmp r1, r4 code = (u8_t)(sub_id >> shift); if ((code != 0) || (tail != 0)) { tail = 1; *msg_ptr = code | 0x80; 802bbb2: f885 8000 strb.w r8, [r5] ofs += 1; if (ofs >= plen) 802bbb6: d307 bcc.n 802bbc8 { /* next octet in next pbuf */ p = p->next; 802bbb8: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 802bbba: 2800 cmp r0, #0 802bbbc: d0c2 beq.n 802bb44 msg_ptr = (u8_t*)p->payload; plen += p->len; 802bbbe: 8947 ldrh r7, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 802bbc0: 6845 ldr r5, [r0, #4] plen += p->len; 802bbc2: 19e4 adds r4, r4, r7 802bbc4: b2a4 uxth r4, r4 802bbc6: e000 b.n 802bbca } else { /* next octet in same pbuf */ msg_ptr++; 802bbc8: 3501 adds r5, #1 u8_t code; code = (u8_t)(sub_id >> shift); if ((code != 0) || (tail != 0)) { tail = 1; 802bbca: 2701 movs r7, #1 ident_len--; sub_id = *ident; tail = 0; shift = 28; while(shift > 0) 802bbcc: 3e07 subs r6, #7 802bbce: d1e5 bne.n 802bb9c msg_ptr++; } } shift -= 7; } *msg_ptr = (u8_t)sub_id & 0x7F; 802bbd0: f00c 0c7f and.w ip, ip, #127 ; 0x7f 802bbd4: f885 c000 strb.w ip, [r5] if (ident_len > 0) 802bbd8: b172 cbz r2, 802bbf8 { ofs += 1; 802bbda: 3101 adds r1, #1 802bbdc: b289 uxth r1, r1 if (ofs >= plen) 802bbde: 42a1 cmp r1, r4 802bbe0: d307 bcc.n 802bbf2 { /* next octet in next pbuf */ p = p->next; 802bbe2: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 802bbe4: 2800 cmp r0, #0 802bbe6: d0ad beq.n 802bb44 msg_ptr = (u8_t*)p->payload; plen += p->len; 802bbe8: 8946 ldrh r6, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 802bbea: 6845 ldr r5, [r0, #4] plen += p->len; 802bbec: 19a4 adds r4, r4, r6 802bbee: b2a4 uxth r4, r4 802bbf0: e000 b.n 802bbf4 } else { /* next octet in same pbuf */ msg_ptr++; 802bbf2: 3501 adds r5, #1 { /* @bug: allow empty varbinds for symmetry (we must decode them for getnext), allow partial compression?? */ /* ident_len <= 1, at least we need zeroDotZero (0.0) (ident_len == 2) */ return ERR_ARG; } while (ident_len > 0) 802bbf4: 2a00 cmp r2, #0 802bbf6: d1cb bne.n 802bb90 } } /* proceed to next sub-identifier */ ident++; } return ERR_OK; 802bbf8: 2000 movs r0, #0 802bbfa: e004 b.n 802bc06 } p = p->next; 802bbfc: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 802bbfe: 4625 mov r5, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 802bc00: 2800 cmp r0, #0 802bc02: d194 bne.n 802bb2e 802bc04: e79e b.n 802bb44 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 802bc06: b240 sxtb r0, r0 802bc08: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 0802bc0c : * @param raw points raw data * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode */ err_t snmp_asn1_enc_raw(struct pbuf *p, u16_t ofs, u16_t raw_len, u8_t *raw) { 802bc0c: b5f0 push {r4, r5, r6, r7, lr} u16_t plen, base; u8_t *msg_ptr; plen = 0; 802bc0e: 2600 movs r6, #0 while (p != NULL) 802bc10: e025 b.n 802bc5e { base = plen; plen += p->len; 802bc12: 8944 ldrh r4, [r0, #10] 802bc14: 1934 adds r4, r6, r4 802bc16: b2a4 uxth r4, r4 if (ofs < plen) 802bc18: 42a1 cmp r1, r4 802bc1a: d21e bcs.n 802bc5a { msg_ptr = (u8_t*)p->payload; 802bc1c: 6847 ldr r7, [r0, #4] msg_ptr += ofs - base; 802bc1e: 1b8d subs r5, r1, r6 802bc20: 197d adds r5, r7, r5 * @param raw_len raw data length * @param raw points raw data * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode */ err_t snmp_asn1_enc_raw(struct pbuf *p, u16_t ofs, u16_t raw_len, u8_t *raw) 802bc22: 1851 adds r1, r2, r1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (raw_len > 1) 802bc24: e012 b.n 802bc4c { /* copy raw_len - 1 octets */ raw_len--; 802bc26: 3a01 subs r2, #1 *msg_ptr = *raw; 802bc28: f813 6b01 ldrb.w r6, [r3], #1 msg_ptr += ofs - base; while (raw_len > 1) { /* copy raw_len - 1 octets */ raw_len--; 802bc2c: b292 uxth r2, r2 *msg_ptr = *raw; 802bc2e: 702e strb r6, [r5, #0] * @param raw_len raw data length * @param raw points raw data * @return ERR_OK if successfull, ERR_ARG if we can't (or won't) encode */ err_t snmp_asn1_enc_raw(struct pbuf *p, u16_t ofs, u16_t raw_len, u8_t *raw) 802bc30: 1a8e subs r6, r1, r2 /* copy raw_len - 1 octets */ raw_len--; *msg_ptr = *raw; raw++; ofs += 1; if (ofs >= plen) 802bc32: b2b6 uxth r6, r6 802bc34: 42a6 cmp r6, r4 802bc36: d308 bcc.n 802bc4a { /* next octet in next pbuf */ p = p->next; 802bc38: 6800 ldr r0, [r0, #0] if (p == NULL) { return ERR_ARG; } 802bc3a: b908 cbnz r0, 802bc40 802bc3c: 20f2 movs r0, #242 ; 0xf2 802bc3e: e012 b.n 802bc66 msg_ptr = (u8_t*)p->payload; plen += p->len; 802bc40: 8946 ldrh r6, [r0, #10] if (ofs >= plen) { /* next octet in next pbuf */ p = p->next; if (p == NULL) { return ERR_ARG; } msg_ptr = (u8_t*)p->payload; 802bc42: 6845 ldr r5, [r0, #4] plen += p->len; 802bc44: 19a4 adds r4, r4, r6 802bc46: b2a4 uxth r4, r4 802bc48: e000 b.n 802bc4c } else { /* next octet in same pbuf */ msg_ptr++; 802bc4a: 3501 adds r5, #1 if (ofs < plen) { msg_ptr = (u8_t*)p->payload; msg_ptr += ofs - base; while (raw_len > 1) 802bc4c: 2a01 cmp r2, #1 802bc4e: d8ea bhi.n 802bc26 { /* next octet in same pbuf */ msg_ptr++; } } if (raw_len > 0) 802bc50: b142 cbz r2, 802bc64 { /* copy last or single octet */ *msg_ptr = *raw; 802bc52: 781b ldrb r3, [r3, #0] } return ERR_OK; 802bc54: 2000 movs r0, #0 } } if (raw_len > 0) { /* copy last or single octet */ *msg_ptr = *raw; 802bc56: 702b strb r3, [r5, #0] 802bc58: e005 b.n 802bc66 } return ERR_OK; } p = p->next; 802bc5a: 6800 ldr r0, [r0, #0] plen = 0; while (p != NULL) { base = plen; plen += p->len; 802bc5c: 4626 mov r6, r4 { u16_t plen, base; u8_t *msg_ptr; plen = 0; while (p != NULL) 802bc5e: 2800 cmp r0, #0 802bc60: d1d7 bne.n 802bc12 802bc62: e7eb b.n 802bc3c if (raw_len > 0) { /* copy last or single octet */ *msg_ptr = *raw; } return ERR_OK; 802bc64: 4610 mov r0, r2 } p = p->next; } /* p == NULL, ofs >= plen */ return ERR_ARG; } 802bc66: b240 sxtb r0, r0 802bc68: bdf0 pop {r4, r5, r6, r7, pc} 0802bc6a : void noleafs_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { LWIP_UNUSED_ARG(ident_len); LWIP_UNUSED_ARG(ident); od->instance = MIB_OBJECT_NONE; 802bc6a: 2300 movs r3, #0 802bc6c: 7013 strb r3, [r2, #0] 802bc6e: 4770 bx lr 0802bc70 : } void noleafs_get_value(struct obj_def *od, u16_t len, void *value) { 802bc70: 4770 bx lr 0802bc72 : LWIP_UNUSED_ARG(od); LWIP_UNUSED_ARG(len); LWIP_UNUSED_ARG(value); /* can't set */ return 0; } 802bc72: 2000 movs r0, #0 802bc74: 4770 bx lr 0802bc76 : void noleafs_set_value(struct obj_def *od, u16_t len, void *value) { 802bc76: 4770 bx lr 0802bc78 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 802bc78: 2801 cmp r0, #1 802bc7a: d145 bne.n 802bd08 { od->id_inst_len = ident_len; 802bc7c: 2002 movs r0, #2 { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 802bc7e: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; 802bc80: 7190 strb r0, [r2, #6] od->id_inst_ptr = ident; 802bc82: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; LWIP_DEBUGF(SNMP_MIB_DEBUG,("get_object_def system.%"U16_F".0\n",(u16_t)id)); switch (id) 802bc84: f811 3c04 ldrb.w r3, [r1, #-4] 802bc88: 3b01 subs r3, #1 802bc8a: 2b06 cmp r3, #6 802bc8c: d83c bhi.n 802bd08 802bc8e: e8df f003 tbb [pc, r3] 802bc92: 0b04 .short 0x0b04 802bc94: 2a221a14 .word 0x2a221a14 802bc98: 34 .byte 0x34 802bc99: 00 .byte 0x00 { case 1: /* sysDescr */ od->instance = MIB_OBJECT_SCALAR; 802bc9a: 2301 movs r3, #1 802bc9c: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 802bc9e: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 802bca0: 2304 movs r3, #4 802bca2: 7093 strb r3, [r2, #2] od->v_len = *sysdescr_len_ptr; 802bca4: 4b1a ldr r3, [pc, #104] ; (802bd10 ) 802bca6: e025 b.n 802bcf4 break; case 2: /* sysObjectID */ od->instance = MIB_OBJECT_SCALAR; 802bca8: 2301 movs r3, #1 802bcaa: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 802bcac: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID); 802bcae: 2306 movs r3, #6 802bcb0: 7093 strb r3, [r2, #2] od->v_len = sysobjid.len * sizeof(s32_t); 802bcb2: 4b18 ldr r3, [pc, #96] ; (802bd14 ) 802bcb4: 781b ldrb r3, [r3, #0] 802bcb6: 009b lsls r3, r3, #2 802bcb8: e024 b.n 802bd04 break; case 3: /* sysUpTime */ od->instance = MIB_OBJECT_SCALAR; 802bcba: 2301 movs r3, #1 802bcbc: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 802bcbe: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS); 802bcc0: 2343 movs r3, #67 ; 0x43 802bcc2: 7093 strb r3, [r2, #2] 802bcc4: e01d b.n 802bd02 od->v_len = sizeof(u32_t); break; case 4: /* sysContact */ od->instance = MIB_OBJECT_SCALAR; 802bcc6: 2301 movs r3, #1 802bcc8: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 802bcca: 2303 movs r3, #3 802bccc: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 802bcce: 2304 movs r3, #4 802bcd0: 7093 strb r3, [r2, #2] od->v_len = *syscontact_len_ptr; 802bcd2: 4b11 ldr r3, [pc, #68] ; (802bd18 ) 802bcd4: e00e b.n 802bcf4 break; case 5: /* sysName */ od->instance = MIB_OBJECT_SCALAR; 802bcd6: 2301 movs r3, #1 802bcd8: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 802bcda: 2303 movs r3, #3 802bcdc: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 802bcde: 2304 movs r3, #4 802bce0: 7093 strb r3, [r2, #2] od->v_len = *sysname_len_ptr; 802bce2: 4b0e ldr r3, [pc, #56] ; (802bd1c ) 802bce4: e006 b.n 802bcf4 break; case 6: /* sysLocation */ od->instance = MIB_OBJECT_SCALAR; 802bce6: 2301 movs r3, #1 802bce8: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 802bcea: 2303 movs r3, #3 802bcec: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 802bcee: 2304 movs r3, #4 802bcf0: 7093 strb r3, [r2, #2] od->v_len = *syslocation_len_ptr; 802bcf2: 4b0b ldr r3, [pc, #44] ; (802bd20 ) 802bcf4: 681b ldr r3, [r3, #0] 802bcf6: 781b ldrb r3, [r3, #0] 802bcf8: e004 b.n 802bd04 break; case 7: /* sysServices */ od->instance = MIB_OBJECT_SCALAR; 802bcfa: 2301 movs r3, #1 802bcfc: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 802bcfe: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 802bd00: 7090 strb r0, [r2, #2] od->v_len = sizeof(s32_t); 802bd02: 2304 movs r3, #4 802bd04: 8093 strh r3, [r2, #4] break; 802bd06: 4770 bx lr }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("system_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 802bd08: 2300 movs r3, #0 802bd0a: 7013 strb r3, [r2, #0] 802bd0c: 4770 bx lr 802bd0e: bf00 nop 802bd10: 20001328 .word 0x20001328 802bd14: 200011d8 .word 0x200011d8 802bd18: 20001184 .word 0x20001184 802bd1c: 20001180 .word 0x20001180 802bd20: 2000136c .word 0x2000136c 0802bd24 : interfaces_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 802bd24: 2801 cmp r0, #1 802bd26: d109 bne.n 802bd3c { od->id_inst_len = ident_len; 802bd28: 2302 movs r3, #2 802bd2a: 7193 strb r3, [r2, #6] static void interfaces_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 802bd2c: 3904 subs r1, #4 od->id_inst_len = ident_len; od->id_inst_ptr = ident; od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 802bd2e: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 802bd30: 2304 movs r3, #4 ident_len += 1; ident -= 1; if (ident_len == 2) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 802bd32: 6091 str r1, [r2, #8] od->instance = MIB_OBJECT_SCALAR; 802bd34: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 802bd36: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); od->v_len = sizeof(s32_t); 802bd38: 8093 strh r3, [r2, #4] 802bd3a: 4770 bx lr } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("interfaces_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 802bd3c: 2300 movs r3, #0 802bd3e: 7013 strb r3, [r2, #0] 802bd40: 4770 bx lr 802bd42: 0000 movs r0, r0 0802bd44 : */ static void interfaces_get_value(struct obj_def *od, u16_t len, void *value) { LWIP_UNUSED_ARG(len); if (od->id_inst_ptr[0] == 1) 802bd44: 6883 ldr r3, [r0, #8] 802bd46: 681b ldr r3, [r3, #0] 802bd48: 2b01 cmp r3, #1 802bd4a: d102 bne.n 802bd52 { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = iflist_root.count; 802bd4c: 4b01 ldr r3, [pc, #4] ; (802bd54 ) 802bd4e: 8b9b ldrh r3, [r3, #28] 802bd50: 6013 str r3, [r2, #0] 802bd52: 4770 bx lr 802bd54: 200011b8 .word 0x200011b8 0802bd58 : { u8_t id; LWIP_UNUSED_ARG(len); LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 802bd58: 6883 ldr r3, [r0, #8] switch (id) 802bd5a: 781b ldrb r3, [r3, #0] 802bd5c: 3b01 subs r3, #1 802bd5e: 2b16 cmp r3, #22 802bd60: d836 bhi.n 802bdd0 802bd62: e8df f003 tbb [pc, r3] 802bd66: 0e0c .short 0x0e0c 802bd68: 16141210 .word 0x16141210 802bd6c: 1e1c1a18 .word 0x1e1c1a18 802bd70: 26242220 .word 0x26242220 802bd74: 2e2c2a28 .word 0x2e2c2a28 802bd78: 35353530 .word 0x35353530 802bd7c: 32 .byte 0x32 802bd7d: 00 .byte 0x00 #if IP_FORWARD /* forwarding */ *sint_ptr = 1; #else /* not-forwarding */ *sint_ptr = 2; 802bd7e: 2302 movs r3, #2 802bd80: e025 b.n 802bdce } break; case 2: /* ipDefaultTTL */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = IP_DEFAULT_TTL; 802bd82: 23ff movs r3, #255 ; 0xff 802bd84: e023 b.n 802bdce } break; case 3: /* ipInReceives */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinreceives; 802bd86: 4b13 ldr r3, [pc, #76] ; (802bdd4 ) 802bd88: e020 b.n 802bdcc } break; case 4: /* ipInHdrErrors */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinhdrerrors; 802bd8a: 4b13 ldr r3, [pc, #76] ; (802bdd8 ) 802bd8c: e01e b.n 802bdcc } break; case 5: /* ipInAddrErrors */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinaddrerrors; 802bd8e: 4b13 ldr r3, [pc, #76] ; (802bddc ) 802bd90: e01c b.n 802bdcc } break; case 6: /* ipForwDatagrams */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipforwdatagrams; 802bd92: 4b13 ldr r3, [pc, #76] ; (802bde0 ) 802bd94: e01a b.n 802bdcc } break; case 7: /* ipInUnknownProtos */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipinunknownprotos; 802bd96: 4b13 ldr r3, [pc, #76] ; (802bde4 ) 802bd98: e018 b.n 802bdcc } break; case 8: /* ipInDiscards */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipindiscards; 802bd9a: 4b13 ldr r3, [pc, #76] ; (802bde8 ) 802bd9c: e016 b.n 802bdcc } break; case 9: /* ipInDelivers */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipindelivers; 802bd9e: 4b13 ldr r3, [pc, #76] ; (802bdec ) 802bda0: e014 b.n 802bdcc } break; case 10: /* ipOutRequests */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipoutrequests; 802bda2: 4b13 ldr r3, [pc, #76] ; (802bdf0 ) 802bda4: e012 b.n 802bdcc } break; case 11: /* ipOutDiscards */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipoutdiscards; 802bda6: 4b13 ldr r3, [pc, #76] ; (802bdf4 ) 802bda8: e010 b.n 802bdcc } break; case 12: /* ipOutNoRoutes */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipoutnoroutes; 802bdaa: 4b13 ldr r3, [pc, #76] ; (802bdf8 ) 802bdac: e00e b.n 802bdcc { s32_t *sint_ptr = (s32_t*)value; #if IP_REASSEMBLY *sint_ptr = IP_REASS_MAXAGE; #else *sint_ptr = 0; 802bdae: 2300 movs r3, #0 802bdb0: e00d b.n 802bdce } break; case 14: /* ipReasmReqds */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipreasmreqds; 802bdb2: 4b12 ldr r3, [pc, #72] ; (802bdfc ) 802bdb4: e00a b.n 802bdcc } break; case 15: /* ipReasmOKs */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipreasmoks; 802bdb6: 4b12 ldr r3, [pc, #72] ; (802be00 ) 802bdb8: e008 b.n 802bdcc } break; case 16: /* ipReasmFails */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipreasmfails; 802bdba: 4b12 ldr r3, [pc, #72] ; (802be04 ) 802bdbc: e006 b.n 802bdcc } break; case 17: /* ipFragOKs */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipfragoks; 802bdbe: 4b12 ldr r3, [pc, #72] ; (802be08 ) 802bdc0: e004 b.n 802bdcc } break; case 18: /* ipFragFails */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipfragfails; 802bdc2: 4b12 ldr r3, [pc, #72] ; (802be0c ) 802bdc4: e002 b.n 802bdcc } break; case 19: /* ipFragCreates */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = ipfragcreates; 802bdc6: 4b12 ldr r3, [pc, #72] ; (802be10 ) 802bdc8: e000 b.n 802bdcc break; case 23: /* ipRoutingDiscards */ /** @todo can lwIP discard routes at all?? hardwire this to 0?? */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = iproutingdiscards; 802bdca: 4b12 ldr r3, [pc, #72] ; (802be14 ) 802bdcc: 681b ldr r3, [r3, #0] 802bdce: 6013 str r3, [r2, #0] 802bdd0: 4770 bx lr 802bdd2: bf00 nop 802bdd4: 2000dc50 .word 0x2000dc50 802bdd8: 2000dbd8 .word 0x2000dbd8 802bddc: 2000dbbc .word 0x2000dbbc 802bde0: 2000dcd8 .word 0x2000dcd8 802bde4: 2000dc18 .word 0x2000dc18 802bde8: 2000dca4 .word 0x2000dca4 802bdec: 2000dcdc .word 0x2000dcdc 802bdf0: 2000dcc4 .word 0x2000dcc4 802bdf4: 2000dc68 .word 0x2000dc68 802bdf8: 2000dce8 .word 0x2000dce8 802bdfc: 2000dc38 .word 0x2000dc38 802be00: 2000dbe4 .word 0x2000dbe4 802be04: 2000dc98 .word 0x2000dc98 802be08: 2000dba8 .word 0x2000dba8 802be0c: 2000dc14 .word 0x2000dc14 802be10: 2000dcb4 .word 0x2000dcb4 802be14: 2000dca0 .word 0x2000dca0 0802be18 : s32_t *sint_ptr = (s32_t*)value; LWIP_UNUSED_ARG(len); set_ok = 0; LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 802be18: 6883 ldr r3, [r0, #8] switch (id) 802be1a: 781b ldrb r3, [r3, #0] 802be1c: 2b01 cmp r3, #1 802be1e: d002 beq.n 802be26 802be20: 2b02 cmp r3, #2 802be22: d109 bne.n 802be38 802be24: e002 b.n 802be2c #if IP_FORWARD /* forwarding */ if (*sint_ptr == 1) #else /* not-forwarding */ if (*sint_ptr == 2) 802be26: 6810 ldr r0, [r2, #0] { u8_t id, set_ok; s32_t *sint_ptr = (s32_t*)value; LWIP_UNUSED_ARG(len); set_ok = 0; 802be28: 2802 cmp r0, #2 802be2a: e001 b.n 802be30 { set_ok = 1; } break; case 2: /* ipDefaultTTL */ if (*sint_ptr == IP_DEFAULT_TTL) 802be2c: 6810 ldr r0, [r2, #0] { u8_t id, set_ok; s32_t *sint_ptr = (s32_t*)value; LWIP_UNUSED_ARG(len); set_ok = 0; 802be2e: 28ff cmp r0, #255 ; 0xff 802be30: bf14 ite ne 802be32: 2000 movne r0, #0 802be34: 2001 moveq r0, #1 802be36: 4770 bx lr 802be38: 2000 movs r0, #0 set_ok = 1; } break; }; return set_ok; } 802be3a: 4770 bx lr 0802be3c : /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; if (ident_len == 5) 802be3c: 2801 cmp r0, #1 802be3e: d12c bne.n 802be9a { od->id_inst_len = ident_len; 802be40: 2305 movs r3, #5 802be42: 7193 strb r3, [r2, #6] { u8_t id; /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; 802be44: f1a1 0310 sub.w r3, r1, #16 if (ident_len == 5) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 802be48: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 802be4a: f811 3c10 ldrb.w r3, [r1, #-16] 802be4e: 3b01 subs r3, #1 802be50: 2b0c cmp r3, #12 802be52: d822 bhi.n 802be9a 802be54: e8df f003 tbb [pc, r3] 802be58: 0d0d0d07 .word 0x0d0d0d07 802be5c: 0d070d0d .word 0x0d070d0d 802be60: 0d070d11 .word 0x0d070d11 802be64: 18 .byte 0x18 802be65: 00 .byte 0x00 { case 1: /* ipRouteDest */ case 7: /* ipRouteNextHop */ case 11: /* ipRouteMask */ od->instance = MIB_OBJECT_TAB; 802be66: 2302 movs r3, #2 802be68: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 802be6a: 2303 movs r3, #3 802be6c: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 802be6e: 2340 movs r3, #64 ; 0x40 802be70: e007 b.n 802be82 case 5: /* ipRouteMetric3 */ case 6: /* ipRouteMetric4 */ case 8: /* ipRouteType */ case 10: /* ipRouteAge */ case 12: /* ipRouteMetric5 */ od->instance = MIB_OBJECT_TAB; 802be72: 2302 movs r3, #2 802be74: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 802be76: 2103 movs r1, #3 802be78: e002 b.n 802be80 od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); od->v_len = sizeof(s32_t); break; case 9: /* ipRouteProto */ od->instance = MIB_OBJECT_TAB; 802be7a: 2302 movs r3, #2 802be7c: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 802be7e: 2101 movs r1, #1 802be80: 7051 strb r1, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 802be82: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 802be84: 2304 movs r3, #4 802be86: e006 b.n 802be96 break; case 13: /* ipRouteInfo */ /** @note returning zeroDotZero (0.0) no routing protocol specific MIB */ od->instance = MIB_OBJECT_TAB; 802be88: 2302 movs r3, #2 802be8a: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 802be8c: 2301 movs r3, #1 802be8e: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID); 802be90: 2306 movs r3, #6 802be92: 7093 strb r3, [r2, #2] od->v_len = iprouteinfo.len * sizeof(s32_t); 802be94: 2308 movs r3, #8 802be96: 8093 strh r3, [r2, #4] break; 802be98: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_rteentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 802be9a: 2300 movs r3, #0 802be9c: 7013 strb r3, [r2, #0] 802be9e: 4770 bx lr 0802bea0 : icmp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if ((ident_len == 2) && 802bea0: 2801 cmp r0, #1 802bea2: d110 bne.n 802bec6 (ident[0] > 0) && (ident[0] < 27)) 802bea4: f851 3c04 ldr.w r3, [r1, #-4] icmp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if ((ident_len == 2) && 802bea8: 2b00 cmp r3, #0 802beaa: dd0c ble.n 802bec6 (ident[0] > 0) && (ident[0] < 27)) 802beac: 2b1a cmp r3, #26 802beae: dc0a bgt.n 802bec6 { od->id_inst_len = ident_len; 802beb0: 2302 movs r3, #2 802beb2: 7193 strb r3, [r2, #6] od->id_inst_ptr = ident; od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 802beb4: 2341 movs r3, #65 ; 0x41 static void icmp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 802beb6: 3904 subs r1, #4 od->id_inst_len = ident_len; od->id_inst_ptr = ident; od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 802beb8: 7093 strb r3, [r2, #2] od->v_len = sizeof(u32_t); 802beba: 2304 movs r3, #4 ident -= 1; if ((ident_len == 2) && (ident[0] > 0) && (ident[0] < 27)) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 802bebc: 6091 str r1, [r2, #8] od->instance = MIB_OBJECT_SCALAR; 802bebe: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 802bec0: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); od->v_len = sizeof(u32_t); 802bec2: 8093 strh r3, [r2, #4] 802bec4: 4770 bx lr } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("icmp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 802bec6: 2300 movs r3, #0 802bec8: 7013 strb r3, [r2, #0] 802beca: 4770 bx lr 0802becc : u32_t *uint_ptr = (u32_t*)value; u8_t id; LWIP_UNUSED_ARG(len); LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 802becc: 6883 ldr r3, [r0, #8] switch (id) 802bece: 781b ldrb r3, [r3, #0] 802bed0: 3b01 subs r3, #1 802bed2: 2b19 cmp r3, #25 802bed4: d843 bhi.n 802bf5e 802bed6: e8df f003 tbb [pc, r3] 802beda: 0f0d .short 0x0f0d 802bedc: 17151311 .word 0x17151311 802bee0: 1f1d1b19 .word 0x1f1d1b19 802bee4: 27252321 .word 0x27252321 802bee8: 2f2d2b29 .word 0x2f2d2b29 802beec: 37353331 .word 0x37353331 802bef0: 3f3d3b39 .word 0x3f3d3b39 { case 1: /* icmpInMsgs */ *uint_ptr = icmpinmsgs; 802bef4: 4b1a ldr r3, [pc, #104] ; (802bf60 ) 802bef6: e030 b.n 802bf5a break; case 2: /* icmpInErrors */ *uint_ptr = icmpinerrors; 802bef8: 4b1a ldr r3, [pc, #104] ; (802bf64 ) 802befa: e02e b.n 802bf5a break; case 3: /* icmpInDestUnreachs */ *uint_ptr = icmpindestunreachs; 802befc: 4b1a ldr r3, [pc, #104] ; (802bf68 ) 802befe: e02c b.n 802bf5a break; case 4: /* icmpInTimeExcds */ *uint_ptr = icmpintimeexcds; 802bf00: 4b1a ldr r3, [pc, #104] ; (802bf6c ) 802bf02: e02a b.n 802bf5a break; case 5: /* icmpInParmProbs */ *uint_ptr = icmpinparmprobs; 802bf04: 4b1a ldr r3, [pc, #104] ; (802bf70 ) 802bf06: e028 b.n 802bf5a break; case 6: /* icmpInSrcQuenchs */ *uint_ptr = icmpinsrcquenchs; 802bf08: 4b1a ldr r3, [pc, #104] ; (802bf74 ) 802bf0a: e026 b.n 802bf5a break; case 7: /* icmpInRedirects */ *uint_ptr = icmpinredirects; 802bf0c: 4b1a ldr r3, [pc, #104] ; (802bf78 ) 802bf0e: e024 b.n 802bf5a break; case 8: /* icmpInEchos */ *uint_ptr = icmpinechos; 802bf10: 4b1a ldr r3, [pc, #104] ; (802bf7c ) 802bf12: e022 b.n 802bf5a break; case 9: /* icmpInEchoReps */ *uint_ptr = icmpinechoreps; 802bf14: 4b1a ldr r3, [pc, #104] ; (802bf80 ) 802bf16: e020 b.n 802bf5a break; case 10: /* icmpInTimestamps */ *uint_ptr = icmpintimestamps; 802bf18: 4b1a ldr r3, [pc, #104] ; (802bf84 ) 802bf1a: e01e b.n 802bf5a break; case 11: /* icmpInTimestampReps */ *uint_ptr = icmpintimestampreps; 802bf1c: 4b1a ldr r3, [pc, #104] ; (802bf88 ) 802bf1e: e01c b.n 802bf5a break; case 12: /* icmpInAddrMasks */ *uint_ptr = icmpinaddrmasks; 802bf20: 4b1a ldr r3, [pc, #104] ; (802bf8c ) 802bf22: e01a b.n 802bf5a break; case 13: /* icmpInAddrMaskReps */ *uint_ptr = icmpinaddrmaskreps; 802bf24: 4b1a ldr r3, [pc, #104] ; (802bf90 ) 802bf26: e018 b.n 802bf5a break; case 14: /* icmpOutMsgs */ *uint_ptr = icmpoutmsgs; 802bf28: 4b1a ldr r3, [pc, #104] ; (802bf94 ) 802bf2a: e016 b.n 802bf5a break; case 15: /* icmpOutErrors */ *uint_ptr = icmpouterrors; 802bf2c: 4b1a ldr r3, [pc, #104] ; (802bf98 ) 802bf2e: e014 b.n 802bf5a break; case 16: /* icmpOutDestUnreachs */ *uint_ptr = icmpoutdestunreachs; 802bf30: 4b1a ldr r3, [pc, #104] ; (802bf9c ) 802bf32: e012 b.n 802bf5a break; case 17: /* icmpOutTimeExcds */ *uint_ptr = icmpouttimeexcds; 802bf34: 4b1a ldr r3, [pc, #104] ; (802bfa0 ) 802bf36: e010 b.n 802bf5a break; case 18: /* icmpOutParmProbs */ *uint_ptr = icmpoutparmprobs; 802bf38: 4b1a ldr r3, [pc, #104] ; (802bfa4 ) 802bf3a: e00e b.n 802bf5a break; case 19: /* icmpOutSrcQuenchs */ *uint_ptr = icmpoutsrcquenchs; 802bf3c: 4b1a ldr r3, [pc, #104] ; (802bfa8 ) 802bf3e: e00c b.n 802bf5a break; case 20: /* icmpOutRedirects */ *uint_ptr = icmpoutredirects; 802bf40: 4b1a ldr r3, [pc, #104] ; (802bfac ) 802bf42: e00a b.n 802bf5a break; case 21: /* icmpOutEchos */ *uint_ptr = icmpoutechos; 802bf44: 4b1a ldr r3, [pc, #104] ; (802bfb0 ) 802bf46: e008 b.n 802bf5a break; case 22: /* icmpOutEchoReps */ *uint_ptr = icmpoutechoreps; 802bf48: 4b1a ldr r3, [pc, #104] ; (802bfb4 ) 802bf4a: e006 b.n 802bf5a break; case 23: /* icmpOutTimestamps */ *uint_ptr = icmpouttimestamps; 802bf4c: 4b1a ldr r3, [pc, #104] ; (802bfb8 ) 802bf4e: e004 b.n 802bf5a break; case 24: /* icmpOutTimestampReps */ *uint_ptr = icmpouttimestampreps; 802bf50: 4b1a ldr r3, [pc, #104] ; (802bfbc ) 802bf52: e002 b.n 802bf5a break; case 25: /* icmpOutAddrMasks */ *uint_ptr = icmpoutaddrmasks; 802bf54: 4b1a ldr r3, [pc, #104] ; (802bfc0 ) 802bf56: e000 b.n 802bf5a break; case 26: /* icmpOutAddrMaskReps */ *uint_ptr = icmpoutaddrmaskreps; 802bf58: 4b1a ldr r3, [pc, #104] ; (802bfc4 ) 802bf5a: 681b ldr r3, [r3, #0] 802bf5c: 6013 str r3, [r2, #0] 802bf5e: 4770 bx lr 802bf60: 2000dbe0 .word 0x2000dbe0 802bf64: 2000dbdc .word 0x2000dbdc 802bf68: 2000dbb8 .word 0x2000dbb8 802bf6c: 2000dc9c .word 0x2000dc9c 802bf70: 2000dcd0 .word 0x2000dcd0 802bf74: 2000dbc8 .word 0x2000dbc8 802bf78: 2000dbf4 .word 0x2000dbf4 802bf7c: 2000dc94 .word 0x2000dc94 802bf80: 2000dc0c .word 0x2000dc0c 802bf84: 2000dbfc .word 0x2000dbfc 802bf88: 2000dc3c .word 0x2000dc3c 802bf8c: 2000dcd4 .word 0x2000dcd4 802bf90: 2000dc70 .word 0x2000dc70 802bf94: 2000dc60 .word 0x2000dc60 802bf98: 2000dce4 .word 0x2000dce4 802bf9c: 2000dc78 .word 0x2000dc78 802bfa0: 2000dc2c .word 0x2000dc2c 802bfa4: 2000dbf0 .word 0x2000dbf0 802bfa8: 2000dc44 .word 0x2000dc44 802bfac: 2000dc00 .word 0x2000dc00 802bfb0: 2000dce0 .word 0x2000dce0 802bfb4: 2000dc80 .word 0x2000dc80 802bfb8: 2000dc4c .word 0x2000dc4c 802bfbc: 2000dc30 .word 0x2000dc30 802bfc0: 2000dbf8 .word 0x2000dbf8 802bfc4: 2000dc58 .word 0x2000dc58 0802bfc8 : s32_t *sint_ptr = (s32_t*)value; u8_t id; LWIP_UNUSED_ARG(len); LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 802bfc8: 6883 ldr r3, [r0, #8] switch (id) 802bfca: 781b ldrb r3, [r3, #0] 802bfcc: 3b01 subs r3, #1 802bfce: 2b0e cmp r3, #14 802bfd0: d836 bhi.n 802c040 802bfd2: e8df f003 tbb [pc, r3] 802bfd6: 0a08 .short 0x0a08 802bfd8: 1412100d .word 0x1412100d 802bfdc: 2a1a1816 .word 0x2a1a1816 802bfe0: 30352e2c .word 0x30352e2c 802bfe4: 32 .byte 0x32 802bfe5: 00 .byte 0x00 { case 1: /* tcpRtoAlgorithm, vanj(4) */ *sint_ptr = 4; 802bfe6: 2304 movs r3, #4 802bfe8: e029 b.n 802c03e break; case 2: /* tcpRtoMin */ /* @todo not the actual value, a guess, needs to be calculated */ *sint_ptr = 1000; 802bfea: f44f 737a mov.w r3, #1000 ; 0x3e8 802bfee: e026 b.n 802c03e break; case 3: /* tcpRtoMax */ /* @todo not the actual value, a guess, needs to be calculated */ *sint_ptr = 60000; 802bff0: f64e 2360 movw r3, #60000 ; 0xea60 802bff4: e023 b.n 802c03e break; case 4: /* tcpMaxConn */ *sint_ptr = MEMP_NUM_TCP_PCB; 802bff6: 230c movs r3, #12 802bff8: e021 b.n 802c03e break; case 5: /* tcpActiveOpens */ *uint_ptr = tcpactiveopens; 802bffa: 4b12 ldr r3, [pc, #72] ; (802c044 ) 802bffc: e01e b.n 802c03c break; case 6: /* tcpPassiveOpens */ *uint_ptr = tcppassiveopens; 802bffe: 4b12 ldr r3, [pc, #72] ; (802c048 ) 802c000: e01c b.n 802c03c break; case 7: /* tcpAttemptFails */ *uint_ptr = tcpattemptfails; 802c002: 4b12 ldr r3, [pc, #72] ; (802c04c ) 802c004: e01a b.n 802c03c break; case 8: /* tcpEstabResets */ *uint_ptr = tcpestabresets; 802c006: 4b12 ldr r3, [pc, #72] ; (802c050 ) 802c008: e018 b.n 802c03c break; case 9: /* tcpCurrEstab */ { u16_t tcpcurrestab = 0; struct tcp_pcb *pcb = tcp_active_pcbs; 802c00a: 4b12 ldr r3, [pc, #72] ; (802c054 ) case 8: /* tcpEstabResets */ *uint_ptr = tcpestabresets; break; case 9: /* tcpCurrEstab */ { u16_t tcpcurrestab = 0; 802c00c: 2100 movs r1, #0 struct tcp_pcb *pcb = tcp_active_pcbs; 802c00e: 681b ldr r3, [r3, #0] while (pcb != NULL) 802c010: e007 b.n 802c022 { if ((pcb->state == ESTABLISHED) || 802c012: 7e18 ldrb r0, [r3, #24] 802c014: 2804 cmp r0, #4 802c016: d001 beq.n 802c01c 802c018: 2807 cmp r0, #7 802c01a: d101 bne.n 802c020 (pcb->state == CLOSE_WAIT)) { tcpcurrestab++; 802c01c: 3101 adds r1, #1 802c01e: b289 uxth r1, r1 } pcb = pcb->next; 802c020: 68db ldr r3, [r3, #12] break; case 9: /* tcpCurrEstab */ { u16_t tcpcurrestab = 0; struct tcp_pcb *pcb = tcp_active_pcbs; while (pcb != NULL) 802c022: 2b00 cmp r3, #0 802c024: d1f5 bne.n 802c012 { tcpcurrestab++; } pcb = pcb->next; } *uint_ptr = tcpcurrestab; 802c026: 6011 str r1, [r2, #0] } break; 802c028: 4770 bx lr case 10: /* tcpInSegs */ *uint_ptr = tcpinsegs; 802c02a: 4b0b ldr r3, [pc, #44] ; (802c058 ) 802c02c: e006 b.n 802c03c break; case 11: /* tcpOutSegs */ *uint_ptr = tcpoutsegs; 802c02e: 4b0b ldr r3, [pc, #44] ; (802c05c ) 802c030: e004 b.n 802c03c break; case 12: /* tcpRetransSegs */ *uint_ptr = tcpretranssegs; 802c032: 4b0b ldr r3, [pc, #44] ; (802c060 ) 802c034: e002 b.n 802c03c break; case 14: /* tcpInErrs */ *uint_ptr = tcpinerrs; 802c036: 4b0b ldr r3, [pc, #44] ; (802c064 ) 802c038: e000 b.n 802c03c break; case 15: /* tcpOutRsts */ *uint_ptr = tcpoutrsts; 802c03a: 4b0b ldr r3, [pc, #44] ; (802c068 ) 802c03c: 681b ldr r3, [r3, #0] 802c03e: 6013 str r3, [r2, #0] 802c040: 4770 bx lr 802c042: bf00 nop 802c044: 2000dbd4 .word 0x2000dbd4 802c048: 2000dc08 .word 0x2000dc08 802c04c: 2000dc54 .word 0x2000dc54 802c050: 2000dbe8 .word 0x2000dbe8 802c054: 200104c4 .word 0x200104c4 802c058: 2000dc64 .word 0x2000dc64 802c05c: 2000dcb0 .word 0x2000dcb0 802c060: 2000dc84 .word 0x2000dc84 802c064: 2000dc10 .word 0x2000dc10 802c068: 2000dc74 .word 0x2000dc74 0802c06c : udp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if ((ident_len == 2) && 802c06c: 2801 cmp r0, #1 802c06e: d110 bne.n 802c092 (ident[0] > 0) && (ident[0] < 6)) 802c070: f851 3c04 ldr.w r3, [r1, #-4] udp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if ((ident_len == 2) && 802c074: 2b00 cmp r3, #0 802c076: dd0c ble.n 802c092 (ident[0] > 0) && (ident[0] < 6)) 802c078: 2b05 cmp r3, #5 802c07a: dc0a bgt.n 802c092 { od->id_inst_len = ident_len; 802c07c: 2302 movs r3, #2 802c07e: 7193 strb r3, [r2, #6] od->id_inst_ptr = ident; od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 802c080: 2341 movs r3, #65 ; 0x41 static void udp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 802c082: 3904 subs r1, #4 od->id_inst_len = ident_len; od->id_inst_ptr = ident; od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 802c084: 7093 strb r3, [r2, #2] od->v_len = sizeof(u32_t); 802c086: 2304 movs r3, #4 ident -= 1; if ((ident_len == 2) && (ident[0] > 0) && (ident[0] < 6)) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 802c088: 6091 str r1, [r2, #8] od->instance = MIB_OBJECT_SCALAR; 802c08a: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 802c08c: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); od->v_len = sizeof(u32_t); 802c08e: 8093 strh r3, [r2, #4] 802c090: 4770 bx lr } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("udp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 802c092: 2300 movs r3, #0 802c094: 7013 strb r3, [r2, #0] 802c096: 4770 bx lr 0802c098 : u32_t *uint_ptr = (u32_t*)value; u8_t id; LWIP_UNUSED_ARG(len); LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 802c098: 6883 ldr r3, [r0, #8] switch (id) 802c09a: 781b ldrb r3, [r3, #0] 802c09c: 3b01 subs r3, #1 802c09e: 2b03 cmp r3, #3 802c0a0: d80c bhi.n 802c0bc 802c0a2: e8df f003 tbb [pc, r3] 802c0a6: 0402 .short 0x0402 802c0a8: 0806 .short 0x0806 { case 1: /* udpInDatagrams */ *uint_ptr = udpindatagrams; 802c0aa: 4b05 ldr r3, [pc, #20] ; (802c0c0 ) 802c0ac: e004 b.n 802c0b8 break; case 2: /* udpNoPorts */ *uint_ptr = udpnoports; 802c0ae: 4b05 ldr r3, [pc, #20] ; (802c0c4 ) 802c0b0: e002 b.n 802c0b8 break; case 3: /* udpInErrors */ *uint_ptr = udpinerrors; 802c0b2: 4b05 ldr r3, [pc, #20] ; (802c0c8 ) 802c0b4: e000 b.n 802c0b8 break; case 4: /* udpOutDatagrams */ *uint_ptr = udpoutdatagrams; 802c0b6: 4b05 ldr r3, [pc, #20] ; (802c0cc ) 802c0b8: 681b ldr r3, [r3, #0] 802c0ba: 6013 str r3, [r2, #0] 802c0bc: 4770 bx lr 802c0be: bf00 nop 802c0c0: 2000dc90 .word 0x2000dc90 802c0c4: 2000dc48 .word 0x2000dc48 802c0c8: 2000dcb8 .word 0x2000dcb8 802c0cc: 2000dc40 .word 0x2000dc40 0802c0d0 : u32_t *uint_ptr = (u32_t*)value; u8_t id; LWIP_UNUSED_ARG(len); LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 802c0d0: 6883 ldr r3, [r0, #8] switch (id) 802c0d2: 781b ldrb r3, [r3, #0] 802c0d4: 3b01 subs r3, #1 802c0d6: 2b1d cmp r3, #29 802c0d8: d84b bhi.n 802c172 802c0da: e8df f003 tbb [pc, r3] 802c0de: 110f .short 0x110f 802c0e0: 19171513 .word 0x19171513 802c0e4: 1f1d1b4a .word 0x1f1d1b4a 802c0e8: 27252321 .word 0x27252321 802c0ec: 2f2d2b29 .word 0x2f2d2b29 802c0f0: 37353331 .word 0x37353331 802c0f4: 3d3b394a .word 0x3d3b394a 802c0f8: 4643413f .word 0x4643413f { case 1: /* snmpInPkts */ *uint_ptr = snmpinpkts; 802c0fc: 4b1d ldr r3, [pc, #116] ; (802c174 ) 802c0fe: e032 b.n 802c166 break; case 2: /* snmpOutPkts */ *uint_ptr = snmpoutpkts; 802c100: 4b1d ldr r3, [pc, #116] ; (802c178 ) 802c102: e030 b.n 802c166 break; case 3: /* snmpInBadVersions */ *uint_ptr = snmpinbadversions; 802c104: 4b1d ldr r3, [pc, #116] ; (802c17c ) 802c106: e02e b.n 802c166 break; case 4: /* snmpInBadCommunityNames */ *uint_ptr = snmpinbadcommunitynames; 802c108: 4b1d ldr r3, [pc, #116] ; (802c180 ) 802c10a: e02c b.n 802c166 break; case 5: /* snmpInBadCommunityUses */ *uint_ptr = snmpinbadcommunityuses; 802c10c: 4b1d ldr r3, [pc, #116] ; (802c184 ) 802c10e: e02a b.n 802c166 break; case 6: /* snmpInASNParseErrs */ *uint_ptr = snmpinasnparseerrs; 802c110: 4b1d ldr r3, [pc, #116] ; (802c188 ) 802c112: e028 b.n 802c166 break; case 8: /* snmpInTooBigs */ *uint_ptr = snmpintoobigs; 802c114: 4b1d ldr r3, [pc, #116] ; (802c18c ) 802c116: e026 b.n 802c166 break; case 9: /* snmpInNoSuchNames */ *uint_ptr = snmpinnosuchnames; 802c118: 4b1d ldr r3, [pc, #116] ; (802c190 ) 802c11a: e024 b.n 802c166 break; case 10: /* snmpInBadValues */ *uint_ptr = snmpinbadvalues; 802c11c: 4b1d ldr r3, [pc, #116] ; (802c194 ) 802c11e: e022 b.n 802c166 break; case 11: /* snmpInReadOnlys */ *uint_ptr = snmpinreadonlys; 802c120: 4b1d ldr r3, [pc, #116] ; (802c198 ) 802c122: e020 b.n 802c166 break; case 12: /* snmpInGenErrs */ *uint_ptr = snmpingenerrs; 802c124: 4b1d ldr r3, [pc, #116] ; (802c19c ) 802c126: e01e b.n 802c166 break; case 13: /* snmpInTotalReqVars */ *uint_ptr = snmpintotalreqvars; 802c128: 4b1d ldr r3, [pc, #116] ; (802c1a0 ) 802c12a: e01c b.n 802c166 break; case 14: /* snmpInTotalSetVars */ *uint_ptr = snmpintotalsetvars; 802c12c: 4b1d ldr r3, [pc, #116] ; (802c1a4 ) 802c12e: e01a b.n 802c166 break; case 15: /* snmpInGetRequests */ *uint_ptr = snmpingetrequests; 802c130: 4b1d ldr r3, [pc, #116] ; (802c1a8 ) 802c132: e018 b.n 802c166 break; case 16: /* snmpInGetNexts */ *uint_ptr = snmpingetnexts; 802c134: 4b1d ldr r3, [pc, #116] ; (802c1ac ) 802c136: e016 b.n 802c166 break; case 17: /* snmpInSetRequests */ *uint_ptr = snmpinsetrequests; 802c138: 4b1d ldr r3, [pc, #116] ; (802c1b0 ) 802c13a: e014 b.n 802c166 break; case 18: /* snmpInGetResponses */ *uint_ptr = snmpingetresponses; 802c13c: 4b1d ldr r3, [pc, #116] ; (802c1b4 ) 802c13e: e012 b.n 802c166 break; case 19: /* snmpInTraps */ *uint_ptr = snmpintraps; 802c140: 4b1d ldr r3, [pc, #116] ; (802c1b8 ) 802c142: e010 b.n 802c166 break; case 20: /* snmpOutTooBigs */ *uint_ptr = snmpouttoobigs; 802c144: 4b1d ldr r3, [pc, #116] ; (802c1bc ) 802c146: e00e b.n 802c166 break; case 21: /* snmpOutNoSuchNames */ *uint_ptr = snmpoutnosuchnames; 802c148: 4b1d ldr r3, [pc, #116] ; (802c1c0 ) 802c14a: e00c b.n 802c166 break; case 22: /* snmpOutBadValues */ *uint_ptr = snmpoutbadvalues; 802c14c: 4b1d ldr r3, [pc, #116] ; (802c1c4 ) 802c14e: e00a b.n 802c166 break; case 24: /* snmpOutGenErrs */ *uint_ptr = snmpoutgenerrs; 802c150: 4b1d ldr r3, [pc, #116] ; (802c1c8 ) 802c152: e008 b.n 802c166 break; case 25: /* snmpOutGetRequests */ *uint_ptr = snmpoutgetrequests; 802c154: 4b1d ldr r3, [pc, #116] ; (802c1cc ) 802c156: e006 b.n 802c166 break; case 26: /* snmpOutGetNexts */ *uint_ptr = snmpoutgetnexts; 802c158: 4b1d ldr r3, [pc, #116] ; (802c1d0 ) 802c15a: e004 b.n 802c166 break; case 27: /* snmpOutSetRequests */ *uint_ptr = snmpoutsetrequests; 802c15c: 4b1d ldr r3, [pc, #116] ; (802c1d4 ) 802c15e: e002 b.n 802c166 break; case 28: /* snmpOutGetResponses */ *uint_ptr = snmpoutgetresponses; 802c160: 4b1d ldr r3, [pc, #116] ; (802c1d8 ) 802c162: e000 b.n 802c166 break; case 29: /* snmpOutTraps */ *uint_ptr = snmpouttraps; 802c164: 4b1d ldr r3, [pc, #116] ; (802c1dc ) 802c166: 681b ldr r3, [r3, #0] 802c168: e002 b.n 802c170 break; case 30: /* snmpEnableAuthenTraps */ *uint_ptr = *snmpenableauthentraps_ptr; 802c16a: 4b1d ldr r3, [pc, #116] ; (802c1e0 ) 802c16c: 681b ldr r3, [r3, #0] 802c16e: 781b ldrb r3, [r3, #0] 802c170: 6013 str r3, [r2, #0] 802c172: 4770 bx lr 802c174: 2000dbec .word 0x2000dbec 802c178: 2000dcbc .word 0x2000dcbc 802c17c: 2000dca8 .word 0x2000dca8 802c180: 2000dbc0 .word 0x2000dbc0 802c184: 2000dbc4 .word 0x2000dbc4 802c188: 2000dcac .word 0x2000dcac 802c18c: 2000dc6c .word 0x2000dc6c 802c190: 2000dcec .word 0x2000dcec 802c194: 2000dc88 .word 0x2000dc88 802c198: 2000dc5c .word 0x2000dc5c 802c19c: 2000dc34 .word 0x2000dc34 802c1a0: 2000dc8c .word 0x2000dc8c 802c1a4: 2000dbcc .word 0x2000dbcc 802c1a8: 2000dc20 .word 0x2000dc20 802c1ac: 2000dba4 .word 0x2000dba4 802c1b0: 2000dcc8 .word 0x2000dcc8 802c1b4: 2000dc1c .word 0x2000dc1c 802c1b8: 2000dbb4 .word 0x2000dbb4 802c1bc: 2000dc04 .word 0x2000dc04 802c1c0: 2000dbd0 .word 0x2000dbd0 802c1c4: 2000dbb0 .word 0x2000dbb0 802c1c8: 2000dcf0 .word 0x2000dcf0 802c1cc: 2000dc28 .word 0x2000dc28 802c1d0: 2000dcc0 .word 0x2000dcc0 802c1d4: 2000dccc .word 0x2000dccc 802c1d8: 2000dbac .word 0x2000dbac 802c1dc: 2000dc24 .word 0x2000dc24 802c1e0: 20001284 .word 0x20001284 0802c1e4 : { u8_t id; LWIP_UNUSED_ARG(len); LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 802c1e4: 6883 ldr r3, [r0, #8] if (id == 30) 802c1e6: 781b ldrb r3, [r3, #0] 802c1e8: 2b1e cmp r3, #30 802c1ea: d103 bne.n 802c1f4 { /* snmpEnableAuthenTraps */ /* @todo @fixme: which kind of pointer is 'value'? s32_t or u8_t??? */ u8_t *ptr = (u8_t*)value; *snmpenableauthentraps_ptr = *ptr; 802c1ec: 4b02 ldr r3, [pc, #8] ; (802c1f8 ) 802c1ee: 7812 ldrb r2, [r2, #0] 802c1f0: 681b ldr r3, [r3, #0] 802c1f2: 701a strb r2, [r3, #0] 802c1f4: 4770 bx lr 802c1f6: bf00 nop 802c1f8: 20001284 .word 0x20001284 0802c1fc : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 802c1fc: 2801 cmp r0, #1 * @param ident points to objectname.index * @param od points to object definition. */ static void ifentry_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { 802c1fe: b513 push {r0, r1, r4, lr} 802c200: 4614 mov r4, r2 u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 802c202: d149 bne.n 802c298 { od->id_inst_len = ident_len; 802c204: 2302 movs r3, #2 802c206: 7193 strb r3, [r2, #6] { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 802c208: 1f0a subs r2, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 802c20a: 60a2 str r2, [r4, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; LWIP_DEBUGF(SNMP_MIB_DEBUG,("get_object_def ifentry.%"U16_F"\n",(u16_t)id)); switch (id) 802c20c: f811 2c04 ldrb.w r2, [r1, #-4] 802c210: 3a01 subs r2, #1 802c212: 2a15 cmp r2, #21 802c214: d840 bhi.n 802c298 802c216: e8df f002 tbb [pc, r2] 802c21a: 0e0b .short 0x0e0b 802c21c: 19140b0b .word 0x19140b0b 802c220: 302b0b27 .word 0x302b0b27 802c224: 30303030 .word 0x30303030 802c228: 30303030 .word 0x30303030 802c22c: 37143030 .word 0x37143030 { case 1: /* ifIndex */ case 3: /* ifType */ case 4: /* ifMtu */ case 8: /* ifOperStatus */ od->instance = MIB_OBJECT_TAB; 802c230: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 802c232: 2201 movs r2, #1 802c234: e01a b.n 802c26c od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); od->v_len = sizeof(s32_t); break; case 2: /* ifDescr */ od->instance = MIB_OBJECT_TAB; od->access = MIB_OBJECT_READ_ONLY; 802c236: 2201 movs r2, #1 802c238: 7062 strb r2, [r4, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 802c23a: 2204 movs r2, #4 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); od->v_len = sizeof(s32_t); break; case 2: /* ifDescr */ od->instance = MIB_OBJECT_TAB; 802c23c: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 802c23e: 70a2 strb r2, [r4, #2] 802c240: e028 b.n 802c294 /** @todo this should be some sort of sizeof(struct netif.name) */ od->v_len = 2; break; case 5: /* ifSpeed */ case 21: /* ifOutQLen */ od->instance = MIB_OBJECT_TAB; 802c242: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 802c244: 2301 movs r3, #1 802c246: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_GAUGE); 802c248: 2342 movs r3, #66 ; 0x42 802c24a: e01a b.n 802c282 break; case 6: /* ifPhysAddress */ { struct netif *netif; snmp_ifindextonetif(ident[1], &netif); 802c24c: 6808 ldr r0, [r1, #0] 802c24e: a901 add r1, sp, #4 802c250: f001 f800 bl 802d254 od->instance = MIB_OBJECT_TAB; 802c254: 2302 movs r3, #2 802c256: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 802c258: 2301 movs r3, #1 802c25a: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 802c25c: 2304 movs r3, #4 802c25e: 70a3 strb r3, [r4, #2] od->v_len = netif->hwaddr_len; 802c260: 9b01 ldr r3, [sp, #4] 802c262: f893 3026 ldrb.w r3, [r3, #38] ; 0x26 802c266: e015 b.n 802c294 } break; case 7: /* ifAdminStatus */ od->instance = MIB_OBJECT_TAB; 802c268: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_WRITE; 802c26a: 2203 movs r2, #3 802c26c: 7062 strb r2, [r4, #1] 802c26e: e008 b.n 802c282 od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); od->v_len = sizeof(s32_t); break; case 9: /* ifLastChange */ od->instance = MIB_OBJECT_TAB; 802c270: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 802c272: 2301 movs r3, #1 802c274: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS); 802c276: 2343 movs r3, #67 ; 0x43 802c278: e003 b.n 802c282 case 16: /* ifOutOctets */ case 17: /* ifOutUcastPkts */ case 18: /* ifOutNUcastPkts */ case 19: /* ifOutDiscarts */ case 20: /* ifOutErrors */ od->instance = MIB_OBJECT_TAB; 802c27a: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 802c27c: 2301 movs r3, #1 802c27e: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 802c280: 2341 movs r3, #65 ; 0x41 802c282: 70a3 strb r3, [r4, #2] od->v_len = sizeof(u32_t); 802c284: 2304 movs r3, #4 802c286: e005 b.n 802c294 break; case 22: /* ifSpecific */ /** @note returning zeroDotZero (0.0) no media specific MIB support */ od->instance = MIB_OBJECT_TAB; 802c288: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 802c28a: 2301 movs r3, #1 802c28c: 7063 strb r3, [r4, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID); 802c28e: 2306 movs r3, #6 802c290: 70a3 strb r3, [r4, #2] od->v_len = ifspecific.len * sizeof(s32_t); 802c292: 2308 movs r3, #8 802c294: 80a3 strh r3, [r4, #4] break; 802c296: e001 b.n 802c29c }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ifentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 802c298: 2300 movs r3, #0 802c29a: 7023 strb r3, [r4, #0] } } 802c29c: bd1c pop {r2, r3, r4, pc} 802c29e: 0000 movs r0, r0 0802c2a0 : } } static void udpentry_get_value(struct obj_def *od, u16_t len, void *value) { 802c2a0: b537 push {r0, r1, r2, r4, r5, lr} 802c2a2: 4604 mov r4, r0 struct udp_pcb *pcb; ip_addr_t ip; u16_t port; LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); 802c2a4: 6880 ldr r0, [r0, #8] 802c2a6: a901 add r1, sp, #4 802c2a8: 3004 adds r0, #4 } } static void udpentry_get_value(struct obj_def *od, u16_t len, void *value) { 802c2aa: 4615 mov r5, r2 struct udp_pcb *pcb; ip_addr_t ip; u16_t port; LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); 802c2ac: f000 fff0 bl 802d290 LWIP_ASSERT("invalid port", (od->id_inst_ptr[5] >= 0) && (od->id_inst_ptr[5] <= 0xffff)); port = (u16_t)od->id_inst_ptr[5]; 802c2b0: 68a1 ldr r1, [r4, #8] pcb = udp_pcbs; 802c2b2: 4b0c ldr r3, [pc, #48] ; (802c2e4 ) u16_t port; LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); LWIP_ASSERT("invalid port", (od->id_inst_ptr[5] >= 0) && (od->id_inst_ptr[5] <= 0xffff)); port = (u16_t)od->id_inst_ptr[5]; 802c2b4: 8a8a ldrh r2, [r1, #20] pcb = udp_pcbs; 802c2b6: 681b ldr r3, [r3, #0] while ((pcb != NULL) && !(ip_addr_cmp(&pcb->local_ip, &ip) && 802c2b8: 9801 ldr r0, [sp, #4] snmp_oidtoip(&od->id_inst_ptr[1], &ip); LWIP_ASSERT("invalid port", (od->id_inst_ptr[5] >= 0) && (od->id_inst_ptr[5] <= 0xffff)); port = (u16_t)od->id_inst_ptr[5]; pcb = udp_pcbs; while ((pcb != NULL) && 802c2ba: e000 b.n 802c2be !(ip_addr_cmp(&pcb->local_ip, &ip) && (pcb->local_port == port))) { pcb = pcb->next; 802c2bc: 68db ldr r3, [r3, #12] snmp_oidtoip(&od->id_inst_ptr[1], &ip); LWIP_ASSERT("invalid port", (od->id_inst_ptr[5] >= 0) && (od->id_inst_ptr[5] <= 0xffff)); port = (u16_t)od->id_inst_ptr[5]; pcb = udp_pcbs; while ((pcb != NULL) && 802c2be: b17b cbz r3, 802c2e0 802c2c0: 681c ldr r4, [r3, #0] 802c2c2: 4284 cmp r4, r0 802c2c4: d1fa bne.n 802c2bc !(ip_addr_cmp(&pcb->local_ip, &ip) && (pcb->local_port == port))) 802c2c6: 8a5c ldrh r4, [r3, #18] LWIP_ASSERT("invalid port", (od->id_inst_ptr[5] >= 0) && (od->id_inst_ptr[5] <= 0xffff)); port = (u16_t)od->id_inst_ptr[5]; pcb = udp_pcbs; while ((pcb != NULL) && !(ip_addr_cmp(&pcb->local_ip, &ip) && 802c2c8: 4294 cmp r4, r2 802c2ca: d1f7 bne.n 802c2bc 802c2cc: e003 b.n 802c2d6 switch (id) { case 1: /* udpLocalAddress */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = pcb->local_ip; 802c2ce: 6028 str r0, [r5, #0] } break; 802c2d0: e006 b.n 802c2e0 case 2: /* udpLocalPort */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = pcb->local_port; 802c2d2: 602a str r2, [r5, #0] } break; 802c2d4: e004 b.n 802c2e0 if (pcb != NULL) { LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; switch (id) 802c2d6: 780b ldrb r3, [r1, #0] 802c2d8: 2b01 cmp r3, #1 802c2da: d0f8 beq.n 802c2ce 802c2dc: 2b02 cmp r3, #2 802c2de: d0f8 beq.n 802c2d2 *sint_ptr = pcb->local_port; } break; } } } 802c2e0: bd3e pop {r1, r2, r3, r4, r5, pc} 802c2e2: bf00 nop 802c2e4: 200104e0 .word 0x200104e0 0802c2e8 : } } static void ip_addrentry_get_value(struct obj_def *od, u16_t len, void *value) { 802c2e8: b573 push {r0, r1, r4, r5, r6, lr} 802c2ea: 4606 mov r6, r0 u16_t ifidx; ip_addr_t ip; struct netif *netif = netif_list; LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); 802c2ec: 6880 ldr r0, [r0, #8] ip_addrentry_get_value(struct obj_def *od, u16_t len, void *value) { u8_t id; u16_t ifidx; ip_addr_t ip; struct netif *netif = netif_list; 802c2ee: 4b18 ldr r3, [pc, #96] ; (802c350 ) LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); 802c2f0: a901 add r1, sp, #4 802c2f2: 3004 adds r0, #4 ip_addrentry_get_value(struct obj_def *od, u16_t len, void *value) { u8_t id; u16_t ifidx; ip_addr_t ip; struct netif *netif = netif_list; 802c2f4: 681c ldr r4, [r3, #0] } } static void ip_addrentry_get_value(struct obj_def *od, u16_t len, void *value) { 802c2f6: 4615 mov r5, r2 u16_t ifidx; ip_addr_t ip; struct netif *netif = netif_list; LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); 802c2f8: f000 ffca bl 802d290 ifidx = 0; while ((netif != NULL) && !ip_addr_cmp(&ip, &netif->ip_addr)) 802c2fc: 9901 ldr r1, [sp, #4] ip_addr_t ip; struct netif *netif = netif_list; LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); ifidx = 0; 802c2fe: 2300 movs r3, #0 while ((netif != NULL) && !ip_addr_cmp(&ip, &netif->ip_addr)) 802c300: e002 b.n 802c308 { netif = netif->next; ifidx++; 802c302: 3301 adds r3, #1 LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); ifidx = 0; while ((netif != NULL) && !ip_addr_cmp(&ip, &netif->ip_addr)) { netif = netif->next; 802c304: 6824 ldr r4, [r4, #0] ifidx++; 802c306: b29b uxth r3, r3 struct netif *netif = netif_list; LWIP_UNUSED_ARG(len); snmp_oidtoip(&od->id_inst_ptr[1], &ip); ifidx = 0; while ((netif != NULL) && !ip_addr_cmp(&ip, &netif->ip_addr)) 802c308: b304 cbz r4, 802c34c 802c30a: 6862 ldr r2, [r4, #4] 802c30c: 4291 cmp r1, r2 802c30e: d1f8 bne.n 802c302 802c310: e00a b.n 802c328 switch (id) { case 1: /* ipAdEntAddr */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = netif->ip_addr; 802c312: 6863 ldr r3, [r4, #4] 802c314: e006 b.n 802c324 } break; case 2: /* ipAdEntIfIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = ifidx + 1; 802c316: 3301 adds r3, #1 802c318: e004 b.n 802c324 } break; case 3: /* ipAdEntNetMask */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = netif->netmask; 802c31a: 68a3 ldr r3, [r4, #8] 802c31c: e002 b.n 802c324 { s32_t *sint_ptr = (s32_t*)value; /* lwIP oddity, there's no broadcast address in the netif we can rely on */ *sint_ptr = IPADDR_BROADCAST & 1; 802c31e: 2301 movs r3, #1 802c320: e000 b.n 802c324 *sint_ptr = (IP_HLEN + ((IP_REASS_MAX_PBUFS/2) * (PBUF_POOL_BUFSIZE - PBUF_LINK_HLEN - IP_HLEN))); #else /** @todo returning MTU would be a bad thing and returning a wild guess like '576' isn't good either */ *sint_ptr = 0; 802c322: 2300 movs r3, #0 802c324: 602b str r3, [r5, #0] #endif } break; 802c326: e011 b.n 802c34c } if (netif != NULL) { LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 802c328: 68b2 ldr r2, [r6, #8] switch (id) 802c32a: 7812 ldrb r2, [r2, #0] 802c32c: 3a01 subs r2, #1 802c32e: 2a04 cmp r2, #4 802c330: d80c bhi.n 802c34c 802c332: a101 add r1, pc, #4 ; (adr r1, 802c338 ) 802c334: f851 f022 ldr.w pc, [r1, r2, lsl #2] 802c338: 0802c313 .word 0x0802c313 802c33c: 0802c317 .word 0x0802c317 802c340: 0802c31b .word 0x0802c31b 802c344: 0802c31f .word 0x0802c31f 802c348: 0802c323 .word 0x0802c323 #endif } break; } } } 802c34c: bd7c pop {r2, r3, r4, r5, r6, pc} 802c34e: bf00 nop 802c350: 200104b8 .word 0x200104b8 0802c354 : } } static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value) { 802c354: b530 push {r4, r5, lr} struct netif *netif; LWIP_UNUSED_ARG(len); LWIP_UNUSED_ARG(value);/* if !LWIP_ARP */ snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 802c356: 6883 ldr r3, [r0, #8] } } static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value) { 802c358: b085 sub sp, #20 802c35a: 4605 mov r5, r0 struct netif *netif; LWIP_UNUSED_ARG(len); LWIP_UNUSED_ARG(value);/* if !LWIP_ARP */ snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 802c35c: a903 add r1, sp, #12 802c35e: 6858 ldr r0, [r3, #4] } } static void ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value) { 802c360: 4614 mov r4, r2 struct netif *netif; LWIP_UNUSED_ARG(len); LWIP_UNUSED_ARG(value);/* if !LWIP_ARP */ snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 802c362: f000 ff77 bl 802d254 snmp_oidtoip(&od->id_inst_ptr[2], &ip); 802c366: 68a8 ldr r0, [r5, #8] 802c368: a902 add r1, sp, #8 802c36a: 3008 adds r0, #8 802c36c: f000 ff90 bl 802d290 #if LWIP_ARP /** @todo implement a netif_find_addr */ if (etharp_find_addr(netif, &ip, ðaddr_ret, &ipaddr_ret) > -1) 802c370: 9803 ldr r0, [sp, #12] 802c372: a902 add r1, sp, #8 802c374: 466a mov r2, sp 802c376: ab01 add r3, sp, #4 802c378: f002 ffca bl 802f310 802c37c: 2800 cmp r0, #0 802c37e: db15 blt.n 802c3ac { LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 802c380: 68ab ldr r3, [r5, #8] switch (id) 802c382: 781a ldrb r2, [r3, #0] 802c384: 3a01 subs r2, #1 802c386: 2a03 cmp r2, #3 802c388: d810 bhi.n 802c3ac 802c38a: e8df f002 tbb [pc, r2] 802c38e: 0402 .short 0x0402 802c390: 0d0a .short 0x0d0a { case 1: /* ipNetToMediaIfIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = od->id_inst_ptr[1]; 802c392: 685b ldr r3, [r3, #4] 802c394: e009 b.n 802c3aa break; case 2: /* ipNetToMediaPhysAddress */ { struct eth_addr *dst = (struct eth_addr*)value; *dst = *ethaddr_ret; 802c396: 9b00 ldr r3, [sp, #0] 802c398: 681a ldr r2, [r3, #0] 802c39a: 6022 str r2, [r4, #0] 802c39c: 889b ldrh r3, [r3, #4] 802c39e: 80a3 strh r3, [r4, #4] } break; 802c3a0: e004 b.n 802c3ac case 3: /* ipNetToMediaNetAddress */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = *ipaddr_ret; 802c3a2: 9b01 ldr r3, [sp, #4] 802c3a4: 681b ldr r3, [r3, #0] 802c3a6: e000 b.n 802c3aa break; case 4: /* ipNetToMediaType */ { s32_t *sint_ptr = (s32_t*)value; /* dynamic (?) */ *sint_ptr = 3; 802c3a8: 2303 movs r3, #3 802c3aa: 6023 str r3, [r4, #0] } break; } } #endif /* LWIP_ARP */ } 802c3ac: b005 add sp, #20 802c3ae: bd30 pop {r4, r5, pc} 0802c3b0 : } } static void atentry_get_value(struct obj_def *od, u16_t len, void *value) { 802c3b0: b530 push {r4, r5, lr} struct netif *netif; LWIP_UNUSED_ARG(len); LWIP_UNUSED_ARG(value);/* if !LWIP_ARP */ snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 802c3b2: 6883 ldr r3, [r0, #8] } } static void atentry_get_value(struct obj_def *od, u16_t len, void *value) { 802c3b4: b085 sub sp, #20 802c3b6: 4605 mov r5, r0 struct netif *netif; LWIP_UNUSED_ARG(len); LWIP_UNUSED_ARG(value);/* if !LWIP_ARP */ snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 802c3b8: a903 add r1, sp, #12 802c3ba: 6858 ldr r0, [r3, #4] } } static void atentry_get_value(struct obj_def *od, u16_t len, void *value) { 802c3bc: 4614 mov r4, r2 struct netif *netif; LWIP_UNUSED_ARG(len); LWIP_UNUSED_ARG(value);/* if !LWIP_ARP */ snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 802c3be: f000 ff49 bl 802d254 snmp_oidtoip(&od->id_inst_ptr[2], &ip); 802c3c2: 68a8 ldr r0, [r5, #8] 802c3c4: a902 add r1, sp, #8 802c3c6: 3008 adds r0, #8 802c3c8: f000 ff62 bl 802d290 #if LWIP_ARP /** @todo implement a netif_find_addr */ if (etharp_find_addr(netif, &ip, ðaddr_ret, &ipaddr_ret) > -1) 802c3cc: 9803 ldr r0, [sp, #12] 802c3ce: a902 add r1, sp, #8 802c3d0: 466a mov r2, sp 802c3d2: ab01 add r3, sp, #4 802c3d4: f002 ff9c bl 802f310 802c3d8: 2800 cmp r0, #0 802c3da: db12 blt.n 802c402 { LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 802c3dc: 68aa ldr r2, [r5, #8] switch (id) 802c3de: 7813 ldrb r3, [r2, #0] 802c3e0: 2b02 cmp r3, #2 802c3e2: d005 beq.n 802c3f0 802c3e4: 2b03 cmp r3, #3 802c3e6: d009 beq.n 802c3fc 802c3e8: 2b01 cmp r3, #1 802c3ea: d10a bne.n 802c402 { case 1: /* atIfIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = od->id_inst_ptr[1]; 802c3ec: 6853 ldr r3, [r2, #4] 802c3ee: e007 b.n 802c400 break; case 2: /* atPhysAddress */ { struct eth_addr *dst = (struct eth_addr*)value; *dst = *ethaddr_ret; 802c3f0: 9b00 ldr r3, [sp, #0] 802c3f2: 681a ldr r2, [r3, #0] 802c3f4: 6022 str r2, [r4, #0] 802c3f6: 889b ldrh r3, [r3, #4] 802c3f8: 80a3 strh r3, [r4, #4] } break; 802c3fa: e002 b.n 802c402 case 3: /* atNetAddress */ { ip_addr_t *dst = (ip_addr_t*)value; *dst = *ipaddr_ret; 802c3fc: 9b01 ldr r3, [sp, #4] 802c3fe: 681b ldr r3, [r3, #0] 802c400: 6023 str r3, [r4, #0] } break; } } #endif /* LWIP_ARP */ } 802c402: b005 add sp, #20 802c404: bd30 pop {r4, r5, pc} 802c406: 0000 movs r0, r0 0802c408 : u8_t id, set_ok; LWIP_UNUSED_ARG(value); set_ok = 0; LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 802c408: 6883 ldr r3, [r0, #8] switch (id) 802c40a: 781b ldrb r3, [r3, #0] 802c40c: 2b05 cmp r3, #5 802c40e: d007 beq.n 802c420 802c410: 2b06 cmp r3, #6 802c412: d00f beq.n 802c434 802c414: 2b04 cmp r3, #4 802c416: d111 bne.n 802c43c { case 4: /* sysContact */ if ((syscontact_ptr != syscontact_default) && 802c418: 4b09 ldr r3, [pc, #36] ; (802c440 ) 802c41a: 681a ldr r2, [r3, #0] 802c41c: 4b09 ldr r3, [pc, #36] ; (802c444 ) 802c41e: e002 b.n 802c426 { set_ok = 1; } break; case 5: /* sysName */ if ((sysname_ptr != sysname_default) && 802c420: 4b09 ldr r3, [pc, #36] ; (802c448 ) 802c422: 681a ldr r2, [r3, #0] 802c424: 4b09 ldr r3, [pc, #36] ; (802c44c ) 802c426: 429a cmp r2, r3 802c428: d008 beq.n 802c43c system_set_test(struct obj_def *od, u16_t len, void *value) { u8_t id, set_ok; LWIP_UNUSED_ARG(value); set_ok = 0; 802c42a: 29ff cmp r1, #255 ; 0xff 802c42c: bf8c ite hi 802c42e: 2000 movhi r0, #0 802c430: 2001 movls r0, #1 802c432: 4770 bx lr { set_ok = 1; } break; case 6: /* sysLocation */ if ((syslocation_ptr != syslocation_default) && 802c434: 4b06 ldr r3, [pc, #24] ; (802c450 ) 802c436: 681a ldr r2, [r3, #0] 802c438: 4b06 ldr r3, [pc, #24] ; (802c454 ) 802c43a: e7f4 b.n 802c426 system_set_test(struct obj_def *od, u16_t len, void *value) { u8_t id, set_ok; LWIP_UNUSED_ARG(value); set_ok = 0; 802c43c: 2000 movs r0, #0 set_ok = 1; } break; }; return set_ok; } 802c43e: 4770 bx lr 802c440: 20001300 .word 0x20001300 802c444: 08037ecc .word 0x08037ecc 802c448: 2000128c .word 0x2000128c 802c44c: 08037be4 .word 0x08037be4 802c450: 20001418 .word 0x20001418 802c454: 08037c14 .word 0x08037c14 0802c458 : { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; if (ident_len == 6) 802c458: 2801 cmp r0, #1 802c45a: d120 bne.n 802c49e { od->id_inst_len = ident_len; 802c45c: 2006 movs r0, #6 static void atentry_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; 802c45e: f1a1 0314 sub.w r3, r1, #20 if (ident_len == 6) { od->id_inst_len = ident_len; 802c462: 7190 strb r0, [r2, #6] od->id_inst_ptr = ident; 802c464: 6093 str r3, [r2, #8] switch (ident[0]) 802c466: f851 3c14 ldr.w r3, [r1, #-20] 802c46a: 2b02 cmp r3, #2 802c46c: d008 beq.n 802c480 802c46e: 2b03 cmp r3, #3 802c470: d00d beq.n 802c48e 802c472: 2b01 cmp r3, #1 802c474: d113 bne.n 802c49e { case 1: /* atIfIndex */ od->instance = MIB_OBJECT_TAB; 802c476: 2302 movs r3, #2 od->access = MIB_OBJECT_READ_WRITE; 802c478: 2103 movs r1, #3 od->id_inst_ptr = ident; switch (ident[0]) { case 1: /* atIfIndex */ od->instance = MIB_OBJECT_TAB; 802c47a: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 802c47c: 7051 strb r1, [r2, #1] 802c47e: e00a b.n 802c496 od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); od->v_len = sizeof(s32_t); break; case 2: /* atPhysAddress */ od->instance = MIB_OBJECT_TAB; 802c480: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 802c482: 2303 movs r3, #3 802c484: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 802c486: 2304 movs r3, #4 802c488: 7093 strb r3, [r2, #2] od->v_len = 6; /** @todo try to use netif::hwaddr_len */ 802c48a: 8090 strh r0, [r2, #4] break; 802c48c: 4770 bx lr case 3: /* atNetAddress */ od->instance = MIB_OBJECT_TAB; 802c48e: 2102 movs r1, #2 od->access = MIB_OBJECT_READ_WRITE; 802c490: 7053 strb r3, [r2, #1] od->access = MIB_OBJECT_READ_WRITE; od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); od->v_len = 6; /** @todo try to use netif::hwaddr_len */ break; case 3: /* atNetAddress */ od->instance = MIB_OBJECT_TAB; 802c492: 7011 strb r1, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 802c494: 2340 movs r3, #64 ; 0x40 802c496: 7093 strb r3, [r2, #2] od->v_len = 4; 802c498: 2304 movs r3, #4 802c49a: 8093 strh r3, [r2, #4] break; 802c49c: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("atentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 802c49e: 2300 movs r3, #0 802c4a0: 7013 strb r3, [r2, #0] 802c4a2: 4770 bx lr 0802c4a4 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 802c4a4: 2801 cmp r0, #1 #endif /* LWIP_ARP */ } static void ip_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { 802c4a6: b510 push {r4, lr} u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 802c4a8: d121 bne.n 802c4ee { od->id_inst_len = ident_len; 802c4aa: 2402 movs r4, #2 { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 802c4ac: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; 802c4ae: 7194 strb r4, [r2, #6] od->id_inst_ptr = ident; 802c4b0: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; LWIP_DEBUGF(SNMP_MIB_DEBUG,("get_object_def ip.%"U16_F".0\n",(u16_t)id)); switch (id) 802c4b2: f811 3c04 ldrb.w r3, [r1, #-4] 802c4b6: 2b17 cmp r3, #23 802c4b8: d819 bhi.n 802c4ee 802c4ba: 490e ldr r1, [pc, #56] ; (802c4f4 ) 802c4bc: 4099 lsls r1, r3 802c4be: d40b bmi.n 802c4d8 802c4c0: f44f 2180 mov.w r1, #262144 ; 0x40000 802c4c4: 4099 lsls r1, r3 802c4c6: d40c bmi.n 802c4e2 802c4c8: f04f 41c0 mov.w r1, #1610612736 ; 0x60000000 802c4cc: 4099 lsls r1, r3 802c4ce: d50e bpl.n 802c4ee { case 1: /* ipForwarding */ case 2: /* ipDefaultTTL */ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_WRITE; 802c4d0: 2303 movs r3, #3 LWIP_DEBUGF(SNMP_MIB_DEBUG,("get_object_def ip.%"U16_F".0\n",(u16_t)id)); switch (id) { case 1: /* ipForwarding */ case 2: /* ipDefaultTTL */ od->instance = MIB_OBJECT_SCALAR; 802c4d2: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 802c4d4: 7053 strb r3, [r2, #1] 802c4d6: e006 b.n 802c4e6 case 18: /* ipFragFails */ case 19: /* ipFragCreates */ case 23: /* ipRoutingDiscards */ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 802c4d8: 2341 movs r3, #65 ; 0x41 case 16: /* ipReasmFails */ case 17: /* ipFragOKs */ case 18: /* ipFragFails */ case 19: /* ipFragCreates */ case 23: /* ipRoutingDiscards */ od->instance = MIB_OBJECT_SCALAR; 802c4da: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 802c4dc: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 802c4de: 7093 strb r3, [r2, #2] 802c4e0: e002 b.n 802c4e8 od->v_len = sizeof(u32_t); break; case 13: /* ipReasmTimeout */ od->instance = MIB_OBJECT_SCALAR; 802c4e2: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 802c4e4: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 802c4e6: 7094 strb r4, [r2, #2] od->v_len = sizeof(s32_t); 802c4e8: 2304 movs r3, #4 802c4ea: 8093 strh r3, [r2, #4] break; 802c4ec: bd10 pop {r4, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 802c4ee: 2300 movs r3, #0 802c4f0: 7013 strb r3, [r2, #0] 802c4f2: bd10 pop {r4, pc} 802c4f4: 1ffbf100 .word 0x1ffbf100 0802c4f8 : { /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; if (ident_len == 5) 802c4f8: 2801 cmp r0, #1 802c4fa: d11c bne.n 802c536 { u8_t id; od->id_inst_len = ident_len; 802c4fc: 2305 movs r3, #5 802c4fe: 7193 strb r3, [r2, #6] static void ip_addrentry_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (4) */ ident_len += 4; ident -= 4; 802c500: f1a1 0310 sub.w r3, r1, #16 if (ident_len == 5) { u8_t id; od->id_inst_len = ident_len; od->id_inst_ptr = ident; 802c504: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 802c506: f811 3c10 ldrb.w r3, [r1, #-16] 802c50a: 2b05 cmp r3, #5 802c50c: d813 bhi.n 802c536 802c50e: f04f 5130 mov.w r1, #738197504 ; 0x2c000000 802c512: 4099 lsls r1, r3 802c514: d408 bmi.n 802c528 802c516: f04f 41a0 mov.w r1, #1342177280 ; 0x50000000 802c51a: 4099 lsls r1, r3 802c51c: d50b bpl.n 802c536 { case 1: /* ipAdEntAddr */ case 3: /* ipAdEntNetMask */ od->instance = MIB_OBJECT_TAB; 802c51e: 2302 movs r3, #2 802c520: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 802c522: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 802c524: 2340 movs r3, #64 ; 0x40 802c526: e002 b.n 802c52e od->v_len = 4; break; case 2: /* ipAdEntIfIndex */ case 4: /* ipAdEntBcastAddr */ case 5: /* ipAdEntReasmMaxSize */ od->instance = MIB_OBJECT_TAB; 802c528: 2302 movs r3, #2 802c52a: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 802c52c: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 802c52e: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 802c530: 2304 movs r3, #4 802c532: 8093 strh r3, [r2, #4] break; 802c534: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_addrentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 802c536: 2300 movs r3, #0 802c538: 7013 strb r3, [r2, #0] 802c53a: 4770 bx lr 0802c53c : { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; if (ident_len == 6) 802c53c: 2801 cmp r0, #1 802c53e: d123 bne.n 802c588 { u8_t id; od->id_inst_len = ident_len; 802c540: 2306 movs r3, #6 802c542: 7193 strb r3, [r2, #6] static void ip_ntomentry_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; 802c544: f1a1 0314 sub.w r3, r1, #20 if (ident_len == 6) { u8_t id; od->id_inst_len = ident_len; od->id_inst_ptr = ident; 802c548: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 802c54a: f811 3c14 ldrb.w r3, [r1, #-20] 802c54e: 3b01 subs r3, #1 802c550: 2b03 cmp r3, #3 802c552: d819 bhi.n 802c588 802c554: e8df f003 tbb [pc, r3] 802c558: 020f0702 .word 0x020f0702 { case 1: /* ipNetToMediaIfIndex */ case 4: /* ipNetToMediaType */ od->instance = MIB_OBJECT_TAB; 802c55c: 2302 movs r3, #2 od->access = MIB_OBJECT_READ_WRITE; 802c55e: 2103 movs r1, #3 id = (u8_t)ident[0]; switch (id) { case 1: /* ipNetToMediaIfIndex */ case 4: /* ipNetToMediaType */ od->instance = MIB_OBJECT_TAB; 802c560: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 802c562: 7051 strb r1, [r2, #1] 802c564: e00c b.n 802c580 od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); od->v_len = sizeof(s32_t); break; case 2: /* ipNetToMediaPhysAddress */ od->instance = MIB_OBJECT_TAB; 802c566: 2302 movs r3, #2 802c568: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 802c56a: 2303 movs r3, #3 802c56c: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR); 802c56e: 2304 movs r3, #4 802c570: 7093 strb r3, [r2, #2] od->v_len = 6; /** @todo try to use netif::hwaddr_len */ 802c572: 2306 movs r3, #6 802c574: e006 b.n 802c584 break; case 3: /* ipNetToMediaNetAddress */ od->instance = MIB_OBJECT_TAB; 802c576: 2302 movs r3, #2 802c578: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 802c57a: 2303 movs r3, #3 802c57c: 7053 strb r3, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 802c57e: 2340 movs r3, #64 ; 0x40 802c580: 7093 strb r3, [r2, #2] od->v_len = 4; 802c582: 2304 movs r3, #4 802c584: 8093 strh r3, [r2, #4] break; 802c586: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ip_ntomentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 802c588: 2300 movs r3, #0 802c58a: 7013 strb r3, [r2, #0] 802c58c: 4770 bx lr 802c58e: 0000 movs r0, r0 0802c590 : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 802c590: 2801 cmp r0, #1 #if LWIP_TCP /** @todo tcp grp */ static void tcp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { 802c592: b510 push {r4, lr} u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 802c594: d121 bne.n 802c5da { od->id_inst_len = ident_len; 802c596: 2402 movs r4, #2 { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 802c598: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; 802c59a: 7194 strb r4, [r2, #6] od->id_inst_ptr = ident; 802c59c: 6093 str r3, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; LWIP_DEBUGF(SNMP_MIB_DEBUG,("get_object_def tcp.%"U16_F".0\n",(u16_t)id)); switch (id) 802c59e: f811 3c04 ldrb.w r3, [r1, #-4] 802c5a2: 2b0f cmp r3, #15 802c5a4: d819 bhi.n 802c5da 802c5a6: 490e ldr r1, [pc, #56] ; (802c5e0 ) 802c5a8: 4099 lsls r1, r3 802c5aa: d40b bmi.n 802c5c4 802c5ac: f44f 0180 mov.w r1, #4194304 ; 0x400000 802c5b0: 4099 lsls r1, r3 802c5b2: d40b bmi.n 802c5cc 802c5b4: f04f 41f0 mov.w r1, #2013265920 ; 0x78000000 802c5b8: 4099 lsls r1, r3 802c5ba: d50e bpl.n 802c5da { case 1: /* tcpRtoAlgorithm */ case 2: /* tcpRtoMin */ case 3: /* tcpRtoMax */ case 4: /* tcpMaxConn */ od->instance = MIB_OBJECT_SCALAR; 802c5bc: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 802c5be: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 802c5c0: 7094 strb r4, [r2, #2] 802c5c2: e007 b.n 802c5d4 case 10: /* tcpInSegs */ case 11: /* tcpOutSegs */ case 12: /* tcpRetransSegs */ case 14: /* tcpInErrs */ case 15: /* tcpOutRsts */ od->instance = MIB_OBJECT_SCALAR; 802c5c4: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 802c5c6: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 802c5c8: 2341 movs r3, #65 ; 0x41 802c5ca: e002 b.n 802c5d2 od->v_len = sizeof(u32_t); break; case 9: /* tcpCurrEstab */ od->instance = MIB_OBJECT_TAB; 802c5cc: 7014 strb r4, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 802c5ce: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_GAUGE); 802c5d0: 2342 movs r3, #66 ; 0x42 802c5d2: 7093 strb r3, [r2, #2] od->v_len = sizeof(u32_t); 802c5d4: 2304 movs r3, #4 802c5d6: 8093 strh r3, [r2, #4] break; 802c5d8: bd10 pop {r4, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("tcp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 802c5da: 2300 movs r3, #0 802c5dc: 7013 strb r3, [r2, #0] 802c5de: bd10 pop {r4, pc} 802c5e0: 07bb0000 .word 0x07bb0000 0802c5e4 : { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; if (ident_len == 6) 802c5e4: 2801 cmp r0, #1 802c5e6: d116 bne.n 802c616 { od->id_inst_len = ident_len; 802c5e8: 2306 movs r3, #6 802c5ea: 7193 strb r3, [r2, #6] static void udpentry_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (5) */ ident_len += 5; ident -= 5; 802c5ec: f1a1 0314 sub.w r3, r1, #20 if (ident_len == 6) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 802c5f0: 6093 str r3, [r2, #8] switch (ident[0]) 802c5f2: f851 3c14 ldr.w r3, [r1, #-20] 802c5f6: 2b01 cmp r3, #1 802c5f8: d002 beq.n 802c600 802c5fa: 2b02 cmp r3, #2 802c5fc: d10b bne.n 802c616 802c5fe: e004 b.n 802c60a { case 1: /* udpLocalAddress */ od->instance = MIB_OBJECT_TAB; 802c600: 2102 movs r1, #2 od->access = MIB_OBJECT_READ_ONLY; 802c602: 7053 strb r3, [r2, #1] od->id_inst_ptr = ident; switch (ident[0]) { case 1: /* udpLocalAddress */ od->instance = MIB_OBJECT_TAB; 802c604: 7011 strb r1, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR); 802c606: 2340 movs r3, #64 ; 0x40 802c608: e001 b.n 802c60e od->v_len = 4; break; case 2: /* udpLocalPort */ od->instance = MIB_OBJECT_TAB; 802c60a: 7013 strb r3, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 802c60c: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 802c60e: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 802c610: 2304 movs r3, #4 802c612: 8093 strh r3, [r2, #4] break; 802c614: 4770 bx lr } } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("udpentry_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 802c616: 2300 movs r3, #0 802c618: 7013 strb r3, [r2, #0] 802c61a: 4770 bx lr 0802c61c : snmp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 802c61c: 2801 cmp r0, #1 } } static void snmp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { 802c61e: b510 push {r4, lr} /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 802c620: d119 bne.n 802c656 { u8_t id; od->id_inst_len = ident_len; 802c622: 2302 movs r3, #2 802c624: 7193 strb r3, [r2, #6] static void snmp_get_object_def(u8_t ident_len, s32_t *ident, struct obj_def *od) { /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 802c626: 1f0c subs r4, r1, #4 od->id_inst_len = ident_len; od->id_inst_ptr = ident; LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 802c628: f811 1c04 ldrb.w r1, [r1, #-4] if (ident_len == 2) { u8_t id; od->id_inst_len = ident_len; od->id_inst_ptr = ident; 802c62c: 6094 str r4, [r2, #8] LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 802c62e: 291e cmp r1, #30 802c630: d811 bhi.n 802c656 802c632: 4c0a ldr r4, [pc, #40] ; (802c65c ) 802c634: 408c lsls r4, r1 802c636: d403 bmi.n 802c640 802c638: fa13 f101 lsls.w r1, r3, r1 802c63c: d404 bmi.n 802c648 802c63e: e00a b.n 802c656 case 25: /* snmpOutGetRequests */ case 26: /* snmpOutGetNexts */ case 27: /* snmpOutSetRequests */ case 28: /* snmpOutGetResponses */ case 29: /* snmpOutTraps */ od->instance = MIB_OBJECT_SCALAR; 802c640: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_ONLY; 802c642: 7050 strb r0, [r2, #1] od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); 802c644: 2341 movs r3, #65 ; 0x41 802c646: e002 b.n 802c64e od->v_len = sizeof(u32_t); break; case 30: /* snmpEnableAuthenTraps */ od->instance = MIB_OBJECT_SCALAR; od->access = MIB_OBJECT_READ_WRITE; 802c648: 2103 movs r1, #3 od->access = MIB_OBJECT_READ_ONLY; od->asn_type = (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER); od->v_len = sizeof(u32_t); break; case 30: /* snmpEnableAuthenTraps */ od->instance = MIB_OBJECT_SCALAR; 802c64a: 7010 strb r0, [r2, #0] od->access = MIB_OBJECT_READ_WRITE; 802c64c: 7051 strb r1, [r2, #1] od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG); 802c64e: 7093 strb r3, [r2, #2] od->v_len = sizeof(s32_t); 802c650: 2304 movs r3, #4 802c652: 8093 strh r3, [r2, #4] break; 802c654: bd10 pop {r4, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("snmp_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 802c656: 2300 movs r3, #0 802c658: 7013 strb r3, [r2, #0] 802c65a: bd10 pop {r4, pc} 802c65c: 7efffefc .word 0x7efffefc 0802c660 : u8_t id, set_ok; LWIP_UNUSED_ARG(len); set_ok = 0; LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 802c660: 6883 ldr r3, [r0, #8] if (id == 30) 802c662: 781b ldrb r3, [r3, #0] 802c664: 2b1e cmp r3, #30 802c666: d10f bne.n 802c688 { /* snmpEnableAuthenTraps */ s32_t *sint_ptr = (s32_t*)value; if (snmpenableauthentraps_ptr != &snmpenableauthentraps_default) 802c668: 4b08 ldr r3, [pc, #32] ; (802c68c ) 802c66a: 6810 ldr r0, [r2, #0] 802c66c: 6819 ldr r1, [r3, #0] 802c66e: 4b08 ldr r3, [pc, #32] ; (802c690 ) 802c670: 4299 cmp r1, r3 802c672: d005 beq.n 802c680 { /* we should have writable non-volatile mem here */ if ((*sint_ptr == 1) || (*sint_ptr == 2)) 802c674: 3801 subs r0, #1 snmp_set_test(struct obj_def *od, u16_t len, void *value) { u8_t id, set_ok; LWIP_UNUSED_ARG(len); set_ok = 0; 802c676: 2801 cmp r0, #1 802c678: bf8c ite hi 802c67a: 2000 movhi r0, #0 802c67c: 2001 movls r0, #1 802c67e: 4770 bx lr 802c680: 1e83 subs r3, r0, #2 802c682: 4258 negs r0, r3 802c684: 4158 adcs r0, r3 802c686: 4770 bx lr 802c688: 2000 movs r0, #0 set_ok = 1; } } } return set_ok; } 802c68a: 4770 bx lr 802c68c: 20001284 .word 0x20001284 802c690: 08037cc8 .word 0x08037cc8 0802c694 : * @param dst points to destination * @param src points to source * @param n number of octets to copy. */ void ocstrncpy(u8_t *dst, u8_t *src, u16_t n) { 802c694: b510 push {r4, lr} u16_t i = n; while (i > 0) { 802c696: 2300 movs r3, #0 802c698: e002 b.n 802c6a0 i--; *dst++ = *src++; 802c69a: 5ccc ldrb r4, [r1, r3] 802c69c: 54c4 strb r4, [r0, r3] 802c69e: 3301 adds r3, #1 * @param n number of octets to copy. */ void ocstrncpy(u8_t *dst, u8_t *src, u16_t n) { u16_t i = n; while (i > 0) { 802c6a0: b29c uxth r4, r3 802c6a2: 42a2 cmp r2, r4 802c6a4: d1f9 bne.n 802c69a i--; *dst++ = *src++; } } 802c6a6: bd10 pop {r4, pc} 0802c6a8 : { u8_t id; LWIP_ASSERT("invalid len", len <= 0xff); LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 802c6a8: 6883 ldr r3, [r0, #8] switch (id) 802c6aa: 781b ldrb r3, [r3, #0] 802c6ac: 2b05 cmp r3, #5 return set_ok; } static void system_set_value(struct obj_def *od, u16_t len, void *value) { 802c6ae: b510 push {r4, lr} 802c6b0: 460c mov r4, r1 802c6b2: 4611 mov r1, r2 u8_t id; LWIP_ASSERT("invalid len", len <= 0xff); LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; switch (id) 802c6b4: d00a beq.n 802c6cc 802c6b6: 2b06 cmp r3, #6 802c6b8: d00f beq.n 802c6da 802c6ba: 2b04 cmp r3, #4 802c6bc: d115 bne.n 802c6ea { case 4: /* sysContact */ ocstrncpy(syscontact_ptr, (u8_t*)value, len); 802c6be: 4b0b ldr r3, [pc, #44] ; (802c6ec ) 802c6c0: 4622 mov r2, r4 802c6c2: 6818 ldr r0, [r3, #0] 802c6c4: f7ff ffe6 bl 802c694 *syscontact_len_ptr = (u8_t)len; 802c6c8: 4b09 ldr r3, [pc, #36] ; (802c6f0 ) 802c6ca: e00c b.n 802c6e6 break; case 5: /* sysName */ ocstrncpy(sysname_ptr, (u8_t*)value, len); 802c6cc: 4b09 ldr r3, [pc, #36] ; (802c6f4 ) 802c6ce: 4622 mov r2, r4 802c6d0: 6818 ldr r0, [r3, #0] 802c6d2: f7ff ffdf bl 802c694 *sysname_len_ptr = (u8_t)len; 802c6d6: 4b08 ldr r3, [pc, #32] ; (802c6f8 ) 802c6d8: e005 b.n 802c6e6 break; case 6: /* sysLocation */ ocstrncpy(syslocation_ptr, (u8_t*)value, len); 802c6da: 4b08 ldr r3, [pc, #32] ; (802c6fc ) 802c6dc: 4622 mov r2, r4 802c6de: 6818 ldr r0, [r3, #0] 802c6e0: f7ff ffd8 bl 802c694 *syslocation_len_ptr = (u8_t)len; 802c6e4: 4b06 ldr r3, [pc, #24] ; (802c700 ) 802c6e6: 681b ldr r3, [r3, #0] 802c6e8: 701c strb r4, [r3, #0] 802c6ea: bd10 pop {r4, pc} 802c6ec: 20001300 .word 0x20001300 802c6f0: 20001184 .word 0x20001184 802c6f4: 2000128c .word 0x2000128c 802c6f8: 20001180 .word 0x20001180 802c6fc: 20001418 .word 0x20001418 802c700: 2000136c .word 0x2000136c 0802c704 : * * @param dst points to destination * @param src points to source * @param n number of sub identifiers to copy. */ void objectidncpy(s32_t *dst, s32_t *src, u8_t n) 802c704: 3904 subs r1, #4 { u8_t i = n; while(i > 0) { 802c706: e005 b.n 802c714 i--; *dst++ = *src++; 802c708: f851 3f04 ldr.w r3, [r1, #4]! */ void objectidncpy(s32_t *dst, s32_t *src, u8_t n) { u8_t i = n; while(i > 0) { i--; 802c70c: 3a01 subs r2, #1 *dst++ = *src++; 802c70e: f840 3b04 str.w r3, [r0], #4 */ void objectidncpy(s32_t *dst, s32_t *src, u8_t n) { u8_t i = n; while(i > 0) { i--; 802c712: b2d2 uxtb r2, r2 * @param n number of sub identifiers to copy. */ void objectidncpy(s32_t *dst, s32_t *src, u8_t n) { u8_t i = n; while(i > 0) { 802c714: 2a00 cmp r2, #0 802c716: d1f7 bne.n 802c708 i--; *dst++ = *src++; } } 802c718: 4770 bx lr 802c71a: 0000 movs r0, r0 0802c71c : * @param len return value space (in bytes) * @param value points to (varbind) space to copy value into. */ static void ifentry_get_value(struct obj_def *od, u16_t len, void *value) { 802c71c: b573 push {r0, r1, r4, r5, r6, lr} struct netif *netif; u8_t id; snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 802c71e: 6883 ldr r3, [r0, #8] * @param len return value space (in bytes) * @param value points to (varbind) space to copy value into. */ static void ifentry_get_value(struct obj_def *od, u16_t len, void *value) { 802c720: 4606 mov r6, r0 802c722: 460d mov r5, r1 struct netif *netif; u8_t id; snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 802c724: 6858 ldr r0, [r3, #4] 802c726: a901 add r1, sp, #4 * @param len return value space (in bytes) * @param value points to (varbind) space to copy value into. */ static void ifentry_get_value(struct obj_def *od, u16_t len, void *value) { 802c728: 4614 mov r4, r2 struct netif *netif; u8_t id; snmp_ifindextonetif(od->id_inst_ptr[1], &netif); 802c72a: f000 fd93 bl 802d254 LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 802c72e: 68b3 ldr r3, [r6, #8] switch (id) 802c730: 781a ldrb r2, [r3, #0] 802c732: 3a01 subs r2, #1 802c734: 2a15 cmp r2, #21 802c736: d85c bhi.n 802c7f2 802c738: e8df f002 tbb [pc, r2] 802c73c: 15110d0b .word 0x15110d0b 802c740: 2e221b18 .word 0x2e221b18 802c744: 403d3a37 .word 0x403d3a37 802c748: 46525243 .word 0x46525243 802c74c: 524f4c49 .word 0x524f4c49 802c750: 5552 .short 0x5552 { case 1: /* ifIndex */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = od->id_inst_ptr[1]; 802c752: 685b ldr r3, [r3, #4] 802c754: e045 b.n 802c7e2 } break; case 2: /* ifDescr */ ocstrncpy((u8_t*)value, (u8_t*)netif->name, len); 802c756: 9901 ldr r1, [sp, #4] 802c758: 4620 mov r0, r4 802c75a: 312e adds r1, #46 ; 0x2e 802c75c: e00c b.n 802c778 break; case 3: /* ifType */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = netif->link_type; 802c75e: 9b01 ldr r3, [sp, #4] 802c760: f893 3031 ldrb.w r3, [r3, #49] ; 0x31 802c764: e03d b.n 802c7e2 } break; case 4: /* ifMtu */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = netif->mtu; 802c766: 9b01 ldr r3, [sp, #4] 802c768: 8c9b ldrh r3, [r3, #36] ; 0x24 802c76a: e03a b.n 802c7e2 } break; case 5: /* ifSpeed */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->link_speed; 802c76c: 9b01 ldr r3, [sp, #4] 802c76e: 6b5b ldr r3, [r3, #52] ; 0x34 802c770: e037 b.n 802c7e2 } break; case 6: /* ifPhysAddress */ ocstrncpy((u8_t*)value, netif->hwaddr, len); 802c772: 9901 ldr r1, [sp, #4] 802c774: 4620 mov r0, r4 802c776: 3127 adds r1, #39 ; 0x27 802c778: 462a mov r2, r5 802c77a: f7ff ff8b bl 802c694 break; 802c77e: e038 b.n 802c7f2 case 7: /* ifAdminStatus */ { s32_t *sint_ptr = (s32_t*)value; if (netif_is_up(netif)) 802c780: 9b01 ldr r3, [sp, #4] 802c782: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 802c786: 07d9 lsls r1, r3, #31 802c788: d50d bpl.n 802c7a6 { if (netif_is_link_up(netif)) 802c78a: f003 0310 and.w r3, r3, #16 802c78e: b2db uxtb r3, r3 802c790: b103 cbz r3, 802c794 802c792: e006 b.n 802c7a2 { *sint_ptr = 1; /* up */ } else { *sint_ptr = 7; /* lowerLayerDown */ 802c794: 2307 movs r3, #7 802c796: e024 b.n 802c7e2 } break; case 8: /* ifOperStatus */ { s32_t *sint_ptr = (s32_t*)value; if (netif_is_up(netif)) 802c798: 9b01 ldr r3, [sp, #4] 802c79a: f893 302d ldrb.w r3, [r3, #45] ; 0x2d 802c79e: 07da lsls r2, r3, #31 802c7a0: d501 bpl.n 802c7a6 { *sint_ptr = 1; 802c7a2: 2301 movs r3, #1 802c7a4: e01d b.n 802c7e2 } else { *sint_ptr = 2; 802c7a6: 2302 movs r3, #2 802c7a8: e01b b.n 802c7e2 } break; case 9: /* ifLastChange */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ts; 802c7aa: 9b01 ldr r3, [sp, #4] 802c7ac: 6b9b ldr r3, [r3, #56] ; 0x38 802c7ae: e018 b.n 802c7e2 } break; case 10: /* ifInOctets */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifinoctets; 802c7b0: 9b01 ldr r3, [sp, #4] 802c7b2: 6bdb ldr r3, [r3, #60] ; 0x3c 802c7b4: e015 b.n 802c7e2 } break; case 11: /* ifInUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifinucastpkts; 802c7b6: 9b01 ldr r3, [sp, #4] 802c7b8: 6c1b ldr r3, [r3, #64] ; 0x40 802c7ba: e012 b.n 802c7e2 } break; case 12: /* ifInNUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifinnucastpkts; 802c7bc: 9b01 ldr r3, [sp, #4] 802c7be: 6c5b ldr r3, [r3, #68] ; 0x44 802c7c0: e00f b.n 802c7e2 } break; case 13: /* ifInDiscarts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifindiscards; 802c7c2: 9b01 ldr r3, [sp, #4] 802c7c4: 6c9b ldr r3, [r3, #72] ; 0x48 802c7c6: e00c b.n 802c7e2 } break; case 16: /* ifOutOctets */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutoctets; 802c7c8: 9b01 ldr r3, [sp, #4] 802c7ca: 6cdb ldr r3, [r3, #76] ; 0x4c 802c7cc: e009 b.n 802c7e2 } break; case 17: /* ifOutUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutucastpkts; 802c7ce: 9b01 ldr r3, [sp, #4] 802c7d0: 6d1b ldr r3, [r3, #80] ; 0x50 802c7d2: e006 b.n 802c7e2 } break; case 18: /* ifOutNUcastPkts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutnucastpkts; 802c7d4: 9b01 ldr r3, [sp, #4] 802c7d6: 6d5b ldr r3, [r3, #84] ; 0x54 802c7d8: e003 b.n 802c7e2 } break; case 19: /* ifOutDiscarts */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = netif->ifoutdiscards; 802c7da: 9b01 ldr r3, [sp, #4] 802c7dc: 6d9b ldr r3, [r3, #88] ; 0x58 802c7de: e000 b.n 802c7e2 break; case 21: /* ifOutQLen */ /** @todo figure out if this must be 0 (no queue) or 1? */ { u32_t *uint_ptr = (u32_t*)value; *uint_ptr = 0; 802c7e0: 2300 movs r3, #0 802c7e2: 6023 str r3, [r4, #0] } break; 802c7e4: e005 b.n 802c7f2 case 22: /* ifSpecific */ objectidncpy((s32_t*)value, (s32_t*)ifspecific.id, (u8_t)(len / sizeof(s32_t))); 802c7e6: 4620 mov r0, r4 802c7e8: 4902 ldr r1, [pc, #8] ; (802c7f4 ) 802c7ea: f3c5 0287 ubfx r2, r5, #2, #8 802c7ee: f7ff ff89 bl 802c704 break; }; } 802c7f2: bd7c pop {r2, r3, r4, r5, r6, pc} 802c7f4: 08037d50 .word 0x08037d50 0802c7f8 : } } static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value) { 802c7f8: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} struct netif *netif; ip_addr_t dest; s32_t *ident; u8_t id; ident = od->id_inst_ptr; 802c7fa: 6885 ldr r5, [r0, #8] } } static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value) { 802c7fc: 460f mov r7, r1 ip_addr_t dest; s32_t *ident; u8_t id; ident = od->id_inst_ptr; snmp_oidtoip(&ident[1], &dest); 802c7fe: 1d28 adds r0, r5, #4 802c800: a901 add r1, sp, #4 } } static void ip_rteentry_get_value(struct obj_def *od, u16_t len, void *value) { 802c802: 4614 mov r4, r2 ip_addr_t dest; s32_t *ident; u8_t id; ident = od->id_inst_ptr; snmp_oidtoip(&ident[1], &dest); 802c804: f000 fd44 bl 802d290 if (ip_addr_isany(&dest)) 802c808: 9b01 ldr r3, [sp, #4] 802c80a: b91b cbnz r3, 802c814 { /* ip_route() uses default netif for default route */ netif = netif_default; 802c80c: 4a23 ldr r2, [pc, #140] ; (802c89c ) 802c80e: 6810 ldr r0, [r2, #0] !ip_addr_netcmp(&dest, &(netif->ip_addr), &(netif->netmask)) ) { netif = netif->next; } } if (netif != NULL) 802c810: b960 cbnz r0, 802c82c 802c812: e041 b.n 802c898 netif = netif_default; } else { /* not using ip_route(), need exact match! */ netif = netif_list; 802c814: 4a22 ldr r2, [pc, #136] ; (802c8a0 ) 802c816: 6810 ldr r0, [r2, #0] while ((netif != NULL) && 802c818: e000 b.n 802c81c !ip_addr_netcmp(&dest, &(netif->ip_addr), &(netif->netmask)) ) { netif = netif->next; 802c81a: 6800 ldr r0, [r0, #0] } else { /* not using ip_route(), need exact match! */ netif = netif_list; while ((netif != NULL) && 802c81c: 2800 cmp r0, #0 802c81e: d03b beq.n 802c898 !ip_addr_netcmp(&dest, &(netif->ip_addr), &(netif->netmask)) ) 802c820: 6846 ldr r6, [r0, #4] 802c822: ea83 0206 eor.w r2, r3, r6 802c826: 6886 ldr r6, [r0, #8] } else { /* not using ip_route(), need exact match! */ netif = netif_list; while ((netif != NULL) && 802c828: 4232 tst r2, r6 802c82a: d1f6 bne.n 802c81a } if (netif != NULL) { LWIP_ASSERT("invalid id", (ident[0] >= 0) && (ident[0] <= 0xff)); id = (u8_t)ident[0]; switch (id) 802c82c: 782d ldrb r5, [r5, #0] 802c82e: 3d01 subs r5, #1 802c830: 2d0c cmp r5, #12 802c832: d831 bhi.n 802c898 802c834: e8df f005 tbb [pc, r5] 802c838: 14110d07 .word 0x14110d07 802c83c: 1c171414 .word 0x1c171414 802c840: 14252321 .word 0x14252321 802c844: 2a .byte 0x2a 802c845: 00 .byte 0x00 { case 1: /* ipRouteDest */ { ip_addr_t *dst = (ip_addr_t*)value; if (ip_addr_isany(&dest)) 802c846: b903 cbnz r3, 802c84a 802c848: e01e b.n 802c888 ip_addr_set_zero(dst); } else { /* netifs have netaddress dest */ ip_addr_get_network(dst, &netif->ip_addr, &netif->netmask); 802c84a: 6882 ldr r2, [r0, #8] 802c84c: 6843 ldr r3, [r0, #4] 802c84e: 4013 ands r3, r2 802c850: e01a b.n 802c888 break; case 2: /* ipRouteIfIndex */ { s32_t *sint_ptr = (s32_t*)value; snmp_netiftoifindex(netif, sint_ptr); 802c852: 4621 mov r1, r4 802c854: f000 fd0c bl 802d270 } break; 802c858: e01e b.n 802c898 case 3: /* ipRouteMetric1 */ { s32_t *sint_ptr = (s32_t*)value; if (ip_addr_isany(&dest)) 802c85a: b983 cbnz r3, 802c87e { /* default rte has metric 1 */ *sint_ptr = 1; 802c85c: 2301 movs r3, #1 802c85e: e013 b.n 802c888 case 6: /* ipRouteMetric4 */ case 12: /* ipRouteMetric5 */ { s32_t *sint_ptr = (s32_t*)value; /* not used */ *sint_ptr = -1; 802c860: f04f 33ff mov.w r3, #4294967295 802c864: e010 b.n 802c888 break; case 7: /* ipRouteNextHop */ { ip_addr_t *dst = (ip_addr_t*)value; if (ip_addr_isany(&dest)) 802c866: b90b cbnz r3, 802c86c { /* default rte: gateway */ *dst = netif->gw; 802c868: 68c3 ldr r3, [r0, #12] 802c86a: e00d b.n 802c888 } else { /* other rtes: netif ip_addr */ *dst = netif->ip_addr; 802c86c: 6843 ldr r3, [r0, #4] 802c86e: e00b b.n 802c888 break; case 8: /* ipRouteType */ { s32_t *sint_ptr = (s32_t*)value; if (ip_addr_isany(&dest)) 802c870: b90b cbnz r3, 802c876 { /* default rte is indirect */ *sint_ptr = 4; 802c872: 2304 movs r3, #4 802c874: e008 b.n 802c888 } else { /* other rtes are direct */ *sint_ptr = 3; 802c876: 2303 movs r3, #3 802c878: e006 b.n 802c888 break; case 9: /* ipRouteProto */ { s32_t *sint_ptr = (s32_t*)value; /* locally defined routes */ *sint_ptr = 2; 802c87a: 2302 movs r3, #2 802c87c: e004 b.n 802c888 case 10: /* ipRouteAge */ { s32_t *sint_ptr = (s32_t*)value; /** @todo (sysuptime - timestamp last change) / 100 @see snmp_insert_iprteidx_tree() */ *sint_ptr = 0; 802c87e: 2300 movs r3, #0 802c880: e002 b.n 802c888 break; case 11: /* ipRouteMask */ { ip_addr_t *dst = (ip_addr_t*)value; if (ip_addr_isany(&dest)) 802c882: b903 cbnz r3, 802c886 802c884: e000 b.n 802c888 ip_addr_set_zero(dst); } else { /* other rtes use netmask */ *dst = netif->netmask; 802c886: 6883 ldr r3, [r0, #8] 802c888: 6023 str r3, [r4, #0] 802c88a: e005 b.n 802c898 } } break; case 13: /* ipRouteInfo */ objectidncpy((s32_t*)value, (s32_t*)iprouteinfo.id, (u8_t)(len / sizeof(s32_t))); 802c88c: 4620 mov r0, r4 802c88e: 4905 ldr r1, [pc, #20] ; (802c8a4 ) 802c890: f3c7 0287 ubfx r2, r7, #2, #8 802c894: f7ff ff36 bl 802c704 break; } } } 802c898: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 802c89a: bf00 nop 802c89c: 200104bc .word 0x200104bc 802c8a0: 200104b8 .word 0x200104b8 802c8a4: 08037b64 .word 0x08037b64 0802c8a8 : * @param str if non-NULL then copy str pointer * @param len points to string length, excluding zero terminator */ void snmp_set_sysdesr(u8_t *str, u8_t *len) { if (str != NULL) 802c8a8: b118 cbz r0, 802c8b2 { sysdescr_ptr = str; 802c8aa: 4b02 ldr r3, [pc, #8] ; (802c8b4 ) 802c8ac: 6018 str r0, [r3, #0] sysdescr_len_ptr = len; 802c8ae: 4b02 ldr r3, [pc, #8] ; (802c8b8 ) 802c8b0: 6019 str r1, [r3, #0] 802c8b2: 4770 bx lr 802c8b4: 200012ac .word 0x200012ac 802c8b8: 20001328 .word 0x20001328 0802c8bc : { sysuptime+=value; } void snmp_get_sysuptime(u32_t *value) { 802c8bc: b510 push {r4, lr} 802c8be: 4604 mov r4, r0 SNMP_GET_SYSUPTIME(sysuptime); 802c8c0: f003 f975 bl 802fbae 802c8c4: 230a movs r3, #10 802c8c6: 4a03 ldr r2, [pc, #12] ; (802c8d4 ) 802c8c8: fbb0 f0f3 udiv r0, r0, r3 802c8cc: 6010 str r0, [r2, #0] *value = sysuptime; 802c8ce: 6020 str r0, [r4, #0] 802c8d0: bd10 pop {r4, pc} 802c8d2: bf00 nop 802c8d4: 2000dc7c .word 0x2000dc7c 0802c8d8 : * @param len return value space (in bytes) * @param value points to (varbind) space to copy value into. */ static void system_get_value(struct obj_def *od, u16_t len, void *value) { 802c8d8: 4613 mov r3, r2 u8_t id; LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; 802c8da: 6882 ldr r2, [r0, #8] switch (id) 802c8dc: 7812 ldrb r2, [r2, #0] 802c8de: 3a01 subs r2, #1 * @param len return value space (in bytes) * @param value points to (varbind) space to copy value into. */ static void system_get_value(struct obj_def *od, u16_t len, void *value) { 802c8e0: b510 push {r4, lr} 802c8e2: 460c mov r4, r1 u8_t id; LWIP_ASSERT("invalid id", (od->id_inst_ptr[0] >= 0) && (od->id_inst_ptr[0] <= 0xff)); id = (u8_t)od->id_inst_ptr[0]; switch (id) 802c8e4: 2a06 cmp r2, #6 802c8e6: d825 bhi.n 802c934 802c8e8: e8df f002 tbb [pc, r2] 802c8ec: 140f0704 .word 0x140f0704 802c8f0: 1a17 .short 0x1a17 802c8f2: 22 .byte 0x22 802c8f3: 00 .byte 0x00 { case 1: /* sysDescr */ ocstrncpy((u8_t*)value, sysdescr_ptr, len); 802c8f4: 4618 mov r0, r3 802c8f6: 4b10 ldr r3, [pc, #64] ; (802c938 ) 802c8f8: e014 b.n 802c924 break; case 2: /* sysObjectID */ objectidncpy((s32_t*)value, (s32_t*)sysobjid.id, (u8_t)(len / sizeof(s32_t))); 802c8fa: 4910 ldr r1, [pc, #64] ; (802c93c ) 802c8fc: 4618 mov r0, r3 802c8fe: f3c4 0287 ubfx r2, r4, #2, #8 s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; } break; }; } 802c902: e8bd 4010 ldmia.w sp!, {r4, lr} { case 1: /* sysDescr */ ocstrncpy((u8_t*)value, sysdescr_ptr, len); break; case 2: /* sysObjectID */ objectidncpy((s32_t*)value, (s32_t*)sysobjid.id, (u8_t)(len / sizeof(s32_t))); 802c906: f7ff befd b.w 802c704 break; case 3: /* sysUpTime */ { snmp_get_sysuptime((u32_t*)value); 802c90a: 4618 mov r0, r3 s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; } break; }; } 802c90c: e8bd 4010 ldmia.w sp!, {r4, lr} case 2: /* sysObjectID */ objectidncpy((s32_t*)value, (s32_t*)sysobjid.id, (u8_t)(len / sizeof(s32_t))); break; case 3: /* sysUpTime */ { snmp_get_sysuptime((u32_t*)value); 802c910: f7ff bfd4 b.w 802c8bc } break; case 4: /* sysContact */ ocstrncpy((u8_t*)value, syscontact_ptr, len); 802c914: 4618 mov r0, r3 802c916: 4b0a ldr r3, [pc, #40] ; (802c940 ) 802c918: e004 b.n 802c924 break; case 5: /* sysName */ ocstrncpy((u8_t*)value, sysname_ptr, len); 802c91a: 4618 mov r0, r3 802c91c: 4b09 ldr r3, [pc, #36] ; (802c944 ) 802c91e: e001 b.n 802c924 break; case 6: /* sysLocation */ ocstrncpy((u8_t*)value, syslocation_ptr, len); 802c920: 4618 mov r0, r3 802c922: 4b09 ldr r3, [pc, #36] ; (802c948 ) 802c924: 6819 ldr r1, [r3, #0] 802c926: 4622 mov r2, r4 s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; } break; }; } 802c928: e8bd 4010 ldmia.w sp!, {r4, lr} break; case 5: /* sysName */ ocstrncpy((u8_t*)value, sysname_ptr, len); break; case 6: /* sysLocation */ ocstrncpy((u8_t*)value, syslocation_ptr, len); 802c92c: f7ff beb2 b.w 802c694 break; case 7: /* sysServices */ { s32_t *sint_ptr = (s32_t*)value; *sint_ptr = sysservices; 802c930: 2248 movs r2, #72 ; 0x48 802c932: 601a str r2, [r3, #0] 802c934: bd10 pop {r4, pc} 802c936: bf00 nop 802c938: 200012ac .word 0x200012ac 802c93c: 200011dc .word 0x200011dc 802c940: 20001300 .word 0x20001300 802c944: 2000128c .word 0x2000128c 802c948: 20001418 .word 0x20001418 0802c94c : * @param ocstr if non-NULL then copy str pointer * @param ocstrlen points to string length, excluding zero terminator */ void snmp_set_syscontact(u8_t *ocstr, u8_t *ocstrlen) { if (ocstr != NULL) 802c94c: b118 cbz r0, 802c956 { syscontact_ptr = ocstr; 802c94e: 4b02 ldr r3, [pc, #8] ; (802c958 ) 802c950: 6018 str r0, [r3, #0] syscontact_len_ptr = ocstrlen; 802c952: 4b02 ldr r3, [pc, #8] ; (802c95c ) 802c954: 6019 str r1, [r3, #0] 802c956: 4770 bx lr 802c958: 20001300 .word 0x20001300 802c95c: 20001184 .word 0x20001184 0802c960 : * @param ocstr if non-NULL then copy str pointer * @param ocstrlen points to string length, excluding zero terminator */ void snmp_set_syslocation(u8_t *ocstr, u8_t *ocstrlen) { if (ocstr != NULL) 802c960: b118 cbz r0, 802c96a { syslocation_ptr = ocstr; 802c962: 4b02 ldr r3, [pc, #8] ; (802c96c ) 802c964: 6018 str r0, [r3, #0] syslocation_len_ptr = ocstrlen; 802c966: 4b02 ldr r3, [pc, #8] ; (802c970 ) 802c968: 6019 str r1, [r3, #0] 802c96a: 4770 bx lr 802c96c: 20001418 .word 0x20001418 802c970: 2000136c .word 0x2000136c 0802c974 : { (ni->ifoutdiscards)++; } void snmp_inc_iflist(void) { 802c974: b507 push {r0, r1, r2, lr} struct mib_list_node *if_node = NULL; snmp_mib_node_insert(&iflist_root, iflist_root.count + 1, &if_node); 802c976: 4806 ldr r0, [pc, #24] ; (802c990 ) (ni->ifoutdiscards)++; } void snmp_inc_iflist(void) { struct mib_list_node *if_node = NULL; 802c978: aa02 add r2, sp, #8 snmp_mib_node_insert(&iflist_root, iflist_root.count + 1, &if_node); 802c97a: 8b81 ldrh r1, [r0, #28] (ni->ifoutdiscards)++; } void snmp_inc_iflist(void) { struct mib_list_node *if_node = NULL; 802c97c: 2300 movs r3, #0 802c97e: f842 3d04 str.w r3, [r2, #-4]! snmp_mib_node_insert(&iflist_root, iflist_root.count + 1, &if_node); 802c982: 3101 adds r1, #1 802c984: f000 fccc bl 802d320 /* enable getnext traversal on filled table */ iftable.maxlength = 1; 802c988: 4b02 ldr r3, [pc, #8] ; (802c994 ) 802c98a: 2201 movs r2, #1 802c98c: 825a strh r2, [r3, #18] } 802c98e: bd0e pop {r1, r2, r3, pc} 802c990: 200011b8 .word 0x200011b8 802c994: 20001330 .word 0x20001330 0802c998 : /** * Inserts ARP table indexes (.xIfIndex.xNetAddress) * into arp table index trees (both atTable and ipNetToMediaTable). */ void snmp_insert_arpidx_tree(struct netif *ni, ip_addr_t *ip) { 802c998: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 802c99c: b086 sub sp, #24 802c99e: 460c mov r4, r1 struct mib_list_node *at_node; s32_t arpidx[5]; u8_t level, tree; LWIP_ASSERT("ni != NULL", ni != NULL); snmp_netiftoifindex(ni, &arpidx[0]); 802c9a0: a901 add r1, sp, #4 802c9a2: f000 fc65 bl 802d270 snmp_iptooid(ip, &arpidx[1]); 802c9a6: 4620 mov r0, r4 802c9a8: a902 add r1, sp, #8 802c9aa: f000 fc7e bl 802d2aa for (tree = 0; tree < 2; tree++) { if (tree == 0) { at_rn = &arptree_root; 802c9ae: f8df 80a0 ldr.w r8, [pc, #160] ; 802ca50 LWIP_ASSERT("ni != NULL", ni != NULL); snmp_netiftoifindex(ni, &arpidx[0]); snmp_iptooid(ip, &arpidx[1]); for (tree = 0; tree < 2; tree++) 802c9b2: 2500 movs r5, #0 { if (tree == 0) { at_rn = &arptree_root; 802c9b4: 4c1f ldr r4, [pc, #124] ; (802ca34 ) else { at_rn->get_object_def = ip_ntomentry_get_object_def; at_rn->get_value = ip_ntomentry_get_value; } at_rn->set_test = noleafs_set_test; 802c9b6: f8df 909c ldr.w r9, [pc, #156] ; 802ca54 at_rn->set_value = noleafs_set_value; 802c9ba: f8df a09c ldr.w sl, [pc, #156] ; 802ca58 for (tree = 0; tree < 2; tree++) { if (tree == 0) { at_rn = &arptree_root; 802c9be: 2d00 cmp r5, #0 802c9c0: bf18 it ne 802c9c2: 4644 movne r4, r8 } else { at_rn = &ipntomtree_root; 802c9c4: 2600 movs r6, #0 } for (level = 0; level < 5; level++) { at_node = NULL; 802c9c6: 2300 movs r3, #0 802c9c8: 9300 str r3, [sp, #0] snmp_mib_node_insert(at_rn, arpidx[level], &at_node); 802c9ca: ab01 add r3, sp, #4 802c9cc: 4620 mov r0, r4 802c9ce: f853 1026 ldr.w r1, [r3, r6, lsl #2] 802c9d2: aa00 add r2, sp, #0 802c9d4: b2f7 uxtb r7, r6 802c9d6: f000 fca3 bl 802d320 if ((level != 4) && (at_node != NULL)) 802c9da: 2f04 cmp r7, #4 802c9dc: d01d beq.n 802ca1a 802c9de: 9b00 ldr r3, [sp, #0] 802c9e0: b1db cbz r3, 802ca1a { if (at_node->nptr == NULL) 802c9e2: 68dc ldr r4, [r3, #12] 802c9e4: b9cc cbnz r4, 802ca1a { at_rn = snmp_mib_lrn_alloc(); 802c9e6: f000 fc79 bl 802d2dc at_node->nptr = (struct mib_node*)at_rn; 802c9ea: 9b00 ldr r3, [sp, #0] snmp_mib_node_insert(at_rn, arpidx[level], &at_node); if ((level != 4) && (at_node != NULL)) { if (at_node->nptr == NULL) { at_rn = snmp_mib_lrn_alloc(); 802c9ec: 4604 mov r4, r0 at_node->nptr = (struct mib_node*)at_rn; 802c9ee: 60d8 str r0, [r3, #12] if (at_rn != NULL) 802c9f0: b920 cbnz r0, 802c9fc LWIP_ASSERT("ni != NULL", ni != NULL); snmp_netiftoifindex(ni, &arpidx[0]); snmp_iptooid(ip, &arpidx[1]); for (tree = 0; tree < 2; tree++) 802c9f2: 3501 adds r5, #1 802c9f4: b2ed uxtb r5, r5 802c9f6: 2d02 cmp r5, #2 802c9f8: d1dc bne.n 802c9b4 802c9fa: e012 b.n 802ca22 { at_rn = snmp_mib_lrn_alloc(); at_node->nptr = (struct mib_node*)at_rn; if (at_rn != NULL) { if (level == 3) 802c9fc: 2f03 cmp r7, #3 802c9fe: d10c bne.n 802ca1a { if (tree == 0) 802ca00: b91d cbnz r5, 802ca0a { at_rn->get_object_def = atentry_get_object_def; 802ca02: 4b0d ldr r3, [pc, #52] ; (802ca38 ) 802ca04: 6003 str r3, [r0, #0] at_rn->get_value = atentry_get_value; 802ca06: 4b0d ldr r3, [pc, #52] ; (802ca3c ) 802ca08: e002 b.n 802ca10 } else { at_rn->get_object_def = ip_ntomentry_get_object_def; 802ca0a: 4b0d ldr r3, [pc, #52] ; (802ca40 ) 802ca0c: 6003 str r3, [r0, #0] at_rn->get_value = ip_ntomentry_get_value; 802ca0e: 4b0d ldr r3, [pc, #52] ; (802ca44 ) 802ca10: 6063 str r3, [r4, #4] } at_rn->set_test = noleafs_set_test; 802ca12: f8c4 9008 str.w r9, [r4, #8] at_rn->set_value = noleafs_set_value; 802ca16: f8c4 a00c str.w sl, [r4, #12] 802ca1a: 3601 adds r6, #1 } else { at_rn = &ipntomtree_root; } for (level = 0; level < 5; level++) 802ca1c: 2e05 cmp r6, #5 802ca1e: d1d2 bne.n 802c9c6 802ca20: e7e7 b.n 802c9f2 } } } } /* enable getnext traversal on filled tables */ at.maxlength = 1; 802ca22: 4a09 ldr r2, [pc, #36] ; (802ca48 ) 802ca24: 2301 movs r3, #1 802ca26: 8253 strh r3, [r2, #18] ipntomtable.maxlength = 1; 802ca28: 4a08 ldr r2, [pc, #32] ; (802ca4c ) 802ca2a: 8253 strh r3, [r2, #18] } 802ca2c: b006 add sp, #24 802ca2e: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802ca32: bf00 nop 802ca34: 20001304 .word 0x20001304 802ca38: 0802c459 .word 0x0802c459 802ca3c: 0802c3b1 .word 0x0802c3b1 802ca40: 0802c53d .word 0x0802c53d 802ca44: 0802c355 .word 0x0802c355 802ca48: 20001128 .word 0x20001128 802ca4c: 2000110c .word 0x2000110c 802ca50: 200013f4 .word 0x200013f4 802ca54: 0802bc73 .word 0x0802bc73 802ca58: 0802bc77 .word 0x0802bc77 0802ca5c : /** * Removes ARP table indexes (.xIfIndex.xNetAddress) * from arp table index trees. */ void snmp_delete_arpidx_tree(struct netif *ni, ip_addr_t *ip) { 802ca5c: b5f0 push {r4, r5, r6, r7, lr} 802ca5e: b091 sub sp, #68 ; 0x44 802ca60: 460c mov r4, r1 struct mib_list_rootnode *at_rn, *next, *del_rn[5]; struct mib_list_node *at_n, *del_n[5]; s32_t arpidx[5]; u8_t fc, tree, level, del_cnt; snmp_netiftoifindex(ni, &arpidx[0]); 802ca62: a90b add r1, sp, #44 ; 0x2c 802ca64: f000 fc04 bl 802d270 snmp_iptooid(ip, &arpidx[1]); 802ca68: 4620 mov r0, r4 802ca6a: a90c add r1, sp, #48 ; 0x30 802ca6c: f000 fc1d bl 802d2aa for (tree = 0; tree < 2; tree++) 802ca70: 2700 movs r7, #0 { /* mark nodes for deletion */ if (tree == 0) { at_rn = &arptree_root; 802ca72: 4b26 ldr r3, [pc, #152] ; (802cb0c ) 802ca74: 4d26 ldr r5, [pc, #152] ; (802cb10 ) } else { at_rn = &ipntomtree_root; 802ca76: 2600 movs r6, #0 for (tree = 0; tree < 2; tree++) { /* mark nodes for deletion */ if (tree == 0) { at_rn = &arptree_root; 802ca78: 2f00 cmp r7, #0 802ca7a: bf08 it eq 802ca7c: 461d moveq r5, r3 } else { at_rn = &ipntomtree_root; 802ca7e: 4634 mov r4, r6 } level = 0; del_cnt = 0; while ((level < 5) && (at_rn != NULL)) { fc = snmp_mib_node_find(at_rn, arpidx[level], &at_n); 802ca80: ab0b add r3, sp, #44 ; 0x2c 802ca82: 4628 mov r0, r5 802ca84: 58f1 ldr r1, [r6, r3] 802ca86: aa00 add r2, sp, #0 802ca88: f000 fc85 bl 802d396 802ca8c: b2c0 uxtb r0, r0 if (fc == 0) 802ca8e: b198 cbz r0, 802cab8 { /* arpidx[level] does not exist */ del_cnt = 0; at_rn = NULL; } else if (fc == 1) 802ca90: 2801 cmp r0, #1 802ca92: d10b bne.n 802caac { del_rn[del_cnt] = at_rn; 802ca94: ab10 add r3, sp, #64 ; 0x40 802ca96: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = at_n; 802ca9a: 9b00 ldr r3, [sp, #0] del_cnt = 0; at_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = at_rn; 802ca9c: f842 5c3c str.w r5, [r2, #-60] del_n[del_cnt] = at_n; del_cnt++; 802caa0: 3401 adds r4, #1 at_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = at_rn; del_n[del_cnt] = at_n; 802caa2: f842 3c28 str.w r3, [r2, #-40] del_cnt++; 802caa6: b2e4 uxtb r4, r4 at_rn = (struct mib_list_rootnode*)(at_n->nptr); 802caa8: 68dd ldr r5, [r3, #12] 802caaa: e007 b.n 802cabc } else if (fc == 2) 802caac: 2802 cmp r0, #2 802caae: d105 bne.n 802cabc { /* reset delete (2 or more childs) */ del_cnt = 0; at_rn = (struct mib_list_rootnode*)(at_n->nptr); 802cab0: 9b00 ldr r3, [sp, #0] at_rn = (struct mib_list_rootnode*)(at_n->nptr); } else if (fc == 2) { /* reset delete (2 or more childs) */ del_cnt = 0; 802cab2: 2400 movs r4, #0 at_rn = (struct mib_list_rootnode*)(at_n->nptr); 802cab4: 68dd ldr r5, [r3, #12] 802cab6: e001 b.n 802cabc { fc = snmp_mib_node_find(at_rn, arpidx[level], &at_n); if (fc == 0) { /* arpidx[level] does not exist */ del_cnt = 0; 802cab8: 4604 mov r4, r0 at_rn = NULL; 802caba: 4605 mov r5, r0 802cabc: 3604 adds r6, #4 { at_rn = &ipntomtree_root; } level = 0; del_cnt = 0; while ((level < 5) && (at_rn != NULL)) 802cabe: 2e14 cmp r6, #20 802cac0: d011 beq.n 802cae6 802cac2: 2d00 cmp r5, #0 802cac4: d1dc bne.n 802ca80 802cac6: e00e b.n 802cae6 level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 802cac8: 3c01 subs r4, #1 802caca: b2e4 uxtb r4, r4 at_rn = del_rn[del_cnt]; 802cacc: aa10 add r2, sp, #64 ; 0x40 802cace: eb02 0384 add.w r3, r2, r4, lsl #2 at_n = del_n[del_cnt]; 802cad2: f853 1c28 ldr.w r1, [r3, #-40] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; at_rn = del_rn[del_cnt]; 802cad6: f853 0c3c ldr.w r0, [r3, #-60] at_n = del_n[del_cnt]; 802cada: 9100 str r1, [sp, #0] next = snmp_mib_node_delete(at_rn, at_n); 802cadc: f000 fc75 bl 802d3ca if (next != NULL) 802cae0: b108 cbz r0, 802cae6 { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 802cae2: f000 fc19 bl 802d318 at_rn = (struct mib_list_rootnode*)(at_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 802cae6: 2c00 cmp r4, #0 802cae8: d1ee bne.n 802cac8 u8_t fc, tree, level, del_cnt; snmp_netiftoifindex(ni, &arpidx[0]); snmp_iptooid(ip, &arpidx[1]); for (tree = 0; tree < 2; tree++) 802caea: 3701 adds r7, #1 802caec: b2ff uxtb r7, r7 802caee: 2f02 cmp r7, #2 802caf0: d1bf bne.n 802ca72 snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty tables */ if(arptree_root.count == 0) at.maxlength = 0; 802caf2: 4b06 ldr r3, [pc, #24] ; (802cb0c ) 802caf4: 8b9b ldrh r3, [r3, #28] 802caf6: b90b cbnz r3, 802cafc 802caf8: 4b06 ldr r3, [pc, #24] ; (802cb14 ) 802cafa: 825c strh r4, [r3, #18] if(ipntomtree_root.count == 0) ipntomtable.maxlength = 0; 802cafc: 4b04 ldr r3, [pc, #16] ; (802cb10 ) 802cafe: 8b9b ldrh r3, [r3, #28] 802cb00: b90b cbnz r3, 802cb06 802cb02: 4a05 ldr r2, [pc, #20] ; (802cb18 ) 802cb04: 8253 strh r3, [r2, #18] } 802cb06: b011 add sp, #68 ; 0x44 802cb08: bdf0 pop {r4, r5, r6, r7, pc} 802cb0a: bf00 nop 802cb0c: 20001304 .word 0x20001304 802cb10: 200013f4 .word 0x200013f4 802cb14: 20001128 .word 0x20001128 802cb18: 2000110c .word 0x2000110c 0802cb1c : void snmp_inc_ipinreceives(void) { ipinreceives++; 802cb1c: 4b02 ldr r3, [pc, #8] ; (802cb28 ) 802cb1e: 681a ldr r2, [r3, #0] 802cb20: 3201 adds r2, #1 802cb22: 601a str r2, [r3, #0] 802cb24: 4770 bx lr 802cb26: bf00 nop 802cb28: 2000dc50 .word 0x2000dc50 0802cb2c : } void snmp_inc_ipinhdrerrors(void) { ipinhdrerrors++; 802cb2c: 4b02 ldr r3, [pc, #8] ; (802cb38 ) 802cb2e: 681a ldr r2, [r3, #0] 802cb30: 3201 adds r2, #1 802cb32: 601a str r2, [r3, #0] 802cb34: 4770 bx lr 802cb36: bf00 nop 802cb38: 2000dbd8 .word 0x2000dbd8 0802cb3c : } void snmp_inc_ipinaddrerrors(void) { ipinaddrerrors++; 802cb3c: 4b02 ldr r3, [pc, #8] ; (802cb48 ) 802cb3e: 681a ldr r2, [r3, #0] 802cb40: 3201 adds r2, #1 802cb42: 601a str r2, [r3, #0] 802cb44: 4770 bx lr 802cb46: bf00 nop 802cb48: 2000dbbc .word 0x2000dbbc 0802cb4c : ipforwdatagrams++; } void snmp_inc_ipinunknownprotos(void) { ipinunknownprotos++; 802cb4c: 4b02 ldr r3, [pc, #8] ; (802cb58 ) 802cb4e: 681a ldr r2, [r3, #0] 802cb50: 3201 adds r2, #1 802cb52: 601a str r2, [r3, #0] 802cb54: 4770 bx lr 802cb56: bf00 nop 802cb58: 2000dc18 .word 0x2000dc18 0802cb5c : } void snmp_inc_ipindiscards(void) { ipindiscards++; 802cb5c: 4b02 ldr r3, [pc, #8] ; (802cb68 ) 802cb5e: 681a ldr r2, [r3, #0] 802cb60: 3201 adds r2, #1 802cb62: 601a str r2, [r3, #0] 802cb64: 4770 bx lr 802cb66: bf00 nop 802cb68: 2000dca4 .word 0x2000dca4 0802cb6c : } void snmp_inc_ipindelivers(void) { ipindelivers++; 802cb6c: 4b02 ldr r3, [pc, #8] ; (802cb78 ) 802cb6e: 681a ldr r2, [r3, #0] 802cb70: 3201 adds r2, #1 802cb72: 601a str r2, [r3, #0] 802cb74: 4770 bx lr 802cb76: bf00 nop 802cb78: 2000dcdc .word 0x2000dcdc 0802cb7c : } void snmp_inc_ipoutrequests(void) { ipoutrequests++; 802cb7c: 4b02 ldr r3, [pc, #8] ; (802cb88 ) 802cb7e: 681a ldr r2, [r3, #0] 802cb80: 3201 adds r2, #1 802cb82: 601a str r2, [r3, #0] 802cb84: 4770 bx lr 802cb86: bf00 nop 802cb88: 2000dcc4 .word 0x2000dcc4 0802cb8c : } void snmp_inc_ipoutdiscards(void) { ipoutdiscards++; 802cb8c: 4b02 ldr r3, [pc, #8] ; (802cb98 ) 802cb8e: 681a ldr r2, [r3, #0] 802cb90: 3201 adds r2, #1 802cb92: 601a str r2, [r3, #0] 802cb94: 4770 bx lr 802cb96: bf00 nop 802cb98: 2000dc68 .word 0x2000dc68 0802cb9c : } void snmp_inc_ipoutnoroutes(void) { ipoutnoroutes++; 802cb9c: 4b02 ldr r3, [pc, #8] ; (802cba8 ) 802cb9e: 681a ldr r2, [r3, #0] 802cba0: 3201 adds r2, #1 802cba2: 601a str r2, [r3, #0] 802cba4: 4770 bx lr 802cba6: bf00 nop 802cba8: 2000dce8 .word 0x2000dce8 0802cbac : /** * Inserts ipAddrTable indexes (.ipAdEntAddr) * into index tree. */ void snmp_insert_ipaddridx_tree(struct netif *ni) { 802cbac: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802cbb0: b086 sub sp, #24 struct mib_list_node *ipa_node; s32_t ipaddridx[4]; u8_t level; LWIP_ASSERT("ni != NULL", ni != NULL); snmp_iptooid(&ni->ip_addr, &ipaddridx[0]); 802cbb2: 3004 adds r0, #4 802cbb4: a902 add r1, sp, #8 802cbb6: f000 fb78 bl 802d2aa level = 0; ipa_rn = &ipaddrtree_root; 802cbba: 4c17 ldr r4, [pc, #92] ; (802cc18 ) ipa_node->nptr = (struct mib_node*)ipa_rn; if (ipa_rn != NULL) { if (level == 2) { ipa_rn->get_object_def = ip_addrentry_get_object_def; 802cbbc: 4f17 ldr r7, [pc, #92] ; (802cc1c ) ipa_rn->get_value = ip_addrentry_get_value; 802cbbe: f8df 806c ldr.w r8, [pc, #108] ; 802cc2c struct mib_list_node *ipa_node; s32_t ipaddridx[4]; u8_t level; LWIP_ASSERT("ni != NULL", ni != NULL); snmp_iptooid(&ni->ip_addr, &ipaddridx[0]); 802cbc2: 2500 movs r5, #0 level = 0; ipa_rn = &ipaddrtree_root; while (level < 4) { ipa_node = NULL; 802cbc4: 2300 movs r3, #0 802cbc6: 9301 str r3, [sp, #4] snmp_mib_node_insert(ipa_rn, ipaddridx[level], &ipa_node); 802cbc8: ab02 add r3, sp, #8 802cbca: 4620 mov r0, r4 802cbcc: f853 1025 ldr.w r1, [r3, r5, lsl #2] 802cbd0: aa01 add r2, sp, #4 802cbd2: b2ee uxtb r6, r5 802cbd4: f000 fba4 bl 802d320 if ((level != 3) && (ipa_node != NULL)) 802cbd8: 2e03 cmp r6, #3 802cbda: d015 beq.n 802cc08 802cbdc: 9b01 ldr r3, [sp, #4] 802cbde: b19b cbz r3, 802cc08 { if (ipa_node->nptr == NULL) 802cbe0: 68dc ldr r4, [r3, #12] 802cbe2: b98c cbnz r4, 802cc08 { ipa_rn = snmp_mib_lrn_alloc(); 802cbe4: f000 fb7a bl 802d2dc ipa_node->nptr = (struct mib_node*)ipa_rn; 802cbe8: 9b01 ldr r3, [sp, #4] snmp_mib_node_insert(ipa_rn, ipaddridx[level], &ipa_node); if ((level != 3) && (ipa_node != NULL)) { if (ipa_node->nptr == NULL) { ipa_rn = snmp_mib_lrn_alloc(); 802cbea: 4604 mov r4, r0 ipa_node->nptr = (struct mib_node*)ipa_rn; 802cbec: 60d8 str r0, [r3, #12] if (ipa_rn != NULL) 802cbee: b918 cbnz r0, 802cbf8 } } level++; } /* enable getnext traversal on filled table */ ipaddrtable.maxlength = 1; 802cbf0: 4b0b ldr r3, [pc, #44] ; (802cc20 ) 802cbf2: 2201 movs r2, #1 802cbf4: 825a strh r2, [r3, #18] 802cbf6: e00b b.n 802cc10 { ipa_rn = snmp_mib_lrn_alloc(); ipa_node->nptr = (struct mib_node*)ipa_rn; if (ipa_rn != NULL) { if (level == 2) 802cbf8: 2e02 cmp r6, #2 802cbfa: d105 bne.n 802cc08 { ipa_rn->get_object_def = ip_addrentry_get_object_def; ipa_rn->get_value = ip_addrentry_get_value; ipa_rn->set_test = noleafs_set_test; 802cbfc: 4b09 ldr r3, [pc, #36] ; (802cc24 ) if (ipa_rn != NULL) { if (level == 2) { ipa_rn->get_object_def = ip_addrentry_get_object_def; ipa_rn->get_value = ip_addrentry_get_value; 802cbfe: e880 0180 stmia.w r0, {r7, r8} ipa_rn->set_test = noleafs_set_test; 802cc02: 6083 str r3, [r0, #8] ipa_rn->set_value = noleafs_set_value; 802cc04: 4b08 ldr r3, [pc, #32] ; (802cc28 ) 802cc06: 60c3 str r3, [r0, #12] 802cc08: 3501 adds r5, #1 LWIP_ASSERT("ni != NULL", ni != NULL); snmp_iptooid(&ni->ip_addr, &ipaddridx[0]); level = 0; ipa_rn = &ipaddrtree_root; while (level < 4) 802cc0a: 2d04 cmp r5, #4 802cc0c: d1da bne.n 802cbc4 802cc0e: e7ef b.n 802cbf0 } level++; } /* enable getnext traversal on filled table */ ipaddrtable.maxlength = 1; } 802cc10: b006 add sp, #24 802cc12: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802cc16: bf00 nop 802cc18: 20001260 .word 0x20001260 802cc1c: 0802c4f9 .word 0x0802c4f9 802cc20: 200012e4 .word 0x200012e4 802cc24: 0802bc73 .word 0x0802bc73 802cc28: 0802bc77 .word 0x0802bc77 802cc2c: 0802c2e9 .word 0x0802c2e9 0802cc30 : /** * Removes ipAddrTable indexes (.ipAdEntAddr) * from index tree. */ void snmp_delete_ipaddridx_tree(struct netif *ni) { 802cc30: b570 push {r4, r5, r6, lr} 802cc32: b08e sub sp, #56 ; 0x38 struct mib_list_node *ipa_n, *del_n[4]; s32_t ipaddridx[4]; u8_t fc, level, del_cnt; LWIP_ASSERT("ni != NULL", ni != NULL); snmp_iptooid(&ni->ip_addr, &ipaddridx[0]); 802cc34: 3004 adds r0, #4 802cc36: a90a add r1, sp, #40 ; 0x28 802cc38: f000 fb37 bl 802d2aa 802cc3c: 2600 movs r6, #0 /* mark nodes for deletion */ level = 0; del_cnt = 0; ipa_rn = &ipaddrtree_root; 802cc3e: 4d1f ldr r5, [pc, #124] ; (802ccbc ) LWIP_ASSERT("ni != NULL", ni != NULL); snmp_iptooid(&ni->ip_addr, &ipaddridx[0]); /* mark nodes for deletion */ level = 0; del_cnt = 0; 802cc40: 4634 mov r4, r6 ipa_rn = &ipaddrtree_root; while ((level < 4) && (ipa_rn != NULL)) { fc = snmp_mib_node_find(ipa_rn, ipaddridx[level], &ipa_n); 802cc42: ab0a add r3, sp, #40 ; 0x28 802cc44: 4628 mov r0, r5 802cc46: 58f1 ldr r1, [r6, r3] 802cc48: aa01 add r2, sp, #4 802cc4a: f000 fba4 bl 802d396 802cc4e: b2c0 uxtb r0, r0 if (fc == 0) 802cc50: b198 cbz r0, 802cc7a { /* ipaddridx[level] does not exist */ del_cnt = 0; ipa_rn = NULL; } else if (fc == 1) 802cc52: 2801 cmp r0, #1 802cc54: d10b bne.n 802cc6e { del_rn[del_cnt] = ipa_rn; 802cc56: ab0e add r3, sp, #56 ; 0x38 802cc58: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = ipa_n; 802cc5c: 9b01 ldr r3, [sp, #4] del_cnt = 0; ipa_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = ipa_rn; 802cc5e: f842 5c30 str.w r5, [r2, #-48] del_n[del_cnt] = ipa_n; del_cnt++; 802cc62: 3401 adds r4, #1 ipa_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = ipa_rn; del_n[del_cnt] = ipa_n; 802cc64: f842 3c20 str.w r3, [r2, #-32] del_cnt++; 802cc68: b2e4 uxtb r4, r4 ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); 802cc6a: 68dd ldr r5, [r3, #12] 802cc6c: e007 b.n 802cc7e } else if (fc == 2) 802cc6e: 2802 cmp r0, #2 802cc70: d105 bne.n 802cc7e { /* reset delete (2 or more childs) */ del_cnt = 0; ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); 802cc72: 9b01 ldr r3, [sp, #4] ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); } else if (fc == 2) { /* reset delete (2 or more childs) */ del_cnt = 0; 802cc74: 2400 movs r4, #0 ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); 802cc76: 68dd ldr r5, [r3, #12] 802cc78: e001 b.n 802cc7e { fc = snmp_mib_node_find(ipa_rn, ipaddridx[level], &ipa_n); if (fc == 0) { /* ipaddridx[level] does not exist */ del_cnt = 0; 802cc7a: 4604 mov r4, r0 ipa_rn = NULL; 802cc7c: 4605 mov r5, r0 /* mark nodes for deletion */ level = 0; del_cnt = 0; ipa_rn = &ipaddrtree_root; while ((level < 4) && (ipa_rn != NULL)) 802cc7e: 2e0c cmp r6, #12 802cc80: d012 beq.n 802cca8 802cc82: 3604 adds r6, #4 802cc84: 2d00 cmp r5, #0 802cc86: d1dc bne.n 802cc42 802cc88: e00e b.n 802cca8 level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 802cc8a: 3c01 subs r4, #1 802cc8c: b2e4 uxtb r4, r4 ipa_rn = del_rn[del_cnt]; 802cc8e: aa0e add r2, sp, #56 ; 0x38 802cc90: eb02 0384 add.w r3, r2, r4, lsl #2 ipa_n = del_n[del_cnt]; 802cc94: f853 1c20 ldr.w r1, [r3, #-32] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; ipa_rn = del_rn[del_cnt]; 802cc98: f853 0c30 ldr.w r0, [r3, #-48] ipa_n = del_n[del_cnt]; 802cc9c: 9101 str r1, [sp, #4] next = snmp_mib_node_delete(ipa_rn, ipa_n); 802cc9e: f000 fb94 bl 802d3ca if (next != NULL) 802cca2: b108 cbz r0, 802cca8 { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 802cca4: f000 fb38 bl 802d318 ipa_rn = (struct mib_list_rootnode*)(ipa_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 802cca8: 2c00 cmp r4, #0 802ccaa: d1ee bne.n 802cc8a LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); } } /* disable getnext traversal on empty table */ if (ipaddrtree_root.count == 0) ipaddrtable.maxlength = 0; 802ccac: 4b03 ldr r3, [pc, #12] ; (802ccbc ) 802ccae: 8b9b ldrh r3, [r3, #28] 802ccb0: b90b cbnz r3, 802ccb6 802ccb2: 4b03 ldr r3, [pc, #12] ; (802ccc0 ) 802ccb4: 825c strh r4, [r3, #18] } 802ccb6: b00e add sp, #56 ; 0x38 802ccb8: bd70 pop {r4, r5, r6, pc} 802ccba: bf00 nop 802ccbc: 20001260 .word 0x20001260 802ccc0: 200012e4 .word 0x200012e4 0802ccc4 : * * @todo record sysuptime for _this_ route when it is installed * (needed for ipRouteAge) in the netif. */ void snmp_insert_iprteidx_tree(u8_t dflt, struct netif *ni) { 802ccc4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802ccc8: b086 sub sp, #24 u8_t insert = 0; ip_addr_t dst; if (dflt != 0) 802ccca: b110 cbz r0, 802ccd2 { /* the default route 0.0.0.0 */ ip_addr_set_any(&dst); 802cccc: 2300 movs r3, #0 802ccce: 9300 str r3, [sp, #0] 802ccd0: e02b b.n 802cd2a insert = 1; } else { /* route to the network address */ ip_addr_get_network(&dst, &ni->ip_addr, &ni->netmask); 802ccd2: 688a ldr r2, [r1, #8] 802ccd4: 684b ldr r3, [r1, #4] 802ccd6: 4013 ands r3, r2 802ccd8: 9300 str r3, [sp, #0] /* exclude 0.0.0.0 network (reserved for default rte) */ if (!ip_addr_isany(&dst)) { 802ccda: bb33 cbnz r3, 802cd2a 802ccdc: e021 b.n 802cd22 snmp_iptooid(&dst, &iprteidx[0]); level = 0; iprte_rn = &iprtetree_root; while (level < 4) { iprte_node = NULL; 802ccde: 2300 movs r3, #0 802cce0: 9301 str r3, [sp, #4] snmp_mib_node_insert(iprte_rn, iprteidx[level], &iprte_node); 802cce2: ab02 add r3, sp, #8 802cce4: 4620 mov r0, r4 802cce6: f853 1025 ldr.w r1, [r3, r5, lsl #2] 802ccea: aa01 add r2, sp, #4 802ccec: b2ee uxtb r6, r5 802ccee: f000 fb17 bl 802d320 if ((level != 3) && (iprte_node != NULL)) 802ccf2: 2e03 cmp r6, #3 802ccf4: d012 beq.n 802cd1c 802ccf6: 9b01 ldr r3, [sp, #4] 802ccf8: b183 cbz r3, 802cd1c { if (iprte_node->nptr == NULL) 802ccfa: 68dc ldr r4, [r3, #12] 802ccfc: b974 cbnz r4, 802cd1c { iprte_rn = snmp_mib_lrn_alloc(); 802ccfe: f000 faed bl 802d2dc iprte_node->nptr = (struct mib_node*)iprte_rn; 802cd02: 9b01 ldr r3, [sp, #4] snmp_mib_node_insert(iprte_rn, iprteidx[level], &iprte_node); if ((level != 3) && (iprte_node != NULL)) { if (iprte_node->nptr == NULL) { iprte_rn = snmp_mib_lrn_alloc(); 802cd04: 4604 mov r4, r0 iprte_node->nptr = (struct mib_node*)iprte_rn; 802cd06: 60d8 str r0, [r3, #12] if (iprte_rn != NULL) 802cd08: b158 cbz r0, 802cd22 { if (level == 2) 802cd0a: 2e02 cmp r6, #2 802cd0c: d106 bne.n 802cd1c { iprte_rn->get_object_def = ip_rteentry_get_object_def; iprte_rn->get_value = ip_rteentry_get_value; iprte_rn->set_test = noleafs_set_test; 802cd0e: 4b0d ldr r3, [pc, #52] ; (802cd44 ) iprte_node->nptr = (struct mib_node*)iprte_rn; if (iprte_rn != NULL) { if (level == 2) { iprte_rn->get_object_def = ip_rteentry_get_object_def; 802cd10: f8c0 8000 str.w r8, [r0] iprte_rn->get_value = ip_rteentry_get_value; iprte_rn->set_test = noleafs_set_test; 802cd14: 6083 str r3, [r0, #8] iprte_rn->set_value = noleafs_set_value; 802cd16: 4b0c ldr r3, [pc, #48] ; (802cd48 ) if (iprte_rn != NULL) { if (level == 2) { iprte_rn->get_object_def = ip_rteentry_get_object_def; iprte_rn->get_value = ip_rteentry_get_value; 802cd18: 6047 str r7, [r0, #4] iprte_rn->set_test = noleafs_set_test; iprte_rn->set_value = noleafs_set_value; 802cd1a: 60c3 str r3, [r0, #12] 802cd1c: 3501 adds r5, #1 u8_t level; snmp_iptooid(&dst, &iprteidx[0]); level = 0; iprte_rn = &iprtetree_root; while (level < 4) 802cd1e: 2d04 cmp r5, #4 802cd20: d1dd bne.n 802ccde } level++; } } /* enable getnext traversal on filled table */ iprtetable.maxlength = 1; 802cd22: 4b0a ldr r3, [pc, #40] ; (802cd4c ) 802cd24: 2201 movs r2, #1 802cd26: 825a strh r2, [r3, #18] 802cd28: e009 b.n 802cd3e struct mib_list_rootnode *iprte_rn; struct mib_list_node *iprte_node; s32_t iprteidx[4]; u8_t level; snmp_iptooid(&dst, &iprteidx[0]); 802cd2a: 4668 mov r0, sp 802cd2c: a902 add r1, sp, #8 802cd2e: f000 fabc bl 802d2aa 802cd32: 2500 movs r5, #0 level = 0; iprte_rn = &iprtetree_root; 802cd34: 4c06 ldr r4, [pc, #24] ; (802cd50 ) iprte_node->nptr = (struct mib_node*)iprte_rn; if (iprte_rn != NULL) { if (level == 2) { iprte_rn->get_object_def = ip_rteentry_get_object_def; 802cd36: f8df 8020 ldr.w r8, [pc, #32] ; 802cd58 iprte_rn->get_value = ip_rteentry_get_value; 802cd3a: 4f06 ldr r7, [pc, #24] ; (802cd54 ) 802cd3c: e7cf b.n 802ccde level++; } } /* enable getnext traversal on filled table */ iprtetable.maxlength = 1; } 802cd3e: b006 add sp, #24 802cd40: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802cd44: 0802bc73 .word 0x0802bc73 802cd48: 0802bc77 .word 0x0802bc77 802cd4c: 2000134c .word 0x2000134c 802cd50: 20001190 .word 0x20001190 802cd54: 0802c7f9 .word 0x0802c7f9 802cd58: 0802be3d .word 0x0802be3d 0802cd5c : * @param dflt non-zero for the default rte, zero for network rte * @param ni points to network interface for this rte or NULL * for default route to be removed. */ void snmp_delete_iprteidx_tree(u8_t dflt, struct netif *ni) { 802cd5c: b570 push {r4, r5, r6, lr} 802cd5e: b08e sub sp, #56 ; 0x38 u8_t del = 0; ip_addr_t dst; if (dflt != 0) 802cd60: b110 cbz r0, 802cd68 { /* the default route 0.0.0.0 */ ip_addr_set_any(&dst); 802cd62: 2300 movs r3, #0 802cd64: 9300 str r3, [sp, #0] 802cd66: e041 b.n 802cdec del = 1; } else { /* route to the network address */ ip_addr_get_network(&dst, &ni->ip_addr, &ni->netmask); 802cd68: 688a ldr r2, [r1, #8] 802cd6a: 684b ldr r3, [r1, #4] 802cd6c: 4013 ands r3, r2 802cd6e: 9300 str r3, [sp, #0] /* exclude 0.0.0.0 network (reserved for default rte) */ if (!ip_addr_isany(&dst)) { 802cd70: 2b00 cmp r3, #0 802cd72: d13b bne.n 802cdec 802cd74: e034 b.n 802cde0 level = 0; del_cnt = 0; iprte_rn = &iprtetree_root; while ((level < 4) && (iprte_rn != NULL)) { fc = snmp_mib_node_find(iprte_rn, iprteidx[level], &iprte_n); 802cd76: ab0a add r3, sp, #40 ; 0x28 802cd78: 4628 mov r0, r5 802cd7a: 58f1 ldr r1, [r6, r3] 802cd7c: aa01 add r2, sp, #4 802cd7e: f000 fb0a bl 802d396 802cd82: b2c0 uxtb r0, r0 if (fc == 0) 802cd84: b198 cbz r0, 802cdae { /* iprteidx[level] does not exist */ del_cnt = 0; iprte_rn = NULL; } else if (fc == 1) 802cd86: 2801 cmp r0, #1 802cd88: d10b bne.n 802cda2 { del_rn[del_cnt] = iprte_rn; 802cd8a: ab0e add r3, sp, #56 ; 0x38 802cd8c: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = iprte_n; 802cd90: 9b01 ldr r3, [sp, #4] del_cnt = 0; iprte_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = iprte_rn; 802cd92: f842 5c30 str.w r5, [r2, #-48] del_n[del_cnt] = iprte_n; del_cnt++; 802cd96: 3401 adds r4, #1 iprte_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = iprte_rn; del_n[del_cnt] = iprte_n; 802cd98: f842 3c20 str.w r3, [r2, #-32] del_cnt++; 802cd9c: b2e4 uxtb r4, r4 iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); 802cd9e: 68dd ldr r5, [r3, #12] 802cda0: e007 b.n 802cdb2 } else if (fc == 2) 802cda2: 2802 cmp r0, #2 802cda4: d105 bne.n 802cdb2 { /* reset delete (2 or more childs) */ del_cnt = 0; iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); 802cda6: 9b01 ldr r3, [sp, #4] iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); } else if (fc == 2) { /* reset delete (2 or more childs) */ del_cnt = 0; 802cda8: 2400 movs r4, #0 iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); 802cdaa: 68dd ldr r5, [r3, #12] 802cdac: e001 b.n 802cdb2 { fc = snmp_mib_node_find(iprte_rn, iprteidx[level], &iprte_n); if (fc == 0) { /* iprteidx[level] does not exist */ del_cnt = 0; 802cdae: 4604 mov r4, r0 iprte_rn = NULL; 802cdb0: 4605 mov r5, r0 snmp_iptooid(&dst, &iprteidx[0]); /* mark nodes for deletion */ level = 0; del_cnt = 0; iprte_rn = &iprtetree_root; while ((level < 4) && (iprte_rn != NULL)) 802cdb2: 2e0c cmp r6, #12 802cdb4: d012 beq.n 802cddc 802cdb6: 3604 adds r6, #4 802cdb8: 2d00 cmp r5, #0 802cdba: d1dc bne.n 802cd76 802cdbc: e00e b.n 802cddc level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 802cdbe: 3c01 subs r4, #1 802cdc0: b2e4 uxtb r4, r4 iprte_rn = del_rn[del_cnt]; 802cdc2: aa0e add r2, sp, #56 ; 0x38 802cdc4: eb02 0384 add.w r3, r2, r4, lsl #2 iprte_n = del_n[del_cnt]; 802cdc8: f853 1c20 ldr.w r1, [r3, #-32] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; iprte_rn = del_rn[del_cnt]; 802cdcc: f853 0c30 ldr.w r0, [r3, #-48] iprte_n = del_n[del_cnt]; 802cdd0: 9101 str r1, [sp, #4] next = snmp_mib_node_delete(iprte_rn, iprte_n); 802cdd2: f000 fafa bl 802d3ca if (next != NULL) 802cdd6: b108 cbz r0, 802cddc { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 802cdd8: f000 fa9e bl 802d318 iprte_rn = (struct mib_list_rootnode*)(iprte_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 802cddc: 2c00 cmp r4, #0 802cdde: d1ee bne.n 802cdbe snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty table */ if (iprtetree_root.count == 0) iprtetable.maxlength = 0; 802cde0: 4b07 ldr r3, [pc, #28] ; (802ce00 ) 802cde2: 8b9b ldrh r3, [r3, #28] 802cde4: b953 cbnz r3, 802cdfc 802cde6: 4a07 ldr r2, [pc, #28] ; (802ce04 ) 802cde8: 8253 strh r3, [r2, #18] 802cdea: e007 b.n 802cdfc struct mib_list_rootnode *iprte_rn, *next, *del_rn[4]; struct mib_list_node *iprte_n, *del_n[4]; s32_t iprteidx[4]; u8_t fc, level, del_cnt; snmp_iptooid(&dst, &iprteidx[0]); 802cdec: 4668 mov r0, sp 802cdee: a90a add r1, sp, #40 ; 0x28 802cdf0: 2600 movs r6, #0 802cdf2: f000 fa5a bl 802d2aa /* mark nodes for deletion */ level = 0; del_cnt = 0; 802cdf6: 4634 mov r4, r6 iprte_rn = &iprtetree_root; 802cdf8: 4d01 ldr r5, [pc, #4] ; (802ce00 ) 802cdfa: e7bc b.n 802cd76 } } } /* disable getnext traversal on empty table */ if (iprtetree_root.count == 0) iprtetable.maxlength = 0; } 802cdfc: b00e add sp, #56 ; 0x38 802cdfe: bd70 pop {r4, r5, r6, pc} 802ce00: 20001190 .word 0x20001190 802ce04: 2000134c .word 0x2000134c 0802ce08 : void snmp_inc_icmpinmsgs(void) { icmpinmsgs++; 802ce08: 4b02 ldr r3, [pc, #8] ; (802ce14 ) 802ce0a: 681a ldr r2, [r3, #0] 802ce0c: 3201 adds r2, #1 802ce0e: 601a str r2, [r3, #0] 802ce10: 4770 bx lr 802ce12: bf00 nop 802ce14: 2000dbe0 .word 0x2000dbe0 0802ce18 : } void snmp_inc_icmpinerrors(void) { icmpinerrors++; 802ce18: 4b02 ldr r3, [pc, #8] ; (802ce24 ) 802ce1a: 681a ldr r2, [r3, #0] 802ce1c: 3201 adds r2, #1 802ce1e: 601a str r2, [r3, #0] 802ce20: 4770 bx lr 802ce22: bf00 nop 802ce24: 2000dbdc .word 0x2000dbdc 0802ce28 : icmpinaddrmaskreps++; } void snmp_inc_icmpoutmsgs(void) { icmpoutmsgs++; 802ce28: 4b02 ldr r3, [pc, #8] ; (802ce34 ) 802ce2a: 681a ldr r2, [r3, #0] 802ce2c: 3201 adds r2, #1 802ce2e: 601a str r2, [r3, #0] 802ce30: 4770 bx lr 802ce32: bf00 nop 802ce34: 2000dc60 .word 0x2000dc60 0802ce38 : icmpoutdestunreachs++; } void snmp_inc_icmpouttimeexcds(void) { icmpouttimeexcds++; 802ce38: 4b02 ldr r3, [pc, #8] ; (802ce44 ) 802ce3a: 681a ldr r2, [r3, #0] 802ce3c: 3201 adds r2, #1 802ce3e: 601a str r2, [r3, #0] 802ce40: 4770 bx lr 802ce42: bf00 nop 802ce44: 2000dc2c .word 0x2000dc2c 0802ce48 : icmpoutechos++; } void snmp_inc_icmpoutechoreps(void) { icmpoutechoreps++; 802ce48: 4b02 ldr r3, [pc, #8] ; (802ce54 ) 802ce4a: 681a ldr r2, [r3, #0] 802ce4c: 3201 adds r2, #1 802ce4e: 601a str r2, [r3, #0] 802ce50: 4770 bx lr 802ce52: bf00 nop 802ce54: 2000dc80 .word 0x2000dc80 0802ce58 : tcpactiveopens++; } void snmp_inc_tcppassiveopens(void) { tcppassiveopens++; 802ce58: 4b02 ldr r3, [pc, #8] ; (802ce64 ) 802ce5a: 681a ldr r2, [r3, #0] 802ce5c: 3201 adds r2, #1 802ce5e: 601a str r2, [r3, #0] 802ce60: 4770 bx lr 802ce62: bf00 nop 802ce64: 2000dc08 .word 0x2000dc08 0802ce68 : } void snmp_inc_tcpattemptfails(void) { tcpattemptfails++; 802ce68: 4b02 ldr r3, [pc, #8] ; (802ce74 ) 802ce6a: 681a ldr r2, [r3, #0] 802ce6c: 3201 adds r2, #1 802ce6e: 601a str r2, [r3, #0] 802ce70: 4770 bx lr 802ce72: bf00 nop 802ce74: 2000dc54 .word 0x2000dc54 0802ce78 : } void snmp_inc_tcpestabresets(void) { tcpestabresets++; 802ce78: 4b02 ldr r3, [pc, #8] ; (802ce84 ) 802ce7a: 681a ldr r2, [r3, #0] 802ce7c: 3201 adds r2, #1 802ce7e: 601a str r2, [r3, #0] 802ce80: 4770 bx lr 802ce82: bf00 nop 802ce84: 2000dbe8 .word 0x2000dbe8 0802ce88 : } void snmp_inc_tcpinsegs(void) { tcpinsegs++; 802ce88: 4b02 ldr r3, [pc, #8] ; (802ce94 ) 802ce8a: 681a ldr r2, [r3, #0] 802ce8c: 3201 adds r2, #1 802ce8e: 601a str r2, [r3, #0] 802ce90: 4770 bx lr 802ce92: bf00 nop 802ce94: 2000dc64 .word 0x2000dc64 0802ce98 : } void snmp_inc_tcpoutsegs(void) { tcpoutsegs++; 802ce98: 4b02 ldr r3, [pc, #8] ; (802cea4 ) 802ce9a: 681a ldr r2, [r3, #0] 802ce9c: 3201 adds r2, #1 802ce9e: 601a str r2, [r3, #0] 802cea0: 4770 bx lr 802cea2: bf00 nop 802cea4: 2000dcb0 .word 0x2000dcb0 0802cea8 : } void snmp_inc_tcpretranssegs(void) { tcpretranssegs++; 802cea8: 4b02 ldr r3, [pc, #8] ; (802ceb4 ) 802ceaa: 681a ldr r2, [r3, #0] 802ceac: 3201 adds r2, #1 802ceae: 601a str r2, [r3, #0] 802ceb0: 4770 bx lr 802ceb2: bf00 nop 802ceb4: 2000dc84 .word 0x2000dc84 0802ceb8 : } void snmp_inc_tcpinerrs(void) { tcpinerrs++; 802ceb8: 4b02 ldr r3, [pc, #8] ; (802cec4 ) 802ceba: 681a ldr r2, [r3, #0] 802cebc: 3201 adds r2, #1 802cebe: 601a str r2, [r3, #0] 802cec0: 4770 bx lr 802cec2: bf00 nop 802cec4: 2000dc10 .word 0x2000dc10 0802cec8 : } void snmp_inc_tcpoutrsts(void) { tcpoutrsts++; 802cec8: 4b02 ldr r3, [pc, #8] ; (802ced4 ) 802ceca: 681a ldr r2, [r3, #0] 802cecc: 3201 adds r2, #1 802cece: 601a str r2, [r3, #0] 802ced0: 4770 bx lr 802ced2: bf00 nop 802ced4: 2000dc74 .word 0x2000dc74 0802ced8 : } void snmp_inc_udpindatagrams(void) { udpindatagrams++; 802ced8: 4b02 ldr r3, [pc, #8] ; (802cee4 ) 802ceda: 681a ldr r2, [r3, #0] 802cedc: 3201 adds r2, #1 802cede: 601a str r2, [r3, #0] 802cee0: 4770 bx lr 802cee2: bf00 nop 802cee4: 2000dc90 .word 0x2000dc90 0802cee8 : } void snmp_inc_udpnoports(void) { udpnoports++; 802cee8: 4b02 ldr r3, [pc, #8] ; (802cef4 ) 802ceea: 681a ldr r2, [r3, #0] 802ceec: 3201 adds r2, #1 802ceee: 601a str r2, [r3, #0] 802cef0: 4770 bx lr 802cef2: bf00 nop 802cef4: 2000dc48 .word 0x2000dc48 0802cef8 : } void snmp_inc_udpinerrors(void) { udpinerrors++; 802cef8: 4b02 ldr r3, [pc, #8] ; (802cf04 ) 802cefa: 681a ldr r2, [r3, #0] 802cefc: 3201 adds r2, #1 802cefe: 601a str r2, [r3, #0] 802cf00: 4770 bx lr 802cf02: bf00 nop 802cf04: 2000dcb8 .word 0x2000dcb8 0802cf08 : } void snmp_inc_udpoutdatagrams(void) { udpoutdatagrams++; 802cf08: 4b02 ldr r3, [pc, #8] ; (802cf14 ) 802cf0a: 681a ldr r2, [r3, #0] 802cf0c: 3201 adds r2, #1 802cf0e: 601a str r2, [r3, #0] 802cf10: 4770 bx lr 802cf12: bf00 nop 802cf14: 2000dc40 .word 0x2000dc40 0802cf18 : /** * Inserts udpTable indexes (.udpLocalAddress.udpLocalPort) * into index tree. */ void snmp_insert_udpidx_tree(struct udp_pcb *pcb) { 802cf18: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802cf1c: 4604 mov r4, r0 802cf1e: b086 sub sp, #24 struct mib_list_node *udp_node; s32_t udpidx[5]; u8_t level; LWIP_ASSERT("pcb != NULL", pcb != NULL); snmp_iptooid(&pcb->local_ip, &udpidx[0]); 802cf20: a901 add r1, sp, #4 802cf22: f000 f9c2 bl 802d2aa udpidx[4] = pcb->local_port; 802cf26: 8a63 ldrh r3, [r4, #18] udp_node->nptr = (struct mib_node*)udp_rn; if (udp_rn != NULL) { if (level == 3) { udp_rn->get_object_def = udpentry_get_object_def; 802cf28: 4f17 ldr r7, [pc, #92] ; (802cf88 ) LWIP_ASSERT("pcb != NULL", pcb != NULL); snmp_iptooid(&pcb->local_ip, &udpidx[0]); udpidx[4] = pcb->local_port; udp_rn = &udp_root; 802cf2a: 4c18 ldr r4, [pc, #96] ; (802cf8c ) if (udp_rn != NULL) { if (level == 3) { udp_rn->get_object_def = udpentry_get_object_def; udp_rn->get_value = udpentry_get_value; 802cf2c: f8df 806c ldr.w r8, [pc, #108] ; 802cf9c s32_t udpidx[5]; u8_t level; LWIP_ASSERT("pcb != NULL", pcb != NULL); snmp_iptooid(&pcb->local_ip, &udpidx[0]); udpidx[4] = pcb->local_port; 802cf30: 9305 str r3, [sp, #20] 802cf32: 2500 movs r5, #0 udp_rn = &udp_root; for (level = 0; level < 5; level++) { udp_node = NULL; 802cf34: 2300 movs r3, #0 802cf36: 9300 str r3, [sp, #0] snmp_mib_node_insert(udp_rn, udpidx[level], &udp_node); 802cf38: ab01 add r3, sp, #4 802cf3a: 4620 mov r0, r4 802cf3c: f853 1025 ldr.w r1, [r3, r5, lsl #2] 802cf40: 466a mov r2, sp 802cf42: b2ee uxtb r6, r5 802cf44: f000 f9ec bl 802d320 if ((level != 4) && (udp_node != NULL)) 802cf48: 2e04 cmp r6, #4 802cf4a: d015 beq.n 802cf78 802cf4c: 9b00 ldr r3, [sp, #0] 802cf4e: b19b cbz r3, 802cf78 { if (udp_node->nptr == NULL) 802cf50: 68dc ldr r4, [r3, #12] 802cf52: b98c cbnz r4, 802cf78 { udp_rn = snmp_mib_lrn_alloc(); 802cf54: f000 f9c2 bl 802d2dc udp_node->nptr = (struct mib_node*)udp_rn; 802cf58: 9b00 ldr r3, [sp, #0] snmp_mib_node_insert(udp_rn, udpidx[level], &udp_node); if ((level != 4) && (udp_node != NULL)) { if (udp_node->nptr == NULL) { udp_rn = snmp_mib_lrn_alloc(); 802cf5a: 4604 mov r4, r0 udp_node->nptr = (struct mib_node*)udp_rn; 802cf5c: 60d8 str r0, [r3, #12] if (udp_rn != NULL) 802cf5e: b918 cbnz r0, 802cf68 { udp_rn = (struct mib_list_rootnode*)udp_node->nptr; } } } udptable.maxlength = 1; 802cf60: 4b0b ldr r3, [pc, #44] ; (802cf90 ) 802cf62: 2201 movs r2, #1 802cf64: 825a strh r2, [r3, #18] 802cf66: e00b b.n 802cf80 { udp_rn = snmp_mib_lrn_alloc(); udp_node->nptr = (struct mib_node*)udp_rn; if (udp_rn != NULL) { if (level == 3) 802cf68: 2e03 cmp r6, #3 802cf6a: d105 bne.n 802cf78 { udp_rn->get_object_def = udpentry_get_object_def; udp_rn->get_value = udpentry_get_value; udp_rn->set_test = noleafs_set_test; 802cf6c: 4b09 ldr r3, [pc, #36] ; (802cf94 ) if (udp_rn != NULL) { if (level == 3) { udp_rn->get_object_def = udpentry_get_object_def; udp_rn->get_value = udpentry_get_value; 802cf6e: e880 0180 stmia.w r0, {r7, r8} udp_rn->set_test = noleafs_set_test; 802cf72: 6083 str r3, [r0, #8] udp_rn->set_value = noleafs_set_value; 802cf74: 4b08 ldr r3, [pc, #32] ; (802cf98 ) 802cf76: 60c3 str r3, [r0, #12] 802cf78: 3501 adds r5, #1 LWIP_ASSERT("pcb != NULL", pcb != NULL); snmp_iptooid(&pcb->local_ip, &udpidx[0]); udpidx[4] = pcb->local_port; udp_rn = &udp_root; for (level = 0; level < 5; level++) 802cf7a: 2d05 cmp r5, #5 802cf7c: d1da bne.n 802cf34 802cf7e: e7ef b.n 802cf60 udp_rn = (struct mib_list_rootnode*)udp_node->nptr; } } } udptable.maxlength = 1; } 802cf80: b006 add sp, #24 802cf82: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802cf86: bf00 nop 802cf88: 0802c5e5 .word 0x0802c5e5 802cf8c: 20001160 .word 0x20001160 802cf90: 20001144 .word 0x20001144 802cf94: 0802bc73 .word 0x0802bc73 802cf98: 0802bc77 .word 0x0802bc77 802cf9c: 0802c2a1 .word 0x0802c2a1 0802cfa0 : /** * Removes udpTable indexes (.udpLocalAddress.udpLocalPort) * from index tree. */ void snmp_delete_udpidx_tree(struct udp_pcb *pcb) { 802cfa0: b570 push {r4, r5, r6, lr} 802cfa2: 4604 mov r4, r0 802cfa4: b090 sub sp, #64 ; 0x40 struct mib_list_node *udp_n, *del_n[5]; s32_t udpidx[5]; u8_t bindings, fc, level, del_cnt; LWIP_ASSERT("pcb != NULL", pcb != NULL); snmp_iptooid(&pcb->local_ip, &udpidx[0]); 802cfa6: a90b add r1, sp, #44 ; 0x2c 802cfa8: f000 f97f bl 802d2aa udpidx[4] = pcb->local_port; 802cfac: 8a61 ldrh r1, [r4, #18] /* count PCBs for a given binding (e.g. when reusing ports or for temp output PCBs) */ bindings = 0; npcb = udp_pcbs; 802cfae: 4b2a ldr r3, [pc, #168] ; (802d058 ) s32_t udpidx[5]; u8_t bindings, fc, level, del_cnt; LWIP_ASSERT("pcb != NULL", pcb != NULL); snmp_iptooid(&pcb->local_ip, &udpidx[0]); udpidx[4] = pcb->local_port; 802cfb0: 910f str r1, [sp, #60] ; 0x3c /* count PCBs for a given binding (e.g. when reusing ports or for temp output PCBs) */ bindings = 0; npcb = udp_pcbs; 802cfb2: 681b ldr r3, [r3, #0] snmp_iptooid(&pcb->local_ip, &udpidx[0]); udpidx[4] = pcb->local_port; /* count PCBs for a given binding (e.g. when reusing ports or for temp output PCBs) */ bindings = 0; 802cfb4: 2200 movs r2, #0 npcb = udp_pcbs; while ((npcb != NULL)) 802cfb6: e009 b.n 802cfcc { if (ip_addr_cmp(&npcb->local_ip, &pcb->local_ip) && 802cfb8: 681d ldr r5, [r3, #0] 802cfba: 6820 ldr r0, [r4, #0] 802cfbc: 4285 cmp r5, r0 802cfbe: d104 bne.n 802cfca (npcb->local_port == udpidx[4])) 802cfc0: 8a58 ldrh r0, [r3, #18] (e.g. when reusing ports or for temp output PCBs) */ bindings = 0; npcb = udp_pcbs; while ((npcb != NULL)) { if (ip_addr_cmp(&npcb->local_ip, &pcb->local_ip) && 802cfc2: 4288 cmp r0, r1 802cfc4: d101 bne.n 802cfca (npcb->local_port == udpidx[4])) { bindings++; 802cfc6: 3201 adds r2, #1 802cfc8: b2d2 uxtb r2, r2 } npcb = npcb->next; 802cfca: 68db ldr r3, [r3, #12] /* count PCBs for a given binding (e.g. when reusing ports or for temp output PCBs) */ bindings = 0; npcb = udp_pcbs; while ((npcb != NULL)) 802cfcc: 2b00 cmp r3, #0 802cfce: d1f3 bne.n 802cfb8 { bindings++; } npcb = npcb->next; } if (bindings == 1) 802cfd0: 2a01 cmp r2, #1 802cfd2: d004 beq.n 802cfde snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty table */ if (udp_root.count == 0) udptable.maxlength = 0; 802cfd4: 4b21 ldr r3, [pc, #132] ; (802d05c ) 802cfd6: 8b9b ldrh r3, [r3, #28] 802cfd8: 2b00 cmp r3, #0 802cfda: d039 beq.n 802d050 802cfdc: e03a b.n 802d054 { /* selectively remove */ /* mark nodes for deletion */ level = 0; del_cnt = 0; udp_rn = &udp_root; 802cfde: 4d1f ldr r5, [pc, #124] ; (802d05c ) { bindings++; } npcb = npcb->next; } if (bindings == 1) 802cfe0: 461e mov r6, r3 802cfe2: 461c mov r4, r3 level = 0; del_cnt = 0; udp_rn = &udp_root; while ((level < 5) && (udp_rn != NULL)) { fc = snmp_mib_node_find(udp_rn, udpidx[level], &udp_n); 802cfe4: ab0b add r3, sp, #44 ; 0x2c 802cfe6: 4628 mov r0, r5 802cfe8: 58f1 ldr r1, [r6, r3] 802cfea: 466a mov r2, sp 802cfec: f000 f9d3 bl 802d396 802cff0: b2c0 uxtb r0, r0 if (fc == 0) 802cff2: b198 cbz r0, 802d01c { /* udpidx[level] does not exist */ del_cnt = 0; udp_rn = NULL; } else if (fc == 1) 802cff4: 2801 cmp r0, #1 802cff6: d10b bne.n 802d010 { del_rn[del_cnt] = udp_rn; 802cff8: ab10 add r3, sp, #64 ; 0x40 802cffa: eb03 0284 add.w r2, r3, r4, lsl #2 del_n[del_cnt] = udp_n; 802cffe: 9b00 ldr r3, [sp, #0] del_cnt = 0; udp_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = udp_rn; 802d000: f842 5c3c str.w r5, [r2, #-60] del_n[del_cnt] = udp_n; del_cnt++; 802d004: 3401 adds r4, #1 udp_rn = NULL; } else if (fc == 1) { del_rn[del_cnt] = udp_rn; del_n[del_cnt] = udp_n; 802d006: f842 3c28 str.w r3, [r2, #-40] del_cnt++; 802d00a: b2e4 uxtb r4, r4 udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); 802d00c: 68dd ldr r5, [r3, #12] 802d00e: e007 b.n 802d020 } else if (fc == 2) 802d010: 2802 cmp r0, #2 802d012: d105 bne.n 802d020 { /* reset delete (2 or more childs) */ del_cnt = 0; udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); 802d014: 9b00 ldr r3, [sp, #0] udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); } else if (fc == 2) { /* reset delete (2 or more childs) */ del_cnt = 0; 802d016: 2400 movs r4, #0 udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); 802d018: 68dd ldr r5, [r3, #12] 802d01a: e001 b.n 802d020 { fc = snmp_mib_node_find(udp_rn, udpidx[level], &udp_n); if (fc == 0) { /* udpidx[level] does not exist */ del_cnt = 0; 802d01c: 4604 mov r4, r0 udp_rn = NULL; 802d01e: 4605 mov r5, r0 /* selectively remove */ /* mark nodes for deletion */ level = 0; del_cnt = 0; udp_rn = &udp_root; while ((level < 5) && (udp_rn != NULL)) 802d020: 2e10 cmp r6, #16 802d022: d012 beq.n 802d04a 802d024: 3604 adds r6, #4 802d026: 2d00 cmp r5, #0 802d028: d1dc bne.n 802cfe4 802d02a: e00e b.n 802d04a level++; } /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; 802d02c: 3c01 subs r4, #1 802d02e: b2e4 uxtb r4, r4 udp_rn = del_rn[del_cnt]; 802d030: aa10 add r2, sp, #64 ; 0x40 802d032: eb02 0384 add.w r3, r2, r4, lsl #2 udp_n = del_n[del_cnt]; 802d036: f853 1c28 ldr.w r1, [r3, #-40] /* delete marked index nodes */ while (del_cnt > 0) { del_cnt--; udp_rn = del_rn[del_cnt]; 802d03a: f853 0c3c ldr.w r0, [r3, #-60] udp_n = del_n[del_cnt]; 802d03e: 9100 str r1, [sp, #0] next = snmp_mib_node_delete(udp_rn, udp_n); 802d040: f000 f9c3 bl 802d3ca if (next != NULL) 802d044: b108 cbz r0, 802d04a { LWIP_ASSERT("next_count == 0",next->count == 0); snmp_mib_lrn_free(next); 802d046: f000 f967 bl 802d318 udp_rn = (struct mib_list_rootnode*)(udp_n->nptr); } level++; } /* delete marked index nodes */ while (del_cnt > 0) 802d04a: 2c00 cmp r4, #0 802d04c: d1ee bne.n 802d02c 802d04e: e7c1 b.n 802cfd4 snmp_mib_lrn_free(next); } } } /* disable getnext traversal on empty table */ if (udp_root.count == 0) udptable.maxlength = 0; 802d050: 4a03 ldr r2, [pc, #12] ; (802d060 ) 802d052: 8253 strh r3, [r2, #18] } 802d054: b010 add sp, #64 ; 0x40 802d056: bd70 pop {r4, r5, r6, pc} 802d058: 200104e0 .word 0x200104e0 802d05c: 20001160 .word 0x20001160 802d060: 20001144 .word 0x20001144 0802d064 : void snmp_inc_snmpinpkts(void) { snmpinpkts++; 802d064: 4b02 ldr r3, [pc, #8] ; (802d070 ) 802d066: 681a ldr r2, [r3, #0] 802d068: 3201 adds r2, #1 802d06a: 601a str r2, [r3, #0] 802d06c: 4770 bx lr 802d06e: bf00 nop 802d070: 2000dbec .word 0x2000dbec 0802d074 : } void snmp_inc_snmpoutpkts(void) { snmpoutpkts++; 802d074: 4b02 ldr r3, [pc, #8] ; (802d080 ) 802d076: 681a ldr r2, [r3, #0] 802d078: 3201 adds r2, #1 802d07a: 601a str r2, [r3, #0] 802d07c: 4770 bx lr 802d07e: bf00 nop 802d080: 2000dcbc .word 0x2000dcbc 0802d084 : } void snmp_inc_snmpinbadversions(void) { snmpinbadversions++; 802d084: 4b02 ldr r3, [pc, #8] ; (802d090 ) 802d086: 681a ldr r2, [r3, #0] 802d088: 3201 adds r2, #1 802d08a: 601a str r2, [r3, #0] 802d08c: 4770 bx lr 802d08e: bf00 nop 802d090: 2000dca8 .word 0x2000dca8 0802d094 : } void snmp_inc_snmpinbadcommunitynames(void) { snmpinbadcommunitynames++; 802d094: 4b02 ldr r3, [pc, #8] ; (802d0a0 ) 802d096: 681a ldr r2, [r3, #0] 802d098: 3201 adds r2, #1 802d09a: 601a str r2, [r3, #0] 802d09c: 4770 bx lr 802d09e: bf00 nop 802d0a0: 2000dbc0 .word 0x2000dbc0 0802d0a4 : snmpinbadcommunityuses++; } void snmp_inc_snmpinasnparseerrs(void) { snmpinasnparseerrs++; 802d0a4: 4b02 ldr r3, [pc, #8] ; (802d0b0 ) 802d0a6: 681a ldr r2, [r3, #0] 802d0a8: 3201 adds r2, #1 802d0aa: 601a str r2, [r3, #0] 802d0ac: 4770 bx lr 802d0ae: bf00 nop 802d0b0: 2000dcac .word 0x2000dcac 0802d0b4 : } void snmp_inc_snmpintoobigs(void) { snmpintoobigs++; 802d0b4: 4b02 ldr r3, [pc, #8] ; (802d0c0 ) 802d0b6: 681a ldr r2, [r3, #0] 802d0b8: 3201 adds r2, #1 802d0ba: 601a str r2, [r3, #0] 802d0bc: 4770 bx lr 802d0be: bf00 nop 802d0c0: 2000dc6c .word 0x2000dc6c 0802d0c4 : } void snmp_inc_snmpinnosuchnames(void) { snmpinnosuchnames++; 802d0c4: 4b02 ldr r3, [pc, #8] ; (802d0d0 ) 802d0c6: 681a ldr r2, [r3, #0] 802d0c8: 3201 adds r2, #1 802d0ca: 601a str r2, [r3, #0] 802d0cc: 4770 bx lr 802d0ce: bf00 nop 802d0d0: 2000dcec .word 0x2000dcec 0802d0d4 : } void snmp_inc_snmpinbadvalues(void) { snmpinbadvalues++; 802d0d4: 4b02 ldr r3, [pc, #8] ; (802d0e0 ) 802d0d6: 681a ldr r2, [r3, #0] 802d0d8: 3201 adds r2, #1 802d0da: 601a str r2, [r3, #0] 802d0dc: 4770 bx lr 802d0de: bf00 nop 802d0e0: 2000dc88 .word 0x2000dc88 0802d0e4 : } void snmp_inc_snmpinreadonlys(void) { snmpinreadonlys++; 802d0e4: 4b02 ldr r3, [pc, #8] ; (802d0f0 ) 802d0e6: 681a ldr r2, [r3, #0] 802d0e8: 3201 adds r2, #1 802d0ea: 601a str r2, [r3, #0] 802d0ec: 4770 bx lr 802d0ee: bf00 nop 802d0f0: 2000dc5c .word 0x2000dc5c 0802d0f4 : } void snmp_inc_snmpingenerrs(void) { snmpingenerrs++; 802d0f4: 4b02 ldr r3, [pc, #8] ; (802d100 ) 802d0f6: 681a ldr r2, [r3, #0] 802d0f8: 3201 adds r2, #1 802d0fa: 601a str r2, [r3, #0] 802d0fc: 4770 bx lr 802d0fe: bf00 nop 802d100: 2000dc34 .word 0x2000dc34 0802d104 : } void snmp_add_snmpintotalreqvars(u8_t value) { snmpintotalreqvars += value; 802d104: 4b02 ldr r3, [pc, #8] ; (802d110 ) 802d106: 681a ldr r2, [r3, #0] 802d108: 1880 adds r0, r0, r2 802d10a: 6018 str r0, [r3, #0] 802d10c: 4770 bx lr 802d10e: bf00 nop 802d110: 2000dc8c .word 0x2000dc8c 0802d114 : } void snmp_add_snmpintotalsetvars(u8_t value) { snmpintotalsetvars += value; 802d114: 4b02 ldr r3, [pc, #8] ; (802d120 ) 802d116: 681a ldr r2, [r3, #0] 802d118: 1880 adds r0, r0, r2 802d11a: 6018 str r0, [r3, #0] 802d11c: 4770 bx lr 802d11e: bf00 nop 802d120: 2000dbcc .word 0x2000dbcc 0802d124 : } void snmp_inc_snmpingetrequests(void) { snmpingetrequests++; 802d124: 4b02 ldr r3, [pc, #8] ; (802d130 ) 802d126: 681a ldr r2, [r3, #0] 802d128: 3201 adds r2, #1 802d12a: 601a str r2, [r3, #0] 802d12c: 4770 bx lr 802d12e: bf00 nop 802d130: 2000dc20 .word 0x2000dc20 0802d134 : } void snmp_inc_snmpingetnexts(void) { snmpingetnexts++; 802d134: 4b02 ldr r3, [pc, #8] ; (802d140 ) 802d136: 681a ldr r2, [r3, #0] 802d138: 3201 adds r2, #1 802d13a: 601a str r2, [r3, #0] 802d13c: 4770 bx lr 802d13e: bf00 nop 802d140: 2000dba4 .word 0x2000dba4 0802d144 : } void snmp_inc_snmpinsetrequests(void) { snmpinsetrequests++; 802d144: 4b02 ldr r3, [pc, #8] ; (802d150 ) 802d146: 681a ldr r2, [r3, #0] 802d148: 3201 adds r2, #1 802d14a: 601a str r2, [r3, #0] 802d14c: 4770 bx lr 802d14e: bf00 nop 802d150: 2000dcc8 .word 0x2000dcc8 0802d154 : } void snmp_inc_snmpingetresponses(void) { snmpingetresponses++; 802d154: 4b02 ldr r3, [pc, #8] ; (802d160 ) 802d156: 681a ldr r2, [r3, #0] 802d158: 3201 adds r2, #1 802d15a: 601a str r2, [r3, #0] 802d15c: 4770 bx lr 802d15e: bf00 nop 802d160: 2000dc1c .word 0x2000dc1c 0802d164 : } void snmp_inc_snmpintraps(void) { snmpintraps++; 802d164: 4b02 ldr r3, [pc, #8] ; (802d170 ) 802d166: 681a ldr r2, [r3, #0] 802d168: 3201 adds r2, #1 802d16a: 601a str r2, [r3, #0] 802d16c: 4770 bx lr 802d16e: bf00 nop 802d170: 2000dbb4 .word 0x2000dbb4 0802d174 : } void snmp_inc_snmpouttoobigs(void) { snmpouttoobigs++; 802d174: 4b02 ldr r3, [pc, #8] ; (802d180 ) 802d176: 681a ldr r2, [r3, #0] 802d178: 3201 adds r2, #1 802d17a: 601a str r2, [r3, #0] 802d17c: 4770 bx lr 802d17e: bf00 nop 802d180: 2000dc04 .word 0x2000dc04 0802d184 : } void snmp_inc_snmpoutnosuchnames(void) { snmpoutnosuchnames++; 802d184: 4b02 ldr r3, [pc, #8] ; (802d190 ) 802d186: 681a ldr r2, [r3, #0] 802d188: 3201 adds r2, #1 802d18a: 601a str r2, [r3, #0] 802d18c: 4770 bx lr 802d18e: bf00 nop 802d190: 2000dbd0 .word 0x2000dbd0 0802d194 : } void snmp_inc_snmpoutbadvalues(void) { snmpoutbadvalues++; 802d194: 4b02 ldr r3, [pc, #8] ; (802d1a0 ) 802d196: 681a ldr r2, [r3, #0] 802d198: 3201 adds r2, #1 802d19a: 601a str r2, [r3, #0] 802d19c: 4770 bx lr 802d19e: bf00 nop 802d1a0: 2000dbb0 .word 0x2000dbb0 0802d1a4 : } void snmp_inc_snmpoutgenerrs(void) { snmpoutgenerrs++; 802d1a4: 4b02 ldr r3, [pc, #8] ; (802d1b0 ) 802d1a6: 681a ldr r2, [r3, #0] 802d1a8: 3201 adds r2, #1 802d1aa: 601a str r2, [r3, #0] 802d1ac: 4770 bx lr 802d1ae: bf00 nop 802d1b0: 2000dcf0 .word 0x2000dcf0 0802d1b4 : snmpoutsetrequests++; } void snmp_inc_snmpoutgetresponses(void) { snmpoutgetresponses++; 802d1b4: 4b02 ldr r3, [pc, #8] ; (802d1c0 ) 802d1b6: 681a ldr r2, [r3, #0] 802d1b8: 3201 adds r2, #1 802d1ba: 601a str r2, [r3, #0] 802d1bc: 4770 bx lr 802d1be: bf00 nop 802d1c0: 2000dbac .word 0x2000dbac 0802d1c4 : } void snmp_inc_snmpouttraps(void) { snmpouttraps++; 802d1c4: 4b02 ldr r3, [pc, #8] ; (802d1d0 ) 802d1c6: 681a ldr r2, [r3, #0] 802d1c8: 3201 adds r2, #1 802d1ca: 601a str r2, [r3, #0] 802d1cc: 4770 bx lr 802d1ce: bf00 nop 802d1d0: 2000dc24 .word 0x2000dc24 0802d1d4 : } void snmp_get_snmpgrpid_ptr(struct snmp_obj_id **oid) { *oid = &snmpgrp_id; 802d1d4: 4b01 ldr r3, [pc, #4] ; (802d1dc ) 802d1d6: 6003 str r3, [r0, #0] 802d1d8: 4770 bx lr 802d1da: bf00 nop 802d1dc: 20001370 .word 0x20001370 0802d1e0 : } } void snmp_get_snmpenableauthentraps(u8_t *value) { *value = *snmpenableauthentraps_ptr; 802d1e0: 4b02 ldr r3, [pc, #8] ; (802d1ec ) 802d1e2: 681b ldr r3, [r3, #0] 802d1e4: 781b ldrb r3, [r3, #0] 802d1e6: 7003 strb r3, [r0, #0] 802d1e8: 4770 bx lr 802d1ea: bf00 nop 802d1ec: 20001284 .word 0x20001284 0802d1f0 : /** * Pushes nse struct onto stack. */ static void push_node(struct nse* node) { 802d1f0: b530 push {r4, r5, lr} LWIP_ASSERT("node_stack_cnt < NODE_STACK_SIZE",node_stack_cnt < NODE_STACK_SIZE); LWIP_DEBUGF(SNMP_MIB_DEBUG,("push_node() node=%p id=%"S32_F"\n",(void*)(node->r_ptr),node->r_id)); if (node_stack_cnt < NODE_STACK_SIZE) 802d1f2: 4d07 ldr r5, [pc, #28] ; (802d210 ) 802d1f4: 782b ldrb r3, [r5, #0] 802d1f6: 2b1f cmp r3, #31 802d1f8: d808 bhi.n 802d20c { node_stack[node_stack_cnt] = *node; 802d1fa: 4a06 ldr r2, [pc, #24] ; (802d214 ) 802d1fc: 240c movs r4, #12 802d1fe: fb04 2403 mla r4, r4, r3, r2 802d202: c807 ldmia r0, {r0, r1, r2} 802d204: e884 0007 stmia.w r4, {r0, r1, r2} node_stack_cnt++; 802d208: 3301 adds r3, #1 802d20a: 702b strb r3, [r5, #0] 802d20c: bd30 pop {r4, r5, pc} 802d20e: bf00 nop 802d210: 2000dcf4 .word 0x2000dcf4 802d214: 2000dcf8 .word 0x2000dcf8 0802d218 : empty_table(struct mib_node *node) { u8_t node_type; u8_t empty = 0; if (node != NULL) 802d218: b1d0 cbz r0, 802d250 { node_type = node->node_type; 802d21a: 7c03 ldrb r3, [r0, #16] if (node_type == MIB_NODE_LR) 802d21c: 2b04 cmp r3, #4 802d21e: d105 bne.n 802d22c { struct mib_list_rootnode *lrn; lrn = (struct mib_list_rootnode *)node; if ((lrn->count == 0) || (lrn->head == NULL)) 802d220: 8b83 ldrh r3, [r0, #28] 802d222: b903 cbnz r3, 802d226 802d224: e009 b.n 802d23a 802d226: 6943 ldr r3, [r0, #20] 802d228: b13b cbz r3, 802d23a 802d22a: e010 b.n 802d24e { empty = 1; } } else if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA)) 802d22c: 1e9a subs r2, r3, #2 802d22e: 2a01 cmp r2, #1 802d230: d805 bhi.n 802d23e { struct mib_array_node *an; an = (struct mib_array_node *)node; if ((an->maxlength == 0) || (an->nptr == NULL)) 802d232: 8a43 ldrh r3, [r0, #18] 802d234: b10b cbz r3, 802d23a 802d236: 6980 ldr r0, [r0, #24] 802d238: e004 b.n 802d244 { empty = 1; 802d23a: 2001 movs r0, #1 802d23c: 4770 bx lr } } else if (node_type == MIB_NODE_EX) 802d23e: 2b05 cmp r3, #5 802d240: d105 bne.n 802d24e { struct mib_external_node *en; en = (struct mib_external_node *)node; if (en->tree_levels == 0) 802d242: 7e00 ldrb r0, [r0, #24] */ static u8_t empty_table(struct mib_node *node) { u8_t node_type; u8_t empty = 0; 802d244: f1d0 0001 rsbs r0, r0, #1 802d248: bf38 it cc 802d24a: 2000 movcc r0, #0 802d24c: 4770 bx lr 802d24e: 2000 movs r0, #0 empty = 1; } } } return empty; } 802d250: 4770 bx lr 802d252: 0000 movs r0, r0 0802d254 : * @param netif points to returned netif struct pointer */ void snmp_ifindextonetif(s32_t ifindex, struct netif **netif) { struct netif *nif = netif_list; 802d254: 4b05 ldr r3, [pc, #20] ; (802d26c ) s32_t i, ifidx; ifidx = ifindex - 1; 802d256: 3801 subs r0, #1 * @param netif points to returned netif struct pointer */ void snmp_ifindextonetif(s32_t ifindex, struct netif **netif) { struct netif *nif = netif_list; 802d258: 681b ldr r3, [r3, #0] s32_t i, ifidx; ifidx = ifindex - 1; i = 0; 802d25a: 2200 movs r2, #0 while ((nif != NULL) && (i < ifidx)) 802d25c: e001 b.n 802d262 { nif = nif->next; 802d25e: 681b ldr r3, [r3, #0] i++; 802d260: 3201 adds r2, #1 struct netif *nif = netif_list; s32_t i, ifidx; ifidx = ifindex - 1; i = 0; while ((nif != NULL) && (i < ifidx)) 802d262: b10b cbz r3, 802d268 802d264: 4282 cmp r2, r0 802d266: dbfa blt.n 802d25e { nif = nif->next; i++; } *netif = nif; 802d268: 600b str r3, [r1, #0] 802d26a: 4770 bx lr 802d26c: 200104b8 .word 0x200104b8 0802d270 : * @param ifidx points to s32_t object sub-identifier */ void snmp_netiftoifindex(struct netif *netif, s32_t *ifidx) { struct netif *nif = netif_list; 802d270: 4b06 ldr r3, [pc, #24] ; (802d28c ) u16_t i; i = 0; 802d272: 2200 movs r2, #0 * @param ifidx points to s32_t object sub-identifier */ void snmp_netiftoifindex(struct netif *netif, s32_t *ifidx) { struct netif *nif = netif_list; 802d274: 681b ldr r3, [r3, #0] u16_t i; i = 0; while ((nif != NULL) && (nif != netif)) 802d276: e001 b.n 802d27c { nif = nif->next; 802d278: 681b ldr r3, [r3, #0] i++; 802d27a: b292 uxth r2, r2 802d27c: 3201 adds r2, #1 { struct netif *nif = netif_list; u16_t i; i = 0; while ((nif != NULL) && (nif != netif)) 802d27e: b90b cbnz r3, 802d284 { nif = nif->next; i++; } *ifidx = i+1; 802d280: 600a str r2, [r1, #0] 802d282: 4770 bx lr { struct netif *nif = netif_list; u16_t i; i = 0; while ((nif != NULL) && (nif != netif)) 802d284: 4283 cmp r3, r0 802d286: d1f7 bne.n 802d278 802d288: e7fa b.n 802d280 802d28a: bf00 nop 802d28c: 200104b8 .word 0x200104b8 0802d290 : * @param ip points to output struct */ void snmp_oidtoip(s32_t *ident, ip_addr_t *ip) { IP4_ADDR(ip, ident[0], ident[1], ident[2], ident[3]); 802d290: 7802 ldrb r2, [r0, #0] 802d292: 68c3 ldr r3, [r0, #12] 802d294: ea42 6303 orr.w r3, r2, r3, lsl #24 802d298: 7a02 ldrb r2, [r0, #8] 802d29a: ea43 4302 orr.w r3, r3, r2, lsl #16 802d29e: 6842 ldr r2, [r0, #4] 802d2a0: 0612 lsls r2, r2, #24 802d2a2: ea43 4312 orr.w r3, r3, r2, lsr #16 802d2a6: 600b str r3, [r1, #0] 802d2a8: 4770 bx lr 0802d2aa : * @param ident points to s32_t ident[4] output */ void snmp_iptooid(ip_addr_t *ip, s32_t *ident) { ident[0] = ip4_addr1(ip); 802d2aa: 7803 ldrb r3, [r0, #0] 802d2ac: 600b str r3, [r1, #0] ident[1] = ip4_addr2(ip); 802d2ae: 7843 ldrb r3, [r0, #1] 802d2b0: 604b str r3, [r1, #4] ident[2] = ip4_addr3(ip); 802d2b2: 7883 ldrb r3, [r0, #2] 802d2b4: 608b str r3, [r1, #8] ident[3] = ip4_addr4(ip); 802d2b6: 78c3 ldrb r3, [r0, #3] 802d2b8: 60cb str r3, [r1, #12] 802d2ba: 4770 bx lr 0802d2bc : } struct mib_list_node * snmp_mib_ln_alloc(s32_t id) { 802d2bc: b510 push {r4, lr} 802d2be: 4604 mov r4, r0 struct mib_list_node *ln; ln = (struct mib_list_node *)memp_malloc(MEMP_SNMP_NODE); 802d2c0: 200b movs r0, #11 802d2c2: f7fa fee9 bl 8028098 if (ln != NULL) 802d2c6: b120 cbz r0, 802d2d2 { ln->prev = NULL; 802d2c8: 2300 movs r3, #0 802d2ca: 6003 str r3, [r0, #0] ln->next = NULL; 802d2cc: 6043 str r3, [r0, #4] ln->objid = id; 802d2ce: 6084 str r4, [r0, #8] ln->nptr = NULL; 802d2d0: 60c3 str r3, [r0, #12] } return ln; } 802d2d2: bd10 pop {r4, pc} 0802d2d4 : void snmp_mib_ln_free(struct mib_list_node *ln) { 802d2d4: 4601 mov r1, r0 memp_free(MEMP_SNMP_NODE, ln); 802d2d6: 200b movs r0, #11 802d2d8: f7fa bef4 b.w 80280c4 0802d2dc : } struct mib_list_rootnode * snmp_mib_lrn_alloc(void) { 802d2dc: b508 push {r3, lr} struct mib_list_rootnode *lrn; lrn = (struct mib_list_rootnode*)memp_malloc(MEMP_SNMP_ROOTNODE); 802d2de: 200a movs r0, #10 802d2e0: f7fa feda bl 8028098 if (lrn != NULL) 802d2e4: b170 cbz r0, 802d304 { lrn->get_object_def = noleafs_get_object_def; 802d2e6: 4b08 ldr r3, [pc, #32] ; (802d308 ) 802d2e8: 6003 str r3, [r0, #0] lrn->get_value = noleafs_get_value; 802d2ea: 4b08 ldr r3, [pc, #32] ; (802d30c ) 802d2ec: 6043 str r3, [r0, #4] lrn->set_test = noleafs_set_test; 802d2ee: 4b08 ldr r3, [pc, #32] ; (802d310 ) 802d2f0: 6083 str r3, [r0, #8] lrn->set_value = noleafs_set_value; 802d2f2: 4b08 ldr r3, [pc, #32] ; (802d314 ) 802d2f4: 60c3 str r3, [r0, #12] lrn->node_type = MIB_NODE_LR; 802d2f6: 2304 movs r3, #4 802d2f8: 7403 strb r3, [r0, #16] lrn->maxlength = 0; 802d2fa: 2300 movs r3, #0 802d2fc: 8243 strh r3, [r0, #18] lrn->head = NULL; 802d2fe: 6143 str r3, [r0, #20] lrn->tail = NULL; 802d300: 6183 str r3, [r0, #24] lrn->count = 0; 802d302: 8383 strh r3, [r0, #28] } return lrn; } 802d304: bd08 pop {r3, pc} 802d306: bf00 nop 802d308: 0802bc6b .word 0x0802bc6b 802d30c: 0802bc71 .word 0x0802bc71 802d310: 0802bc73 .word 0x0802bc73 802d314: 0802bc77 .word 0x0802bc77 0802d318 : void snmp_mib_lrn_free(struct mib_list_rootnode *lrn) { 802d318: 4601 mov r1, r0 memp_free(MEMP_SNMP_ROOTNODE, lrn); 802d31a: 200a movs r0, #10 802d31c: f7fa bed2 b.w 80280c4 0802d320 : * used for constructing the tree. * @return -1 if failed, 1 if inserted, 2 if present. */ s8_t snmp_mib_node_insert(struct mib_list_rootnode *rn, s32_t objid, struct mib_list_node **insn) { 802d320: b5f8 push {r3, r4, r5, r6, r7, lr} 802d322: 4605 mov r5, r0 802d324: 4616 mov r6, r2 LWIP_ASSERT("rn != NULL",rn != NULL); /* -1 = malloc failure, 0 = not inserted, 1 = inserted, 2 = was present */ insert = 0; if (rn->head == NULL) 802d326: 696c ldr r4, [r5, #20] * used for constructing the tree. * @return -1 if failed, 1 if inserted, 2 if present. */ s8_t snmp_mib_node_insert(struct mib_list_rootnode *rn, s32_t objid, struct mib_list_node **insn) { 802d328: 4608 mov r0, r1 LWIP_ASSERT("rn != NULL",rn != NULL); /* -1 = malloc failure, 0 = not inserted, 1 = inserted, 2 = was present */ insert = 0; if (rn->head == NULL) 802d32a: b93c cbnz r4, 802d33c { /* empty list, add first node */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("alloc empty list objid==%"S32_F"\n",objid)); nn = snmp_mib_ln_alloc(objid); 802d32c: f7ff ffc6 bl 802d2bc if (nn != NULL) 802d330: b350 cbz r0, 802d388 { rn->head = nn; 802d332: 6168 str r0, [r5, #20] rn->tail = nn; 802d334: 61a8 str r0, [r5, #24] *insn = nn; 802d336: 6030 str r0, [r6, #0] 802d338: e021 b.n 802d37e *insn = n; insert = 2; } else if (n->objid < objid) { if (n->next == NULL) 802d33a: 463c mov r4, r7 struct mib_list_node *n; /* at least one node is present */ n = rn->head; while ((n != NULL) && (insert == 0)) { if (n->objid == objid) 802d33c: 68a3 ldr r3, [r4, #8] 802d33e: 4283 cmp r3, r0 802d340: d102 bne.n 802d348 { /* node is already there */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("node already there objid==%"S32_F"\n",objid)); *insn = n; 802d342: 6034 str r4, [r6, #0] insert = 2; 802d344: 2302 movs r3, #2 802d346: e023 b.n 802d390 } else if (n->objid < objid) 802d348: da0a bge.n 802d360 { if (n->next == NULL) 802d34a: 6867 ldr r7, [r4, #4] 802d34c: 2f00 cmp r7, #0 802d34e: d1f4 bne.n 802d33a { /* alloc and insert at the tail */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("alloc ins tail objid==%"S32_F"\n",objid)); nn = snmp_mib_ln_alloc(objid); 802d350: f7ff ffb4 bl 802d2bc if (nn != NULL) 802d354: b1d8 cbz r0, 802d38e { nn->next = NULL; nn->prev = n; 802d356: e880 0090 stmia.w r0, {r4, r7} n->next = nn; 802d35a: 6060 str r0, [r4, #4] rn->tail = nn; 802d35c: 61a8 str r0, [r5, #24] 802d35e: e00b b.n 802d378 else { /* n->objid > objid */ /* alloc and insert between n->prev and n */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("alloc ins n->prev, objid==%"S32_F", n\n",objid)); nn = snmp_mib_ln_alloc(objid); 802d360: f7ff ffac bl 802d2bc if (nn != NULL) 802d364: b198 cbz r0, 802d38e { if (n->prev == NULL) 802d366: 6822 ldr r2, [r4, #0] { /* insert at the head */ nn->next = n; nn->prev = NULL; 802d368: e880 0014 stmia.w r0, {r2, r4} /* alloc and insert between n->prev and n */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("alloc ins n->prev, objid==%"S32_F", n\n",objid)); nn = snmp_mib_ln_alloc(objid); if (nn != NULL) { if (n->prev == NULL) 802d36c: b90a cbnz r2, 802d372 { /* insert at the head */ nn->next = n; nn->prev = NULL; rn->head = nn; 802d36e: 6168 str r0, [r5, #20] 802d370: e001 b.n 802d376 else { /* insert in the middle */ nn->next = n; nn->prev = n->prev; n->prev->next = nn; 802d372: 6822 ldr r2, [r4, #0] 802d374: 6050 str r0, [r2, #4] n->prev = nn; 802d376: 6020 str r0, [r4, #0] } *insn = nn; 802d378: 6030 str r0, [r6, #0] insert = 1; 802d37a: 2301 movs r3, #1 802d37c: e008 b.n 802d390 } } } if (insert == 1) { rn->count += 1; 802d37e: 8bab ldrh r3, [r5, #28] 802d380: 3301 adds r3, #1 802d382: 83ab strh r3, [r5, #28] 802d384: 2301 movs r3, #1 802d386: e000 b.n 802d38a *insn = nn; insert = 1; } else { insert = -1; 802d388: 23ff movs r3, #255 ; 0xff if (insert == 1) { rn->count += 1; } LWIP_ASSERT("insert != 0",insert != 0); return insert; 802d38a: b258 sxtb r0, r3 802d38c: bdf8 pop {r3, r4, r5, r6, r7, pc} insert = 1; } else { /* insertion failure */ insert = -1; 802d38e: 23ff movs r3, #255 ; 0xff } } } } if (insert == 1) 802d390: 2b01 cmp r3, #1 802d392: d1fa bne.n 802d38a 802d394: e7f3 b.n 802d37e 0802d396 : { s8_t fc; struct mib_list_node *n; LWIP_ASSERT("rn != NULL",rn != NULL); n = rn->head; 802d396: 6943 ldr r3, [r0, #20] while ((n != NULL) && (n->objid != objid)) 802d398: e000 b.n 802d39c { n = n->next; 802d39a: 685b ldr r3, [r3, #4] s8_t fc; struct mib_list_node *n; LWIP_ASSERT("rn != NULL",rn != NULL); n = rn->head; while ((n != NULL) && (n->objid != objid)) 802d39c: b16b cbz r3, 802d3ba 802d39e: 6898 ldr r0, [r3, #8] 802d3a0: 4288 cmp r0, r1 802d3a2: d1fa bne.n 802d39a } if (n == NULL) { fc = 0; } else if (n->nptr == NULL) 802d3a4: 68d9 ldr r1, [r3, #12] 802d3a6: b161 cbz r1, 802d3c2 } else { struct mib_list_rootnode *r; if (n->nptr->node_type == MIB_NODE_LR) 802d3a8: 7c08 ldrb r0, [r1, #16] 802d3aa: 2804 cmp r0, #4 802d3ac: d107 bne.n 802d3be { r = (struct mib_list_rootnode *)n->nptr; if (r->count > 1) 802d3ae: 8b88 ldrh r0, [r1, #28] { /* can't delete node */ fc = 2; 802d3b0: 2801 cmp r0, #1 802d3b2: bf94 ite ls 802d3b4: 2001 movls r0, #1 802d3b6: 2002 movhi r0, #2 802d3b8: e004 b.n 802d3c4 { n = n->next; } if (n == NULL) { fc = 0; 802d3ba: 4618 mov r0, r3 802d3bc: e002 b.n 802d3c4 } } else { /* other node type */ fc = 3; 802d3be: 2003 movs r0, #3 802d3c0: e000 b.n 802d3c4 fc = 0; } else if (n->nptr == NULL) { /* leaf, can delete node */ fc = 1; 802d3c2: 2001 movs r0, #1 { /* other node type */ fc = 3; } } *fn = n; 802d3c4: 6013 str r3, [r2, #0] return fc; } 802d3c6: b240 sxtb r0, r0 802d3c8: 4770 bx lr 0802d3ca : * @param n points to the node to delete * @return the nptr to be freed by caller */ struct mib_list_rootnode * snmp_mib_node_delete(struct mib_list_rootnode *rn, struct mib_list_node *n) { 802d3ca: b538 push {r3, r4, r5, lr} LWIP_ASSERT("rn != NULL",rn != NULL); LWIP_ASSERT("n != NULL",n != NULL); /* caller must remove this sub-tree */ next = (struct mib_list_rootnode*)(n->nptr); rn->count -= 1; 802d3cc: 8b83 ldrh r3, [r0, #28] LWIP_ASSERT("rn != NULL",rn != NULL); LWIP_ASSERT("n != NULL",n != NULL); /* caller must remove this sub-tree */ next = (struct mib_list_rootnode*)(n->nptr); 802d3ce: 68cd ldr r5, [r1, #12] rn->count -= 1; 802d3d0: 3b01 subs r3, #1 802d3d2: 8383 strh r3, [r0, #28] if (n == rn->head) 802d3d4: 6943 ldr r3, [r0, #20] 802d3d6: 4299 cmp r1, r3 * @param n points to the node to delete * @return the nptr to be freed by caller */ struct mib_list_rootnode * snmp_mib_node_delete(struct mib_list_rootnode *rn, struct mib_list_node *n) { 802d3d8: 4604 mov r4, r0 /* caller must remove this sub-tree */ next = (struct mib_list_rootnode*)(n->nptr); rn->count -= 1; if (n == rn->head) 802d3da: d105 bne.n 802d3e8 { rn->head = n->next; 802d3dc: 684b ldr r3, [r1, #4] 802d3de: 6143 str r3, [r0, #20] if (n->next != NULL) 802d3e0: b17b cbz r3, 802d402 { /* not last node, new list begin */ n->next->prev = NULL; 802d3e2: 2200 movs r2, #0 802d3e4: 601a str r2, [r3, #0] 802d3e6: e00c b.n 802d402 } } else if (n == rn->tail) 802d3e8: 6983 ldr r3, [r0, #24] 802d3ea: 4299 cmp r1, r3 802d3ec: 680b ldr r3, [r1, #0] 802d3ee: d104 bne.n 802d3fa { rn->tail = n->prev; 802d3f0: 6183 str r3, [r0, #24] if (n->prev != NULL) 802d3f2: b133 cbz r3, 802d402 { /* not last node, new list end */ n->prev->next = NULL; 802d3f4: 2200 movs r2, #0 802d3f6: 605a str r2, [r3, #4] 802d3f8: e003 b.n 802d402 } } else { /* node must be in the middle */ n->prev->next = n->next; 802d3fa: 684a ldr r2, [r1, #4] 802d3fc: 605a str r2, [r3, #4] n->next->prev = n->prev; 802d3fe: 684a ldr r2, [r1, #4] 802d400: 6013 str r3, [r2, #0] } LWIP_DEBUGF(SNMP_MIB_DEBUG,("free list objid==%"S32_F"\n",n->objid)); snmp_mib_ln_free(n); 802d402: 4608 mov r0, r1 802d404: f7ff ff66 bl 802d2d4 if (rn->count == 0) 802d408: 8ba3 ldrh r3, [r4, #28] 802d40a: b90b cbnz r3, 802d410 { rn->head = NULL; 802d40c: 6163 str r3, [r4, #20] rn->tail = NULL; 802d40e: 61a3 str r3, [r4, #24] } return next; } 802d410: 4628 mov r0, r5 802d412: bd38 pop {r3, r4, r5, pc} 0802d414 : * @param np points to the found object instance (return) * @return pointer to the requested parent (!) node if success, NULL otherwise */ struct mib_node * snmp_search_tree(struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_name_ptr *np) { 802d414: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802d418: 4604 mov r4, r0 802d41a: b085 sub sp, #20 802d41c: 460d mov r5, r1 802d41e: 461e mov r6, r3 * @param ident points to the array of sub identifiers * @param np points to the found object instance (return) * @return pointer to the requested parent (!) node if success, NULL otherwise */ struct mib_node * snmp_search_tree(struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_name_ptr *np) 802d420: f102 0804 add.w r8, r2, #4 { u8_t node_type, ext_level; ext_level = 0; 802d424: f04f 0b00 mov.w fp, #0 LWIP_DEBUGF(SNMP_MIB_DEBUG,("node==%p *ident==%"S32_F"\n",(void*)node,*ident)); while (node != NULL) 802d428: e068 b.n 802d4fc { node_type = node->node_type; 802d42a: 7c23 ldrb r3, [r4, #16] if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA)) 802d42c: 1e9a subs r2, r3, #2 802d42e: 2a01 cmp r2, #1 802d430: d812 bhi.n 802d458 { struct mib_array_node *an; u16_t i; if (ident_len > 0) 802d432: b90d cbnz r5, 802d438 } else { /* search failed, short object identifier (nosuchname) */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("an search failed, short object identifier\n")); return NULL; 802d434: 2000 movs r0, #0 802d436: e06a b.n 802d50e if (ident_len > 0) { /* array node (internal ROM or RAM, fixed length) */ an = (struct mib_array_node *)node; i = 0; while ((i < an->maxlength) && (an->objid[i] != *ident)) 802d438: 8a67 ldrh r7, [r4, #18] 802d43a: 2300 movs r3, #0 802d43c: b29a uxth r2, r3 802d43e: 42ba cmp r2, r7 802d440: d2f8 bcs.n 802d434 802d442: 009a lsls r2, r3, #2 802d444: 6961 ldr r1, [r4, #20] 802d446: 5888 ldr r0, [r1, r2] 802d448: f858 1c04 ldr.w r1, [r8, #-4] 802d44c: 3301 adds r3, #1 802d44e: 4288 cmp r0, r1 802d450: d1f4 bne.n 802d43c } if (i < an->maxlength) { /* found it, if available proceed to child, otherwise inspect leaf */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("an->objid[%"U16_F"]==%"S32_F" *ident==%"S32_F"\n",i,an->objid[i],*ident)); if (an->nptr[i] == NULL) 802d452: 69a3 ldr r3, [r4, #24] 802d454: 589b ldr r3, [r3, r2] 802d456: e057 b.n 802d508 /* search failed, short object identifier (nosuchname) */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("an search failed, short object identifier\n")); return NULL; } } else if(node_type == MIB_NODE_LR) 802d458: 2b04 cmp r3, #4 802d45a: d10c bne.n 802d476 { struct mib_list_rootnode *lrn; struct mib_list_node *ln; if (ident_len > 0) 802d45c: 2d00 cmp r5, #0 802d45e: d0e9 beq.n 802d434 { /* list root node (internal 'RAM', variable length) */ lrn = (struct mib_list_rootnode *)node; ln = lrn->head; 802d460: 6963 ldr r3, [r4, #20] /* iterate over list, head to tail */ while ((ln != NULL) && (ln->objid != *ident)) 802d462: e000 b.n 802d466 { ln = ln->next; 802d464: 685b ldr r3, [r3, #4] { /* list root node (internal 'RAM', variable length) */ lrn = (struct mib_list_rootnode *)node; ln = lrn->head; /* iterate over list, head to tail */ while ((ln != NULL) && (ln->objid != *ident)) 802d466: 2b00 cmp r3, #0 802d468: d0e4 beq.n 802d434 802d46a: 6899 ldr r1, [r3, #8] 802d46c: f858 2c04 ldr.w r2, [r8, #-4] 802d470: 4291 cmp r1, r2 802d472: d1f7 bne.n 802d464 802d474: e047 b.n 802d506 /* search failed, short object identifier (nosuchname) */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("ln search failed, short object identifier\n")); return NULL; } } else if(node_type == MIB_NODE_EX) 802d476: 2b05 cmp r3, #5 802d478: d12e bne.n 802d4d8 { struct mib_external_node *en; u16_t i, len; if (ident_len > 0) 802d47a: 2d00 cmp r5, #0 802d47c: d0da beq.n 802d434 { /* external node (addressing and access via functions) */ en = (struct mib_external_node *)node; i = 0; len = en->level_length(en->addr_inf,ext_level); 802d47e: 69e3 ldr r3, [r4, #28] 802d480: 6960 ldr r0, [r4, #20] 802d482: 4659 mov r1, fp 802d484: 4798 blx r3 if (ident_len > 0) { /* external node (addressing and access via functions) */ en = (struct mib_external_node *)node; i = 0; 802d486: f04f 0900 mov.w r9, #0 len = en->level_length(en->addr_inf,ext_level); 802d48a: 4684 mov ip, r0 while ((i < len) && (en->ident_cmp(en->addr_inf,ext_level,i,*ident) != 0)) 802d48c: e003 b.n 802d496 { i++; 802d48e: f109 0901 add.w r9, r9, #1 802d492: fa1f f989 uxth.w r9, r9 /* external node (addressing and access via functions) */ en = (struct mib_external_node *)node; i = 0; len = en->level_length(en->addr_inf,ext_level); while ((i < len) && (en->ident_cmp(en->addr_inf,ext_level,i,*ident) != 0)) 802d496: 45e1 cmp r9, ip 802d498: d0cc beq.n 802d434 802d49a: 6960 ldr r0, [r4, #20] 802d49c: f858 3c04 ldr.w r3, [r8, #-4] 802d4a0: 6a27 ldr r7, [r4, #32] 802d4a2: f8cd c004 str.w ip, [sp, #4] 802d4a6: 4659 mov r1, fp 802d4a8: 464a mov r2, r9 802d4aa: 47b8 blx r7 802d4ac: f8dd c004 ldr.w ip, [sp, #4] 802d4b0: 2800 cmp r0, #0 802d4b2: d1ec bne.n 802d48e { i++; } if (i < len) 802d4b4: 45e1 cmp r9, ip 802d4b6: d2bd bcs.n 802d434 { s32_t debug_id; en->get_objid(en->addr_inf,ext_level,i,&debug_id); 802d4b8: 4659 mov r1, fp 802d4ba: ab03 add r3, sp, #12 802d4bc: 6a67 ldr r7, [r4, #36] ; 0x24 802d4be: 6960 ldr r0, [r4, #20] 802d4c0: 464a mov r2, r9 802d4c2: 47b8 blx r7 LWIP_DEBUGF(SNMP_MIB_DEBUG,("en->objid==%"S32_F" *ident==%"S32_F"\n",debug_id,*ident)); if ((ext_level + 1) == en->tree_levels) 802d4c4: 7e23 ldrb r3, [r4, #24] 802d4c6: f10b 0b01 add.w fp, fp, #1 802d4ca: 459b cmp fp, r3 802d4cc: d100 bne.n 802d4d0 802d4ce: e00b b.n 802d4e8 else { /* found it, proceed to child */ ident_len--; ident++; ext_level++; 802d4d0: fa5f fb8b uxtb.w fp, fp 802d4d4: 4623 mov r3, r4 802d4d6: e00c b.n 802d4f2 /* search failed, short object identifier (nosuchname) */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("en search failed, short object identifier\n")); return NULL; } } else if (node_type == MIB_NODE_SC) 802d4d8: 2b01 cmp r3, #1 802d4da: d1ab bne.n 802d434 { mib_scalar_node *sn; sn = (mib_scalar_node *)node; if ((ident_len == 1) && (*ident == 0)) 802d4dc: 2d01 cmp r5, #1 802d4de: d1a9 bne.n 802d434 802d4e0: f8da 3000 ldr.w r3, [sl] 802d4e4: 2b00 cmp r3, #0 802d4e6: d1a5 bne.n 802d434 { np->ident_len = ident_len; 802d4e8: 7035 strb r5, [r6, #0] np->ident = ident; 802d4ea: f8c6 a004 str.w sl, [r6, #4] return (struct mib_node*)sn; 802d4ee: 4620 mov r0, r4 802d4f0: e00d b.n 802d50e 802d4f2: 3d01 subs r5, #1 802d4f4: b2ed uxtb r5, r5 802d4f6: f108 0804 add.w r8, r8, #4 802d4fa: 461c mov r4, r3 * @param ident points to the array of sub identifiers * @param np points to the found object instance (return) * @return pointer to the requested parent (!) node if success, NULL otherwise */ struct mib_node * snmp_search_tree(struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_name_ptr *np) 802d4fc: f1a8 0a04 sub.w sl, r8, #4 { u8_t node_type, ext_level; ext_level = 0; LWIP_DEBUGF(SNMP_MIB_DEBUG,("node==%p *ident==%"S32_F"\n",(void*)node,*ident)); while (node != NULL) 802d500: 2c00 cmp r4, #0 802d502: d192 bne.n 802d42a 802d504: e796 b.n 802d434 } if (ln != NULL) { /* found it, proceed to child */; LWIP_DEBUGF(SNMP_MIB_DEBUG,("ln->objid==%"S32_F" *ident==%"S32_F"\n",ln->objid,*ident)); if (ln->nptr == NULL) 802d506: 68db ldr r3, [r3, #12] 802d508: 2b00 cmp r3, #0 802d50a: d1f2 bne.n 802d4f2 802d50c: e7ec b.n 802d4e8 } } /* done, found nothing */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("search failed node==%p\n",(void*)node)); return NULL; } 802d50e: b005 add sp, #20 802d510: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0802d514 : /** * Tree expansion. */ struct mib_node * snmp_expand_tree(struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret) { 802d514: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802d518: 461d mov r5, r3 802d51a: b08b sub sp, #44 ; 0x2c u8_t node_type, ext_level, climb_tree; ext_level = 0; /* reset node stack */ node_stack_cnt = 0; 802d51c: 4ba4 ldr r3, [pc, #656] ; (802d7b0 ) 802d51e: f04f 0a00 mov.w sl, #0 j = (u8_t)i + 1; if (j < len) { /* right node is the current external node */ cur_node.r_ptr = node; en->get_objid(en->addr_inf,ext_level,j,&cur_node.r_id); 802d522: af08 add r7, sp, #32 /** * Tree expansion. */ struct mib_node * snmp_expand_tree(struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret) { 802d524: 4604 mov r4, r0 802d526: 460e mov r6, r1 802d528: 4690 mov r8, r2 u8_t node_type, ext_level, climb_tree; ext_level = 0; /* reset node stack */ node_stack_cnt = 0; 802d52a: f883 a000 strb.w sl, [r3] j = (u8_t)i + 1; if (j < len) { /* right node is the current external node */ cur_node.r_ptr = node; en->get_objid(en->addr_inf,ext_level,j,&cur_node.r_id); 802d52e: 9705 str r7, [sp, #20] u8_t node_type, ext_level, climb_tree; ext_level = 0; /* reset node stack */ node_stack_cnt = 0; while (node != NULL) 802d530: e19c b.n 802d86c { climb_tree = 0; node_type = node->node_type; 802d532: 7c23 ldrb r3, [r4, #16] if ((node_type == MIB_NODE_AR) || (node_type == MIB_NODE_RA)) 802d534: 1e9a subs r2, r3, #2 802d536: 2a01 cmp r2, #1 802d538: f200 808f bhi.w 802d65a 802d53c: 8a67 ldrh r7, [r4, #18] struct mib_array_node *an; u16_t i; /* array node (internal ROM or RAM, fixed length) */ an = (struct mib_array_node *)node; if (ident_len > 0) 802d53e: b90e cbnz r6, 802d544 else { u8_t j; /* ident_len == 0, complete with leftmost '.thing' */ j = 0; while ((j < an->maxlength) && empty_table(an->nptr[j])) 802d540: 46b1 mov r9, r6 802d542: e06f b.n 802d624 /* array node (internal ROM or RAM, fixed length) */ an = (struct mib_array_node *)node; if (ident_len > 0) { i = 0; while ((i < an->maxlength) && (an->objid[i] < *ident)) 802d544: f04f 0c00 mov.w ip, #0 802d548: fa1f f28c uxth.w r2, ip 802d54c: 42ba cmp r2, r7 802d54e: f080 8168 bcs.w 802d822 802d552: 6963 ldr r3, [r4, #20] 802d554: f853 102c ldr.w r1, [r3, ip, lsl #2] 802d558: f8d8 3000 ldr.w r3, [r8] 802d55c: 4299 cmp r1, r3 802d55e: ea4f 098c mov.w r9, ip, lsl #2 802d562: f10c 0c01 add.w ip, ip, #1 802d566: dbef blt.n 802d548 } if (i < an->maxlength) { LWIP_DEBUGF(SNMP_MIB_DEBUG,("an->objid[%"U16_F"]==%"S32_F" *ident==%"S32_F"\n",i,an->objid[i],*ident)); /* add identifier to oidret */ oidret->id[oidret->len] = an->objid[i]; 802d568: 782b ldrb r3, [r5, #0] 802d56a: eb05 0783 add.w r7, r5, r3, lsl #2 802d56e: 6079 str r1, [r7, #4] (oidret->len)++; 802d570: 1c59 adds r1, r3, #1 802d572: 7029 strb r1, [r5, #0] if (an->nptr[i] == NULL) 802d574: f8d4 b018 ldr.w fp, [r4, #24] 802d578: f85b 0009 ldr.w r0, [fp, r9] 802d57c: b998 cbnz r0, 802d5a6 { LWIP_DEBUGF(SNMP_MIB_DEBUG,("leaf node\n")); /* leaf node (e.g. in a fixed size table) */ if (an->objid[i] > *ident) 802d57e: 6960 ldr r0, [r4, #20] 802d580: f850 6009 ldr.w r6, [r0, r9] 802d584: f8d8 0000 ldr.w r0, [r8] 802d588: 4286 cmp r6, r0 802d58a: f300 8173 bgt.w 802d874 { return (struct mib_node*)an; } else if ((i + 1) < an->maxlength) 802d58e: 8a60 ldrh r0, [r4, #18] { /* an->objid[i] == *ident */ (oidret->len)--; 802d590: 702b strb r3, [r5, #0] /* leaf node (e.g. in a fixed size table) */ if (an->objid[i] > *ident) { return (struct mib_node*)an; } else if ((i + 1) < an->maxlength) 802d592: 3201 adds r2, #1 802d594: 4282 cmp r2, r0 802d596: f280 8144 bge.w 802d822 { /* an->objid[i] == *ident */ (oidret->len)--; oidret->id[oidret->len] = an->objid[i + 1]; 802d59a: 6963 ldr r3, [r4, #20] 802d59c: f853 302c ldr.w r3, [r3, ip, lsl #2] (oidret->len)++; 802d5a0: 7029 strb r1, [r5, #0] } else if ((i + 1) < an->maxlength) { /* an->objid[i] == *ident */ (oidret->len)--; oidret->id[oidret->len] = an->objid[i + 1]; 802d5a2: 607b str r3, [r7, #4] 802d5a4: e166 b.n 802d874 struct nse cur_node; LWIP_DEBUGF(SNMP_MIB_DEBUG,("non-leaf node\n")); /* non-leaf, store right child ptr and id */ LWIP_ASSERT("i < 0xff", i < 0xff); j = (u8_t)i + 1; 802d5a6: 3201 adds r2, #1 while ((j < an->maxlength) && (empty_table(an->nptr[j]))) 802d5a8: 8a61 ldrh r1, [r4, #18] struct nse cur_node; LWIP_DEBUGF(SNMP_MIB_DEBUG,("non-leaf node\n")); /* non-leaf, store right child ptr and id */ LWIP_ASSERT("i < 0xff", i < 0xff); j = (u8_t)i + 1; 802d5aa: fa5f fc82 uxtb.w ip, r2 while ((j < an->maxlength) && (empty_table(an->nptr[j]))) 802d5ae: 2700 movs r7, #0 /** * Tree expansion. */ struct mib_node * snmp_expand_tree(struct mib_node *node, u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret) 802d5b0: eb0c 0307 add.w r3, ip, r7 802d5b4: b2db uxtb r3, r3 LWIP_DEBUGF(SNMP_MIB_DEBUG,("non-leaf node\n")); /* non-leaf, store right child ptr and id */ LWIP_ASSERT("i < 0xff", i < 0xff); j = (u8_t)i + 1; while ((j < an->maxlength) && (empty_table(an->nptr[j]))) 802d5b6: 428b cmp r3, r1 802d5b8: d21a bcs.n 802d5f0 802d5ba: b21b sxth r3, r3 802d5bc: 009a lsls r2, r3, #2 802d5be: f85b 3023 ldr.w r3, [fp, r3, lsl #2] 802d5c2: 9104 str r1, [sp, #16] 802d5c4: 4618 mov r0, r3 802d5c6: 9203 str r2, [sp, #12] 802d5c8: 9302 str r3, [sp, #8] 802d5ca: f8cd c004 str.w ip, [sp, #4] 802d5ce: f7ff fe23 bl 802d218 802d5d2: 3701 adds r7, #1 802d5d4: 9904 ldr r1, [sp, #16] 802d5d6: 9a03 ldr r2, [sp, #12] 802d5d8: 9b02 ldr r3, [sp, #8] 802d5da: f8dd c004 ldr.w ip, [sp, #4] 802d5de: 2800 cmp r0, #0 802d5e0: d1e6 bne.n 802d5b0 { j++; } if (j < an->maxlength) { cur_node.r_ptr = an->nptr[j]; 802d5e2: 9307 str r3, [sp, #28] cur_node.r_id = an->objid[j]; 802d5e4: 6963 ldr r3, [r4, #20] 802d5e6: 589b ldr r3, [r3, r2] cur_node.r_nl = 0; 802d5e8: f88d 0024 strb.w r0, [sp, #36] ; 0x24 j++; } if (j < an->maxlength) { cur_node.r_ptr = an->nptr[j]; cur_node.r_id = an->objid[j]; 802d5ec: 9308 str r3, [sp, #32] 802d5ee: e001 b.n 802d5f4 cur_node.r_nl = 0; } else { cur_node.r_ptr = NULL; 802d5f0: 2300 movs r3, #0 802d5f2: 9307 str r3, [sp, #28] } push_node(&cur_node); 802d5f4: a807 add r0, sp, #28 802d5f6: f7ff fdfb bl 802d1f0 if (an->objid[i] == *ident) 802d5fa: 6963 ldr r3, [r4, #20] 802d5fc: f853 2009 ldr.w r2, [r3, r9] 802d600: f8d8 3000 ldr.w r3, [r8] 802d604: 429a cmp r2, r3 802d606: d104 bne.n 802d612 { ident_len--; 802d608: 3e01 subs r6, #1 802d60a: b2f6 uxtb r6, r6 ident++; 802d60c: f108 0804 add.w r8, r8, #4 802d610: e000 b.n 802d614 } else { /* an->objid[i] < *ident */ ident_len = 0; 802d612: 2600 movs r6, #0 } /* follow next child pointer */ node = an->nptr[i]; 802d614: 69a3 ldr r3, [r4, #24] 802d616: f853 3009 ldr.w r3, [r3, r9] 802d61a: e140 b.n 802d89e u8_t j; /* ident_len == 0, complete with leftmost '.thing' */ j = 0; while ((j < an->maxlength) && empty_table(an->nptr[j])) { j++; 802d61c: f109 0901 add.w r9, r9, #1 802d620: fa5f f989 uxtb.w r9, r9 else { u8_t j; /* ident_len == 0, complete with leftmost '.thing' */ j = 0; while ((j < an->maxlength) && empty_table(an->nptr[j])) 802d624: 45b9 cmp r9, r7 802d626: f080 80fc bcs.w 802d822 802d62a: fa0f f289 sxth.w r2, r9 802d62e: 69a3 ldr r3, [r4, #24] 802d630: f853 0022 ldr.w r0, [r3, r2, lsl #2] 802d634: ea4f 0b82 mov.w fp, r2, lsl #2 802d638: f7ff fdee bl 802d218 802d63c: 2800 cmp r0, #0 802d63e: d1ed bne.n 802d61c j++; } if (j < an->maxlength) { LWIP_DEBUGF(SNMP_MIB_DEBUG,("left an->objid[j]==%"S32_F"\n",an->objid[j])); oidret->id[oidret->len] = an->objid[j]; 802d640: 6962 ldr r2, [r4, #20] 802d642: 782b ldrb r3, [r5, #0] 802d644: f852 100b ldr.w r1, [r2, fp] 802d648: eb05 0283 add.w r2, r5, r3, lsl #2 (oidret->len)++; 802d64c: 3301 adds r3, #1 802d64e: 702b strb r3, [r5, #0] if (an->nptr[j] == NULL) 802d650: 69a3 ldr r3, [r4, #24] j++; } if (j < an->maxlength) { LWIP_DEBUGF(SNMP_MIB_DEBUG,("left an->objid[j]==%"S32_F"\n",an->objid[j])); oidret->id[oidret->len] = an->objid[j]; 802d652: 6051 str r1, [r2, #4] (oidret->len)++; if (an->nptr[j] == NULL) 802d654: f853 300b ldr.w r3, [r3, fp] 802d658: e11f b.n 802d89a /* j == an->maxlength */ climb_tree = 1; } } } else if(node_type == MIB_NODE_LR) 802d65a: 2b04 cmp r3, #4 802d65c: d14c bne.n 802d6f8 802d65e: 6967 ldr r7, [r4, #20] struct mib_list_rootnode *lrn; struct mib_list_node *ln; /* list root node (internal 'RAM', variable length) */ lrn = (struct mib_list_rootnode *)node; if (ident_len > 0) 802d660: 2e00 cmp r6, #0 802d662: d040 beq.n 802d6e6 { ln = lrn->head; /* iterate over list, head to tail */ while ((ln != NULL) && (ln->objid < *ident)) 802d664: e000 b.n 802d668 { ln = ln->next; 802d666: 687f ldr r7, [r7, #4] lrn = (struct mib_list_rootnode *)node; if (ident_len > 0) { ln = lrn->head; /* iterate over list, head to tail */ while ((ln != NULL) && (ln->objid < *ident)) 802d668: 2f00 cmp r7, #0 802d66a: f000 80da beq.w 802d822 802d66e: 68ba ldr r2, [r7, #8] 802d670: f8d8 3000 ldr.w r3, [r8] 802d674: 429a cmp r2, r3 802d676: dbf6 blt.n 802d666 ln = ln->next; } if (ln != NULL) { LWIP_DEBUGF(SNMP_MIB_DEBUG,("ln->objid==%"S32_F" *ident==%"S32_F"\n",ln->objid,*ident)); oidret->id[oidret->len] = ln->objid; 802d678: 782b ldrb r3, [r5, #0] 802d67a: eb05 0183 add.w r1, r5, r3, lsl #2 802d67e: 604a str r2, [r1, #4] (oidret->len)++; 802d680: 1c5a adds r2, r3, #1 802d682: 702a strb r2, [r5, #0] if (ln->nptr == NULL) 802d684: 68f8 ldr r0, [r7, #12] 802d686: b978 cbnz r0, 802d6a8 { /* leaf node */ if (ln->objid > *ident) 802d688: 68b8 ldr r0, [r7, #8] 802d68a: f8d8 6000 ldr.w r6, [r8] 802d68e: 42b0 cmp r0, r6 802d690: f300 80f0 bgt.w 802d874 { return (struct mib_node*)lrn; } else if (ln->next != NULL) 802d694: 6878 ldr r0, [r7, #4] { /* ln->objid == *ident */ (oidret->len)--; 802d696: 702b strb r3, [r5, #0] /* leaf node */ if (ln->objid > *ident) { return (struct mib_node*)lrn; } else if (ln->next != NULL) 802d698: 2800 cmp r0, #0 802d69a: f000 80c2 beq.w 802d822 { /* ln->objid == *ident */ (oidret->len)--; oidret->id[oidret->len] = ln->next->objid; 802d69e: 687b ldr r3, [r7, #4] 802d6a0: 689b ldr r3, [r3, #8] (oidret->len)++; 802d6a2: 702a strb r2, [r5, #0] } else if (ln->next != NULL) { /* ln->objid == *ident */ (oidret->len)--; oidret->id[oidret->len] = ln->next->objid; 802d6a4: 604b str r3, [r1, #4] 802d6a6: e0e5 b.n 802d874 { struct mib_list_node *jn; struct nse cur_node; /* non-leaf, store right child ptr and id */ jn = ln->next; 802d6a8: 687c ldr r4, [r7, #4] while ((jn != NULL) && empty_table(jn->nptr)) 802d6aa: e000 b.n 802d6ae { jn = jn->next; 802d6ac: 6864 ldr r4, [r4, #4] struct mib_list_node *jn; struct nse cur_node; /* non-leaf, store right child ptr and id */ jn = ln->next; while ((jn != NULL) && empty_table(jn->nptr)) 802d6ae: 2c00 cmp r4, #0 802d6b0: f000 80e9 beq.w 802d886 802d6b4: f8d4 900c ldr.w r9, [r4, #12] 802d6b8: 4648 mov r0, r9 802d6ba: f7ff fdad bl 802d218 802d6be: 2800 cmp r0, #0 802d6c0: d1f4 bne.n 802d6ac 802d6c2: e0d9 b.n 802d878 } else { cur_node.r_ptr = NULL; } push_node(&cur_node); 802d6c4: a807 add r0, sp, #28 802d6c6: f7ff fd93 bl 802d1f0 if (ln->objid == *ident) 802d6ca: 68ba ldr r2, [r7, #8] 802d6cc: f8d8 3000 ldr.w r3, [r8] 802d6d0: 429a cmp r2, r3 802d6d2: d104 bne.n 802d6de { ident_len--; 802d6d4: 3e01 subs r6, #1 802d6d6: b2f6 uxtb r6, r6 ident++; 802d6d8: f108 0804 add.w r8, r8, #4 802d6dc: e000 b.n 802d6e0 } else { /* ln->objid < *ident */ ident_len = 0; 802d6de: 2600 movs r6, #0 } /* follow next child pointer */ node = ln->nptr; 802d6e0: 68fb ldr r3, [r7, #12] 802d6e2: e0dc b.n 802d89e struct mib_list_node *jn; /* ident_len == 0, complete with leftmost '.thing' */ jn = lrn->head; while ((jn != NULL) && empty_table(jn->nptr)) { jn = jn->next; 802d6e4: 687f ldr r7, [r7, #4] else { struct mib_list_node *jn; /* ident_len == 0, complete with leftmost '.thing' */ jn = lrn->head; while ((jn != NULL) && empty_table(jn->nptr)) 802d6e6: 2f00 cmp r7, #0 802d6e8: f000 809b beq.w 802d822 802d6ec: 68f8 ldr r0, [r7, #12] 802d6ee: f7ff fd93 bl 802d218 802d6f2: 2800 cmp r0, #0 802d6f4: d1f6 bne.n 802d6e4 802d6f6: e0c8 b.n 802d88a /* jn == NULL */ climb_tree = 1; } } } else if(node_type == MIB_NODE_EX) 802d6f8: 2b05 cmp r3, #5 802d6fa: f040 8086 bne.w 802d80a struct mib_external_node *en; s32_t ex_id; /* external node (addressing and access via functions) */ en = (struct mib_external_node *)node; if (ident_len > 0) 802d6fe: 2e00 cmp r6, #0 802d700: d06e beq.n 802d7e0 { u16_t i, len; i = 0; len = en->level_length(en->addr_inf,ext_level); 802d702: 69e3 ldr r3, [r4, #28] 802d704: 6960 ldr r0, [r4, #20] 802d706: 4651 mov r1, sl 802d708: 4798 blx r3 en = (struct mib_external_node *)node; if (ident_len > 0) { u16_t i, len; i = 0; 802d70a: f04f 0900 mov.w r9, #0 len = en->level_length(en->addr_inf,ext_level); 802d70e: 4683 mov fp, r0 while ((i < len) && (en->ident_cmp(en->addr_inf,ext_level,i,*ident) < 0)) 802d710: e003 b.n 802d71a { i++; 802d712: f109 0901 add.w r9, r9, #1 802d716: fa1f f989 uxth.w r9, r9 { u16_t i, len; i = 0; len = en->level_length(en->addr_inf,ext_level); while ((i < len) && (en->ident_cmp(en->addr_inf,ext_level,i,*ident) < 0)) 802d71a: 45d9 cmp r9, fp 802d71c: f000 8081 beq.w 802d822 802d720: 6a27 ldr r7, [r4, #32] 802d722: 6960 ldr r0, [r4, #20] 802d724: f8d8 3000 ldr.w r3, [r8] 802d728: 4651 mov r1, sl 802d72a: 464a mov r2, r9 802d72c: 47b8 blx r7 802d72e: 2800 cmp r0, #0 802d730: dbef blt.n 802d712 { i++; } if (i < len) 802d732: 45d9 cmp r9, fp 802d734: d275 bcs.n 802d822 { /* add identifier to oidret */ en->get_objid(en->addr_inf,ext_level,i,&ex_id); 802d736: 4651 mov r1, sl 802d738: 464a mov r2, r9 802d73a: ab06 add r3, sp, #24 802d73c: 6a67 ldr r7, [r4, #36] ; 0x24 802d73e: 6960 ldr r0, [r4, #20] 802d740: 47b8 blx r7 LWIP_DEBUGF(SNMP_MIB_DEBUG,("en->objid[%"U16_F"]==%"S32_F" *ident==%"S32_F"\n",i,ex_id,*ident)); oidret->id[oidret->len] = ex_id; 802d742: 782b ldrb r3, [r5, #0] 802d744: 9a06 ldr r2, [sp, #24] 802d746: eb05 0183 add.w r1, r5, r3, lsl #2 (oidret->len)++; if ((ext_level + 1) == en->tree_levels) 802d74a: f10a 0c01 add.w ip, sl, #1 if (i < len) { /* add identifier to oidret */ en->get_objid(en->addr_inf,ext_level,i,&ex_id); LWIP_DEBUGF(SNMP_MIB_DEBUG,("en->objid[%"U16_F"]==%"S32_F" *ident==%"S32_F"\n",i,ex_id,*ident)); oidret->id[oidret->len] = ex_id; 802d74e: 604a str r2, [r1, #4] (oidret->len)++; 802d750: 1c59 adds r1, r3, #1 802d752: 7029 strb r1, [r5, #0] if ((ext_level + 1) == en->tree_levels) 802d754: 7e21 ldrb r1, [r4, #24] 802d756: 458c cmp ip, r1 802d758: d118 bne.n 802d78c { LWIP_DEBUGF(SNMP_MIB_DEBUG,("leaf node\n")); /* leaf node */ if (ex_id > *ident) 802d75a: f8d8 1000 ldr.w r1, [r8] 802d75e: 428a cmp r2, r1 802d760: f300 8088 bgt.w 802d874 { return (struct mib_node*)en; } else if ((i + 1) < len) 802d764: f109 0201 add.w r2, r9, #1 802d768: 455a cmp r2, fp 802d76a: da0d bge.n 802d788 { /* ex_id == *ident */ en->get_objid(en->addr_inf,ext_level,i + 1,&ex_id); 802d76c: ab06 add r3, sp, #24 802d76e: 6a66 ldr r6, [r4, #36] ; 0x24 802d770: 6960 ldr r0, [r4, #20] 802d772: 4651 mov r1, sl 802d774: b292 uxth r2, r2 802d776: 47b0 blx r6 (oidret->len)--; 802d778: 782b ldrb r3, [r5, #0] 802d77a: 3b01 subs r3, #1 oidret->id[oidret->len] = ex_id; 802d77c: b2db uxtb r3, r3 802d77e: eb05 0583 add.w r5, r5, r3, lsl #2 802d782: 9b06 ldr r3, [sp, #24] 802d784: 606b str r3, [r5, #4] 802d786: e075 b.n 802d874 return (struct mib_node*)en; } else { /* (i + 1) == len */ (oidret->len)--; 802d788: 702b strb r3, [r5, #0] 802d78a: e04a b.n 802d822 struct nse cur_node; LWIP_DEBUGF(SNMP_MIB_DEBUG,("non-leaf node\n")); /* non-leaf, store right child ptr and id */ LWIP_ASSERT("i < 0xff", i < 0xff); j = (u8_t)i + 1; 802d78c: f109 0201 add.w r2, r9, #1 if (j < len) 802d790: b2d2 uxtb r2, r2 802d792: 455a cmp r2, fp 802d794: d20e bcs.n 802d7b4 { /* right node is the current external node */ cur_node.r_ptr = node; 802d796: 9407 str r4, [sp, #28] en->get_objid(en->addr_inf,ext_level,j,&cur_node.r_id); 802d798: 6960 ldr r0, [r4, #20] 802d79a: 9b05 ldr r3, [sp, #20] 802d79c: f8cd c004 str.w ip, [sp, #4] 802d7a0: 4651 mov r1, sl 802d7a2: 6a67 ldr r7, [r4, #36] ; 0x24 802d7a4: 47b8 blx r7 cur_node.r_nl = ext_level + 1; 802d7a6: f8dd c004 ldr.w ip, [sp, #4] 802d7aa: f88d c024 strb.w ip, [sp, #36] ; 0x24 802d7ae: e003 b.n 802d7b8 802d7b0: 2000dcf4 .word 0x2000dcf4 } else { cur_node.r_ptr = NULL; 802d7b4: 2300 movs r3, #0 802d7b6: 9307 str r3, [sp, #28] } push_node(&cur_node); 802d7b8: a807 add r0, sp, #28 802d7ba: f7ff fd19 bl 802d1f0 if (en->ident_cmp(en->addr_inf,ext_level,i,*ident) == 0) 802d7be: 6a27 ldr r7, [r4, #32] 802d7c0: 6960 ldr r0, [r4, #20] 802d7c2: f8d8 3000 ldr.w r3, [r8] 802d7c6: 4651 mov r1, sl 802d7c8: 464a mov r2, r9 802d7ca: 47b8 blx r7 802d7cc: b920 cbnz r0, 802d7d8 { ident_len--; 802d7ce: 3e01 subs r6, #1 802d7d0: b2f6 uxtb r6, r6 ident++; 802d7d2: f108 0804 add.w r8, r8, #4 802d7d6: e000 b.n 802d7da } else { /* external id < *ident */ ident_len = 0; 802d7d8: 2600 movs r6, #0 } /* proceed to child */ ext_level++; 802d7da: f10a 0a01 add.w sl, sl, #1 802d7de: e011 b.n 802d804 } } else { /* ident_len == 0, complete with leftmost '.thing' */ en->get_objid(en->addr_inf,ext_level,0,&ex_id); 802d7e0: 4651 mov r1, sl 802d7e2: 4632 mov r2, r6 802d7e4: ab06 add r3, sp, #24 802d7e6: 6a67 ldr r7, [r4, #36] ; 0x24 802d7e8: 6960 ldr r0, [r4, #20] 802d7ea: 47b8 blx r7 LWIP_DEBUGF(SNMP_MIB_DEBUG,("left en->objid==%"S32_F"\n",ex_id)); oidret->id[oidret->len] = ex_id; 802d7ec: 782b ldrb r3, [r5, #0] 802d7ee: 9a06 ldr r2, [sp, #24] 802d7f0: eb05 0183 add.w r1, r5, r3, lsl #2 (oidret->len)++; 802d7f4: 3301 adds r3, #1 else { /* ident_len == 0, complete with leftmost '.thing' */ en->get_objid(en->addr_inf,ext_level,0,&ex_id); LWIP_DEBUGF(SNMP_MIB_DEBUG,("left en->objid==%"S32_F"\n",ex_id)); oidret->id[oidret->len] = ex_id; 802d7f6: 604a str r2, [r1, #4] (oidret->len)++; 802d7f8: 702b strb r3, [r5, #0] if ((ext_level + 1) == en->tree_levels) 802d7fa: 7e23 ldrb r3, [r4, #24] 802d7fc: f10a 0a01 add.w sl, sl, #1 802d800: 459a cmp sl, r3 802d802: d037 beq.n 802d874 return (struct mib_node*)en; } else { /* no leaf, proceed to child */ ext_level++; 802d804: fa5f fa8a uxtb.w sl, sl 802d808: e030 b.n 802d86c } } } else if(node_type == MIB_NODE_SC) 802d80a: 2b01 cmp r3, #1 802d80c: d001 beq.n 802d812 } else { /* unknown/unhandled node_type */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("expand failed node_type %"U16_F" unkown\n",(u16_t)node_type)); return NULL; 802d80e: 2000 movs r0, #0 802d810: e047 b.n 802d8a2 { mib_scalar_node *sn; /* scalar node */ sn = (mib_scalar_node *)node; if (ident_len > 0) 802d812: b936 cbnz r6, 802d822 climb_tree = 1; } else { /* ident_len == 0, complete object identifier */ oidret->id[oidret->len] = 0; 802d814: 782b ldrb r3, [r5, #0] 802d816: eb05 0283 add.w r2, r5, r3, lsl #2 (oidret->len)++; 802d81a: 3301 adds r3, #1 climb_tree = 1; } else { /* ident_len == 0, complete object identifier */ oidret->id[oidret->len] = 0; 802d81c: 6056 str r6, [r2, #4] (oidret->len)++; 802d81e: 702b strb r3, [r5, #0] 802d820: e028 b.n 802d874 802d822: 4921 ldr r1, [pc, #132] ; (802d8a8 ) struct nse child; /* find right child ptr */ child.r_ptr = NULL; child.r_id = 0; child.r_nl = 0; 802d824: f04f 0a00 mov.w sl, #0 802d828: 780b ldrb r3, [r1, #0] pop_node(struct nse* node) { if (node_stack_cnt > 0) { node_stack_cnt--; *node = node_stack[node_stack_cnt]; 802d82a: 4920 ldr r1, [pc, #128] ; (802d8ac ) { struct nse child; /* find right child ptr */ child.r_ptr = NULL; child.r_id = 0; 802d82c: 4652 mov r2, sl if (climb_tree) { struct nse child; /* find right child ptr */ child.r_ptr = NULL; 802d82e: 4654 mov r4, sl pop_node(struct nse* node) { if (node_stack_cnt > 0) { node_stack_cnt--; *node = node_stack[node_stack_cnt]; 802d830: 260c movs r6, #12 /* find right child ptr */ child.r_ptr = NULL; child.r_id = 0; child.r_nl = 0; while ((node_stack_cnt > 0) && (child.r_ptr == NULL)) 802d832: e00b b.n 802d84c static void pop_node(struct nse* node) { if (node_stack_cnt > 0) { node_stack_cnt--; 802d834: 3b01 subs r3, #1 802d836: b2db uxtb r3, r3 *node = node_stack[node_stack_cnt]; 802d838: fb06 f203 mul.w r2, r6, r3 802d83c: 1888 adds r0, r1, r2 802d83e: 588c ldr r4, [r1, r2] 802d840: f890 a008 ldrb.w sl, [r0, #8] 802d844: 6842 ldr r2, [r0, #4] child.r_nl = 0; while ((node_stack_cnt > 0) && (child.r_ptr == NULL)) { pop_node(&child); /* trim returned oid */ (oidret->len)--; 802d846: 7828 ldrb r0, [r5, #0] 802d848: 3801 subs r0, #1 802d84a: 7028 strb r0, [r5, #0] /* find right child ptr */ child.r_ptr = NULL; child.r_id = 0; child.r_nl = 0; while ((node_stack_cnt > 0) && (child.r_ptr == NULL)) 802d84c: b91b cbnz r3, 802d856 802d84e: 4f16 ldr r7, [pc, #88] ; (802d8a8 ) 802d850: 703b strb r3, [r7, #0] { pop_node(&child); /* trim returned oid */ (oidret->len)--; } if (child.r_ptr != NULL) 802d852: b924 cbnz r4, 802d85e 802d854: e7db b.n 802d80e /* find right child ptr */ child.r_ptr = NULL; child.r_id = 0; child.r_nl = 0; while ((node_stack_cnt > 0) && (child.r_ptr == NULL)) 802d856: 2c00 cmp r4, #0 802d858: d0ec beq.n 802d834 802d85a: 4913 ldr r1, [pc, #76] ; (802d8a8 ) 802d85c: 700b strb r3, [r1, #0] } if (child.r_ptr != NULL) { /* incoming ident is useless beyond this point */ ident_len = 0; oidret->id[oidret->len] = child.r_id; 802d85e: 782b ldrb r3, [r5, #0] 802d860: eb05 0183 add.w r1, r5, r3, lsl #2 oidret->len++; 802d864: 3301 adds r3, #1 } if (child.r_ptr != NULL) { /* incoming ident is useless beyond this point */ ident_len = 0; oidret->id[oidret->len] = child.r_id; 802d866: 604a str r2, [r1, #4] oidret->len++; 802d868: 702b strb r3, [r5, #0] (oidret->len)--; } if (child.r_ptr != NULL) { /* incoming ident is useless beyond this point */ ident_len = 0; 802d86a: 2600 movs r6, #0 u8_t node_type, ext_level, climb_tree; ext_level = 0; /* reset node stack */ node_stack_cnt = 0; while (node != NULL) 802d86c: 2c00 cmp r4, #0 802d86e: f47f ae60 bne.w 802d532 802d872: e7cc b.n 802d80e if (jn != NULL) { LWIP_DEBUGF(SNMP_MIB_DEBUG,("left jn->objid==%"S32_F"\n",jn->objid)); oidret->id[oidret->len] = jn->objid; (oidret->len)++; if (jn->nptr == NULL) 802d874: 4620 mov r0, r4 802d876: e014 b.n 802d8a2 jn = jn->next; } if (jn != NULL) { cur_node.r_ptr = jn->nptr; cur_node.r_id = jn->objid; 802d878: 68a3 ldr r3, [r4, #8] { jn = jn->next; } if (jn != NULL) { cur_node.r_ptr = jn->nptr; 802d87a: f8cd 901c str.w r9, [sp, #28] cur_node.r_id = jn->objid; 802d87e: 9308 str r3, [sp, #32] cur_node.r_nl = 0; 802d880: f88d 0024 strb.w r0, [sp, #36] ; 0x24 802d884: e71e b.n 802d6c4 } else { cur_node.r_ptr = NULL; 802d886: 9407 str r4, [sp, #28] 802d888: e71c b.n 802d6c4 jn = jn->next; } if (jn != NULL) { LWIP_DEBUGF(SNMP_MIB_DEBUG,("left jn->objid==%"S32_F"\n",jn->objid)); oidret->id[oidret->len] = jn->objid; 802d88a: 782b ldrb r3, [r5, #0] 802d88c: 68ba ldr r2, [r7, #8] 802d88e: eb05 0183 add.w r1, r5, r3, lsl #2 (oidret->len)++; 802d892: 3301 adds r3, #1 802d894: 702b strb r3, [r5, #0] if (jn->nptr == NULL) 802d896: 68fb ldr r3, [r7, #12] jn = jn->next; } if (jn != NULL) { LWIP_DEBUGF(SNMP_MIB_DEBUG,("left jn->objid==%"S32_F"\n",jn->objid)); oidret->id[oidret->len] = jn->objid; 802d898: 604a str r2, [r1, #4] (oidret->len)++; if (jn->nptr == NULL) 802d89a: 2b00 cmp r3, #0 802d89c: d0ea beq.n 802d874 (oidret->len)--; } if (child.r_ptr != NULL) { /* incoming ident is useless beyond this point */ ident_len = 0; 802d89e: 461c mov r4, r3 802d8a0: e7e4 b.n 802d86c } } /* done, found nothing */ LWIP_DEBUGF(SNMP_MIB_DEBUG,("expand failed node==%p\n",(void*)node)); return NULL; } 802d8a2: b00b add sp, #44 ; 0x2c 802d8a4: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802d8a8: 2000dcf4 .word 0x2000dcf4 802d8ac: 2000dcf8 .word 0x2000dcf8 0802d8b0 : * @return 1 if it matches, 0 otherwise */ u8_t snmp_iso_prefix_tst(u8_t ident_len, s32_t *ident) { if ((ident_len > 3) && 802d8b0: 2803 cmp r0, #3 802d8b2: d90d bls.n 802d8d0 802d8b4: 680b ldr r3, [r1, #0] 802d8b6: 2b01 cmp r3, #1 802d8b8: d10a bne.n 802d8d0 (ident[0] == 1) && (ident[1] == 3) && 802d8ba: 684b ldr r3, [r1, #4] 802d8bc: 2b03 cmp r3, #3 802d8be: d107 bne.n 802d8d0 802d8c0: 688b ldr r3, [r1, #8] 802d8c2: 2b06 cmp r3, #6 802d8c4: d104 bne.n 802d8d0 (ident[2] == 6) && (ident[3] == 1)) 802d8c6: 68c8 ldr r0, [r1, #12] { return 1; 802d8c8: 1e43 subs r3, r0, #1 802d8ca: 4258 negs r0, r3 802d8cc: 4158 adcs r0, r3 802d8ce: 4770 bx lr } else { return 0; 802d8d0: 2000 movs r0, #0 } } 802d8d2: 4770 bx lr 0802d8d4 : i = 0; prefix_ptr = &prefix[0]; ret_ptr = &oidret->id[0]; ident_len = ((ident_len < 4)?ident_len:4); while ((i < ident_len) && ((*ident) <= (*prefix_ptr))) 802d8d4: 2300 movs r3, #0 * * @note ident_len 0 is allowed, expanding to the first known object id!! */ u8_t snmp_iso_prefix_expand(u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret) { 802d8d6: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} s32_t *ret_ptr; u8_t i; i = 0; prefix_ptr = &prefix[0]; ret_ptr = &oidret->id[0]; 802d8da: 1d15 adds r5, r2, #4 ident_len = ((ident_len < 4)?ident_len:4); 802d8dc: 2804 cmp r0, #4 802d8de: bf34 ite cc 802d8e0: 4680 movcc r8, r0 802d8e2: f04f 0804 movcs.w r8, #4 { const s32_t *prefix_ptr; s32_t *ret_ptr; u8_t i; i = 0; 802d8e6: 461c mov r4, r3 * @return 1 if it matches, 0 otherwise * * @note ident_len 0 is allowed, expanding to the first known object id!! */ u8_t snmp_iso_prefix_expand(u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret) 802d8e8: 4f10 ldr r7, [pc, #64] ; (802d92c ) i = 0; prefix_ptr = &prefix[0]; ret_ptr = &oidret->id[0]; ident_len = ((ident_len < 4)?ident_len:4); while ((i < ident_len) && ((*ident) <= (*prefix_ptr))) 802d8ea: e003 b.n 802d8f4 { *ret_ptr++ = *prefix_ptr++; ident++; i++; 802d8ec: 3401 adds r4, #1 prefix_ptr = &prefix[0]; ret_ptr = &oidret->id[0]; ident_len = ((ident_len < 4)?ident_len:4); while ((i < ident_len) && ((*ident) <= (*prefix_ptr))) { *ret_ptr++ = *prefix_ptr++; 802d8ee: 50ee str r6, [r5, r3] ident++; i++; 802d8f0: b2e4 uxtb r4, r4 802d8f2: 3304 adds r3, #4 i = 0; prefix_ptr = &prefix[0]; ret_ptr = &oidret->id[0]; ident_len = ((ident_len < 4)?ident_len:4); while ((i < ident_len) && ((*ident) <= (*prefix_ptr))) 802d8f4: 4544 cmp r4, r8 * @return 1 if it matches, 0 otherwise * * @note ident_len 0 is allowed, expanding to the first known object id!! */ u8_t snmp_iso_prefix_expand(u8_t ident_len, s32_t *ident, struct snmp_obj_id *oidret) 802d8f6: eb05 0c03 add.w ip, r5, r3 802d8fa: eb07 0603 add.w r6, r7, r3 i = 0; prefix_ptr = &prefix[0]; ret_ptr = &oidret->id[0]; ident_len = ((ident_len < 4)?ident_len:4); while ((i < ident_len) && ((*ident) <= (*prefix_ptr))) 802d8fe: d101 bne.n 802d904 802d900: 2300 movs r3, #0 802d902: e00c b.n 802d91e 802d904: 59de ldr r6, [r3, r7] 802d906: 58c8 ldr r0, [r1, r3] 802d908: 42b0 cmp r0, r6 802d90a: ddef ble.n 802d8ec return 1; } else { /* i != ident_len */ return 0; 802d90c: 2000 movs r0, #0 802d90e: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} if (i == ident_len) { /* match, complete missing bits */ while (i < 4) { *ret_ptr++ = *prefix_ptr++; 802d912: 58f1 ldr r1, [r6, r3] i++; 802d914: 3401 adds r4, #1 if (i == ident_len) { /* match, complete missing bits */ while (i < 4) { *ret_ptr++ = *prefix_ptr++; 802d916: f84c 1003 str.w r1, [ip, r3] i++; 802d91a: b2e4 uxtb r4, r4 802d91c: 3304 adds r3, #4 i++; } if (i == ident_len) { /* match, complete missing bits */ while (i < 4) 802d91e: 2c03 cmp r4, #3 802d920: d9f7 bls.n 802d912 { *ret_ptr++ = *prefix_ptr++; i++; } oidret->len = i; 802d922: 7014 strb r4, [r2, #0] return 1; 802d924: 2001 movs r0, #1 else { /* i != ident_len */ return 0; } } 802d926: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} 802d92a: bf00 nop 802d92c: 080383e0 .word 0x080383e0 0802d930 : * Starts SNMP Agent. * Allocates UDP pcb and binds it to IP_ADDR_ANY port 161. */ void snmp_init(void) { 802d930: b510 push {r4, lr} struct snmp_msg_pstat *msg_ps; u8_t i; snmp1_pcb = udp_new(); 802d932: f7fd fa39 bl 802ada8 802d936: 4c0b ldr r4, [pc, #44] ; (802d964 ) 802d938: 6020 str r0, [r4, #0] if (snmp1_pcb != NULL) 802d93a: b140 cbz r0, 802d94e { udp_recv(snmp1_pcb, snmp_recv, (void *)SNMP_IN_PORT); 802d93c: 490a ldr r1, [pc, #40] ; (802d968 ) 802d93e: 22a1 movs r2, #161 ; 0xa1 802d940: f7fd fa12 bl 802ad68 udp_bind(snmp1_pcb, IP_ADDR_ANY, SNMP_IN_PORT); 802d944: 6820 ldr r0, [r4, #0] 802d946: 4909 ldr r1, [pc, #36] ; (802d96c ) 802d948: 22a1 movs r2, #161 ; 0xa1 802d94a: f7fd f915 bl 802ab78 } msg_ps = &msg_input_list[0]; for (i=0; istate = SNMP_MSG_EMPTY; 802d94e: 4b08 ldr r3, [pc, #32] ; (802d970 ) 802d950: 2200 movs r2, #0 802d952: f883 205a strb.w r2, [r3, #90] ; 0x5a msg_ps->error_index = 0; 802d956: 615a str r2, [r3, #20] msg_ps->error_status = SNMP_ES_NOERROR; 802d958: 611a str r2, [r3, #16] msg_ps++; } trap_msg.pcb = snmp1_pcb; 802d95a: 4b02 ldr r3, [pc, #8] ; (802d964 ) 802d95c: 681a ldr r2, [r3, #0] 802d95e: 4b05 ldr r3, [pc, #20] ; (802d974 ) 802d960: 601a str r2, [r3, #0] 802d962: bd10 pop {r4, pc} 802d964: 200104f4 .word 0x200104f4 802d968: 0802e4dd .word 0x0802e4dd 802d96c: 08037acc .word 0x08037acc 802d970: 200104f8 .word 0x200104f8 802d974: 20010630 .word 0x20010630 0802d978 : return ERR_OK; } struct snmp_varbind* snmp_varbind_alloc(struct snmp_obj_id *oid, u8_t type, u8_t len) { 802d978: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} 802d97c: 4680 mov r8, r0 struct snmp_varbind *vb; vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 802d97e: 200c movs r0, #12 return ERR_OK; } struct snmp_varbind* snmp_varbind_alloc(struct snmp_obj_id *oid, u8_t type, u8_t len) { 802d980: 4689 mov r9, r1 802d982: 4617 mov r7, r2 struct snmp_varbind *vb; vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 802d984: f7fa fb88 bl 8028098 if (vb != NULL) 802d988: 4604 mov r4, r0 802d98a: 2800 cmp r0, #0 802d98c: d032 beq.n 802d9f4 { u8_t i; vb->next = NULL; 802d98e: 2300 movs r3, #0 802d990: 6003 str r3, [r0, #0] vb->prev = NULL; 802d992: 6043 str r3, [r0, #4] i = oid->len; 802d994: f898 5000 ldrb.w r5, [r8] vb->ident_len = i; 802d998: 7205 strb r5, [r0, #8] if (i > 0) 802d99a: b1ad cbz r5, 802d9c8 { LWIP_ASSERT("SNMP_MAX_TREE_DEPTH is configured too low", i <= SNMP_MAX_TREE_DEPTH); /* allocate array of s32_t for our object identifier */ vb->ident = (s32_t*)memp_malloc(MEMP_SNMP_VALUE); 802d99c: 200d movs r0, #13 802d99e: f7fa fb7b bl 8028098 802d9a2: 4606 mov r6, r0 802d9a4: 60e0 str r0, [r4, #12] if (vb->ident == NULL) 802d9a6: b928 cbnz r0, 802d9b4 { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate ident value space\n")); memp_free(MEMP_SNMP_VARBIND, vb); 802d9a8: 4621 mov r1, r4 802d9aa: 200c movs r0, #12 802d9ac: f7fa fb8a bl 80280c4 return NULL; 802d9b0: 4634 mov r4, r6 802d9b2: e01f b.n 802d9f4 } while(i > 0) { i--; 802d9b4: 3d01 subs r5, #1 802d9b6: b2ed uxtb r5, r5 vb->ident[i] = oid->id[i]; 802d9b8: eb08 0385 add.w r3, r8, r5, lsl #2 802d9bc: 685b ldr r3, [r3, #4] 802d9be: f846 3025 str.w r3, [r6, r5, lsl #2] { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate ident value space\n")); memp_free(MEMP_SNMP_VARBIND, vb); return NULL; } while(i > 0) 802d9c2: 2d00 cmp r5, #0 802d9c4: d1f6 bne.n 802d9b4 802d9c6: e000 b.n 802d9ca } } else { /* i == 0, pass zero length object identifier */ vb->ident = NULL; 802d9c8: 60c5 str r5, [r0, #12] } vb->value_type = type; 802d9ca: f884 9010 strb.w r9, [r4, #16] vb->value_len = len; 802d9ce: 7467 strb r7, [r4, #17] if (len > 0) 802d9d0: b17f cbz r7, 802d9f2 { LWIP_ASSERT("SNMP_MAX_OCTET_STRING_LEN is configured too low", vb->value_len <= SNMP_MAX_VALUE_SIZE); /* allocate raw bytes for our object value */ vb->value = memp_malloc(MEMP_SNMP_VALUE); 802d9d2: 200d movs r0, #13 802d9d4: f7fa fb60 bl 8028098 802d9d8: 6160 str r0, [r4, #20] if (vb->value == NULL) 802d9da: b958 cbnz r0, 802d9f4 { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate value space\n")); if (vb->ident != NULL) 802d9dc: 68e1 ldr r1, [r4, #12] 802d9de: b111 cbz r1, 802d9e6 { memp_free(MEMP_SNMP_VALUE, vb->ident); 802d9e0: 200d movs r0, #13 802d9e2: f7fa fb6f bl 80280c4 } memp_free(MEMP_SNMP_VARBIND, vb); 802d9e6: 4621 mov r1, r4 802d9e8: 200c movs r0, #12 802d9ea: f7fa fb6b bl 80280c4 return NULL; 802d9ee: 2400 movs r4, #0 802d9f0: e000 b.n 802d9f4 } } else { /* ASN1_NUL type, or zero length ASN1_OC_STR */ vb->value = NULL; 802d9f2: 6167 str r7, [r4, #20] else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_varbind_alloc: couldn't allocate varbind space\n")); } return vb; } 802d9f4: 4620 mov r0, r4 802d9f6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 0802d9fa : void snmp_varbind_free(struct snmp_varbind *vb) { if (vb->value != NULL ) 802d9fa: 6941 ldr r1, [r0, #20] return vb; } void snmp_varbind_free(struct snmp_varbind *vb) { 802d9fc: b510 push {r4, lr} 802d9fe: 4604 mov r4, r0 if (vb->value != NULL ) 802da00: b111 cbz r1, 802da08 { memp_free(MEMP_SNMP_VALUE, vb->value); 802da02: 200d movs r0, #13 802da04: f7fa fb5e bl 80280c4 } if (vb->ident != NULL ) 802da08: 68e1 ldr r1, [r4, #12] 802da0a: b111 cbz r1, 802da12 { memp_free(MEMP_SNMP_VALUE, vb->ident); 802da0c: 200d movs r0, #13 802da0e: f7fa fb59 bl 80280c4 } memp_free(MEMP_SNMP_VARBIND, vb); 802da12: 200c movs r0, #12 802da14: 4621 mov r1, r4 } 802da16: e8bd 4010 ldmia.w sp!, {r4, lr} } if (vb->ident != NULL ) { memp_free(MEMP_SNMP_VALUE, vb->ident); } memp_free(MEMP_SNMP_VARBIND, vb); 802da1a: f7fa bb53 b.w 80280c4 0802da1e : } void snmp_varbind_list_free(struct snmp_varbind_root *root) { 802da1e: b538 push {r3, r4, r5, lr} 802da20: 4604 mov r4, r0 struct snmp_varbind *vb, *prev; vb = root->tail; 802da22: 6840 ldr r0, [r0, #4] while ( vb != NULL ) 802da24: e003 b.n 802da2e { prev = vb->prev; 802da26: 6845 ldr r5, [r0, #4] snmp_varbind_free(vb); 802da28: f7ff ffe7 bl 802d9fa vb = prev; 802da2c: 4628 mov r0, r5 snmp_varbind_list_free(struct snmp_varbind_root *root) { struct snmp_varbind *vb, *prev; vb = root->tail; while ( vb != NULL ) 802da2e: 2800 cmp r0, #0 802da30: d1f9 bne.n 802da26 { prev = vb->prev; snmp_varbind_free(vb); vb = prev; } root->count = 0; 802da32: 7220 strb r0, [r4, #8] root->head = NULL; 802da34: 6020 str r0, [r4, #0] root->tail = NULL; 802da36: 6060 str r0, [r4, #4] 802da38: bd38 pop {r3, r4, r5, pc} 0802da3a : //snmp_coldstart_trap(); } static void snmp_error_response(struct snmp_msg_pstat *msg_ps, u8_t error) { 802da3a: b570 push {r4, r5, r6, lr} 802da3c: 4604 mov r4, r0 /* move names back from outvb to invb */ int v; struct snmp_varbind *vbi = msg_ps->invb.head; struct snmp_varbind *vbo = msg_ps->outvb.head; for (v=0; vvb_idx; v++) { 802da3e: 2200 movs r2, #0 //snmp_coldstart_trap(); } static void snmp_error_response(struct snmp_msg_pstat *msg_ps, u8_t error) { 802da40: 460e mov r6, r1 /* move names back from outvb to invb */ int v; struct snmp_varbind *vbi = msg_ps->invb.head; 802da42: f8d0 0100 ldr.w r0, [r0, #256] ; 0x100 struct snmp_varbind *vbo = msg_ps->outvb.head; 802da46: f8d4 310c ldr.w r3, [r4, #268] ; 0x10c for (v=0; vvb_idx; v++) { vbi->ident_len = vbo->ident_len; vbo->ident_len = 0; 802da4a: 4611 mov r1, r2 { /* move names back from outvb to invb */ int v; struct snmp_varbind *vbi = msg_ps->invb.head; struct snmp_varbind *vbo = msg_ps->outvb.head; for (v=0; vvb_idx; v++) { 802da4c: e008 b.n 802da60 vbi->ident_len = vbo->ident_len; 802da4e: 7a1d ldrb r5, [r3, #8] 802da50: 7205 strb r5, [r0, #8] vbo->ident_len = 0; vbi->ident = vbo->ident; 802da52: 68dd ldr r5, [r3, #12] int v; struct snmp_varbind *vbi = msg_ps->invb.head; struct snmp_varbind *vbo = msg_ps->outvb.head; for (v=0; vvb_idx; v++) { vbi->ident_len = vbo->ident_len; vbo->ident_len = 0; 802da54: 7219 strb r1, [r3, #8] vbi->ident = vbo->ident; 802da56: 60c5 str r5, [r0, #12] vbo->ident = NULL; 802da58: 60d9 str r1, [r3, #12] vbi = vbi->next; 802da5a: 6800 ldr r0, [r0, #0] vbo = vbo->next; 802da5c: 681b ldr r3, [r3, #0] { /* move names back from outvb to invb */ int v; struct snmp_varbind *vbi = msg_ps->invb.head; struct snmp_varbind *vbo = msg_ps->outvb.head; for (v=0; vvb_idx; v++) { 802da5e: 3201 adds r2, #1 802da60: f894 50f8 ldrb.w r5, [r4, #248] ; 0xf8 802da64: 42aa cmp r2, r5 802da66: dbf2 blt.n 802da4e vbo->ident = NULL; vbi = vbi->next; vbo = vbo->next; } /* free outvb */ snmp_varbind_list_free(&msg_ps->outvb); 802da68: f504 7586 add.w r5, r4, #268 ; 0x10c 802da6c: 4628 mov r0, r5 802da6e: f7ff ffd6 bl 802da1e /* we send invb back */ msg_ps->outvb = msg_ps->invb; 802da72: f504 7380 add.w r3, r4, #256 ; 0x100 802da76: e893 0007 ldmia.w r3, {r0, r1, r2} msg_ps->invb.head = NULL; 802da7a: 2300 movs r3, #0 msg_ps->invb.tail = NULL; msg_ps->invb.count = 0; msg_ps->error_status = error; /* error index must be 0 for error too big */ msg_ps->error_index = (error != SNMP_ES_TOOBIG) ? (1 + msg_ps->vb_idx) : 0; 802da7c: 2e01 cmp r6, #1 } /* free outvb */ snmp_varbind_list_free(&msg_ps->outvb); /* we send invb back */ msg_ps->outvb = msg_ps->invb; msg_ps->invb.head = NULL; 802da7e: f8c4 3100 str.w r3, [r4, #256] ; 0x100 msg_ps->invb.tail = NULL; 802da82: f8c4 3104 str.w r3, [r4, #260] ; 0x104 msg_ps->invb.count = 0; 802da86: f884 3108 strb.w r3, [r4, #264] ; 0x108 msg_ps->error_status = error; /* error index must be 0 for error too big */ msg_ps->error_index = (error != SNMP_ES_TOOBIG) ? (1 + msg_ps->vb_idx) : 0; 802da8a: bf18 it ne 802da8c: f894 30f8 ldrbne.w r3, [r4, #248] ; 0xf8 /* we send invb back */ msg_ps->outvb = msg_ps->invb; msg_ps->invb.head = NULL; msg_ps->invb.tail = NULL; msg_ps->invb.count = 0; msg_ps->error_status = error; 802da90: 6126 str r6, [r4, #16] /* error index must be 0 for error too big */ msg_ps->error_index = (error != SNMP_ES_TOOBIG) ? (1 + msg_ps->vb_idx) : 0; 802da92: bf18 it ne 802da94: 3301 addne r3, #1 vbo = vbo->next; } /* free outvb */ snmp_varbind_list_free(&msg_ps->outvb); /* we send invb back */ msg_ps->outvb = msg_ps->invb; 802da96: e885 0007 stmia.w r5, {r0, r1, r2} msg_ps->invb.head = NULL; msg_ps->invb.tail = NULL; msg_ps->invb.count = 0; msg_ps->error_status = error; /* error index must be 0 for error too big */ msg_ps->error_index = (error != SNMP_ES_TOOBIG) ? (1 + msg_ps->vb_idx) : 0; 802da9a: 6163 str r3, [r4, #20] snmp_send_response(msg_ps); 802da9c: 4620 mov r0, r4 802da9e: f001 f873 bl 802eb88 snmp_varbind_list_free(&msg_ps->outvb); 802daa2: 4628 mov r0, r5 802daa4: f7ff ffbb bl 802da1e msg_ps->state = SNMP_MSG_EMPTY; 802daa8: 2300 movs r3, #0 802daaa: f884 305a strb.w r3, [r4, #90] ; 0x5a 802daae: bd70 pop {r4, r5, r6, pc} 0802dab0 : } static void snmp_ok_response(struct snmp_msg_pstat *msg_ps) { 802dab0: b510 push {r4, lr} 802dab2: 4604 mov r4, r0 err_t err_ret; err_ret = snmp_send_response(msg_ps); 802dab4: f001 f868 bl 802eb88 else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event = %"S32_F"\n",msg_ps->error_status)); } /* free varbinds (if available) */ snmp_varbind_list_free(&msg_ps->invb); 802dab8: f504 7080 add.w r0, r4, #256 ; 0x100 802dabc: f7ff ffaf bl 802da1e snmp_varbind_list_free(&msg_ps->outvb); 802dac0: f504 7086 add.w r0, r4, #268 ; 0x10c 802dac4: f7ff ffab bl 802da1e msg_ps->state = SNMP_MSG_EMPTY; 802dac8: 2300 movs r3, #0 802daca: f884 305a strb.w r3, [r4, #90] ; 0x5a 802dace: bd10 pop {r4, pc} 0802dad0 : } void snmp_varbind_tail_add(struct snmp_varbind_root *root, struct snmp_varbind *vb) { if (root->count == 0) 802dad0: 7a03 ldrb r3, [r0, #8] 802dad2: b90b cbnz r3, 802dad8 { /* add first varbind to list */ root->head = vb; 802dad4: 6001 str r1, [r0, #0] 802dad6: e002 b.n 802dade root->tail = vb; } else { /* add nth varbind to list tail */ root->tail->next = vb; 802dad8: 6843 ldr r3, [r0, #4] 802dada: 6019 str r1, [r3, #0] vb->prev = root->tail; 802dadc: 604b str r3, [r1, #4] root->tail = vb; } root->count += 1; 802dade: 7a03 ldrb r3, [r0, #8] else { /* add nth varbind to list tail */ root->tail->next = vb; vb->prev = root->tail; root->tail = vb; 802dae0: 6041 str r1, [r0, #4] } root->count += 1; 802dae2: 3301 adds r3, #1 802dae4: 7203 strb r3, [r0, #8] 802dae6: 4770 bx lr 0802dae8 : * * @param request_id identifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1) */ void snmp_msg_event(u8_t request_id) { 802dae8: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} struct snmp_msg_pstat *msg_ps; if (request_id < SNMP_CONCURRENT_REQUESTS) 802daec: 4605 mov r5, r0 * * @param request_id identifies requests from 0 to (SNMP_CONCURRENT_REQUESTS-1) */ void snmp_msg_event(u8_t request_id) { 802daee: b0a7 sub sp, #156 ; 0x9c struct snmp_msg_pstat *msg_ps; if (request_id < SNMP_CONCURRENT_REQUESTS) 802daf0: 2800 cmp r0, #0 802daf2: f040 8390 bne.w 802e216 { msg_ps = &msg_input_list[request_id]; if (msg_ps->rt == SNMP_ASN1_PDU_GET_NEXT_REQ) 802daf6: 4cb2 ldr r4, [pc, #712] ; (802ddc0 ) 802daf8: 7aa6 ldrb r6, [r4, #10] 802dafa: 2e01 cmp r6, #1 802dafc: f040 80d4 bne.w 802dca8 static void snmp_msg_getnext_event(u8_t request_id, struct snmp_msg_pstat *msg_ps) { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_getnext_event: msg_ps->state==%"U16_F"\n",(u16_t)msg_ps->state)); if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_OBJDEF) 802db00: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 802db04: 2b07 cmp r3, #7 802db06: d125 bne.n 802db54 /* get_object_def() answer*/ en = msg_ps->ext_mib_node; /* translate answer into a known lifeform */ en->get_object_def_a(request_id, 1, &msg_ps->ext_oid.id[msg_ps->ext_oid.len - 1], &msg_ps->ext_object_def); 802db08: f894 2074 ldrb.w r2, [r4, #116] ; 0x74 if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_OBJDEF) { struct mib_external_node *en; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 802db0c: f8d4 805c ldr.w r8, [r4, #92] ; 0x5c /* translate answer into a known lifeform */ en->get_object_def_a(request_id, 1, &msg_ps->ext_oid.id[msg_ps->ext_oid.len - 1], &msg_ps->ext_object_def); 802db10: eb04 0282 add.w r2, r4, r2, lsl #2 802db14: 4631 mov r1, r6 802db16: 3274 adds r2, #116 ; 0x74 802db18: f104 0368 add.w r3, r4, #104 ; 0x68 802db1c: f8d8 7038 ldr.w r7, [r8, #56] ; 0x38 802db20: 47b8 blx r7 if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) 802db22: f894 0068 ldrb.w r0, [r4, #104] ; 0x68 802db26: b148 cbz r0, 802db3c { msg_ps->state = SNMP_MSG_EXTERNAL_GET_VALUE; 802db28: 2308 movs r3, #8 802db2a: f884 305a strb.w r3, [r4, #90] ; 0x5a en->get_value_q(request_id, &msg_ps->ext_object_def); 802db2e: f8d8 302c ldr.w r3, [r8, #44] ; 0x2c 802db32: 4628 mov r0, r5 802db34: f104 0168 add.w r1, r4, #104 ; 0x68 802db38: 4798 blx r3 802db3a: e0a6 b.n 802dc8a } else { en->get_object_def_pc(request_id, 1, &msg_ps->ext_oid.id[msg_ps->ext_oid.len - 1]); 802db3c: f894 2074 ldrb.w r2, [r4, #116] ; 0x74 802db40: f8d8 3048 ldr.w r3, [r8, #72] ; 0x48 802db44: eb04 0282 add.w r2, r4, r2, lsl #2 802db48: 4631 mov r1, r6 802db4a: 3274 adds r2, #116 ; 0x74 802db4c: 4798 blx r3 /* search failed, object id points to unknown object (nosuchname) */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 802db4e: 4620 mov r0, r4 802db50: 2102 movs r1, #2 802db52: e02a b.n 802dbaa } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_VALUE) 802db54: 2b08 cmp r3, #8 802db56: f040 8098 bne.w 802dc8a /* get_value() answer */ en = msg_ps->ext_mib_node; LWIP_ASSERT("invalid length", msg_ps->ext_object_def.v_len <= 0xff); vb = snmp_varbind_alloc(&msg_ps->ext_oid, 802db5a: f104 0074 add.w r0, r4, #116 ; 0x74 802db5e: f894 106a ldrb.w r1, [r4, #106] ; 0x6a 802db62: f894 206c ldrb.w r2, [r4, #108] ; 0x6c { struct mib_external_node *en; struct snmp_varbind *vb; /* get_value() answer */ en = msg_ps->ext_mib_node; 802db66: f8d4 805c ldr.w r8, [r4, #92] ; 0x5c LWIP_ASSERT("invalid length", msg_ps->ext_object_def.v_len <= 0xff); vb = snmp_varbind_alloc(&msg_ps->ext_oid, 802db6a: f7ff ff05 bl 802d978 msg_ps->ext_object_def.asn_type, (u8_t)msg_ps->ext_object_def.v_len); if (vb != NULL) 802db6e: 4607 mov r7, r0 802db70: b1a0 cbz r0, 802db9c { en->get_value_a(request_id, &msg_ps->ext_object_def, vb->value_len, vb->value); 802db72: 697b ldr r3, [r7, #20] 802db74: f8d8 c03c ldr.w ip, [r8, #60] ; 0x3c 802db78: 7c7a ldrb r2, [r7, #17] 802db7a: 4628 mov r0, r5 802db7c: f104 0168 add.w r1, r4, #104 ; 0x68 802db80: 47e0 blx ip snmp_varbind_tail_add(&msg_ps->outvb, vb); 802db82: f504 7086 add.w r0, r4, #268 ; 0x10c 802db86: 4639 mov r1, r7 802db88: f7ff ffa2 bl 802dad0 msg_ps->state = SNMP_MSG_SEARCH_OBJ; msg_ps->vb_idx += 1; 802db8c: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 (u8_t)msg_ps->ext_object_def.v_len); if (vb != NULL) { en->get_value_a(request_id, &msg_ps->ext_object_def, vb->value_len, vb->value); snmp_varbind_tail_add(&msg_ps->outvb, vb); msg_ps->state = SNMP_MSG_SEARCH_OBJ; 802db90: f884 605a strb.w r6, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 802db94: 3301 adds r3, #1 802db96: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 802db9a: e076 b.n 802dc8a } else { en->get_value_pc(request_id, &msg_ps->ext_object_def); 802db9c: f104 0168 add.w r1, r4, #104 ; 0x68 802dba0: f8d8 304c ldr.w r3, [r8, #76] ; 0x4c 802dba4: 4798 blx r3 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_getnext_event: couldn't allocate outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 802dba6: 4620 mov r0, r4 802dba8: 4631 mov r1, r6 802dbaa: f7ff ff46 bl 802da3a 802dbae: e06c b.n 802dc8a (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_obj_id oid; if (msg_ps->vb_idx == 0) 802dbb0: b913 cbnz r3, 802dbb8 { msg_ps->vb_ptr = msg_ps->invb.head; 802dbb2: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 802dbb6: e002 b.n 802dbbe } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 802dbb8: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 802dbbc: 681b ldr r3, [r3, #0] 802dbbe: f8c4 30fc str.w r3, [r4, #252] ; 0xfc } if (snmp_iso_prefix_expand(msg_ps->vb_ptr->ident_len, msg_ps->vb_ptr->ident, &oid)) 802dbc2: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 802dbc6: aa05 add r2, sp, #20 802dbc8: 7a18 ldrb r0, [r3, #8] 802dbca: 68d9 ldr r1, [r3, #12] 802dbcc: f7ff fe82 bl 802d8d4 802dbd0: 2800 cmp r0, #0 802dbd2: f000 82ff beq.w 802e1d4 { if (msg_ps->vb_ptr->ident_len > 3) 802dbd6: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 802dbda: 7a19 ldrb r1, [r3, #8] 802dbdc: 2903 cmp r1, #3 802dbde: d905 bls.n 802dbec { /* can offset ident_len and ident */ mn = snmp_expand_tree((struct mib_node*)&internet, 802dbe0: 68da ldr r2, [r3, #12] 802dbe2: 4878 ldr r0, [pc, #480] ; (802ddc4 ) 802dbe4: 3904 subs r1, #4 802dbe6: b2c9 uxtb r1, r1 802dbe8: 3210 adds r2, #16 802dbea: e002 b.n 802dbf2 msg_ps->vb_ptr->ident + 4, &oid); } else { /* can't offset ident_len -4, ident + 4 */ mn = snmp_expand_tree((struct mib_node*)&internet, 0, NULL, &oid); 802dbec: 2100 movs r1, #0 802dbee: 4875 ldr r0, [pc, #468] ; (802ddc4 ) 802dbf0: 460a mov r2, r1 802dbf2: ab05 add r3, sp, #20 802dbf4: f7ff fc8e bl 802d514 802dbf8: 4605 mov r5, r0 } else { mn = NULL; } if (mn != NULL) 802dbfa: 2800 cmp r0, #0 802dbfc: f000 82ea beq.w 802e1d4 { if (mn->node_type == MIB_NODE_EX) 802dc00: 7c03 ldrb r3, [r0, #16] 802dc02: 2b05 cmp r3, #5 802dc04: d113 bne.n 802dc2e { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; 802dc06: 2307 movs r3, #7 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; 802dc08: 65e0 str r0, [r4, #92] ; 0x5c msg_ps->ext_oid = oid; 802dc0a: a905 add r1, sp, #20 802dc0c: 2284 movs r2, #132 ; 0x84 802dc0e: 486e ldr r0, [pc, #440] ; (802ddc8 ) if (mn->node_type == MIB_NODE_EX) { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; 802dc10: f884 305a strb.w r3, [r4, #90] ; 0x5a /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_oid = oid; 802dc14: f7f3 fcba bl 802158c en->get_object_def_q(en->addr_inf, request_id, 1, &oid.id[oid.len - 1]); 802dc18: f89d 3014 ldrb.w r3, [sp, #20] 802dc1c: 6aae ldr r6, [r5, #40] ; 0x28 802dc1e: 6968 ldr r0, [r5, #20] 802dc20: ad05 add r5, sp, #20 802dc22: 2100 movs r1, #0 802dc24: 2201 movs r2, #1 802dc26: eb05 0383 add.w r3, r5, r3, lsl #2 802dc2a: 47b0 blx r6 802dc2c: e02e b.n 802dc8c { /* internal object */ struct obj_def object_def; struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 802dc2e: 2302 movs r3, #2 mn->get_object_def(1, &oid.id[oid.len - 1], &object_def); 802dc30: f89d 1014 ldrb.w r1, [sp, #20] { /* internal object */ struct obj_def object_def; struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 802dc34: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_object_def(1, &oid.id[oid.len - 1], &object_def); 802dc38: af05 add r7, sp, #20 802dc3a: 6803 ldr r3, [r0, #0] 802dc3c: eb07 0181 add.w r1, r7, r1, lsl #2 802dc40: 2001 movs r0, #1 802dc42: aa02 add r2, sp, #8 802dc44: 4798 blx r3 LWIP_ASSERT("invalid length", object_def.v_len <= 0xff); vb = snmp_varbind_alloc(&oid, object_def.asn_type, (u8_t)object_def.v_len); 802dc46: a805 add r0, sp, #20 802dc48: f89d 100a ldrb.w r1, [sp, #10] 802dc4c: f89d 200c ldrb.w r2, [sp, #12] 802dc50: f7ff fe92 bl 802d978 if (vb != NULL) 802dc54: 4606 mov r6, r0 802dc56: b1a8 cbz r0, 802dc84 { msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; 802dc58: 2303 movs r3, #3 802dc5a: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_value(&object_def, object_def.v_len, vb->value); 802dc5e: 686b ldr r3, [r5, #4] 802dc60: f8bd 100c ldrh.w r1, [sp, #12] 802dc64: 6972 ldr r2, [r6, #20] 802dc66: a802 add r0, sp, #8 802dc68: 4798 blx r3 snmp_varbind_tail_add(&msg_ps->outvb, vb); 802dc6a: 4858 ldr r0, [pc, #352] ; (802ddcc ) 802dc6c: 4631 mov r1, r6 802dc6e: f7ff ff2f bl 802dad0 msg_ps->state = SNMP_MSG_SEARCH_OBJ; 802dc72: 2301 movs r3, #1 802dc74: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 802dc78: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 802dc7c: 3301 adds r3, #1 802dc7e: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 802dc82: e003 b.n 802dc8c } else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_recv couldn't allocate outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 802dc84: 484e ldr r0, [pc, #312] ; (802ddc0 ) 802dc86: 2101 movs r1, #1 802dc88: e2a6 b.n 802e1d8 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_getnext_event: couldn't allocate outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); } } while ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 802dc8a: 4c4d ldr r4, [pc, #308] ; (802ddc0 ) 802dc8c: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 802dc90: 2b01 cmp r3, #1 802dc92: f040 82c0 bne.w 802e216 (msg_ps->vb_idx < msg_ps->invb.count)) 802dc96: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 802dc9a: f894 2108 ldrb.w r2, [r4, #264] ; 0x108 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_getnext_event: couldn't allocate outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); } } while ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 802dc9e: 4293 cmp r3, r2 802dca0: d386 bcc.n 802dbb0 802dca2: e2a7 b.n 802e1f4 } } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && (msg_ps->vb_idx == msg_ps->invb.count)) { snmp_ok_response(msg_ps); 802dca4: 4846 ldr r0, [pc, #280] ; (802ddc0 ) 802dca6: e292 b.n 802e1ce msg_ps = &msg_input_list[request_id]; if (msg_ps->rt == SNMP_ASN1_PDU_GET_NEXT_REQ) { snmp_msg_getnext_event(request_id, msg_ps); } else if (msg_ps->rt == SNMP_ASN1_PDU_GET_REQ) 802dca8: 2e00 cmp r6, #0 802dcaa: f040 8126 bne.w 802defa static void snmp_msg_get_event(u8_t request_id, struct snmp_msg_pstat *msg_ps) { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_get_event: msg_ps->state==%"U16_F"\n",(u16_t)msg_ps->state)); if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_OBJDEF) 802dcae: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 802dcb2: 2b07 cmp r3, #7 802dcb4: d122 bne.n 802dcfc { struct mib_external_node *en; struct snmp_name_ptr np; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 802dcb6: 6de5 ldr r5, [r4, #92] ; 0x5c np = msg_ps->ext_name_ptr; 802dcb8: f894 9060 ldrb.w r9, [r4, #96] ; 0x60 802dcbc: f8d4 8064 ldr.w r8, [r4, #100] ; 0x64 /* translate answer into a known lifeform */ en->get_object_def_a(request_id, np.ident_len, np.ident, &msg_ps->ext_object_def); 802dcc0: 6baf ldr r7, [r5, #56] ; 0x38 802dcc2: f104 0368 add.w r3, r4, #104 ; 0x68 802dcc6: 4649 mov r1, r9 802dcc8: 4642 mov r2, r8 802dcca: 47b8 blx r7 if ((msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) && 802dccc: f894 3068 ldrb.w r3, [r4, #104] ; 0x68 802dcd0: b163 cbz r3, 802dcec (msg_ps->ext_object_def.access & MIB_ACCESS_READ)) 802dcd2: f894 3069 ldrb.w r3, [r4, #105] ; 0x69 en = msg_ps->ext_mib_node; np = msg_ps->ext_name_ptr; /* translate answer into a known lifeform */ en->get_object_def_a(request_id, np.ident_len, np.ident, &msg_ps->ext_object_def); if ((msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) && 802dcd6: 07da lsls r2, r3, #31 802dcd8: d508 bpl.n 802dcec (msg_ps->ext_object_def.access & MIB_ACCESS_READ)) { msg_ps->state = SNMP_MSG_EXTERNAL_GET_VALUE; 802dcda: 2308 movs r3, #8 802dcdc: f884 305a strb.w r3, [r4, #90] ; 0x5a en->get_value_q(request_id, &msg_ps->ext_object_def); 802dce0: 6aeb ldr r3, [r5, #44] ; 0x2c 802dce2: 4630 mov r0, r6 802dce4: f104 0168 add.w r1, r4, #104 ; 0x68 802dce8: 4798 blx r3 802dcea: e0f7 b.n 802dedc } else { en->get_object_def_pc(request_id, np.ident_len, np.ident); 802dcec: 2000 movs r0, #0 802dcee: 4649 mov r1, r9 802dcf0: 6cab ldr r3, [r5, #72] ; 0x48 802dcf2: 4642 mov r2, r8 802dcf4: 4798 blx r3 /* search failed, object id points to unknown object (nosuchname) */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 802dcf6: 4832 ldr r0, [pc, #200] ; (802ddc0 ) 802dcf8: 2102 movs r1, #2 802dcfa: e059 b.n 802ddb0 } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_VALUE) 802dcfc: 2b08 cmp r3, #8 802dcfe: f040 80ed bne.w 802dedc /* get_value() answer */ en = msg_ps->ext_mib_node; /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 802dd02: 200c movs r0, #12 { struct mib_external_node *en; struct snmp_varbind *vb; /* get_value() answer */ en = msg_ps->ext_mib_node; 802dd04: f8d4 805c ldr.w r8, [r4, #92] ; 0x5c /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 802dd08: f7fa f9c6 bl 8028098 if (vb != NULL) 802dd0c: 4605 mov r5, r0 802dd0e: 2800 cmp r0, #0 802dd10: d047 beq.n 802dda2 { vb->next = NULL; 802dd12: 6006 str r6, [r0, #0] vb->prev = NULL; 802dd14: 6046 str r6, [r0, #4] /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 802dd16: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 802dd1a: 68da ldr r2, [r3, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 802dd1c: 7a1b ldrb r3, [r3, #8] { vb->next = NULL; vb->prev = NULL; /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 802dd1e: 60c2 str r2, [r0, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 802dd20: 7203 strb r3, [r0, #8] /* ensure this memory is refereced once only */ msg_ps->vb_ptr->ident = NULL; 802dd22: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc msg_ps->vb_ptr->ident_len = 0; 802dd26: 721e strb r6, [r3, #8] /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; vb->ident_len = msg_ps->vb_ptr->ident_len; /* ensure this memory is refereced once only */ msg_ps->vb_ptr->ident = NULL; 802dd28: 60de str r6, [r3, #12] msg_ps->vb_ptr->ident_len = 0; vb->value_type = msg_ps->ext_object_def.asn_type; 802dd2a: f894 306a ldrb.w r3, [r4, #106] ; 0x6a 802dd2e: 7403 strb r3, [r0, #16] LWIP_ASSERT("invalid length", msg_ps->ext_object_def.v_len <= 0xff); vb->value_len = (u8_t)msg_ps->ext_object_def.v_len; 802dd30: f894 706c ldrb.w r7, [r4, #108] ; 0x6c 802dd34: 7447 strb r7, [r0, #17] if (vb->value_len > 0) 802dd36: b1ef cbz r7, 802dd74 { LWIP_ASSERT("SNMP_MAX_OCTET_STRING_LEN is configured too low", vb->value_len <= SNMP_MAX_VALUE_SIZE); vb->value = memp_malloc(MEMP_SNMP_VALUE); 802dd38: 200d movs r0, #13 802dd3a: f7fa f9ad bl 8028098 802dd3e: 4603 mov r3, r0 802dd40: 6168 str r0, [r5, #20] if (vb->value != NULL) 802dd42: b138 cbz r0, 802dd54 { en->get_value_a(request_id, &msg_ps->ext_object_def, vb->value_len, vb->value); 802dd44: f8d8 703c ldr.w r7, [r8, #60] ; 0x3c 802dd48: 7c6a ldrb r2, [r5, #17] 802dd4a: 4630 mov r0, r6 802dd4c: f104 0168 add.w r1, r4, #104 ; 0x68 802dd50: 47b8 blx r7 802dd52: e018 b.n 802dd86 msg_ps->state = SNMP_MSG_SEARCH_OBJ; msg_ps->vb_idx += 1; } else { en->get_value_pc(request_id, &msg_ps->ext_object_def); 802dd54: f8d8 304c ldr.w r3, [r8, #76] ; 0x4c 802dd58: f104 0168 add.w r1, r4, #104 ; 0x68 802dd5c: 4798 blx r3 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no variable space\n")); msg_ps->vb_ptr->ident = vb->ident; 802dd5e: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 802dd62: 68ea ldr r2, [r5, #12] 802dd64: 60da str r2, [r3, #12] msg_ps->vb_ptr->ident_len = vb->ident_len; 802dd66: 7a2a ldrb r2, [r5, #8] memp_free(MEMP_SNMP_VARBIND, vb); 802dd68: 200c movs r0, #12 else { en->get_value_pc(request_id, &msg_ps->ext_object_def); LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no variable space\n")); msg_ps->vb_ptr->ident = vb->ident; msg_ps->vb_ptr->ident_len = vb->ident_len; 802dd6a: 721a strb r2, [r3, #8] memp_free(MEMP_SNMP_VARBIND, vb); 802dd6c: 4629 mov r1, r5 802dd6e: f7fa f9a9 bl 80280c4 802dd72: e01b b.n 802ddac } } else { /* vb->value_len == 0, empty value (e.g. empty string) */ en->get_value_a(request_id, &msg_ps->ext_object_def, 0, NULL); 802dd74: f8d8 603c ldr.w r6, [r8, #60] ; 0x3c 802dd78: 4638 mov r0, r7 802dd7a: f104 0168 add.w r1, r4, #104 ; 0x68 802dd7e: 463a mov r2, r7 802dd80: 463b mov r3, r7 802dd82: 47b0 blx r6 vb->value = NULL; 802dd84: 616f str r7, [r5, #20] snmp_varbind_tail_add(&msg_ps->outvb, vb); 802dd86: f504 7086 add.w r0, r4, #268 ; 0x10c 802dd8a: 4629 mov r1, r5 802dd8c: f7ff fea0 bl 802dad0 /* search again (if vb_idx < msg_ps->invb.count) */ msg_ps->state = SNMP_MSG_SEARCH_OBJ; 802dd90: 2301 movs r3, #1 802dd92: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 802dd96: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 802dd9a: 3301 adds r3, #1 802dd9c: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 802dda0: e09c b.n 802dedc } } else { en->get_value_pc(request_id, &msg_ps->ext_object_def); 802dda2: f8d8 304c ldr.w r3, [r8, #76] ; 0x4c 802dda6: f104 0168 add.w r1, r4, #104 ; 0x68 802ddaa: 4798 blx r3 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 802ddac: 4620 mov r0, r4 802ddae: 2101 movs r1, #1 802ddb0: f7ff fe43 bl 802da3a 802ddb4: e092 b.n 802dedc (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_name_ptr np; if (msg_ps->vb_idx == 0) 802ddb6: b95b cbnz r3, 802ddd0 { msg_ps->vb_ptr = msg_ps->invb.head; 802ddb8: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 802ddbc: e00b b.n 802ddd6 802ddbe: bf00 nop 802ddc0: 200104f8 .word 0x200104f8 802ddc4: 080382f8 .word 0x080382f8 802ddc8: 2001056c .word 0x2001056c 802ddcc: 20010604 .word 0x20010604 } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 802ddd0: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 802ddd4: 681b ldr r3, [r3, #0] 802ddd6: f8c4 30fc str.w r3, [r4, #252] ; 0xfc } /** test object identifier for .iso.org.dod.internet prefix */ if (snmp_iso_prefix_tst(msg_ps->vb_ptr->ident_len, msg_ps->vb_ptr->ident)) 802ddda: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 802ddde: 7a18 ldrb r0, [r3, #8] 802dde0: 68d9 ldr r1, [r3, #12] 802dde2: f7ff fd65 bl 802d8b0 802dde6: 2800 cmp r0, #0 802dde8: d073 beq.n 802ded2 { mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 802ddea: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 802ddee: 48a6 ldr r0, [pc, #664] ; (802e088 ) 802ddf0: 7a19 ldrb r1, [r3, #8] 802ddf2: 68da ldr r2, [r3, #12] 802ddf4: 3904 subs r1, #4 802ddf6: b2c9 uxtb r1, r1 802ddf8: 3210 adds r2, #16 802ddfa: 466b mov r3, sp 802ddfc: f7ff fb0a bl 802d414 msg_ps->vb_ptr->ident + 4, &np); if (mn != NULL) 802de00: 4606 mov r6, r0 802de02: 2800 cmp r0, #0 802de04: d065 beq.n 802ded2 { if (mn->node_type == MIB_NODE_EX) 802de06: 7c03 ldrb r3, [r0, #16] 802de08: 2b05 cmp r3, #5 802de0a: d110 bne.n 802de2e /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; 802de0c: 65e0 str r0, [r4, #92] ; 0x5c if (mn->node_type == MIB_NODE_EX) { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; 802de0e: 2307 movs r3, #7 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 802de10: e898 0003 ldmia.w r8, {r0, r1} if (mn->node_type == MIB_NODE_EX) { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; 802de14: f884 305a strb.w r3, [r4, #90] ; 0x5a /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 802de18: 4b9c ldr r3, [pc, #624] ; (802e08c ) en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 802de1a: f89d 2000 ldrb.w r2, [sp] struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 802de1e: e883 0003 stmia.w r3, {r0, r1} en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 802de22: 2100 movs r1, #0 802de24: 6ab5 ldr r5, [r6, #40] ; 0x28 802de26: 6970 ldr r0, [r6, #20] 802de28: 9b01 ldr r3, [sp, #4] 802de2a: 47a8 blx r5 802de2c: e058 b.n 802dee0 else { /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 802de2e: 2302 movs r3, #2 802de30: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_object_def(np.ident_len, np.ident, &object_def); 802de34: 6803 ldr r3, [r0, #0] 802de36: 9901 ldr r1, [sp, #4] 802de38: f89d 0000 ldrb.w r0, [sp] 802de3c: aa02 add r2, sp, #8 802de3e: 4798 blx r3 if ((object_def.instance != MIB_OBJECT_NONE) && 802de40: f89d 3008 ldrb.w r3, [sp, #8] 802de44: 2b00 cmp r3, #0 802de46: d044 beq.n 802ded2 (object_def.access & MIB_ACCESS_READ)) 802de48: f89d 3009 ldrb.w r3, [sp, #9] /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; mn->get_object_def(np.ident_len, np.ident, &object_def); if ((object_def.instance != MIB_OBJECT_NONE) && 802de4c: 07db lsls r3, r3, #31 802de4e: f100 81c6 bmi.w 802e1de 802de52: e03e b.n 802ded2 msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); if (vb != NULL) { vb->next = NULL; 802de54: 2200 movs r2, #0 802de56: 602a str r2, [r5, #0] vb->prev = NULL; 802de58: 606a str r2, [r5, #4] /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 802de5a: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 802de5e: 68d9 ldr r1, [r3, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 802de60: 7a1b ldrb r3, [r3, #8] { vb->next = NULL; vb->prev = NULL; /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; 802de62: 60e9 str r1, [r5, #12] vb->ident_len = msg_ps->vb_ptr->ident_len; 802de64: 722b strb r3, [r5, #8] /* ensure this memory is refereced once only */ msg_ps->vb_ptr->ident = NULL; 802de66: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc msg_ps->vb_ptr->ident_len = 0; 802de6a: 721a strb r2, [r3, #8] /* move name from invb to outvb */ vb->ident = msg_ps->vb_ptr->ident; vb->ident_len = msg_ps->vb_ptr->ident_len; /* ensure this memory is refereced once only */ msg_ps->vb_ptr->ident = NULL; 802de6c: 60da str r2, [r3, #12] msg_ps->vb_ptr->ident_len = 0; vb->value_type = object_def.asn_type; 802de6e: f89d 300a ldrb.w r3, [sp, #10] 802de72: 742b strb r3, [r5, #16] LWIP_ASSERT("invalid length", object_def.v_len <= 0xff); vb->value_len = (u8_t)object_def.v_len; 802de74: f89d 300c ldrb.w r3, [sp, #12] 802de78: 746b strb r3, [r5, #17] if (vb->value_len > 0) 802de7a: b1bb cbz r3, 802deac { LWIP_ASSERT("SNMP_MAX_OCTET_STRING_LEN is configured too low", vb->value_len <= SNMP_MAX_VALUE_SIZE); vb->value = memp_malloc(MEMP_SNMP_VALUE); 802de7c: 200d movs r0, #13 802de7e: f7fa f90b bl 8028098 802de82: 4602 mov r2, r0 802de84: 6168 str r0, [r5, #20] if (vb->value != NULL) 802de86: b120 cbz r0, 802de92 { mn->get_value(&object_def, vb->value_len, vb->value); 802de88: 6877 ldr r7, [r6, #4] 802de8a: 7c69 ldrb r1, [r5, #17] 802de8c: a802 add r0, sp, #8 802de8e: 47b8 blx r7 802de90: e00d b.n 802deae msg_ps->vb_idx += 1; } else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: couldn't allocate variable space\n")); msg_ps->vb_ptr->ident = vb->ident; 802de92: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 802de96: 68e9 ldr r1, [r5, #12] 802de98: 60d9 str r1, [r3, #12] msg_ps->vb_ptr->ident_len = vb->ident_len; 802de9a: 7a29 ldrb r1, [r5, #8] vb->ident = NULL; 802de9c: 60e8 str r0, [r5, #12] } else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: couldn't allocate variable space\n")); msg_ps->vb_ptr->ident = vb->ident; msg_ps->vb_ptr->ident_len = vb->ident_len; 802de9e: 7219 strb r1, [r3, #8] vb->ident = NULL; vb->ident_len = 0; 802dea0: 7228 strb r0, [r5, #8] memp_free(MEMP_SNMP_VARBIND, vb); 802dea2: 4629 mov r1, r5 802dea4: 200c movs r0, #12 802dea6: f7fa f90d bl 80280c4 802deaa: e00d b.n 802dec8 } } else { /* vb->value_len == 0, empty value (e.g. empty string) */ vb->value = NULL; 802deac: 616b str r3, [r5, #20] snmp_varbind_tail_add(&msg_ps->outvb, vb); 802deae: 4878 ldr r0, [pc, #480] ; (802e090 ) 802deb0: 4629 mov r1, r5 802deb2: f7ff fe0d bl 802dad0 msg_ps->state = SNMP_MSG_SEARCH_OBJ; 802deb6: 2301 movs r3, #1 802deb8: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 802debc: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 802dec0: 3301 adds r3, #1 802dec2: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 802dec6: e003 b.n 802ded0 } } else { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: couldn't allocate outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); 802dec8: 4872 ldr r0, [pc, #456] ; (802e094 ) 802deca: 2101 movs r1, #1 802decc: f7ff fdb5 bl 802da3a } else { mn = NULL; } if (mn == NULL) 802ded0: b936 cbnz r6, 802dee0 { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 802ded2: 4870 ldr r0, [pc, #448] ; (802e094 ) 802ded4: 2102 movs r1, #2 802ded6: f7ff fdb0 bl 802da3a 802deda: e001 b.n 802dee0 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); } } while ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 802dedc: 4c6d ldr r4, [pc, #436] ; (802e094 ) msg_ps->vb_ptr = msg_ps->vb_ptr->next; } /** test object identifier for .iso.org.dod.internet prefix */ if (snmp_iso_prefix_tst(msg_ps->vb_ptr->ident_len, msg_ps->vb_ptr->ident)) { mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 802dede: 46e8 mov r8, sp LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); } } while ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 802dee0: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 802dee4: 2b01 cmp r3, #1 802dee6: f040 8196 bne.w 802e216 (msg_ps->vb_idx < msg_ps->invb.count)) 802deea: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 802deee: f894 2108 ldrb.w r2, [r4, #264] ; 0x108 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_event: no outvb space\n")); snmp_error_response(msg_ps,SNMP_ES_TOOBIG); } } while ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 802def2: 4293 cmp r3, r2 802def4: f4ff af5f bcc.w 802ddb6 802def8: e17c b.n 802e1f4 } else if (msg_ps->rt == SNMP_ASN1_PDU_GET_REQ) { snmp_msg_get_event(request_id, msg_ps); } else if(msg_ps->rt == SNMP_ASN1_PDU_SET_REQ) 802defa: 2e03 cmp r6, #3 802defc: f040 818b bne.w 802e216 static void snmp_msg_set_event(u8_t request_id, struct snmp_msg_pstat *msg_ps) { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_msg_set_event: msg_ps->state==%"U16_F"\n",(u16_t)msg_ps->state)); if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_OBJDEF) 802df00: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 802df04: 2b07 cmp r3, #7 802df06: d11b bne.n 802df40 { struct mib_external_node *en; struct snmp_name_ptr np; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 802df08: 6de6 ldr r6, [r4, #92] ; 0x5c np = msg_ps->ext_name_ptr; 802df0a: f894 9060 ldrb.w r9, [r4, #96] ; 0x60 802df0e: f8d4 8064 ldr.w r8, [r4, #100] ; 0x64 /* translate answer into a known lifeform */ en->get_object_def_a(request_id, np.ident_len, np.ident, &msg_ps->ext_object_def); 802df12: 6bb7 ldr r7, [r6, #56] ; 0x38 802df14: 4649 mov r1, r9 802df16: 4642 mov r2, r8 802df18: f104 0368 add.w r3, r4, #104 ; 0x68 802df1c: 47b8 blx r7 if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) 802df1e: f894 0068 ldrb.w r0, [r4, #104] ; 0x68 802df22: b140 cbz r0, 802df36 { msg_ps->state = SNMP_MSG_EXTERNAL_SET_TEST; 802df24: 2309 movs r3, #9 802df26: f884 305a strb.w r3, [r4, #90] ; 0x5a en->set_test_q(request_id, &msg_ps->ext_object_def); 802df2a: 6b33 ldr r3, [r6, #48] ; 0x30 802df2c: 4628 mov r0, r5 802df2e: f104 0168 add.w r1, r4, #104 ; 0x68 802df32: 4798 blx r3 802df34: e0d5 b.n 802e0e2 } else { en->get_object_def_pc(request_id, np.ident_len, np.ident); 802df36: 6cb3 ldr r3, [r6, #72] ; 0x48 802df38: 4649 mov r1, r9 802df3a: 4642 mov r2, r8 802df3c: 4798 blx r3 802df3e: e023 b.n 802df88 /* search failed, object id points to unknown object (nosuchname) */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_SET_TEST) 802df40: 2b09 cmp r3, #9 802df42: d124 bne.n 802df8e struct mib_external_node *en; /* set_test() answer*/ en = msg_ps->ext_mib_node; if (msg_ps->ext_object_def.access & MIB_ACCESS_WRITE) 802df44: f894 3069 ldrb.w r3, [r4, #105] ; 0x69 else if (msg_ps->state == SNMP_MSG_EXTERNAL_SET_TEST) { struct mib_external_node *en; /* set_test() answer*/ en = msg_ps->ext_mib_node; 802df48: 6de5 ldr r5, [r4, #92] ; 0x5c if (msg_ps->ext_object_def.access & MIB_ACCESS_WRITE) 802df4a: f003 0302 and.w r3, r3, #2 802df4e: b2db uxtb r3, r3 802df50: b1b3 cbz r3, 802df80 { if ((msg_ps->ext_object_def.asn_type == msg_ps->vb_ptr->value_type) && 802df52: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 802df56: f894 106a ldrb.w r1, [r4, #106] ; 0x6a 802df5a: 7c1a ldrb r2, [r3, #16] 802df5c: 4291 cmp r1, r2 802df5e: d108 bne.n 802df72 (en->set_test_a(request_id,&msg_ps->ext_object_def, 802df60: 7c5a ldrb r2, [r3, #17] 802df62: 6c2e ldr r6, [r5, #64] ; 0x40 802df64: 695b ldr r3, [r3, #20] 802df66: f104 0168 add.w r1, r4, #104 ; 0x68 802df6a: 47b0 blx r6 /* set_test() answer*/ en = msg_ps->ext_mib_node; if (msg_ps->ext_object_def.access & MIB_ACCESS_WRITE) { if ((msg_ps->ext_object_def.asn_type == msg_ps->vb_ptr->value_type) && 802df6c: b108 cbz r0, 802df72 (en->set_test_a(request_id,&msg_ps->ext_object_def, msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value) != 0)) { msg_ps->state = SNMP_MSG_SEARCH_OBJ; 802df6e: 2301 movs r3, #1 802df70: e040 b.n 802dff4 msg_ps->vb_idx += 1; } else { en->set_test_pc(request_id,&msg_ps->ext_object_def); 802df72: 2000 movs r0, #0 802df74: 4948 ldr r1, [pc, #288] ; (802e098 ) 802df76: 6d2b ldr r3, [r5, #80] ; 0x50 802df78: 4798 blx r3 /* bad value */ snmp_error_response(msg_ps,SNMP_ES_BADVALUE); 802df7a: 4846 ldr r0, [pc, #280] ; (802e094 ) 802df7c: 2103 movs r1, #3 802df7e: e029 b.n 802dfd4 } } else { en->set_test_pc(request_id,&msg_ps->ext_object_def); 802df80: 6d2b ldr r3, [r5, #80] ; 0x50 802df82: f104 0168 add.w r1, r4, #104 ; 0x68 802df86: 4798 blx r3 /* object not available for set */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 802df88: 4620 mov r0, r4 802df8a: 2102 movs r1, #2 802df8c: e022 b.n 802dfd4 } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_GET_OBJDEF_S) 802df8e: 2b0a cmp r3, #10 802df90: d123 bne.n 802dfda { struct mib_external_node *en; struct snmp_name_ptr np; /* get_object_def() answer*/ en = msg_ps->ext_mib_node; 802df92: 6de6 ldr r6, [r4, #92] ; 0x5c np = msg_ps->ext_name_ptr; 802df94: f894 9060 ldrb.w r9, [r4, #96] ; 0x60 802df98: f8d4 8064 ldr.w r8, [r4, #100] ; 0x64 /* translate answer into a known lifeform */ en->get_object_def_a(request_id, np.ident_len, np.ident, &msg_ps->ext_object_def); 802df9c: 6bb7 ldr r7, [r6, #56] ; 0x38 802df9e: 4649 mov r1, r9 802dfa0: 4642 mov r2, r8 802dfa2: f104 0368 add.w r3, r4, #104 ; 0x68 802dfa6: 47b8 blx r7 if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) 802dfa8: f894 0068 ldrb.w r0, [r4, #104] ; 0x68 802dfac: b160 cbz r0, 802dfc8 { msg_ps->state = SNMP_MSG_EXTERNAL_SET_VALUE; 802dfae: 230b movs r3, #11 802dfb0: f884 305a strb.w r3, [r4, #90] ; 0x5a en->set_value_q(request_id, &msg_ps->ext_object_def, msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value); 802dfb4: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc /* translate answer into a known lifeform */ en->get_object_def_a(request_id, np.ident_len, np.ident, &msg_ps->ext_object_def); if (msg_ps->ext_object_def.instance != MIB_OBJECT_NONE) { msg_ps->state = SNMP_MSG_EXTERNAL_SET_VALUE; en->set_value_q(request_id, &msg_ps->ext_object_def, 802dfb8: 6b76 ldr r6, [r6, #52] ; 0x34 802dfba: 7c5a ldrb r2, [r3, #17] 802dfbc: 695b ldr r3, [r3, #20] 802dfbe: 4628 mov r0, r5 802dfc0: f104 0168 add.w r1, r4, #104 ; 0x68 802dfc4: 47b0 blx r6 802dfc6: e08c b.n 802e0e2 msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value); } else { en->get_object_def_pc(request_id, np.ident_len, np.ident); 802dfc8: 4649 mov r1, r9 802dfca: 6cb3 ldr r3, [r6, #72] ; 0x48 802dfcc: 4642 mov r2, r8 802dfce: 4798 blx r3 /* set_value failed, object has disappeared for some odd reason?? */ snmp_error_response(msg_ps,SNMP_ES_GENERROR); 802dfd0: 4620 mov r0, r4 802dfd2: 2105 movs r1, #5 802dfd4: f7ff fd31 bl 802da3a 802dfd8: e083 b.n 802e0e2 } } else if (msg_ps->state == SNMP_MSG_EXTERNAL_SET_VALUE) 802dfda: 2b0b cmp r3, #11 802dfdc: f040 8081 bne.w 802e0e2 struct mib_external_node *en; /** set_value_a() */ en = msg_ps->ext_mib_node; en->set_value_a(request_id, &msg_ps->ext_object_def, msg_ps->vb_ptr->value_len, msg_ps->vb_ptr->value); 802dfe0: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc { struct mib_external_node *en; /** set_value_a() */ en = msg_ps->ext_mib_node; en->set_value_a(request_id, &msg_ps->ext_object_def, 802dfe4: 6de2 ldr r2, [r4, #92] ; 0x5c 802dfe6: f104 0168 add.w r1, r4, #104 ; 0x68 802dfea: 6c55 ldr r5, [r2, #68] ; 0x44 802dfec: 7c5a ldrb r2, [r3, #17] 802dfee: 695b ldr r3, [r3, #20] 802dff0: 47a8 blx r5 msg_ps->vb_ptr->value_len, msg_ps->vb_ptr->value); /** @todo use set_value_pc() if toobig */ msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; 802dff2: 2306 movs r3, #6 802dff4: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 802dff8: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 802dffc: 3301 adds r3, #1 802dffe: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 802e002: e06e b.n 802e0e2 (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_name_ptr np; if (msg_ps->vb_idx == 0) 802e004: b912 cbnz r2, 802e00c { msg_ps->vb_ptr = msg_ps->invb.head; 802e006: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 802e00a: e002 b.n 802e012 } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 802e00c: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 802e010: 681b ldr r3, [r3, #0] 802e012: f8c4 30fc str.w r3, [r4, #252] ; 0xfc } /** test object identifier for .iso.org.dod.internet prefix */ if (snmp_iso_prefix_tst(msg_ps->vb_ptr->ident_len, msg_ps->vb_ptr->ident)) 802e016: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 802e01a: 7a18 ldrb r0, [r3, #8] 802e01c: 68d9 ldr r1, [r3, #12] 802e01e: f7ff fc47 bl 802d8b0 802e022: 2800 cmp r0, #0 802e024: d058 beq.n 802e0d8 { mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 802e026: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 802e02a: 4817 ldr r0, [pc, #92] ; (802e088 ) 802e02c: 7a19 ldrb r1, [r3, #8] 802e02e: 68da ldr r2, [r3, #12] 802e030: 3904 subs r1, #4 802e032: b2c9 uxtb r1, r1 802e034: 3210 adds r2, #16 802e036: 466b mov r3, sp 802e038: f7ff f9ec bl 802d414 msg_ps->vb_ptr->ident + 4, &np); if (mn != NULL) 802e03c: 4605 mov r5, r0 802e03e: 2800 cmp r0, #0 802e040: d04a beq.n 802e0d8 { if (mn->node_type == MIB_NODE_EX) 802e042: 7c03 ldrb r3, [r0, #16] 802e044: 2b05 cmp r3, #5 802e046: d110 bne.n 802e06a /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; 802e048: 65e0 str r0, [r4, #92] ; 0x5c if (mn->node_type == MIB_NODE_EX) { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; 802e04a: 2307 movs r3, #7 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 802e04c: e896 0003 ldmia.w r6, {r0, r1} if (mn->node_type == MIB_NODE_EX) { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; 802e050: f884 305a strb.w r3, [r4, #90] ; 0x5a /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 802e054: 4b0d ldr r3, [pc, #52] ; (802e08c ) en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 802e056: f89d 2000 ldrb.w r2, [sp] struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF; /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 802e05a: e883 0003 stmia.w r3, {r0, r1} en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 802e05e: 2100 movs r1, #0 802e060: 6aaf ldr r7, [r5, #40] ; 0x28 802e062: 6968 ldr r0, [r5, #20] 802e064: 9b01 ldr r3, [sp, #4] 802e066: 47b8 blx r7 802e068: e03d b.n 802e0e6 else { /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF; 802e06a: 2702 movs r7, #2 802e06c: f884 705a strb.w r7, [r4, #90] ; 0x5a mn->get_object_def(np.ident_len, np.ident, &object_def); 802e070: 6803 ldr r3, [r0, #0] 802e072: 9901 ldr r1, [sp, #4] 802e074: f89d 0000 ldrb.w r0, [sp] 802e078: aa02 add r2, sp, #8 802e07a: 4798 blx r3 if (object_def.instance != MIB_OBJECT_NONE) 802e07c: f89d 3008 ldrb.w r3, [sp, #8] 802e080: 2b00 cmp r3, #0 802e082: f040 80b9 bne.w 802e1f8 802e086: e027 b.n 802e0d8 802e088: 080382f8 .word 0x080382f8 802e08c: 20010558 .word 0x20010558 802e090: 20010604 .word 0x20010604 802e094: 200104f8 .word 0x200104f8 802e098: 20010560 .word 0x20010560 { msg_ps->state = SNMP_MSG_INTERNAL_SET_TEST; if (object_def.access & MIB_ACCESS_WRITE) { if ((object_def.asn_type == msg_ps->vb_ptr->value_type) && 802e09c: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 802e0a0: f89d 100a ldrb.w r1, [sp, #10] 802e0a4: 7c1a ldrb r2, [r3, #16] 802e0a6: 4291 cmp r1, r2 802e0a8: d10e bne.n 802e0c8 (mn->set_test(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value) != 0)) 802e0aa: 68af ldr r7, [r5, #8] 802e0ac: 7c59 ldrb r1, [r3, #17] 802e0ae: 695a ldr r2, [r3, #20] 802e0b0: a802 add r0, sp, #8 802e0b2: 47b8 blx r7 { msg_ps->state = SNMP_MSG_INTERNAL_SET_TEST; if (object_def.access & MIB_ACCESS_WRITE) { if ((object_def.asn_type == msg_ps->vb_ptr->value_type) && 802e0b4: b140 cbz r0, 802e0c8 (mn->set_test(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value) != 0)) { msg_ps->state = SNMP_MSG_SEARCH_OBJ; 802e0b6: 2301 movs r3, #1 802e0b8: f884 305a strb.w r3, [r4, #90] ; 0x5a msg_ps->vb_idx += 1; 802e0bc: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 802e0c0: 3301 adds r3, #1 802e0c2: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 802e0c6: e006 b.n 802e0d6 } else { /* bad value */ snmp_error_response(msg_ps,SNMP_ES_BADVALUE); 802e0c8: 4854 ldr r0, [pc, #336] ; (802e21c ) 802e0ca: 2103 movs r1, #3 802e0cc: e001 b.n 802e0d2 } } else { /* object not available for set */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 802e0ce: 4853 ldr r0, [pc, #332] ; (802e21c ) 802e0d0: 4639 mov r1, r7 802e0d2: f7ff fcb2 bl 802da3a } else { mn = NULL; } if (mn == NULL) 802e0d6: b935 cbnz r5, 802e0e6 { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 802e0d8: 4850 ldr r0, [pc, #320] ; (802e21c ) 802e0da: 2102 movs r1, #2 802e0dc: f7ff fcad bl 802da3a 802e0e0: e001 b.n 802e0e6 msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; msg_ps->vb_idx += 1; } /* test all values before setting */ while ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 802e0e2: 4c4e ldr r4, [pc, #312] ; (802e21c ) msg_ps->vb_ptr = msg_ps->vb_ptr->next; } /** test object identifier for .iso.org.dod.internet prefix */ if (snmp_iso_prefix_tst(msg_ps->vb_ptr->ident_len, msg_ps->vb_ptr->ident)) { mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 802e0e4: 466e mov r6, sp msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; msg_ps->vb_idx += 1; } /* test all values before setting */ while ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 802e0e6: f894 205a ldrb.w r2, [r4, #90] ; 0x5a 802e0ea: 4b4c ldr r3, [pc, #304] ; (802e21c ) 802e0ec: 2a01 cmp r2, #1 802e0ee: d151 bne.n 802e194 (msg_ps->vb_idx < msg_ps->invb.count)) 802e0f0: f894 20f8 ldrb.w r2, [r4, #248] ; 0xf8 802e0f4: f894 1108 ldrb.w r1, [r4, #264] ; 0x108 msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; msg_ps->vb_idx += 1; } /* test all values before setting */ while ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 802e0f8: 428a cmp r2, r1 802e0fa: d383 bcc.n 802e004 802e0fc: e088 b.n 802e210 } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && (msg_ps->vb_idx == msg_ps->invb.count)) { msg_ps->vb_idx = 0; 802e0fe: 2200 movs r2, #0 802e100: f883 20f8 strb.w r2, [r3, #248] ; 0xf8 msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; 802e104: 2206 movs r2, #6 802e106: f883 205a strb.w r2, [r3, #90] ; 0x5a 802e10a: e043 b.n 802e194 (msg_ps->vb_idx < msg_ps->invb.count)) { struct mib_node *mn; struct snmp_name_ptr np; if (msg_ps->vb_idx == 0) 802e10c: b913 cbnz r3, 802e114 { msg_ps->vb_ptr = msg_ps->invb.head; 802e10e: f8d4 3100 ldr.w r3, [r4, #256] ; 0x100 802e112: e002 b.n 802e11a } else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; 802e114: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 802e118: 681b ldr r3, [r3, #0] 802e11a: f8c4 30fc str.w r3, [r4, #252] ; 0xfc } /* skip iso prefix test, was done previously while settesting() */ mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 802e11e: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 802e122: 483f ldr r0, [pc, #252] ; (802e220 ) 802e124: 7a19 ldrb r1, [r3, #8] 802e126: 68da ldr r2, [r3, #12] 802e128: 3904 subs r1, #4 802e12a: b2c9 uxtb r1, r1 802e12c: 3210 adds r2, #16 802e12e: 466b mov r3, sp 802e130: f7ff f970 bl 802d414 msg_ps->vb_ptr->ident + 4, &np); /* check if object is still available (e.g. external hot-plug thingy present?) */ if (mn != NULL) 802e134: 4605 mov r5, r0 802e136: 2800 cmp r0, #0 802e138: d02e beq.n 802e198 { if (mn->node_type == MIB_NODE_EX) 802e13a: 7c03 ldrb r3, [r0, #16] 802e13c: 2b05 cmp r3, #5 802e13e: d110 bne.n 802e162 /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF_S; /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; 802e140: 65e0 str r0, [r4, #92] ; 0x5c if (mn->node_type == MIB_NODE_EX) { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF_S; 802e142: 230a movs r3, #10 /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 802e144: e896 0003 ldmia.w r6, {r0, r1} if (mn->node_type == MIB_NODE_EX) { /* external object */ struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF_S; 802e148: f884 305a strb.w r3, [r4, #90] ; 0x5a /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 802e14c: 4b35 ldr r3, [pc, #212] ; (802e224 ) en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 802e14e: f89d 2000 ldrb.w r2, [sp] struct mib_external_node *en = (struct mib_external_node*)mn; msg_ps->state = SNMP_MSG_EXTERNAL_GET_OBJDEF_S; /* save en && args in msg_ps!! */ msg_ps->ext_mib_node = en; msg_ps->ext_name_ptr = np; 802e152: e883 0003 stmia.w r3, {r0, r1} en->get_object_def_q(en->addr_inf, request_id, np.ident_len, np.ident); 802e156: 2100 movs r1, #0 802e158: 6aaf ldr r7, [r5, #40] ; 0x28 802e15a: 6968 ldr r0, [r5, #20] 802e15c: 9b01 ldr r3, [sp, #4] 802e15e: 47b8 blx r7 802e160: e01a b.n 802e198 else { /* internal object */ struct obj_def object_def; msg_ps->state = SNMP_MSG_INTERNAL_GET_OBJDEF_S; 802e162: 2305 movs r3, #5 802e164: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->get_object_def(np.ident_len, np.ident, &object_def); 802e168: 6803 ldr r3, [r0, #0] 802e16a: 9901 ldr r1, [sp, #4] 802e16c: f89d 0000 ldrb.w r0, [sp] 802e170: aa02 add r2, sp, #8 802e172: 4798 blx r3 msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; 802e174: 2306 movs r3, #6 802e176: f884 305a strb.w r3, [r4, #90] ; 0x5a mn->set_value(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value); 802e17a: f8d4 30fc ldr.w r3, [r4, #252] ; 0xfc 802e17e: 68ed ldr r5, [r5, #12] 802e180: 7c59 ldrb r1, [r3, #17] 802e182: 695a ldr r2, [r3, #20] 802e184: a802 add r0, sp, #8 802e186: 47a8 blx r5 msg_ps->vb_idx += 1; 802e188: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 802e18c: 3301 adds r3, #1 802e18e: f884 30f8 strb.w r3, [r4, #248] ; 0xf8 802e192: e001 b.n 802e198 msg_ps->vb_idx = 0; msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; } /* set all values "atomically" (be as "atomic" as possible) */ while ((msg_ps->state == SNMP_MSG_INTERNAL_SET_VALUE) && 802e194: 4c21 ldr r4, [pc, #132] ; (802e21c ) else { msg_ps->vb_ptr = msg_ps->vb_ptr->next; } /* skip iso prefix test, was done previously while settesting() */ mn = snmp_search_tree((struct mib_node*)&internet, msg_ps->vb_ptr->ident_len - 4, 802e196: 466e mov r6, sp msg_ps->vb_idx = 0; msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; } /* set all values "atomically" (be as "atomic" as possible) */ while ((msg_ps->state == SNMP_MSG_INTERNAL_SET_VALUE) && 802e198: f894 305a ldrb.w r3, [r4, #90] ; 0x5a 802e19c: 4d1f ldr r5, [pc, #124] ; (802e21c ) 802e19e: 2b06 cmp r3, #6 802e1a0: d139 bne.n 802e216 (msg_ps->vb_idx < msg_ps->invb.count)) 802e1a2: f894 30f8 ldrb.w r3, [r4, #248] ; 0xf8 802e1a6: f894 2108 ldrb.w r2, [r4, #264] ; 0x108 msg_ps->vb_idx = 0; msg_ps->state = SNMP_MSG_INTERNAL_SET_VALUE; } /* set all values "atomically" (be as "atomic" as possible) */ while ((msg_ps->state == SNMP_MSG_INTERNAL_SET_VALUE) && 802e1aa: 4293 cmp r3, r2 802e1ac: d3ae bcc.n 802e10c 802e1ae: e031 b.n 802e214 (msg_ps->vb_idx == msg_ps->invb.count)) { /* simply echo the input if we can set it @todo do we need to return the actual value? e.g. if value is silently modified or behaves sticky? */ msg_ps->outvb = msg_ps->invb; 802e1b0: f505 7280 add.w r2, r5, #256 ; 0x100 802e1b4: ca07 ldmia r2, {r0, r1, r2} 802e1b6: f505 7386 add.w r3, r5, #268 ; 0x10c 802e1ba: e883 0007 stmia.w r3, {r0, r1, r2} msg_ps->invb.head = NULL; 802e1be: 2300 movs r3, #0 802e1c0: f8c5 3100 str.w r3, [r5, #256] ; 0x100 msg_ps->invb.tail = NULL; 802e1c4: f8c5 3104 str.w r3, [r5, #260] ; 0x104 msg_ps->invb.count = 0; 802e1c8: f885 3108 strb.w r3, [r5, #264] ; 0x108 snmp_ok_response(msg_ps); 802e1cc: 4628 mov r0, r5 802e1ce: f7ff fc6f bl 802dab0 802e1d2: e020 b.n 802e216 } } if (mn == NULL) { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); 802e1d4: 4811 ldr r0, [pc, #68] ; (802e21c ) 802e1d6: 2102 movs r1, #2 802e1d8: f7ff fc2f bl 802da3a 802e1dc: e556 b.n 802dc8c } if (mn != NULL) { struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; 802e1de: 2303 movs r3, #3 /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 802e1e0: 200c movs r0, #12 } if (mn != NULL) { struct snmp_varbind *vb; msg_ps->state = SNMP_MSG_INTERNAL_GET_VALUE; 802e1e2: f884 305a strb.w r3, [r4, #90] ; 0x5a /* allocate output varbind */ vb = (struct snmp_varbind *)memp_malloc(MEMP_SNMP_VARBIND); 802e1e6: f7f9 ff57 bl 8028098 if (vb != NULL) 802e1ea: 4605 mov r5, r0 802e1ec: 2800 cmp r0, #0 802e1ee: f47f ae31 bne.w 802de54 802e1f2: e669 b.n 802dec8 { /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); } } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 802e1f4: d10f bne.n 802e216 802e1f6: e555 b.n 802dca4 /* search failed, object id points to unknown object (nosuchname) */ mn = NULL; } if (mn != NULL) { msg_ps->state = SNMP_MSG_INTERNAL_SET_TEST; 802e1f8: 2304 movs r3, #4 802e1fa: f884 305a strb.w r3, [r4, #90] ; 0x5a if (object_def.access & MIB_ACCESS_WRITE) 802e1fe: f89d 3009 ldrb.w r3, [sp, #9] 802e202: f003 0302 and.w r3, r3, #2 802e206: b2db uxtb r3, r3 802e208: 2b00 cmp r3, #0 802e20a: f47f af47 bne.w 802e09c 802e20e: e75e b.n 802e0ce /* mn == NULL, noSuchName */ snmp_error_response(msg_ps,SNMP_ES_NOSUCHNAME); } } if ((msg_ps->state == SNMP_MSG_SEARCH_OBJ) && 802e210: d1c0 bne.n 802e194 802e212: e774 b.n 802e0fe mn->set_value(&object_def,msg_ps->vb_ptr->value_len,msg_ps->vb_ptr->value); msg_ps->vb_idx += 1; } } } if ((msg_ps->state == SNMP_MSG_INTERNAL_SET_VALUE) && 802e214: d0cc beq.n 802e1b0 else if(msg_ps->rt == SNMP_ASN1_PDU_SET_REQ) { snmp_msg_set_event(request_id, msg_ps); } } } 802e216: b027 add sp, #156 ; 0x9c 802e218: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 802e21c: 200104f8 .word 0x200104f8 802e220: 080382f8 .word 0x080382f8 802e224: 20010558 .word 0x20010558 0802e228 : return ERR_OK; } static err_t snmp_pdu_dec_varbindlist(struct pbuf *p, u16_t ofs, u16_t *ofs_ret, struct snmp_msg_pstat *m_stat) { 802e228: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} 802e22c: b0c7 sub sp, #284 ; 0x11c u16_t len, vb_len; u8_t len_octets; u8_t type; /* variable binding list */ snmp_asn1_dec_type(p, ofs, &type); 802e22e: f10d 070b add.w r7, sp, #11 return ERR_OK; } static err_t snmp_pdu_dec_varbindlist(struct pbuf *p, u16_t ofs, u16_t *ofs_ret, struct snmp_msg_pstat *m_stat) { 802e232: 468a mov sl, r1 802e234: 4691 mov r9, r2 u16_t len, vb_len; u8_t len_octets; u8_t type; /* variable binding list */ snmp_asn1_dec_type(p, ofs, &type); 802e236: 463a mov r2, r7 return ERR_OK; } static err_t snmp_pdu_dec_varbindlist(struct pbuf *p, u16_t ofs, u16_t *ofs_ret, struct snmp_msg_pstat *m_stat) { 802e238: 4604 mov r4, r0 802e23a: 461d mov r5, r3 u8_t len_octets; u8_t type; /* variable binding list */ snmp_asn1_dec_type(p, ofs, &type); derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &vb_len); 802e23c: f10d 060e add.w r6, sp, #14 u16_t len, vb_len; u8_t len_octets; u8_t type; /* variable binding list */ snmp_asn1_dec_type(p, ofs, &type); 802e240: f7fd f944 bl 802b4cc derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &vb_len); 802e244: f10a 0101 add.w r1, sl, #1 802e248: 4620 mov r0, r4 802e24a: b289 uxth r1, r1 802e24c: f10d 020a add.w r2, sp, #10 802e250: 4633 mov r3, r6 802e252: f7fd f950 bl 802b4f6 if ((derr != ERR_OK) || 802e256: b910 cbnz r0, 802e25e 802e258: 783b ldrb r3, [r7, #0] 802e25a: 2b30 cmp r3, #48 ; 0x30 802e25c: d002 beq.n 802e264 (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ))) { snmp_inc_snmpinasnparseerrs(); 802e25e: f7fe ff21 bl 802d0a4 802e262: e02b b.n 802e2bc return ERR_ARG; } ofs += (1 + len_octets); 802e264: f89d 800a ldrb.w r8, [sp, #10] /* start with empty list */ m_stat->invb.count = 0; 802e268: f885 0108 strb.w r0, [r5, #264] ; 0x108 (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ))) { snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets); 802e26c: f108 0801 add.w r8, r8, #1 802e270: 44d0 add r8, sl 802e272: fa1f f888 uxth.w r8, r8 /* start with empty list */ m_stat->invb.count = 0; m_stat->invb.head = NULL; 802e276: f8c5 0100 str.w r0, [r5, #256] ; 0x100 m_stat->invb.tail = NULL; 802e27a: f8c5 0104 str.w r0, [r5, #260] ; 0x104 while (vb_len > 0) 802e27e: e118 b.n 802e4b2 { struct snmp_obj_id oid, oid_value; struct snmp_varbind *vb; snmp_asn1_dec_type(p, ofs, &type); 802e280: 4641 mov r1, r8 802e282: 463a mov r2, r7 802e284: 4620 mov r0, r4 802e286: f7fd f921 bl 802b4cc derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 802e28a: f108 0101 add.w r1, r8, #1 802e28e: 4620 mov r0, r4 802e290: b289 uxth r1, r1 802e292: f10d 020a add.w r2, sp, #10 802e296: ab03 add r3, sp, #12 802e298: f7fd f92d bl 802b4f6 if ((derr != ERR_OK) || 802e29c: b940 cbnz r0, 802e2b0 802e29e: 783b ldrb r3, [r7, #0] 802e2a0: 2b30 cmp r3, #48 ; 0x30 802e2a2: d105 bne.n 802e2b0 (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)) || (len == 0) || (len > vb_len)) 802e2a4: f8bd 200c ldrh.w r2, [sp, #12] struct snmp_varbind *vb; snmp_asn1_dec_type(p, ofs, &type); derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)) || 802e2a8: b112 cbz r2, 802e2b0 (len == 0) || (len > vb_len)) 802e2aa: 8833 ldrh r3, [r6, #0] 802e2ac: 429a cmp r2, r3 802e2ae: d907 bls.n 802e2c0 { snmp_inc_snmpinasnparseerrs(); 802e2b0: f7fe fef8 bl 802d0a4 /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); 802e2b4: f505 7080 add.w r0, r5, #256 ; 0x100 802e2b8: f7ff fbb1 bl 802da1e 802e2bc: 20f2 movs r0, #242 ; 0xf2 802e2be: e109 b.n 802e4d4 return ERR_ARG; } ofs += (1 + len_octets); 802e2c0: f89d 200a ldrb.w r2, [sp, #10] 802e2c4: 4490 add r8, r2 802e2c6: fa1f f888 uxth.w r8, r8 802e2ca: f108 0a01 add.w sl, r8, #1 vb_len -= (1 + len_octets); 802e2ce: 43d2 mvns r2, r2 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets); 802e2d0: fa1f fa8a uxth.w sl, sl vb_len -= (1 + len_octets); 802e2d4: 189b adds r3, r3, r2 snmp_asn1_dec_type(p, ofs, &type); 802e2d6: 4651 mov r1, sl 802e2d8: 463a mov r2, r7 802e2da: 4620 mov r0, r4 /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets); vb_len -= (1 + len_octets); 802e2dc: 8033 strh r3, [r6, #0] snmp_asn1_dec_type(p, ofs, &type); 802e2de: f7fd f8f5 bl 802b4cc derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 802e2e2: f108 0102 add.w r1, r8, #2 802e2e6: 4620 mov r0, r4 802e2e8: b289 uxth r1, r1 802e2ea: f10d 020a add.w r2, sp, #10 802e2ee: ab03 add r3, sp, #12 802e2f0: f7fd f901 bl 802b4f6 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID))) 802e2f4: 2800 cmp r0, #0 802e2f6: d1db bne.n 802e2b0 802e2f8: 783b ldrb r3, [r7, #0] 802e2fa: 2b06 cmp r3, #6 802e2fc: d1d8 bne.n 802e2b0 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } derr = snmp_asn1_dec_oid(p, ofs + 1 + len_octets, len, &oid); 802e2fe: f89d 100a ldrb.w r1, [sp, #10] 802e302: f8bd 200c ldrh.w r2, [sp, #12] 802e306: 3101 adds r1, #1 802e308: 4451 add r1, sl 802e30a: 4620 mov r0, r4 802e30c: b289 uxth r1, r1 802e30e: ab04 add r3, sp, #16 802e310: f7fd fa20 bl 802b754 if (derr != ERR_OK) 802e314: 2800 cmp r0, #0 802e316: d1cb bne.n 802e2b0 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); 802e318: f89d 300a ldrb.w r3, [sp, #10] 802e31c: f8bd 200c ldrh.w r2, [sp, #12] 802e320: 1899 adds r1, r3, r2 802e322: 448a add sl, r1 802e324: fa1f fa8a uxth.w sl, sl vb_len -= (1 + len_octets + len); 802e328: 8831 ldrh r1, [r6, #0] snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); 802e32a: f10a 0801 add.w r8, sl, #1 vb_len -= (1 + len_octets + len); 802e32e: 1a8a subs r2, r1, r2 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); 802e330: fa1f f888 uxth.w r8, r8 vb_len -= (1 + len_octets + len); 802e334: 43db mvns r3, r3 802e336: 18d3 adds r3, r2, r3 snmp_asn1_dec_type(p, ofs, &type); 802e338: 4641 mov r1, r8 802e33a: 463a mov r2, r7 802e33c: 4620 mov r0, r4 /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); vb_len -= (1 + len_octets + len); 802e33e: 8033 strh r3, [r6, #0] snmp_asn1_dec_type(p, ofs, &type); 802e340: f7fd f8c4 bl 802b4cc derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 802e344: f10a 0102 add.w r1, sl, #2 802e348: 4620 mov r0, r4 802e34a: b289 uxth r1, r1 802e34c: f10d 020a add.w r2, sp, #10 802e350: ab03 add r3, sp, #12 802e352: f7fd f8d0 bl 802b4f6 if (derr != ERR_OK) 802e356: 2800 cmp r0, #0 802e358: d1aa bne.n 802e2b0 /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } switch (type) 802e35a: 7839 ldrb r1, [r7, #0] 802e35c: 2906 cmp r1, #6 802e35e: d047 beq.n 802e3f0 802e360: d805 bhi.n 802e36e 802e362: 2904 cmp r1, #4 802e364: d036 beq.n 802e3d4 802e366: d839 bhi.n 802e3dc 802e368: 2902 cmp r1, #2 802e36a: d1a1 bne.n 802e2b0 802e36c: e009 b.n 802e382 802e36e: 2943 cmp r1, #67 ; 0x43 802e370: d804 bhi.n 802e37c 802e372: 2941 cmp r1, #65 ; 0x41 802e374: d219 bcs.n 802e3aa 802e376: 2940 cmp r1, #64 ; 0x40 802e378: d19a bne.n 802e2b0 802e37a: e069 b.n 802e450 802e37c: 2944 cmp r1, #68 ; 0x44 802e37e: d197 bne.n 802e2b0 802e380: e028 b.n 802e3d4 { case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG): vb = snmp_varbind_alloc(&oid, type, sizeof(s32_t)); 802e382: a804 add r0, sp, #16 802e384: 2204 movs r2, #4 802e386: f7ff faf7 bl 802d978 if (vb != NULL) 802e38a: 4683 mov fp, r0 802e38c: 2800 cmp r0, #0 802e38e: d08f beq.n 802e2b0 { s32_t *vptr = (s32_t*)vb->value; derr = snmp_asn1_dec_s32t(p, ofs + 1 + len_octets, len, vptr); 802e390: f89d 100a ldrb.w r1, [sp, #10] 802e394: f8bd 200c ldrh.w r2, [sp, #12] 802e398: f8db 3014 ldr.w r3, [fp, #20] 802e39c: 3101 adds r1, #1 802e39e: 4441 add r1, r8 802e3a0: 4620 mov r0, r4 802e3a2: b289 uxth r1, r1 802e3a4: f7fd f97d bl 802b6a2 802e3a8: e06b b.n 802e482 } break; case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_GAUGE): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS): vb = snmp_varbind_alloc(&oid, type, sizeof(u32_t)); 802e3aa: a804 add r0, sp, #16 802e3ac: 2204 movs r2, #4 802e3ae: f7ff fae3 bl 802d978 if (vb != NULL) 802e3b2: 4683 mov fp, r0 802e3b4: 2800 cmp r0, #0 802e3b6: f43f af7b beq.w 802e2b0 { u32_t *vptr = (u32_t*)vb->value; derr = snmp_asn1_dec_u32t(p, ofs + 1 + len_octets, len, vptr); 802e3ba: f89d 100a ldrb.w r1, [sp, #10] 802e3be: f8bd 200c ldrh.w r2, [sp, #12] 802e3c2: f8db 3014 ldr.w r3, [fp, #20] 802e3c6: 3101 adds r1, #1 802e3c8: 4441 add r1, r8 802e3ca: 4620 mov r0, r4 802e3cc: b289 uxth r1, r1 802e3ce: f7fd f914 bl 802b5fa 802e3d2: e056 b.n 802e482 } break; case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_OPAQUE): LWIP_ASSERT("invalid length", len <= 0xff); vb = snmp_varbind_alloc(&oid, type, (u8_t)len); 802e3d4: a804 add r0, sp, #16 802e3d6: f89d 200c ldrb.w r2, [sp, #12] 802e3da: e03f b.n 802e45c { derr = ERR_ARG; } break; case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_NUL): vb = snmp_varbind_alloc(&oid, type, 0); 802e3dc: 2105 movs r1, #5 802e3de: a804 add r0, sp, #16 802e3e0: 2200 movs r2, #0 802e3e2: f7ff fac9 bl 802d978 if (vb != NULL) 802e3e6: 4601 mov r1, r0 802e3e8: 2800 cmp r0, #0 802e3ea: f43f af61 beq.w 802e2b0 802e3ee: e02a b.n 802e446 { derr = ERR_ARG; } break; case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID): derr = snmp_asn1_dec_oid(p, ofs + 1 + len_octets, len, &oid_value); 802e3f0: f89d 100a ldrb.w r1, [sp, #10] 802e3f4: f8bd 200c ldrh.w r2, [sp, #12] 802e3f8: 3101 adds r1, #1 802e3fa: 4441 add r1, r8 802e3fc: 4620 mov r0, r4 802e3fe: b289 uxth r1, r1 802e400: ab25 add r3, sp, #148 ; 0x94 802e402: f7fd f9a7 bl 802b754 if (derr == ERR_OK) 802e406: 2800 cmp r0, #0 802e408: f47f af52 bne.w 802e2b0 { vb = snmp_varbind_alloc(&oid, type, oid_value.len * sizeof(s32_t)); 802e40c: f89d 2094 ldrb.w r2, [sp, #148] ; 0x94 802e410: 7839 ldrb r1, [r7, #0] 802e412: 0092 lsls r2, r2, #2 802e414: a804 add r0, sp, #16 802e416: f002 02fc and.w r2, r2, #252 ; 0xfc 802e41a: f7ff faad bl 802d978 if (vb != NULL) 802e41e: 4601 mov r1, r0 802e420: 2800 cmp r0, #0 802e422: f43f af45 beq.w 802e2b0 { u8_t i = oid_value.len; 802e426: f89d 3094 ldrb.w r3, [sp, #148] ; 0x94 s32_t *vptr = (s32_t*)vb->value; 802e42a: 6940 ldr r0, [r0, #20] while(i > 0) 802e42c: e009 b.n 802e442 { i--; 802e42e: 3b01 subs r3, #1 802e430: b2db uxtb r3, r3 vptr[i] = oid_value.id[i]; 802e432: f50d 7e8c add.w lr, sp, #280 ; 0x118 802e436: eb0e 0283 add.w r2, lr, r3, lsl #2 802e43a: f852 2c80 ldr.w r2, [r2, #-128] 802e43e: f840 2023 str.w r2, [r0, r3, lsl #2] if (vb != NULL) { u8_t i = oid_value.len; s32_t *vptr = (s32_t*)vb->value; while(i > 0) 802e442: 2b00 cmp r3, #0 802e444: d1f3 bne.n 802e42e { i--; vptr[i] = oid_value.id[i]; } snmp_varbind_tail_add(&m_stat->invb, vb); 802e446: f505 7080 add.w r0, r5, #256 ; 0x100 802e44a: f7ff fb41 bl 802dad0 802e44e: e022 b.n 802e496 derr = ERR_ARG; } } break; case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR): if (len == 4) 802e450: f8bd 200c ldrh.w r2, [sp, #12] 802e454: 2a04 cmp r2, #4 802e456: f47f af2b bne.w 802e2b0 { /* must be exactly 4 octets! */ vb = snmp_varbind_alloc(&oid, type, 4); 802e45a: a804 add r0, sp, #16 802e45c: f7ff fa8c bl 802d978 if (vb != NULL) 802e460: 4683 mov fp, r0 802e462: 2800 cmp r0, #0 802e464: f43f af24 beq.w 802e2b0 { derr = snmp_asn1_dec_raw(p, ofs + 1 + len_octets, len, vb->value_len, (u8_t*)vb->value); 802e468: f89d 100a ldrb.w r1, [sp, #10] 802e46c: 7c43 ldrb r3, [r0, #17] 802e46e: 6940 ldr r0, [r0, #20] 802e470: f8bd 200c ldrh.w r2, [sp, #12] 802e474: 9000 str r0, [sp, #0] 802e476: 3101 adds r1, #1 802e478: 4441 add r1, r8 802e47a: 4620 mov r0, r4 802e47c: b289 uxth r1, r1 802e47e: f7fd fa05 bl 802b88c 802e482: 4682 mov sl, r0 snmp_varbind_tail_add(&m_stat->invb, vb); 802e484: 4659 mov r1, fp 802e486: f505 7080 add.w r0, r5, #256 ; 0x100 802e48a: f7ff fb21 bl 802dad0 break; default: derr = ERR_ARG; break; } if (derr != ERR_OK) 802e48e: f1ba 0f00 cmp.w sl, #0 802e492: f47f af0d bne.w 802e2b0 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); 802e496: f8bd 200c ldrh.w r2, [sp, #12] 802e49a: f89d 300a ldrb.w r3, [sp, #10] 802e49e: 1c51 adds r1, r2, #1 802e4a0: 1859 adds r1, r3, r1 802e4a2: 4488 add r8, r1 vb_len -= (1 + len_octets + len); 802e4a4: 8831 ldrh r1, [r6, #0] 802e4a6: 43db mvns r3, r3 802e4a8: 1a8a subs r2, r1, r2 802e4aa: 18d3 adds r3, r2, r3 snmp_inc_snmpinasnparseerrs(); /* free varbinds (if available) */ snmp_varbind_list_free(&m_stat->invb); return ERR_ARG; } ofs += (1 + len_octets + len); 802e4ac: fa1f f888 uxth.w r8, r8 vb_len -= (1 + len_octets + len); 802e4b0: 8033 strh r3, [r6, #0] /* start with empty list */ m_stat->invb.count = 0; m_stat->invb.head = NULL; m_stat->invb.tail = NULL; while (vb_len > 0) 802e4b2: 8833 ldrh r3, [r6, #0] 802e4b4: 2b00 cmp r3, #0 802e4b6: f47f aee3 bne.w 802e280 } ofs += (1 + len_octets + len); vb_len -= (1 + len_octets + len); } if (m_stat->rt == SNMP_ASN1_PDU_SET_REQ) 802e4ba: 7aab ldrb r3, [r5, #10] 802e4bc: f895 0108 ldrb.w r0, [r5, #264] ; 0x108 802e4c0: 2b03 cmp r3, #3 802e4c2: d102 bne.n 802e4ca { snmp_add_snmpintotalsetvars(m_stat->invb.count); 802e4c4: f7fe fe26 bl 802d114 802e4c8: e001 b.n 802e4ce } else { snmp_add_snmpintotalreqvars(m_stat->invb.count); 802e4ca: f7fe fe1b bl 802d104 } *ofs_ret = ofs; 802e4ce: f8a9 8000 strh.w r8, [r9] return ERR_OK; 802e4d2: 2000 movs r0, #0 } 802e4d4: b240 sxtb r0, r0 802e4d6: b047 add sp, #284 ; 0x11c 802e4d8: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0802e4dc : /* lwIP UDP receive callback function */ static void snmp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) { 802e4dc: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} LWIP_UNUSED_ARG(arg); /* traverse input message process list, look for SNMP_MSG_EMPTY */ msg_ps = &msg_input_list[0]; req_idx = 0; while ((req_idx < SNMP_CONCURRENT_REQUESTS) && (msg_ps->state != SNMP_MSG_EMPTY)) 802e4e0: 4da3 ldr r5, [pc, #652] ; (802e770 ) snmp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) { volatile struct snmp_msg_pstat *msg_ps; u8_t req_idx; err_t err_ret; u16_t payload_len = p->tot_len; 802e4e2: 8917 ldrh r7, [r2, #8] LWIP_UNUSED_ARG(arg); /* traverse input message process list, look for SNMP_MSG_EMPTY */ msg_ps = &msg_input_list[0]; req_idx = 0; while ((req_idx < SNMP_CONCURRENT_REQUESTS) && (msg_ps->state != SNMP_MSG_EMPTY)) 802e4e4: f895 605a ldrb.w r6, [r5, #90] ; 0x5a /* lwIP UDP receive callback function */ static void snmp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) { 802e4e8: b087 sub sp, #28 802e4ea: 4699 mov r9, r3 volatile struct snmp_msg_pstat *msg_ps; u8_t req_idx; err_t err_ret; u16_t payload_len = p->tot_len; u16_t payload_ofs = 0; u16_t varbind_ofs = 0; 802e4ec: 2300 movs r3, #0 /* lwIP UDP receive callback function */ static void snmp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, ip_addr_t *addr, u16_t port) { 802e4ee: 4688 mov r8, r1 802e4f0: 4614 mov r4, r2 volatile struct snmp_msg_pstat *msg_ps; u8_t req_idx; err_t err_ret; u16_t payload_len = p->tot_len; u16_t payload_ofs = 0; u16_t varbind_ofs = 0; 802e4f2: f8ad 3010 strh.w r3, [sp, #16] LWIP_UNUSED_ARG(arg); /* traverse input message process list, look for SNMP_MSG_EMPTY */ msg_ps = &msg_input_list[0]; req_idx = 0; while ((req_idx < SNMP_CONCURRENT_REQUESTS) && (msg_ps->state != SNMP_MSG_EMPTY)) 802e4f6: 2e00 cmp r6, #0 802e4f8: f000 81aa beq.w 802e850 msg_ps++; } if (req_idx == SNMP_CONCURRENT_REQUESTS) { /* exceeding number of concurrent requests */ pbuf_free(p); 802e4fc: 4620 mov r0, r4 802e4fe: f7f9 feeb bl 80282d8 802e502: e1d6 b.n 802e8b2 ofs_base = ofs; snmp_asn1_dec_type(p, ofs, &type); derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); if ((derr != ERR_OK) || (pdu_len != (1 + len_octets + len)) || 802e504: f89d 600e ldrb.w r6, [sp, #14] 802e508: f8bd 3012 ldrh.w r3, [sp, #18] 802e50c: 1c75 adds r5, r6, #1 802e50e: 18eb adds r3, r5, r3 s32_t version; ofs_base = ofs; snmp_asn1_dec_type(p, ofs, &type); derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); if ((derr != ERR_OK) || 802e510: 429f cmp r7, r3 802e512: f040 80c4 bne.w 802e69e (pdu_len != (1 + len_octets + len)) || 802e516: f89d 300f ldrb.w r3, [sp, #15] 802e51a: 2b30 cmp r3, #48 ; 0x30 802e51c: d000 beq.n 802e520 802e51e: e0be b.n 802e69e (type != (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ))) { snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets); 802e520: b2ad uxth r5, r5 snmp_asn1_dec_type(p, ofs, &type); 802e522: 4629 mov r1, r5 802e524: f10d 020f add.w r2, sp, #15 802e528: 4620 mov r0, r4 802e52a: f7fc ffcf bl 802b4cc derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 802e52e: 4620 mov r0, r4 802e530: 1cb1 adds r1, r6, #2 802e532: f10d 020e add.w r2, sp, #14 802e536: f10d 0312 add.w r3, sp, #18 802e53a: f7fc ffdc bl 802b4f6 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 802e53e: 2800 cmp r0, #0 802e540: f040 80ad bne.w 802e69e 802e544: f89d 300f ldrb.w r3, [sp, #15] 802e548: 2b02 cmp r3, #2 802e54a: f040 80a8 bne.w 802e69e { /* can't decode or no integer (version) */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } derr = snmp_asn1_dec_s32t(p, ofs + 1 + len_octets, len, &version); 802e54e: f89d 100e ldrb.w r1, [sp, #14] 802e552: f8bd 2012 ldrh.w r2, [sp, #18] 802e556: 3101 adds r1, #1 802e558: 4620 mov r0, r4 802e55a: 1869 adds r1, r5, r1 802e55c: ab05 add r3, sp, #20 802e55e: f7fd f8a0 bl 802b6a2 if (derr != ERR_OK) 802e562: 2800 cmp r0, #0 802e564: f040 809b bne.w 802e69e { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } if (version != 0) 802e568: 9b05 ldr r3, [sp, #20] 802e56a: b113 cbz r3, 802e572 { /* not version 1 */ snmp_inc_snmpinbadversions(); 802e56c: f7fe fd8a bl 802d084 802e570: e7c4 b.n 802e4fc return ERR_ARG; } ofs += (1 + len_octets + len); 802e572: f89d 200e ldrb.w r2, [sp, #14] 802e576: f8bd 3012 ldrh.w r3, [sp, #18] 802e57a: 18d3 adds r3, r2, r3 802e57c: 18ed adds r5, r5, r3 802e57e: b2ad uxth r5, r5 802e580: 1c6e adds r6, r5, #1 802e582: b2b6 uxth r6, r6 snmp_asn1_dec_type(p, ofs, &type); 802e584: 4631 mov r1, r6 802e586: f10d 020f add.w r2, sp, #15 802e58a: 4620 mov r0, r4 802e58c: f7fc ff9e bl 802b4cc derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 802e590: 1ca9 adds r1, r5, #2 802e592: 4620 mov r0, r4 802e594: b289 uxth r1, r1 802e596: f10d 020e add.w r2, sp, #14 802e59a: f10d 0312 add.w r3, sp, #18 802e59e: f7fc ffaa bl 802b4f6 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR))) 802e5a2: 2800 cmp r0, #0 802e5a4: d17b bne.n 802e69e 802e5a6: f89d 300f ldrb.w r3, [sp, #15] 802e5aa: 2b04 cmp r3, #4 802e5ac: d177 bne.n 802e69e { /* can't decode or no octet string (community) */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } derr = snmp_asn1_dec_raw(p, ofs + 1 + len_octets, len, SNMP_COMMUNITY_STR_LEN, m_stat->community); 802e5ae: f89d 100e ldrb.w r1, [sp, #14] 802e5b2: 4d70 ldr r5, [pc, #448] ; (802e774 ) 802e5b4: f8bd 2012 ldrh.w r2, [sp, #18] 802e5b8: 9500 str r5, [sp, #0] 802e5ba: 3101 adds r1, #1 802e5bc: 1871 adds r1, r6, r1 802e5be: 4620 mov r0, r4 802e5c0: b289 uxth r1, r1 802e5c2: 2340 movs r3, #64 ; 0x40 802e5c4: f7fd f962 bl 802b88c if (derr != ERR_OK) 802e5c8: 2800 cmp r0, #0 802e5ca: d168 bne.n 802e69e { snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } /* add zero terminator */ len = ((len < (SNMP_COMMUNITY_STR_LEN))?(len):(SNMP_COMMUNITY_STR_LEN)); 802e5cc: f8bd 3012 ldrh.w r3, [sp, #18] m_stat->community[len] = 0; 802e5d0: f1a5 0218 sub.w r2, r5, #24 { snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } /* add zero terminator */ len = ((len < (SNMP_COMMUNITY_STR_LEN))?(len):(SNMP_COMMUNITY_STR_LEN)); 802e5d4: 2b40 cmp r3, #64 ; 0x40 802e5d6: bf28 it cs 802e5d8: 2340 movcs r3, #64 ; 0x40 m_stat->community[len] = 0; 802e5da: 18d1 adds r1, r2, r3 snmp_inc_snmpinbadcommunitynames(); snmp_authfail_trap(); return ERR_ARG; }*/ ofs += (1 + len_octets + len); 802e5dc: f89d 200e ldrb.w r2, [sp, #14] { snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } /* add zero terminator */ len = ((len < (SNMP_COMMUNITY_STR_LEN))?(len):(SNMP_COMMUNITY_STR_LEN)); 802e5e0: f8ad 3012 strh.w r3, [sp, #18] m_stat->community[len] = 0; m_stat->com_strlen = (u8_t)len; 802e5e4: f885 3041 strb.w r3, [r5, #65] ; 0x41 snmp_inc_snmpinbadcommunitynames(); snmp_authfail_trap(); return ERR_ARG; }*/ ofs += (1 + len_octets + len); 802e5e8: 189b adds r3, r3, r2 802e5ea: 18f6 adds r6, r6, r3 802e5ec: b2b6 uxth r6, r6 802e5ee: f106 0801 add.w r8, r6, #1 802e5f2: fa1f f888 uxth.w r8, r8 snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } /* add zero terminator */ len = ((len < (SNMP_COMMUNITY_STR_LEN))?(len):(SNMP_COMMUNITY_STR_LEN)); m_stat->community[len] = 0; 802e5f6: 7608 strb r0, [r1, #24] snmp_authfail_trap(); return ERR_ARG; }*/ ofs += (1 + len_octets + len); snmp_asn1_dec_type(p, ofs, &type); 802e5f8: f10d 020f add.w r2, sp, #15 802e5fc: 4641 mov r1, r8 802e5fe: 4620 mov r0, r4 802e600: f7fc ff64 bl 802b4cc derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 802e604: 1cb1 adds r1, r6, #2 802e606: 4620 mov r0, r4 802e608: b289 uxth r1, r1 802e60a: f10d 020e add.w r2, sp, #14 802e60e: f10d 0312 add.w r3, sp, #18 802e612: f7fc ff70 bl 802b4f6 if (derr != ERR_OK) 802e616: 2800 cmp r0, #0 802e618: d141 bne.n 802e69e return ERR_ARG; } /* FIX for write/read communuty */ /* GetRequest PDU */ if (type == (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_REQ)) 802e61a: f89d 300f ldrb.w r3, [sp, #15] 802e61e: 2ba0 cmp r3, #160 ; 0xa0 802e620: d10f bne.n 802e642 { if (strncmp(sSettings.sSnmp.readCommunity, (const char*)m_stat->community, strlen(sSettings.sSnmp.readCommunity)) != 0 802e622: 4855 ldr r0, [pc, #340] ; (802e778 ) 802e624: f7f3 fa44 bl 8021ab0 802e628: 4629 mov r1, r5 802e62a: 4602 mov r2, r0 802e62c: 4852 ldr r0, [pc, #328] ; (802e778 ) 802e62e: f7f3 faa1 bl 8021b74 802e632: b120 cbz r0, 802e63e || (strlen(sSettings.sSnmp.readCommunity) != strlen((const char*)m_stat->community)) ) { snmp_inc_snmpinbadcommunitynames(); 802e634: f7fe fd2e bl 802d094 snmp_authfail_trap(); 802e638: f000 fd7e bl 802f138 802e63c: e75e b.n 802e4fc /* FIX for write/read communuty */ /* GetRequest PDU */ if (type == (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_REQ)) { if (strncmp(sSettings.sSnmp.readCommunity, (const char*)m_stat->community, strlen(sSettings.sSnmp.readCommunity)) != 0 || (strlen(sSettings.sSnmp.readCommunity) != strlen((const char*)m_stat->community)) ) 802e63e: 484e ldr r0, [pc, #312] ; (802e778 ) 802e640: e00c b.n 802e65c snmp_authfail_trap(); return ERR_ARG; } } /* SetRequest PDU */ else if (type == (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_SET_REQ)) 802e642: 2ba3 cmp r3, #163 ; 0xa3 802e644: d112 bne.n 802e66c { if (strncmp(sSettings.sSnmp.writeCommunity, (const char*)m_stat->community, strlen(sSettings.sSnmp.writeCommunity)) != 0 802e646: 484d ldr r0, [pc, #308] ; (802e77c ) 802e648: f7f3 fa32 bl 8021ab0 802e64c: 4629 mov r1, r5 802e64e: 4602 mov r2, r0 802e650: 484a ldr r0, [pc, #296] ; (802e77c ) 802e652: f7f3 fa8f bl 8021b74 802e656: 2800 cmp r0, #0 802e658: d1ec bne.n 802e634 || (strlen(sSettings.sSnmp.writeCommunity) != strlen((const char*)m_stat->community)) ) 802e65a: 4848 ldr r0, [pc, #288] ; (802e77c ) 802e65c: f7f3 fa28 bl 8021ab0 802e660: 4606 mov r6, r0 802e662: 4628 mov r0, r5 802e664: f7f3 fa24 bl 8021ab0 802e668: 4286 cmp r6, r0 802e66a: d1e3 bne.n 802e634 snmp_authfail_trap(); return ERR_ARG; } } switch(type) 802e66c: f89d 300f ldrb.w r3, [sp, #15] 802e670: 3ba0 subs r3, #160 ; 0xa0 802e672: 2b04 cmp r3, #4 802e674: d813 bhi.n 802e69e 802e676: e8df f003 tbb [pc, r3] 802e67a: 0603 .short 0x0603 802e67c: 0c09 .short 0x0c09 802e67e: 0f .byte 0x0f 802e67f: 00 .byte 0x00 { case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_REQ): // GetRequest PDU snmp_inc_snmpingetrequests(); 802e680: f7fe fd50 bl 802d124 802e684: e100 b.n 802e888 derr = ERR_OK; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_NEXT_REQ): // GetNextRequest PDU snmp_inc_snmpingetnexts(); 802e686: f7fe fd55 bl 802d134 802e68a: e0fd b.n 802e888 derr = ERR_OK; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP): // GetResponse PDU snmp_inc_snmpingetresponses(); 802e68c: f7fe fd62 bl 802d154 802e690: e734 b.n 802e4fc derr = ERR_ARG; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_SET_REQ): // SetRequest PDU snmp_inc_snmpinsetrequests(); 802e692: f7fe fd57 bl 802d144 802e696: e0f7 b.n 802e888 derr = ERR_OK; break; case (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP): // Trap PDU snmp_inc_snmpintraps(); 802e698: f7fe fd64 bl 802d164 802e69c: e72e b.n 802e4fc derr = ERR_ARG; break; default: snmp_inc_snmpinasnparseerrs(); 802e69e: f7fe fd01 bl 802d0a4 802e6a2: e72b b.n 802e4fc { /* decoded PDU length does not equal actual payload length */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } snmp_asn1_dec_type(p, ofs, &type); 802e6a4: 4631 mov r1, r6 802e6a6: f10d 020f add.w r2, sp, #15 802e6aa: 4620 mov r0, r4 802e6ac: f7fc ff0e bl 802b4cc derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 802e6b0: f108 0102 add.w r1, r8, #2 802e6b4: 4620 mov r0, r4 802e6b6: b289 uxth r1, r1 802e6b8: f10d 020e add.w r2, sp, #14 802e6bc: f10d 0312 add.w r3, sp, #18 802e6c0: f7fc ff19 bl 802b4f6 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 802e6c4: 2800 cmp r0, #0 802e6c6: d1ea bne.n 802e69e 802e6c8: f89d 300f ldrb.w r3, [sp, #15] 802e6cc: 2b02 cmp r3, #2 802e6ce: d1e6 bne.n 802e69e { /* can't decode or no integer (request ID) */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } derr = snmp_asn1_dec_s32t(p, ofs + 1 + len_octets, len, &m_stat->rid); 802e6d0: f89d 100e ldrb.w r1, [sp, #14] 802e6d4: f8bd 2012 ldrh.w r2, [sp, #18] 802e6d8: 3101 adds r1, #1 802e6da: 1871 adds r1, r6, r1 802e6dc: 4620 mov r0, r4 802e6de: b289 uxth r1, r1 802e6e0: f105 030c add.w r3, r5, #12 802e6e4: f7fc ffdd bl 802b6a2 if (derr != ERR_OK) 802e6e8: 2800 cmp r0, #0 802e6ea: d1d8 bne.n 802e69e { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); 802e6ec: f89d 200e ldrb.w r2, [sp, #14] 802e6f0: f8bd 3012 ldrh.w r3, [sp, #18] 802e6f4: 18d3 adds r3, r2, r3 802e6f6: 18f6 adds r6, r6, r3 802e6f8: b2b6 uxth r6, r6 802e6fa: 1c77 adds r7, r6, #1 802e6fc: b2bf uxth r7, r7 snmp_asn1_dec_type(p, ofs, &type); 802e6fe: 4639 mov r1, r7 802e700: f10d 020f add.w r2, sp, #15 802e704: 4620 mov r0, r4 802e706: f7fc fee1 bl 802b4cc derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 802e70a: 1cb1 adds r1, r6, #2 802e70c: 4620 mov r0, r4 802e70e: b289 uxth r1, r1 802e710: f10d 020e add.w r2, sp, #14 802e714: f10d 0312 add.w r3, sp, #18 802e718: f7fc feed bl 802b4f6 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 802e71c: 2800 cmp r0, #0 802e71e: d1be bne.n 802e69e 802e720: f89d 300f ldrb.w r3, [sp, #15] 802e724: 2b02 cmp r3, #2 802e726: d1ba bne.n 802e69e snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } /* must be noError (0) for incoming requests. log errors for mib-2 completeness and for debug purposes */ derr = snmp_asn1_dec_s32t(p, ofs + 1 + len_octets, len, &m_stat->error_status); 802e728: f89d 100e ldrb.w r1, [sp, #14] 802e72c: f8bd 2012 ldrh.w r2, [sp, #18] 802e730: 3101 adds r1, #1 802e732: 1879 adds r1, r7, r1 802e734: 4620 mov r0, r4 802e736: b289 uxth r1, r1 802e738: f105 0310 add.w r3, r5, #16 802e73c: f7fc ffb1 bl 802b6a2 if (derr != ERR_OK) 802e740: 2800 cmp r0, #0 802e742: d1ac bne.n 802e69e { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } switch (m_stat->error_status) 802e744: 692b ldr r3, [r5, #16] 802e746: 3b01 subs r3, #1 802e748: 2b04 cmp r3, #4 802e74a: d81b bhi.n 802e784 802e74c: e8df f003 tbb [pc, r3] 802e750: 0c090603 .word 0x0c090603 802e754: 18 .byte 0x18 802e755: 00 .byte 0x00 { case SNMP_ES_TOOBIG: snmp_inc_snmpintoobigs(); 802e756: f7fe fcad bl 802d0b4 802e75a: e013 b.n 802e784 break; case SNMP_ES_NOSUCHNAME: snmp_inc_snmpinnosuchnames(); 802e75c: f7fe fcb2 bl 802d0c4 802e760: e010 b.n 802e784 break; case SNMP_ES_BADVALUE: snmp_inc_snmpinbadvalues(); 802e762: f7fe fcb7 bl 802d0d4 802e766: e00d b.n 802e784 break; case SNMP_ES_READONLY: snmp_inc_snmpinreadonlys(); 802e768: f7fe fcbc bl 802d0e4 802e76c: e00a b.n 802e784 802e76e: bf00 nop 802e770: 200104f8 .word 0x200104f8 802e774: 20010510 .word 0x20010510 802e778: 2000e0be .word 0x2000e0be 802e77c: 2000e0d2 .word 0x2000e0d2 break; case SNMP_ES_GENERROR: snmp_inc_snmpingenerrs(); 802e780: f7fe fcb8 bl 802d0f4 break; } ofs += (1 + len_octets + len); 802e784: f89d 200e ldrb.w r2, [sp, #14] 802e788: f8bd 3012 ldrh.w r3, [sp, #18] 802e78c: 18d3 adds r3, r2, r3 802e78e: 18ff adds r7, r7, r3 802e790: b2bf uxth r7, r7 802e792: 1c7d adds r5, r7, #1 802e794: b2ad uxth r5, r5 snmp_asn1_dec_type(p, ofs, &type); 802e796: 4629 mov r1, r5 802e798: f10d 020f add.w r2, sp, #15 802e79c: 4620 mov r0, r4 802e79e: f7fc fe95 bl 802b4cc derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 802e7a2: 1cb9 adds r1, r7, #2 802e7a4: 4620 mov r0, r4 802e7a6: b289 uxth r1, r1 802e7a8: f10d 020e add.w r2, sp, #14 802e7ac: f10d 0312 add.w r3, sp, #18 802e7b0: f7fc fea1 bl 802b4f6 if ((derr != ERR_OK) || (type != (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG))) 802e7b4: 2800 cmp r0, #0 802e7b6: f47f af72 bne.w 802e69e 802e7ba: f89d 300f ldrb.w r3, [sp, #15] 802e7be: 2b02 cmp r3, #2 802e7c0: f47f af6d bne.w 802e69e snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } /* must be 0 for incoming requests. decode anyway to catch bad integers (and dirty tricks) */ derr = snmp_asn1_dec_s32t(p, ofs + 1 + len_octets, len, &m_stat->error_index); 802e7c4: f89d 100e ldrb.w r1, [sp, #14] 802e7c8: f8bd 2012 ldrh.w r2, [sp, #18] 802e7cc: 4b3a ldr r3, [pc, #232] ; (802e8b8 ) 802e7ce: 3101 adds r1, #1 802e7d0: 1869 adds r1, r5, r1 802e7d2: 4620 mov r0, r4 802e7d4: b289 uxth r1, r1 802e7d6: f7fc ff64 bl 802b6a2 if (derr != ERR_OK) 802e7da: 2800 cmp r0, #0 802e7dc: f47f af5f bne.w 802e69e { /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); 802e7e0: f8bd 3012 ldrh.w r3, [sp, #18] 802e7e4: f89d 200e ldrb.w r2, [sp, #14] 802e7e8: 3301 adds r3, #1 802e7ea: 189b adds r3, r3, r2 802e7ec: 18ed adds r5, r5, r3 /* check total length, version, community, pdu type */ err_ret = snmp_pdu_header_check(p, payload_ofs, payload_len, &varbind_ofs, msg_ps); /* Only accept requests and requests without error (be robust) */ /* Reject response and trap headers or error requests as input! */ if ((err_ret != ERR_OK) || ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && 802e7ee: 4b33 ldr r3, [pc, #204] ; (802e8bc ) /* can't decode */ snmp_inc_snmpinasnparseerrs(); return ERR_ARG; } ofs += (1 + len_octets + len); *ofs_ret = ofs; 802e7f0: f8ad 5010 strh.w r5, [sp, #16] /* check total length, version, community, pdu type */ err_ret = snmp_pdu_header_check(p, payload_ofs, payload_len, &varbind_ofs, msg_ps); /* Only accept requests and requests without error (be robust) */ /* Reject response and trap headers or error requests as input! */ if ((err_ret != ERR_OK) || ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && 802e7f4: 7a9a ldrb r2, [r3, #10] /* check total length, version, community, pdu type */ err_ret = snmp_pdu_header_check(p, payload_ofs, payload_len, &varbind_ofs, msg_ps); /* Only accept requests and requests without error (be robust) */ /* Reject response and trap headers or error requests as input! */ if ((err_ret != ERR_OK) || 802e7f6: b132 cbz r2, 802e806 ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_GET_NEXT_REQ) && 802e7f8: 7a9a ldrb r2, [r3, #10] /* check total length, version, community, pdu type */ err_ret = snmp_pdu_header_check(p, payload_ofs, payload_len, &varbind_ofs, msg_ps); /* Only accept requests and requests without error (be robust) */ /* Reject response and trap headers or error requests as input! */ if ((err_ret != ERR_OK) || ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && 802e7fa: 2a01 cmp r2, #1 802e7fc: d003 beq.n 802e806 (msg_ps->rt != SNMP_ASN1_PDU_GET_NEXT_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_SET_REQ)) || 802e7fe: 7a9a ldrb r2, [r3, #10] err_ret = snmp_pdu_header_check(p, payload_ofs, payload_len, &varbind_ofs, msg_ps); /* Only accept requests and requests without error (be robust) */ /* Reject response and trap headers or error requests as input! */ if ((err_ret != ERR_OK) || ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_GET_NEXT_REQ) && 802e800: 2a03 cmp r2, #3 802e802: f47f ae7b bne.w 802e4fc (msg_ps->rt != SNMP_ASN1_PDU_SET_REQ)) || ((msg_ps->error_status != SNMP_ES_NOERROR) || 802e806: 691b ldr r3, [r3, #16] 802e808: 4d2c ldr r5, [pc, #176] ; (802e8bc ) /* Only accept requests and requests without error (be robust) */ /* Reject response and trap headers or error requests as input! */ if ((err_ret != ERR_OK) || ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_GET_NEXT_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_SET_REQ)) || 802e80a: 2b00 cmp r3, #0 802e80c: f47f ae76 bne.w 802e4fc ((msg_ps->error_status != SNMP_ES_NOERROR) || (msg_ps->error_index != 0)) ) 802e810: 696b ldr r3, [r5, #20] /* Reject response and trap headers or error requests as input! */ if ((err_ret != ERR_OK) || ((msg_ps->rt != SNMP_ASN1_PDU_GET_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_GET_NEXT_REQ) && (msg_ps->rt != SNMP_ASN1_PDU_SET_REQ)) || ((msg_ps->error_status != SNMP_ES_NOERROR) || 802e812: 2b00 cmp r3, #0 802e814: f47f ae72 bne.w 802e4fc } LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_recv ok, community %s\n", msg_ps->community)); /* Builds a list of variable bindings. Copy the varbinds from the pbuf chain to glue them when these are divided over two or more pbuf's. */ err_ret = snmp_pdu_dec_varbindlist(p, varbind_ofs, &varbind_ofs, msg_ps); 802e818: aa06 add r2, sp, #24 802e81a: 4620 mov r0, r4 802e81c: f832 1d08 ldrh.w r1, [r2, #-8]! 802e820: 462b mov r3, r5 802e822: f7ff fd01 bl 802e228 802e826: 4606 mov r6, r0 /* we've decoded the incoming message, release input msg now */ pbuf_free(p); 802e828: 4620 mov r0, r4 802e82a: f7f9 fd55 bl 80282d8 if ((err_ret != ERR_OK) || (msg_ps->invb.count == 0)) 802e82e: 2e00 cmp r6, #0 802e830: d13f bne.n 802e8b2 802e832: f895 3108 ldrb.w r3, [r5, #264] ; 0x108 802e836: 2b00 cmp r3, #0 802e838: d03b beq.n 802e8b2 } msg_ps->error_status = SNMP_ES_NOERROR; msg_ps->error_index = 0; /* find object for each variable binding */ msg_ps->state = SNMP_MSG_SEARCH_OBJ; 802e83a: 2301 movs r3, #1 (errors are only returned for a specific varbind failure) */ LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_pdu_dec_varbindlist() failed\n")); return; } msg_ps->error_status = SNMP_ES_NOERROR; 802e83c: 612e str r6, [r5, #16] msg_ps->vb_idx = 0; LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_recv varbind cnt=%"U16_F"\n",(u16_t)msg_ps->invb.count)); /* handle input event and as much objects as possible in one go */ snmp_msg_event(req_idx); 802e83e: 4630 mov r0, r6 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_pdu_dec_varbindlist() failed\n")); return; } msg_ps->error_status = SNMP_ES_NOERROR; msg_ps->error_index = 0; 802e840: 616e str r6, [r5, #20] /* find object for each variable binding */ msg_ps->state = SNMP_MSG_SEARCH_OBJ; 802e842: f885 305a strb.w r3, [r5, #90] ; 0x5a /* first variable binding from list to inspect */ msg_ps->vb_idx = 0; 802e846: f885 60f8 strb.w r6, [r5, #248] ; 0xf8 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_recv varbind cnt=%"U16_F"\n",(u16_t)msg_ps->invb.count)); /* handle input event and as much objects as possible in one go */ snmp_msg_event(req_idx); 802e84a: f7ff f94d bl 802dae8 802e84e: e030 b.n 802e8b2 pbuf_free(p); return; } /* accepting request */ snmp_inc_snmpinpkts(); 802e850: f7fe fc08 bl 802d064 /* record used 'protocol control block' */ msg_ps->pcb = pcb; /* source address (network order) */ msg_ps->sip = *addr; 802e854: f8d9 3000 ldr.w r3, [r9] } /* accepting request */ snmp_inc_snmpinpkts(); /* record used 'protocol control block' */ msg_ps->pcb = pcb; 802e858: f8c5 8000 str.w r8, [r5] /* source address (network order) */ msg_ps->sip = *addr; 802e85c: 606b str r3, [r5, #4] /* source port (host order (lwIP oddity)) */ msg_ps->sp = port; 802e85e: f8bd 3038 ldrh.w r3, [sp, #56] ; 0x38 u8_t len_octets; u8_t type; s32_t version; ofs_base = ofs; snmp_asn1_dec_type(p, ofs, &type); 802e862: 4631 mov r1, r6 /* record used 'protocol control block' */ msg_ps->pcb = pcb; /* source address (network order) */ msg_ps->sip = *addr; /* source port (host order (lwIP oddity)) */ msg_ps->sp = port; 802e864: 812b strh r3, [r5, #8] u8_t len_octets; u8_t type; s32_t version; ofs_base = ofs; snmp_asn1_dec_type(p, ofs, &type); 802e866: f10d 020f add.w r2, sp, #15 802e86a: 4620 mov r0, r4 802e86c: f7fc fe2e bl 802b4cc derr = snmp_asn1_dec_length(p, ofs+1, &len_octets, &len); 802e870: 4620 mov r0, r4 802e872: 2101 movs r1, #1 802e874: f10d 020e add.w r2, sp, #14 802e878: f10d 0312 add.w r3, sp, #18 802e87c: f7fc fe3b bl 802b4f6 if ((derr != ERR_OK) || 802e880: 2800 cmp r0, #0 802e882: f43f ae3f beq.w 802e504 802e886: e70a b.n 802e69e if (derr != ERR_OK) { /* unsupported input PDU for this agent (no parse error) */ return ERR_ARG; } m_stat->rt = type & 0x1F; 802e888: f89d 300f ldrb.w r3, [sp, #15] 802e88c: 4d0b ldr r5, [pc, #44] ; (802e8bc ) 802e88e: f003 031f and.w r3, r3, #31 802e892: 72ab strb r3, [r5, #10] ofs += (1 + len_octets); 802e894: f89d 300e ldrb.w r3, [sp, #14] 802e898: 4498 add r8, r3 802e89a: fa1f f888 uxth.w r8, r8 802e89e: f108 0601 add.w r6, r8, #1 802e8a2: b2b6 uxth r6, r6 if (len != (pdu_len - (ofs - ofs_base))) 802e8a4: f8bd 3012 ldrh.w r3, [sp, #18] 802e8a8: 1bbf subs r7, r7, r6 802e8aa: 42bb cmp r3, r7 802e8ac: f43f aefa beq.w 802e6a4 802e8b0: e6f5 b.n 802e69e LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_recv varbind cnt=%"U16_F"\n",(u16_t)msg_ps->invb.count)); /* handle input event and as much objects as possible in one go */ snmp_msg_event(req_idx); } 802e8b2: b007 add sp, #28 802e8b4: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} 802e8b8: 2001050c .word 0x2001050c 802e8bc: 200104f8 .word 0x200104f8 0802e8c0 : * @param root points to the root of the variable binding list * @return the required lenght for encoding the variable bindings */ static u16_t snmp_varbind_list_sum(struct snmp_varbind_root *root) { 802e8c0: b5f8 push {r3, r4, r5, r6, r7, lr} struct snmp_varbind *vb; u32_t *uint_ptr; s32_t *sint_ptr; u16_t tot_len; tot_len = 0; 802e8c2: 2500 movs r5, #0 * @param root points to the root of the variable binding list * @return the required lenght for encoding the variable bindings */ static u16_t snmp_varbind_list_sum(struct snmp_varbind_root *root) { 802e8c4: 4606 mov r6, r0 u32_t *uint_ptr; s32_t *sint_ptr; u16_t tot_len; tot_len = 0; vb = root->tail; 802e8c6: 6844 ldr r4, [r0, #4] sint_ptr = (s32_t*)vb->value; snmp_asn1_enc_oid_cnt(vb->value_len / sizeof(s32_t), sint_ptr, &vb->vlen); break; default: /* unsupported type */ vb->vlen = 0; 802e8c8: 462f mov r7, r5 s32_t *sint_ptr; u16_t tot_len; tot_len = 0; vb = root->tail; while ( vb != NULL ) 802e8ca: e051 b.n 802e970 { /* encoded value lenght depends on type */ switch (vb->value_type) 802e8cc: 7c23 ldrb r3, [r4, #16] 802e8ce: 2b06 cmp r3, #6 802e8d0: d020 beq.n 802e914 802e8d2: d805 bhi.n 802e8e0 802e8d4: 2b02 cmp r3, #2 802e8d6: d00c beq.n 802e8f2 802e8d8: d324 bcc.n 802e924 802e8da: 2b04 cmp r3, #4 802e8dc: d322 bcc.n 802e924 802e8de: e016 b.n 802e90e 802e8e0: 2b43 cmp r3, #67 ; 0x43 802e8e2: d803 bhi.n 802e8ec 802e8e4: 2b41 cmp r3, #65 ; 0x41 802e8e6: d20b bcs.n 802e900 802e8e8: 2b40 cmp r3, #64 ; 0x40 802e8ea: e000 b.n 802e8ee 802e8ec: 2b44 cmp r3, #68 ; 0x44 802e8ee: d119 bne.n 802e924 802e8f0: e00d b.n 802e90e { case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG): sint_ptr = (s32_t*)vb->value; snmp_asn1_enc_s32t_cnt(*sint_ptr, &vb->vlen); 802e8f2: 6963 ldr r3, [r4, #20] 802e8f4: f104 0120 add.w r1, r4, #32 802e8f8: 6818 ldr r0, [r3, #0] 802e8fa: f7fd f81e bl 802b93a break; 802e8fe: e012 b.n 802e926 case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_GAUGE): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS): uint_ptr = (u32_t*)vb->value; snmp_asn1_enc_u32t_cnt(*uint_ptr, &vb->vlen); 802e900: 6963 ldr r3, [r4, #20] 802e902: f104 0120 add.w r1, r4, #32 802e906: 6818 ldr r0, [r3, #0] 802e908: f7fd f802 bl 802b910 break; 802e90c: e00b b.n 802e926 case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR): case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_NUL): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_OPAQUE): vb->vlen = vb->value_len; 802e90e: 7c63 ldrb r3, [r4, #17] 802e910: 8423 strh r3, [r4, #32] break; 802e912: e008 b.n 802e926 case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID): sint_ptr = (s32_t*)vb->value; snmp_asn1_enc_oid_cnt(vb->value_len / sizeof(s32_t), sint_ptr, &vb->vlen); 802e914: 7c60 ldrb r0, [r4, #17] 802e916: 6961 ldr r1, [r4, #20] 802e918: 0880 lsrs r0, r0, #2 802e91a: f104 0220 add.w r2, r4, #32 802e91e: f7fd f821 bl 802b964 break; 802e922: e000 b.n 802e926 default: /* unsupported type */ vb->vlen = 0; 802e924: 8427 strh r7, [r4, #32] break; }; /* encoding length of value length field */ snmp_asn1_enc_length_cnt(vb->vlen, &vb->vlenlen); 802e926: 8c20 ldrh r0, [r4, #32] 802e928: f104 011a add.w r1, r4, #26 802e92c: f7fc ffe5 bl 802b8fa snmp_asn1_enc_oid_cnt(vb->ident_len, vb->ident, &vb->olen); 802e930: f104 021e add.w r2, r4, #30 802e934: 7a20 ldrb r0, [r4, #8] 802e936: 68e1 ldr r1, [r4, #12] 802e938: f7fd f814 bl 802b964 snmp_asn1_enc_length_cnt(vb->olen, &vb->olenlen); 802e93c: 8be0 ldrh r0, [r4, #30] 802e93e: f104 0119 add.w r1, r4, #25 802e942: f7fc ffda bl 802b8fa vb->seqlen = 1 + vb->vlenlen + vb->vlen; 802e946: 8be3 ldrh r3, [r4, #30] 802e948: 8c20 ldrh r0, [r4, #32] 802e94a: 18c0 adds r0, r0, r3 802e94c: 7ea3 ldrb r3, [r4, #26] vb->seqlen += 1 + vb->olenlen + vb->olen; 802e94e: 3002 adds r0, #2 802e950: 18c0 adds r0, r0, r3 802e952: 7e63 ldrb r3, [r4, #25] 802e954: 18c0 adds r0, r0, r3 802e956: b280 uxth r0, r0 802e958: 83a0 strh r0, [r4, #28] snmp_asn1_enc_length_cnt(vb->seqlen, &vb->seqlenlen); 802e95a: f104 0118 add.w r1, r4, #24 802e95e: f7fc ffcc bl 802b8fa /* varbind seq */ tot_len += 1 + vb->seqlenlen + vb->seqlen; 802e962: 8ba3 ldrh r3, [r4, #28] 802e964: 7e22 ldrb r2, [r4, #24] vb = vb->prev; 802e966: 6864 ldr r4, [r4, #4] vb->seqlen = 1 + vb->vlenlen + vb->vlen; vb->seqlen += 1 + vb->olenlen + vb->olen; snmp_asn1_enc_length_cnt(vb->seqlen, &vb->seqlenlen); /* varbind seq */ tot_len += 1 + vb->seqlenlen + vb->seqlen; 802e968: 3301 adds r3, #1 802e96a: 189b adds r3, r3, r2 802e96c: 18ed adds r5, r5, r3 802e96e: b2ad uxth r5, r5 s32_t *sint_ptr; u16_t tot_len; tot_len = 0; vb = root->tail; while ( vb != NULL ) 802e970: 2c00 cmp r4, #0 802e972: d1ab bne.n 802e8cc vb = vb->prev; } /* varbind-list seq */ root->seqlen = tot_len; snmp_asn1_enc_length_cnt(root->seqlen, &root->seqlenlen); 802e974: 4628 mov r0, r5 vb = vb->prev; } /* varbind-list seq */ root->seqlen = tot_len; 802e976: 8175 strh r5, [r6, #10] snmp_asn1_enc_length_cnt(root->seqlen, &root->seqlenlen); 802e978: f106 0109 add.w r1, r6, #9 802e97c: f7fc ffbd bl 802b8fa tot_len += 1 + root->seqlenlen; 802e980: 7a73 ldrb r3, [r6, #9] 802e982: 3301 adds r3, #1 802e984: 18e8 adds r0, r5, r3 return tot_len; } 802e986: b280 uxth r0, r0 802e988: bdf8 pop {r3, r4, r5, r6, r7, pc} 802e98a: 0000 movs r0, r0 0802e98c : * @param rhl points to returned header lengths * @return the required lenght for encoding the response header */ static u16_t snmp_resp_header_sum(struct snmp_msg_pstat *m_stat, u16_t vb_len) { 802e98c: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} 802e990: 4604 mov r4, r0 u16_t tot_len; struct snmp_resp_header_lengths *rhl; rhl = &m_stat->rhl; tot_len = vb_len; snmp_asn1_enc_s32t_cnt(m_stat->error_index, &rhl->erridxlen); 802e992: f500 758c add.w r5, r0, #280 ; 0x118 * @param rhl points to returned header lengths * @return the required lenght for encoding the response header */ static u16_t snmp_resp_header_sum(struct snmp_msg_pstat *m_stat, u16_t vb_len) { 802e996: 460f mov r7, r1 u16_t tot_len; struct snmp_resp_header_lengths *rhl; rhl = &m_stat->rhl; tot_len = vb_len; snmp_asn1_enc_s32t_cnt(m_stat->error_index, &rhl->erridxlen); 802e998: 6940 ldr r0, [r0, #20] 802e99a: f504 7190 add.w r1, r4, #288 ; 0x120 802e99e: f7fc ffcc bl 802b93a snmp_asn1_enc_length_cnt(rhl->erridxlen, &rhl->erridxlenlen); 802e9a2: f8b4 0120 ldrh.w r0, [r4, #288] ; 0x120 802e9a6: 4629 mov r1, r5 802e9a8: f7fc ffa7 bl 802b8fa tot_len += 1 + rhl->erridxlenlen + rhl->erridxlen; snmp_asn1_enc_s32t_cnt(m_stat->error_status, &rhl->errstatlen); 802e9ac: 6920 ldr r0, [r4, #16] rhl = &m_stat->rhl; tot_len = vb_len; snmp_asn1_enc_s32t_cnt(m_stat->error_index, &rhl->erridxlen); snmp_asn1_enc_length_cnt(rhl->erridxlen, &rhl->erridxlenlen); tot_len += 1 + rhl->erridxlenlen + rhl->erridxlen; 802e9ae: f894 8118 ldrb.w r8, [r4, #280] ; 0x118 802e9b2: f8b4 a120 ldrh.w sl, [r4, #288] ; 0x120 snmp_asn1_enc_s32t_cnt(m_stat->error_status, &rhl->errstatlen); 802e9b6: f504 7191 add.w r1, r4, #290 ; 0x122 802e9ba: f7fc ffbe bl 802b93a snmp_asn1_enc_length_cnt(rhl->errstatlen, &rhl->errstatlenlen); 802e9be: 1c69 adds r1, r5, #1 802e9c0: f8b4 0122 ldrh.w r0, [r4, #290] ; 0x122 802e9c4: f7fc ff99 bl 802b8fa tot_len += 1 + rhl->errstatlenlen + rhl->errstatlen; 802e9c8: f8b4 9122 ldrh.w r9, [r4, #290] ; 0x122 snmp_asn1_enc_s32t_cnt(m_stat->rid, &rhl->ridlen); 802e9cc: 68e0 ldr r0, [r4, #12] snmp_asn1_enc_length_cnt(rhl->erridxlen, &rhl->erridxlenlen); tot_len += 1 + rhl->erridxlenlen + rhl->erridxlen; snmp_asn1_enc_s32t_cnt(m_stat->error_status, &rhl->errstatlen); snmp_asn1_enc_length_cnt(rhl->errstatlen, &rhl->errstatlenlen); tot_len += 1 + rhl->errstatlenlen + rhl->errstatlen; 802e9ce: f894 6119 ldrb.w r6, [r4, #281] ; 0x119 snmp_asn1_enc_s32t_cnt(m_stat->rid, &rhl->ridlen); 802e9d2: f504 7192 add.w r1, r4, #292 ; 0x124 802e9d6: f7fc ffb0 bl 802b93a snmp_asn1_enc_length_cnt(rhl->ridlen, &rhl->ridlenlen); 802e9da: f8b4 0124 ldrh.w r0, [r4, #292] ; 0x124 802e9de: f504 718d add.w r1, r4, #282 ; 0x11a 802e9e2: f7fc ff8a bl 802b8fa rhl = &m_stat->rhl; tot_len = vb_len; snmp_asn1_enc_s32t_cnt(m_stat->error_index, &rhl->erridxlen); snmp_asn1_enc_length_cnt(rhl->erridxlen, &rhl->erridxlenlen); tot_len += 1 + rhl->erridxlenlen + rhl->erridxlen; 802e9e6: 44d1 add r9, sl snmp_asn1_enc_s32t_cnt(m_stat->error_status, &rhl->errstatlen); snmp_asn1_enc_length_cnt(rhl->errstatlen, &rhl->errstatlenlen); tot_len += 1 + rhl->errstatlenlen + rhl->errstatlen; 802e9e8: f8b4 3124 ldrh.w r3, [r4, #292] ; 0x124 802e9ec: f109 0903 add.w r9, r9, #3 802e9f0: 4499 add r9, r3 802e9f2: fa18 f889 uxtah r8, r8, r9 snmp_asn1_enc_s32t_cnt(m_stat->rid, &rhl->ridlen); snmp_asn1_enc_length_cnt(rhl->ridlen, &rhl->ridlenlen); tot_len += 1 + rhl->ridlenlen + rhl->ridlen; 802e9f6: f894 311a ldrb.w r3, [r4, #282] ; 0x11a 802e9fa: 4446 add r6, r8 802e9fc: 18f6 adds r6, r6, r3 802e9fe: fa17 f686 uxtah r6, r7, r6 802ea02: b2b6 uxth r6, r6 rhl->pdulen = tot_len; snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); 802ea04: 1ce9 adds r1, r5, #3 802ea06: 4630 mov r0, r6 snmp_asn1_enc_s32t_cnt(m_stat->rid, &rhl->ridlen); snmp_asn1_enc_length_cnt(rhl->ridlen, &rhl->ridlenlen); tot_len += 1 + rhl->ridlenlen + rhl->ridlen; rhl->pdulen = tot_len; 802ea08: f8a4 6126 strh.w r6, [r4, #294] ; 0x126 snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); 802ea0c: f7fc ff75 bl 802b8fa tot_len += 1 + rhl->pdulenlen; rhl->comlen = m_stat->com_strlen; 802ea10: f894 0059 ldrb.w r0, [r4, #89] ; 0x59 snmp_asn1_enc_length_cnt(rhl->ridlen, &rhl->ridlenlen); tot_len += 1 + rhl->ridlenlen + rhl->ridlen; rhl->pdulen = tot_len; snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); tot_len += 1 + rhl->pdulenlen; 802ea14: f894 811b ldrb.w r8, [r4, #283] ; 0x11b rhl->comlen = m_stat->com_strlen; 802ea18: f8a4 0128 strh.w r0, [r4, #296] ; 0x128 snmp_asn1_enc_length_cnt(rhl->comlen, &rhl->comlenlen); 802ea1c: f504 718e add.w r1, r4, #284 ; 0x11c 802ea20: f7fc ff6b bl 802b8fa tot_len += 1 + rhl->comlenlen + rhl->comlen; snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); 802ea24: 4b14 ldr r3, [pc, #80] ; (802ea78 ) snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); tot_len += 1 + rhl->pdulenlen; rhl->comlen = m_stat->com_strlen; snmp_asn1_enc_length_cnt(rhl->comlen, &rhl->comlenlen); tot_len += 1 + rhl->comlenlen + rhl->comlen; 802ea26: f894 711c ldrb.w r7, [r4, #284] ; 0x11c snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); 802ea2a: 6818 ldr r0, [r3, #0] snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); tot_len += 1 + rhl->pdulenlen; rhl->comlen = m_stat->com_strlen; snmp_asn1_enc_length_cnt(rhl->comlen, &rhl->comlenlen); tot_len += 1 + rhl->comlenlen + rhl->comlen; 802ea2c: f8b4 9128 ldrh.w r9, [r4, #296] ; 0x128 snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); 802ea30: f504 7195 add.w r1, r4, #298 ; 0x12a 802ea34: f7fc ff81 bl 802b93a snmp_asn1_enc_length_cnt(rhl->verlen, &rhl->verlenlen); 802ea38: 1d69 adds r1, r5, #5 802ea3a: f8b4 012a ldrh.w r0, [r4, #298] ; 0x12a 802ea3e: f7fc ff5c bl 802b8fa snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); tot_len += 1 + rhl->pdulenlen; rhl->comlen = m_stat->com_strlen; snmp_asn1_enc_length_cnt(rhl->comlen, &rhl->comlenlen); tot_len += 1 + rhl->comlenlen + rhl->comlen; 802ea42: f8b4 512a ldrh.w r5, [r4, #298] ; 0x12a snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); snmp_asn1_enc_length_cnt(rhl->verlen, &rhl->verlenlen); tot_len += 1 + rhl->verlen + rhl->verlenlen; 802ea46: f894 311d ldrb.w r3, [r4, #285] ; 0x11d snmp_asn1_enc_length_cnt(rhl->pdulen, &rhl->pdulenlen); tot_len += 1 + rhl->pdulenlen; rhl->comlen = m_stat->com_strlen; snmp_asn1_enc_length_cnt(rhl->comlen, &rhl->comlenlen); tot_len += 1 + rhl->comlenlen + rhl->comlen; 802ea4a: 444d add r5, r9 802ea4c: 3503 adds r5, #3 802ea4e: 4445 add r5, r8 snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); snmp_asn1_enc_length_cnt(rhl->verlen, &rhl->verlenlen); tot_len += 1 + rhl->verlen + rhl->verlenlen; 802ea50: 197d adds r5, r7, r5 802ea52: 18ed adds r5, r5, r3 802ea54: fa16 f585 uxtah r5, r6, r5 802ea58: b2ad uxth r5, r5 rhl->seqlen = tot_len; snmp_asn1_enc_length_cnt(rhl->seqlen, &rhl->seqlenlen); 802ea5a: 4628 mov r0, r5 snmp_asn1_enc_s32t_cnt(snmp_version, &rhl->verlen); snmp_asn1_enc_length_cnt(rhl->verlen, &rhl->verlenlen); tot_len += 1 + rhl->verlen + rhl->verlenlen; rhl->seqlen = tot_len; 802ea5c: f8a4 512c strh.w r5, [r4, #300] ; 0x12c snmp_asn1_enc_length_cnt(rhl->seqlen, &rhl->seqlenlen); 802ea60: f504 718f add.w r1, r4, #286 ; 0x11e 802ea64: f7fc ff49 bl 802b8fa tot_len += 1 + rhl->seqlenlen; 802ea68: f894 311e ldrb.w r3, [r4, #286] ; 0x11e 802ea6c: 3301 adds r3, #1 802ea6e: 18e8 adds r0, r5, r3 return tot_len; } 802ea70: b280 uxth r0, r0 802ea72: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} 802ea76: bf00 nop 802ea78: 080383f0 .word 0x080383f0 0802ea7c : /** * Encodes varbind list from head to tail. */ static u16_t snmp_varbind_list_enc(struct snmp_varbind_root *root, struct pbuf *p, u16_t ofs) { 802ea7c: b570 push {r4, r5, r6, lr} 802ea7e: 4616 mov r6, r2 802ea80: 4604 mov r4, r0 s32_t *sint_ptr; u32_t *uint_ptr; u8_t *raw_ptr; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); ofs += 1; 802ea82: 3601 adds r6, #1 /** * Encodes varbind list from head to tail. */ static u16_t snmp_varbind_list_enc(struct snmp_varbind_root *root, struct pbuf *p, u16_t ofs) { 802ea84: 460d mov r5, r1 struct snmp_varbind *vb; s32_t *sint_ptr; u32_t *uint_ptr; u8_t *raw_ptr; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); 802ea86: 4608 mov r0, r1 ofs += 1; 802ea88: b2b6 uxth r6, r6 struct snmp_varbind *vb; s32_t *sint_ptr; u32_t *uint_ptr; u8_t *raw_ptr; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); 802ea8a: 4611 mov r1, r2 802ea8c: 2230 movs r2, #48 ; 0x30 802ea8e: f7fc ff81 bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, root->seqlen); 802ea92: 4628 mov r0, r5 802ea94: 4631 mov r1, r6 802ea96: 8962 ldrh r2, [r4, #10] 802ea98: f7fc ff90 bl 802b9bc ofs += root->seqlenlen; 802ea9c: 7a63 ldrb r3, [r4, #9] 802ea9e: e064 b.n 802eb6a vb = root->head; while ( vb != NULL ) { snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); 802eaa0: 4631 mov r1, r6 ofs += 1; 802eaa2: 3601 adds r6, #1 ofs += root->seqlenlen; vb = root->head; while ( vb != NULL ) { snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); 802eaa4: 2230 movs r2, #48 ; 0x30 ofs += 1; 802eaa6: b2b6 uxth r6, r6 ofs += root->seqlenlen; vb = root->head; while ( vb != NULL ) { snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); 802eaa8: 4628 mov r0, r5 802eaaa: f7fc ff73 bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, vb->seqlen); 802eaae: 4631 mov r1, r6 802eab0: 8ba2 ldrh r2, [r4, #28] 802eab2: 4628 mov r0, r5 802eab4: f7fc ff82 bl 802b9bc ofs += vb->seqlenlen; 802eab8: 7e23 ldrb r3, [r4, #24] 802eaba: 18f6 adds r6, r6, r3 802eabc: b2b6 uxth r6, r6 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 802eabe: 4631 mov r1, r6 ofs += 1; 802eac0: 3601 adds r6, #1 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); ofs += 1; snmp_asn1_enc_length(p, ofs, vb->seqlen); ofs += vb->seqlenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 802eac2: 2206 movs r2, #6 ofs += 1; 802eac4: b2b6 uxth r6, r6 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); ofs += 1; snmp_asn1_enc_length(p, ofs, vb->seqlen); ofs += vb->seqlenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 802eac6: 4628 mov r0, r5 802eac8: f7fc ff64 bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, vb->olen); 802eacc: 4631 mov r1, r6 802eace: 8be2 ldrh r2, [r4, #30] 802ead0: 4628 mov r0, r5 802ead2: f7fc ff73 bl 802b9bc ofs += vb->olenlen; 802ead6: 7e63 ldrb r3, [r4, #25] snmp_asn1_enc_oid(p, ofs, vb->ident_len, &vb->ident[0]); 802ead8: 7a22 ldrb r2, [r4, #8] ofs += vb->seqlenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); ofs += 1; snmp_asn1_enc_length(p, ofs, vb->olen); ofs += vb->olenlen; 802eada: 18f6 adds r6, r6, r3 802eadc: b2b6 uxth r6, r6 snmp_asn1_enc_oid(p, ofs, vb->ident_len, &vb->ident[0]); 802eade: 4631 mov r1, r6 802eae0: 68e3 ldr r3, [r4, #12] 802eae2: 4628 mov r0, r5 802eae4: f7fd f81f bl 802bb26 ofs += vb->olen; 802eae8: 8be3 ldrh r3, [r4, #30] snmp_asn1_enc_type(p, ofs, vb->value_type); 802eaea: 7c22 ldrb r2, [r4, #16] snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); ofs += 1; snmp_asn1_enc_length(p, ofs, vb->olen); ofs += vb->olenlen; snmp_asn1_enc_oid(p, ofs, vb->ident_len, &vb->ident[0]); ofs += vb->olen; 802eaec: 18f6 adds r6, r6, r3 802eaee: b2b6 uxth r6, r6 snmp_asn1_enc_type(p, ofs, vb->value_type); 802eaf0: 4631 mov r1, r6 ofs += 1; 802eaf2: 3601 adds r6, #1 802eaf4: b2b6 uxth r6, r6 snmp_asn1_enc_length(p, ofs, vb->olen); ofs += vb->olenlen; snmp_asn1_enc_oid(p, ofs, vb->ident_len, &vb->ident[0]); ofs += vb->olen; snmp_asn1_enc_type(p, ofs, vb->value_type); 802eaf6: 4628 mov r0, r5 802eaf8: f7fc ff4c bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, vb->vlen); 802eafc: 4631 mov r1, r6 802eafe: 4628 mov r0, r5 802eb00: 8c22 ldrh r2, [r4, #32] 802eb02: f7fc ff5b bl 802b9bc ofs += vb->vlenlen; 802eb06: 7ea3 ldrb r3, [r4, #26] 802eb08: 18f6 adds r6, r6, r3 switch (vb->value_type) 802eb0a: 7c23 ldrb r3, [r4, #16] 802eb0c: 2b40 cmp r3, #64 ; 0x40 ofs += vb->olen; snmp_asn1_enc_type(p, ofs, vb->value_type); ofs += 1; snmp_asn1_enc_length(p, ofs, vb->vlen); ofs += vb->vlenlen; 802eb0e: b2b6 uxth r6, r6 switch (vb->value_type) 802eb10: d01c beq.n 802eb4c 802eb12: d806 bhi.n 802eb22 802eb14: 2b04 cmp r3, #4 802eb16: d019 beq.n 802eb4c 802eb18: 2b06 cmp r3, #6 802eb1a: d01e beq.n 802eb5a 802eb1c: 2b02 cmp r3, #2 802eb1e: d123 bne.n 802eb68 802eb20: e004 b.n 802eb2c 802eb22: 2b43 cmp r3, #67 ; 0x43 802eb24: d90a bls.n 802eb3c 802eb26: 2b44 cmp r3, #68 ; 0x44 802eb28: d11e bne.n 802eb68 802eb2a: e00f b.n 802eb4c { case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG): sint_ptr = (s32_t*)vb->value; snmp_asn1_enc_s32t(p, ofs, vb->vlen, *sint_ptr); 802eb2c: 6963 ldr r3, [r4, #20] 802eb2e: 8c22 ldrh r2, [r4, #32] 802eb30: 681b ldr r3, [r3, #0] 802eb32: 4628 mov r0, r5 802eb34: 4631 mov r1, r6 802eb36: f7fc ffc9 bl 802bacc break; 802eb3a: e015 b.n 802eb68 case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_COUNTER): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_GAUGE): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS): uint_ptr = (u32_t*)vb->value; snmp_asn1_enc_u32t(p, ofs, vb->vlen, *uint_ptr); 802eb3c: 6963 ldr r3, [r4, #20] 802eb3e: 8c22 ldrh r2, [r4, #32] 802eb40: 681b ldr r3, [r3, #0] 802eb42: 4628 mov r0, r5 802eb44: 4631 mov r1, r6 802eb46: f7fc ff81 bl 802ba4c break; 802eb4a: e00d b.n 802eb68 case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR): case (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_OPAQUE): raw_ptr = (u8_t*)vb->value; snmp_asn1_enc_raw(p, ofs, vb->vlen, raw_ptr); 802eb4c: 4628 mov r0, r5 802eb4e: 4631 mov r1, r6 802eb50: 8c22 ldrh r2, [r4, #32] 802eb52: 6963 ldr r3, [r4, #20] 802eb54: f7fd f85a bl 802bc0c break; 802eb58: e006 b.n 802eb68 case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_NUL): break; case (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID): sint_ptr = (s32_t*)vb->value; snmp_asn1_enc_oid(p, ofs, vb->value_len / sizeof(s32_t), sint_ptr); 802eb5a: 7c62 ldrb r2, [r4, #17] 802eb5c: 6963 ldr r3, [r4, #20] 802eb5e: 4628 mov r0, r5 802eb60: 4631 mov r1, r6 802eb62: 0892 lsrs r2, r2, #2 802eb64: f7fc ffdf bl 802bb26 break; default: /* unsupported type */ break; }; ofs += vb->vlen; 802eb68: 8c23 ldrh r3, [r4, #32] vb = vb->next; 802eb6a: 6824 ldr r4, [r4, #0] break; default: /* unsupported type */ break; }; ofs += vb->vlen; 802eb6c: 18f6 adds r6, r6, r3 802eb6e: b2b6 uxth r6, r6 ofs += 1; snmp_asn1_enc_length(p, ofs, root->seqlen); ofs += root->seqlenlen; vb = root->head; while ( vb != NULL ) 802eb70: 2c00 cmp r4, #0 802eb72: d195 bne.n 802eaa0 }; ofs += vb->vlen; vb = vb->next; } return ofs; } 802eb74: 4630 mov r0, r6 802eb76: bd70 pop {r4, r5, r6, pc} 0802eb78 : * @param dst IPv4 address in host order. */ void snmp_trap_dst_ip_set(u8_t dst_idx, ip_addr_t *dst) { if (dst_idx < SNMP_TRAP_DESTINATIONS) 802eb78: b918 cbnz r0, 802eb82 { ip_addr_set(&trap_dst[dst_idx].dip, dst); 802eb7a: b101 cbz r1, 802eb7e 802eb7c: 6809 ldr r1, [r1, #0] 802eb7e: 4b01 ldr r3, [pc, #4] ; (802eb84 ) 802eb80: 6019 str r1, [r3, #0] 802eb82: 4770 bx lr 802eb84: 20010628 .word 0x20010628 0802eb88 : * @note the caller is responsible for filling in outvb in the m_stat * and provide error-status and index (except for tooBig errors) ... */ err_t snmp_send_response(struct snmp_msg_pstat *m_stat) { 802eb88: b5f0 push {r4, r5, r6, r7, lr} 802eb8a: 4604 mov r4, r0 802eb8c: b085 sub sp, #20 struct snmp_varbind_root emptyvb = {NULL, NULL, 0, 0, 0}; 802eb8e: 220c movs r2, #12 802eb90: 2100 movs r1, #0 802eb92: a801 add r0, sp, #4 struct pbuf *p; u16_t tot_len; err_t err; /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&m_stat->outvb); 802eb94: f504 7686 add.w r6, r4, #268 ; 0x10c * and provide error-status and index (except for tooBig errors) ... */ err_t snmp_send_response(struct snmp_msg_pstat *m_stat) { struct snmp_varbind_root emptyvb = {NULL, NULL, 0, 0, 0}; 802eb98: f7f2 fdb2 bl 8021700 struct pbuf *p; u16_t tot_len; err_t err; /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&m_stat->outvb); 802eb9c: 4630 mov r0, r6 802eb9e: f7ff fe8f bl 802e8c0 802eba2: 4601 mov r1, r0 tot_len = snmp_resp_header_sum(m_stat, tot_len); 802eba4: 4620 mov r0, r4 802eba6: f7ff fef1 bl 802e98c /* try allocating pbuf(s) for complete response */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 802ebaa: 2203 movs r2, #3 u16_t tot_len; err_t err; /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&m_stat->outvb); tot_len = snmp_resp_header_sum(m_stat, tot_len); 802ebac: 4601 mov r1, r0 /* try allocating pbuf(s) for complete response */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 802ebae: 2000 movs r0, #0 802ebb0: f7f9 fbdf bl 8028372 if (p == NULL) 802ebb4: 4605 mov r5, r0 802ebb6: b990 cbnz r0, 802ebde { LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_snd_response() tooBig\n")); /* can't construct reply, return error-status tooBig */ m_stat->error_status = SNMP_ES_TOOBIG; 802ebb8: 2301 movs r3, #1 802ebba: 6123 str r3, [r4, #16] m_stat->error_index = 0; 802ebbc: 6160 str r0, [r4, #20] /* pass 0, recalculate lengths, for empty varbind-list */ tot_len = snmp_varbind_list_sum(&emptyvb); 802ebbe: a801 add r0, sp, #4 802ebc0: f7ff fe7e bl 802e8c0 802ebc4: 4601 mov r1, r0 tot_len = snmp_resp_header_sum(m_stat, tot_len); 802ebc6: 4620 mov r0, r4 802ebc8: f7ff fee0 bl 802e98c /* retry allocation once for header and empty varbind-list */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 802ebcc: 2203 movs r2, #3 /* can't construct reply, return error-status tooBig */ m_stat->error_status = SNMP_ES_TOOBIG; m_stat->error_index = 0; /* pass 0, recalculate lengths, for empty varbind-list */ tot_len = snmp_varbind_list_sum(&emptyvb); tot_len = snmp_resp_header_sum(m_stat, tot_len); 802ebce: 4601 mov r1, r0 /* retry allocation once for header and empty varbind-list */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 802ebd0: 4628 mov r0, r5 802ebd2: f7f9 fbce bl 8028372 } if (p != NULL) 802ebd6: 4605 mov r5, r0 802ebd8: 2800 cmp r0, #0 802ebda: f000 80dc beq.w 802ed96 snmp_resp_header_enc(struct snmp_msg_pstat *m_stat, struct pbuf *p) { u16_t ofs; ofs = 0; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); 802ebde: 2100 movs r1, #0 802ebe0: 2230 movs r2, #48 ; 0x30 802ebe2: 4628 mov r0, r5 802ebe4: f7fc fed6 bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.seqlen); 802ebe8: 2101 movs r1, #1 802ebea: f8b4 212c ldrh.w r2, [r4, #300] ; 0x12c 802ebee: 4628 mov r0, r5 802ebf0: f7fc fee4 bl 802b9bc ofs += m_stat->rhl.seqlenlen; 802ebf4: f894 711e ldrb.w r7, [r4, #286] ; 0x11e snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802ebf8: 2202 movs r2, #2 802ebfa: 1c79 adds r1, r7, #1 802ebfc: 4628 mov r0, r5 ofs += 1; 802ebfe: 3702 adds r7, #2 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.seqlen); ofs += m_stat->rhl.seqlenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802ec00: f7fc fec8 bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.verlen); 802ec04: 4639 mov r1, r7 802ec06: f8b4 212a ldrh.w r2, [r4, #298] ; 0x12a 802ec0a: 4628 mov r0, r5 802ec0c: f7fc fed6 bl 802b9bc ofs += m_stat->rhl.verlenlen; 802ec10: f894 311d ldrb.w r3, [r4, #285] ; 0x11d snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.verlen, snmp_version); 802ec14: f8b4 212a ldrh.w r2, [r4, #298] ; 0x12a ofs += m_stat->rhl.seqlenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.verlen); ofs += m_stat->rhl.verlenlen; 802ec18: 18ff adds r7, r7, r3 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.verlen, snmp_version); 802ec1a: 4b61 ldr r3, [pc, #388] ; (802eda0 ) 802ec1c: 4639 mov r1, r7 802ec1e: 681b ldr r3, [r3, #0] 802ec20: 4628 mov r0, r5 802ec22: f7fc ff53 bl 802bacc ofs += m_stat->rhl.verlen; 802ec26: f8b4 312a ldrh.w r3, [r4, #298] ; 0x12a 802ec2a: 18ff adds r7, r7, r3 802ec2c: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 802ec2e: 4639 mov r1, r7 ofs += 1; 802ec30: 3701 adds r7, #1 snmp_asn1_enc_length(p, ofs, m_stat->rhl.verlen); ofs += m_stat->rhl.verlenlen; snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.verlen, snmp_version); ofs += m_stat->rhl.verlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 802ec32: 2204 movs r2, #4 ofs += 1; 802ec34: b2bf uxth r7, r7 snmp_asn1_enc_length(p, ofs, m_stat->rhl.verlen); ofs += m_stat->rhl.verlenlen; snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.verlen, snmp_version); ofs += m_stat->rhl.verlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 802ec36: 4628 mov r0, r5 802ec38: f7fc feac bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.comlen); 802ec3c: 4639 mov r1, r7 802ec3e: f8b4 2128 ldrh.w r2, [r4, #296] ; 0x128 802ec42: 4628 mov r0, r5 802ec44: f7fc feba bl 802b9bc ofs += m_stat->rhl.comlenlen; 802ec48: f894 311c ldrb.w r3, [r4, #284] ; 0x11c snmp_asn1_enc_raw(p, ofs, m_stat->rhl.comlen, m_stat->community); 802ec4c: f8b4 2128 ldrh.w r2, [r4, #296] ; 0x128 ofs += m_stat->rhl.verlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.comlen); ofs += m_stat->rhl.comlenlen; 802ec50: 18ff adds r7, r7, r3 802ec52: b2bf uxth r7, r7 snmp_asn1_enc_raw(p, ofs, m_stat->rhl.comlen, m_stat->community); 802ec54: 4639 mov r1, r7 802ec56: f104 0318 add.w r3, r4, #24 802ec5a: 4628 mov r0, r5 802ec5c: f7fc ffd6 bl 802bc0c ofs += m_stat->rhl.comlen; 802ec60: f8b4 3128 ldrh.w r3, [r4, #296] ; 0x128 802ec64: 18ff adds r7, r7, r3 802ec66: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP)); 802ec68: 4639 mov r1, r7 ofs += 1; 802ec6a: 3701 adds r7, #1 snmp_asn1_enc_length(p, ofs, m_stat->rhl.comlen); ofs += m_stat->rhl.comlenlen; snmp_asn1_enc_raw(p, ofs, m_stat->rhl.comlen, m_stat->community); ofs += m_stat->rhl.comlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP)); 802ec6c: 22a2 movs r2, #162 ; 0xa2 ofs += 1; 802ec6e: b2bf uxth r7, r7 snmp_asn1_enc_length(p, ofs, m_stat->rhl.comlen); ofs += m_stat->rhl.comlenlen; snmp_asn1_enc_raw(p, ofs, m_stat->rhl.comlen, m_stat->community); ofs += m_stat->rhl.comlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP)); 802ec70: 4628 mov r0, r5 802ec72: f7fc fe8f bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.pdulen); 802ec76: 4639 mov r1, r7 802ec78: f8b4 2126 ldrh.w r2, [r4, #294] ; 0x126 802ec7c: 4628 mov r0, r5 802ec7e: f7fc fe9d bl 802b9bc ofs += m_stat->rhl.pdulenlen; 802ec82: f894 311b ldrb.w r3, [r4, #283] ; 0x11b 802ec86: 18ff adds r7, r7, r3 802ec88: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802ec8a: 4639 mov r1, r7 ofs += 1; 802ec8c: 3701 adds r7, #1 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.pdulen); ofs += m_stat->rhl.pdulenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802ec8e: 2202 movs r2, #2 ofs += 1; 802ec90: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_GET_RESP)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.pdulen); ofs += m_stat->rhl.pdulenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802ec92: 4628 mov r0, r5 802ec94: f7fc fe7e bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.ridlen); 802ec98: 4639 mov r1, r7 802ec9a: f8b4 2124 ldrh.w r2, [r4, #292] ; 0x124 802ec9e: 4628 mov r0, r5 802eca0: f7fc fe8c bl 802b9bc ofs += m_stat->rhl.ridlenlen; 802eca4: f894 311a ldrb.w r3, [r4, #282] ; 0x11a snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.ridlen, m_stat->rid); 802eca8: f8b4 2124 ldrh.w r2, [r4, #292] ; 0x124 ofs += m_stat->rhl.pdulenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.ridlen); ofs += m_stat->rhl.ridlenlen; 802ecac: 18ff adds r7, r7, r3 802ecae: b2bf uxth r7, r7 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.ridlen, m_stat->rid); 802ecb0: 4639 mov r1, r7 802ecb2: 68e3 ldr r3, [r4, #12] 802ecb4: 4628 mov r0, r5 802ecb6: f7fc ff09 bl 802bacc ofs += m_stat->rhl.ridlen; 802ecba: f8b4 3124 ldrh.w r3, [r4, #292] ; 0x124 802ecbe: 18ff adds r7, r7, r3 802ecc0: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802ecc2: 4639 mov r1, r7 ofs += 1; 802ecc4: 3701 adds r7, #1 snmp_asn1_enc_length(p, ofs, m_stat->rhl.ridlen); ofs += m_stat->rhl.ridlenlen; snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.ridlen, m_stat->rid); ofs += m_stat->rhl.ridlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802ecc6: 2202 movs r2, #2 ofs += 1; 802ecc8: b2bf uxth r7, r7 snmp_asn1_enc_length(p, ofs, m_stat->rhl.ridlen); ofs += m_stat->rhl.ridlenlen; snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.ridlen, m_stat->rid); ofs += m_stat->rhl.ridlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802ecca: 4628 mov r0, r5 802eccc: f7fc fe62 bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.errstatlen); 802ecd0: 4639 mov r1, r7 802ecd2: f8b4 2122 ldrh.w r2, [r4, #290] ; 0x122 802ecd6: 4628 mov r0, r5 802ecd8: f7fc fe70 bl 802b9bc ofs += m_stat->rhl.errstatlenlen; 802ecdc: f894 3119 ldrb.w r3, [r4, #281] ; 0x119 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.errstatlen, m_stat->error_status); 802ece0: f8b4 2122 ldrh.w r2, [r4, #290] ; 0x122 ofs += m_stat->rhl.ridlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.errstatlen); ofs += m_stat->rhl.errstatlenlen; 802ece4: 18ff adds r7, r7, r3 802ece6: b2bf uxth r7, r7 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.errstatlen, m_stat->error_status); 802ece8: 4639 mov r1, r7 802ecea: 6923 ldr r3, [r4, #16] 802ecec: 4628 mov r0, r5 802ecee: f7fc feed bl 802bacc ofs += m_stat->rhl.errstatlen; 802ecf2: f8b4 3122 ldrh.w r3, [r4, #290] ; 0x122 802ecf6: 18ff adds r7, r7, r3 802ecf8: b2bf uxth r7, r7 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802ecfa: 4639 mov r1, r7 ofs += 1; 802ecfc: 3701 adds r7, #1 snmp_asn1_enc_length(p, ofs, m_stat->rhl.errstatlen); ofs += m_stat->rhl.errstatlenlen; snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.errstatlen, m_stat->error_status); ofs += m_stat->rhl.errstatlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802ecfe: 2202 movs r2, #2 ofs += 1; 802ed00: b2bf uxth r7, r7 snmp_asn1_enc_length(p, ofs, m_stat->rhl.errstatlen); ofs += m_stat->rhl.errstatlenlen; snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.errstatlen, m_stat->error_status); ofs += m_stat->rhl.errstatlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802ed02: 4628 mov r0, r5 802ed04: f7fc fe46 bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.erridxlen); 802ed08: 4639 mov r1, r7 802ed0a: f8b4 2120 ldrh.w r2, [r4, #288] ; 0x120 802ed0e: 4628 mov r0, r5 802ed10: f7fc fe54 bl 802b9bc ofs += m_stat->rhl.erridxlenlen; 802ed14: f894 3118 ldrb.w r3, [r4, #280] ; 0x118 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.erridxlen, m_stat->error_index); 802ed18: f8b4 2120 ldrh.w r2, [r4, #288] ; 0x120 ofs += m_stat->rhl.errstatlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_stat->rhl.erridxlen); ofs += m_stat->rhl.erridxlenlen; 802ed1c: 18ff adds r7, r7, r3 802ed1e: b2bf uxth r7, r7 snmp_asn1_enc_s32t(p, ofs, m_stat->rhl.erridxlen, m_stat->error_index); 802ed20: 4639 mov r1, r7 802ed22: 6963 ldr r3, [r4, #20] 802ed24: 4628 mov r0, r5 802ed26: f7fc fed1 bl 802bacc ofs += m_stat->rhl.erridxlen; 802ed2a: f8b4 3120 ldrh.w r3, [r4, #288] ; 0x120 802ed2e: 18fa adds r2, r7, r3 LWIP_DEBUGF(SNMP_MSG_DEBUG, ("snmp_snd_response() p != NULL\n")); /* pass 1, size error, encode packet ino the pbuf(s) */ ofs = snmp_resp_header_enc(m_stat, p); snmp_varbind_list_enc(&m_stat->outvb, p, ofs); 802ed30: 4630 mov r0, r6 802ed32: 4629 mov r1, r5 802ed34: b292 uxth r2, r2 802ed36: f7ff fea1 bl 802ea7c switch (m_stat->error_status) 802ed3a: 6923 ldr r3, [r4, #16] 802ed3c: 3b01 subs r3, #1 802ed3e: 2b04 cmp r3, #4 802ed40: d80f bhi.n 802ed62 802ed42: e8df f003 tbb [pc, r3] 802ed46: 0603 .short 0x0603 802ed48: 0e09 .short 0x0e09 802ed4a: 0c .byte 0x0c 802ed4b: 00 .byte 0x00 { case SNMP_ES_TOOBIG: snmp_inc_snmpouttoobigs(); 802ed4c: f7fe fa12 bl 802d174 break; 802ed50: e007 b.n 802ed62 case SNMP_ES_NOSUCHNAME: snmp_inc_snmpoutnosuchnames(); 802ed52: f7fe fa17 bl 802d184 break; 802ed56: e004 b.n 802ed62 case SNMP_ES_BADVALUE: snmp_inc_snmpoutbadvalues(); 802ed58: f7fe fa1c bl 802d194 break; 802ed5c: e001 b.n 802ed62 case SNMP_ES_GENERROR: snmp_inc_snmpoutgenerrs(); 802ed5e: f7fe fa21 bl 802d1a4 break; } snmp_inc_snmpoutgetresponses(); 802ed62: f7fe fa27 bl 802d1b4 snmp_inc_snmpoutpkts(); 802ed66: f7fe f985 bl 802d074 /** @todo do we need separate rx and tx pcbs for threaded case? */ /** connect to the originating source */ udp_connect(m_stat->pcb, &m_stat->sip, m_stat->sp); 802ed6a: 8922 ldrh r2, [r4, #8] 802ed6c: 6820 ldr r0, [r4, #0] 802ed6e: 1d21 adds r1, r4, #4 802ed70: f7fb ffcc bl 802ad0c err = udp_send(m_stat->pcb, p); 802ed74: 4629 mov r1, r5 802ed76: 6820 ldr r0, [r4, #0] 802ed78: f7fb ffc3 bl 802ad02 /** @todo release some memory, retry and return tooBig? tooMuchHassle? */ err = ERR_MEM; } else { err = ERR_OK; 802ed7c: f1b0 3fff cmp.w r0, #4294967295 802ed80: bf0c ite eq 802ed82: f04f 36ff moveq.w r6, #4294967295 802ed86: 2600 movne r6, #0 } /** disassociate remote address and port with this pcb */ udp_disconnect(m_stat->pcb); 802ed88: 6820 ldr r0, [r4, #0] 802ed8a: f7fb ffe5 bl 802ad58 pbuf_free(p); 802ed8e: 4628 mov r0, r5 802ed90: f7f9 faa2 bl 80282d8 802ed94: e000 b.n 802ed98 } else { /* first pbuf alloc try or retry alloc failed very low on memory, couldn't return tooBig */ return ERR_MEM; 802ed96: 26ff movs r6, #255 ; 0xff } } 802ed98: b270 sxtb r0, r6 802ed9a: b005 add sp, #20 802ed9c: bdf0 pop {r4, r5, r6, r7, pc} 802ed9e: bf00 nop 802eda0: 080383f0 .word 0x080383f0 0802eda4 : * and .iso.org.dod.internet.private.enterprises.yourenterprise * (sysObjectID) for specific traps. */ err_t snmp_send_trap(s8_t generic_trap, struct snmp_obj_id *eoid, s32_t specific_trap) { 802eda4: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} struct pbuf *p; u16_t i,tot_len; for (i=0, td = &trap_dst[0]; ienable != 0) && !ip_addr_isany(&td->dip)) 802eda8: 4b11 ldr r3, [pc, #68] ; (802edf0 ) * and .iso.org.dod.internet.private.enterprises.yourenterprise * (sysObjectID) for specific traps. */ err_t snmp_send_trap(s8_t generic_trap, struct snmp_obj_id *eoid, s32_t specific_trap) { 802edaa: 4617 mov r7, r2 struct pbuf *p; u16_t i,tot_len; for (i=0, td = &trap_dst[0]; ienable != 0) && !ip_addr_isany(&td->dip)) 802edac: 791a ldrb r2, [r3, #4] * and .iso.org.dod.internet.private.enterprises.yourenterprise * (sysObjectID) for specific traps. */ err_t snmp_send_trap(s8_t generic_trap, struct snmp_obj_id *eoid, s32_t specific_trap) { 802edae: b085 sub sp, #20 802edb0: 4605 mov r5, r0 802edb2: 460e mov r6, r1 struct pbuf *p; u16_t i,tot_len; for (i=0, td = &trap_dst[0]; ienable != 0) && !ip_addr_isany(&td->dip)) 802edb4: 2a00 cmp r2, #0 802edb6: f000 81b8 beq.w 802f12a 802edba: 6818 ldr r0, [r3, #0] 802edbc: 2800 cmp r0, #0 802edbe: f000 81b4 beq.w 802f12a { /* network order trap destination */ ip_addr_copy(trap_msg.dip, td->dip); 802edc2: 4c0c ldr r4, [pc, #48] ; (802edf4 ) 802edc4: 6060 str r0, [r4, #4] /* lookup current source address for this dst */ dst_if = ip_route(&td->dip); 802edc6: 4618 mov r0, r3 802edc8: f7fc fa10 bl 802b1ec ip_addr_copy(dst_ip, dst_if->ip_addr); 802edcc: 6843 ldr r3, [r0, #4] /* @todo: what about IPv6? */ trap_msg.sip_raw[0] = ip4_addr1(&dst_ip); trap_msg.sip_raw[1] = ip4_addr2(&dst_ip); trap_msg.sip_raw[2] = ip4_addr3(&dst_ip); trap_msg.sip_raw[3] = ip4_addr4(&dst_ip); trap_msg.gen_trap = generic_trap; 802edce: 6125 str r5, [r4, #16] /* lookup current source address for this dst */ dst_if = ip_route(&td->dip); ip_addr_copy(dst_ip, dst_if->ip_addr); /* @todo: what about IPv6? */ trap_msg.sip_raw[0] = ip4_addr1(&dst_ip); trap_msg.sip_raw[1] = ip4_addr2(&dst_ip); 802edd0: f3c3 2207 ubfx r2, r3, #8, #8 ip_addr_copy(trap_msg.dip, td->dip); /* lookup current source address for this dst */ dst_if = ip_route(&td->dip); ip_addr_copy(dst_ip, dst_if->ip_addr); /* @todo: what about IPv6? */ trap_msg.sip_raw[0] = ip4_addr1(&dst_ip); 802edd4: 7323 strb r3, [r4, #12] trap_msg.sip_raw[1] = ip4_addr2(&dst_ip); 802edd6: 7362 strb r2, [r4, #13] trap_msg.sip_raw[2] = ip4_addr3(&dst_ip); trap_msg.sip_raw[3] = ip4_addr4(&dst_ip); trap_msg.gen_trap = generic_trap; trap_msg.spc_trap = specific_trap; if (generic_trap == SNMP_GENTRAP_ENTERPRISESPC) 802edd8: 2d06 cmp r5, #6 dst_if = ip_route(&td->dip); ip_addr_copy(dst_ip, dst_if->ip_addr); /* @todo: what about IPv6? */ trap_msg.sip_raw[0] = ip4_addr1(&dst_ip); trap_msg.sip_raw[1] = ip4_addr2(&dst_ip); trap_msg.sip_raw[2] = ip4_addr3(&dst_ip); 802edda: f3c3 4207 ubfx r2, r3, #16, #8 trap_msg.sip_raw[3] = ip4_addr4(&dst_ip); 802edde: f3c3 6307 ubfx r3, r3, #24, #8 dst_if = ip_route(&td->dip); ip_addr_copy(dst_ip, dst_if->ip_addr); /* @todo: what about IPv6? */ trap_msg.sip_raw[0] = ip4_addr1(&dst_ip); trap_msg.sip_raw[1] = ip4_addr2(&dst_ip); trap_msg.sip_raw[2] = ip4_addr3(&dst_ip); 802ede2: 73a2 strb r2, [r4, #14] trap_msg.sip_raw[3] = ip4_addr4(&dst_ip); 802ede4: 73e3 strb r3, [r4, #15] trap_msg.gen_trap = generic_trap; trap_msg.spc_trap = specific_trap; 802ede6: 6167 str r7, [r4, #20] if (generic_trap == SNMP_GENTRAP_ENTERPRISESPC) 802ede8: d106 bne.n 802edf8 { /* enterprise-Specific trap */ trap_msg.enterprise = eoid; 802edea: 60a6 str r6, [r4, #8] 802edec: e008 b.n 802ee00 802edee: bf00 nop 802edf0: 20010628 .word 0x20010628 802edf4: 20010630 .word 0x20010630 } else { /* generic (MIB-II) trap */ snmp_get_snmpgrpid_ptr(&trap_msg.enterprise); 802edf8: f104 0008 add.w r0, r4, #8 802edfc: f7fe f9ea bl 802d1d4 } snmp_get_sysuptime(&trap_msg.ts); 802ee00: 48bb ldr r0, [pc, #748] ; (802f0f0 ) struct snmp_trap_header_lengths *thl; thl = &m_trap->thl; tot_len = vb_len; snmp_asn1_enc_u32t_cnt(m_trap->ts, &thl->tslen); 802ee02: 4cbc ldr r4, [pc, #752] ; (802f0f4 ) else { /* generic (MIB-II) trap */ snmp_get_snmpgrpid_ptr(&trap_msg.enterprise); } snmp_get_sysuptime(&trap_msg.ts); 802ee04: f7fd fd5a bl 802c8bc /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&trap_msg.outvb); 802ee08: 48bb ldr r0, [pc, #748] ; (802f0f8 ) 802ee0a: f7ff fd59 bl 802e8c0 struct snmp_trap_header_lengths *thl; thl = &m_trap->thl; tot_len = vb_len; snmp_asn1_enc_u32t_cnt(m_trap->ts, &thl->tslen); 802ee0e: f104 0132 add.w r1, r4, #50 ; 0x32 snmp_get_snmpgrpid_ptr(&trap_msg.enterprise); } snmp_get_sysuptime(&trap_msg.ts); /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&trap_msg.outvb); 802ee12: 4606 mov r6, r0 struct snmp_trap_header_lengths *thl; thl = &m_trap->thl; tot_len = vb_len; snmp_asn1_enc_u32t_cnt(m_trap->ts, &thl->tslen); 802ee14: 69a0 ldr r0, [r4, #24] 802ee16: f7fc fd7b bl 802b910 snmp_asn1_enc_length_cnt(thl->tslen, &thl->tslenlen); 802ee1a: 8e60 ldrh r0, [r4, #50] ; 0x32 802ee1c: f104 0128 add.w r1, r4, #40 ; 0x28 802ee20: f7fc fd6b bl 802b8fa tot_len += 1 + thl->tslen + thl->tslenlen; 802ee24: f8b4 c032 ldrh.w ip, [r4, #50] ; 0x32 snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); 802ee28: 6960 ldr r0, [r4, #20] 802ee2a: f8cd c004 str.w ip, [sp, #4] 802ee2e: f104 0134 add.w r1, r4, #52 ; 0x34 thl = &m_trap->thl; tot_len = vb_len; snmp_asn1_enc_u32t_cnt(m_trap->ts, &thl->tslen); snmp_asn1_enc_length_cnt(thl->tslen, &thl->tslenlen); tot_len += 1 + thl->tslen + thl->tslenlen; 802ee32: f894 9028 ldrb.w r9, [r4, #40] ; 0x28 snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); 802ee36: f7fc fd80 bl 802b93a snmp_asn1_enc_length_cnt(thl->strplen, &thl->strplenlen); 802ee3a: 8ea0 ldrh r0, [r4, #52] ; 0x34 802ee3c: f104 0129 add.w r1, r4, #41 ; 0x29 802ee40: f7fc fd5b bl 802b8fa tot_len += 1 + thl->strplen + thl->strplenlen; 802ee44: 8ea3 ldrh r3, [r4, #52] ; 0x34 snmp_asn1_enc_s32t_cnt(m_trap->gen_trap, &thl->gtrplen); 802ee46: 6920 ldr r0, [r4, #16] 802ee48: 9302 str r3, [sp, #8] 802ee4a: f104 0136 add.w r1, r4, #54 ; 0x36 snmp_asn1_enc_length_cnt(thl->tslen, &thl->tslenlen); tot_len += 1 + thl->tslen + thl->tslenlen; snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); snmp_asn1_enc_length_cnt(thl->strplen, &thl->strplenlen); tot_len += 1 + thl->strplen + thl->strplenlen; 802ee4e: f894 8029 ldrb.w r8, [r4, #41] ; 0x29 snmp_asn1_enc_s32t_cnt(m_trap->gen_trap, &thl->gtrplen); snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); tot_len += 1 + thl->gtrplen + thl->gtrplenlen; thl->aaddrlen = 4; 802ee52: 2504 movs r5, #4 snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); snmp_asn1_enc_length_cnt(thl->strplen, &thl->strplenlen); tot_len += 1 + thl->strplen + thl->strplenlen; snmp_asn1_enc_s32t_cnt(m_trap->gen_trap, &thl->gtrplen); 802ee54: f7fc fd71 bl 802b93a snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); 802ee58: 8ee0 ldrh r0, [r4, #54] ; 0x36 802ee5a: f104 012a add.w r1, r4, #42 ; 0x2a 802ee5e: f7fc fd4c bl 802b8fa tot_len += 1 + thl->gtrplen + thl->gtrplenlen; thl->aaddrlen = 4; snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); 802ee62: 4628 mov r0, r5 802ee64: f104 012b add.w r1, r4, #43 ; 0x2b snmp_asn1_enc_length_cnt(thl->strplen, &thl->strplenlen); tot_len += 1 + thl->strplen + thl->strplenlen; snmp_asn1_enc_s32t_cnt(m_trap->gen_trap, &thl->gtrplen); snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); tot_len += 1 + thl->gtrplen + thl->gtrplenlen; 802ee68: f8b4 b036 ldrh.w fp, [r4, #54] ; 0x36 802ee6c: f894 702a ldrb.w r7, [r4, #42] ; 0x2a thl->aaddrlen = 4; 802ee70: 8725 strh r5, [r4, #56] ; 0x38 snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); 802ee72: f7fc fd42 bl 802b8fa tot_len += 1 + thl->aaddrlen + thl->aaddrlenlen; 802ee76: f894 202b ldrb.w r2, [r4, #43] ; 0x2b snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); 802ee7a: 68a1 ldr r1, [r4, #8] snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); tot_len += 1 + thl->gtrplen + thl->gtrplenlen; thl->aaddrlen = 4; snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); tot_len += 1 + thl->aaddrlen + thl->aaddrlenlen; 802ee7c: 9203 str r2, [sp, #12] snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); 802ee7e: f811 0b04 ldrb.w r0, [r1], #4 snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); tot_len += 1 + thl->gtrplen + thl->gtrplenlen; thl->aaddrlen = 4; snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); tot_len += 1 + thl->aaddrlen + thl->aaddrlenlen; 802ee82: f8b4 a038 ldrh.w sl, [r4, #56] ; 0x38 snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); 802ee86: f104 023a add.w r2, r4, #58 ; 0x3a 802ee8a: f7fc fd6b bl 802b964 snmp_asn1_enc_length_cnt(thl->eidlen, &thl->eidlenlen); 802ee8e: 8f60 ldrh r0, [r4, #58] ; 0x3a 802ee90: f104 012c add.w r1, r4, #44 ; 0x2c 802ee94: f7fc fd31 bl 802b8fa snmp_asn1_enc_length_cnt(thl->tslen, &thl->tslenlen); tot_len += 1 + thl->tslen + thl->tslenlen; snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); snmp_asn1_enc_length_cnt(thl->strplen, &thl->strplenlen); tot_len += 1 + thl->strplen + thl->strplenlen; 802ee98: f8dd c004 ldr.w ip, [sp, #4] 802ee9c: 9b02 ldr r3, [sp, #8] snmp_asn1_enc_s32t_cnt(m_trap->gen_trap, &thl->gtrplen); snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); tot_len += 1 + thl->gtrplen + thl->gtrplenlen; 802ee9e: 8f62 ldrh r2, [r4, #58] ; 0x3a snmp_asn1_enc_length_cnt(thl->tslen, &thl->tslenlen); tot_len += 1 + thl->tslen + thl->tslenlen; snmp_asn1_enc_s32t_cnt(m_trap->spc_trap, &thl->strplen); snmp_asn1_enc_length_cnt(thl->strplen, &thl->strplenlen); tot_len += 1 + thl->strplen + thl->strplenlen; 802eea0: 4463 add r3, ip 802eea2: 3305 adds r3, #5 snmp_asn1_enc_s32t_cnt(m_trap->gen_trap, &thl->gtrplen); snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); tot_len += 1 + thl->gtrplen + thl->gtrplenlen; 802eea4: 449b add fp, r3 802eea6: 44da add sl, fp 802eea8: fa12 fa8a uxtah sl, r2, sl thl->aaddrlen = 4; snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); tot_len += 1 + thl->aaddrlen + thl->aaddrlenlen; 802eeac: 44d1 add r9, sl 802eeae: 44c8 add r8, r9 snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); snmp_asn1_enc_length_cnt(thl->eidlen, &thl->eidlenlen); tot_len += 1 + thl->eidlen + thl->eidlenlen; 802eeb0: 9b03 ldr r3, [sp, #12] snmp_asn1_enc_length_cnt(thl->gtrplen, &thl->gtrplenlen); tot_len += 1 + thl->gtrplen + thl->gtrplenlen; thl->aaddrlen = 4; snmp_asn1_enc_length_cnt(thl->aaddrlen, &thl->aaddrlenlen); tot_len += 1 + thl->aaddrlen + thl->aaddrlenlen; 802eeb2: fa17 f788 uxtah r7, r7, r8 snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); snmp_asn1_enc_length_cnt(thl->eidlen, &thl->eidlenlen); tot_len += 1 + thl->eidlen + thl->eidlenlen; 802eeb6: 19df adds r7, r3, r7 802eeb8: f894 302c ldrb.w r3, [r4, #44] ; 0x2c 802eebc: 18ff adds r7, r7, r3 802eebe: fa16 f687 uxtah r6, r6, r7 802eec2: b2b6 uxth r6, r6 thl->pdulen = tot_len; snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); 802eec4: 4630 mov r0, r6 802eec6: f104 012d add.w r1, r4, #45 ; 0x2d tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; 802eeca: 2706 movs r7, #6 snmp_asn1_enc_oid_cnt(m_trap->enterprise->len, &m_trap->enterprise->id[0], &thl->eidlen); snmp_asn1_enc_length_cnt(thl->eidlen, &thl->eidlenlen); tot_len += 1 + thl->eidlen + thl->eidlenlen; thl->pdulen = tot_len; 802eecc: 87a6 strh r6, [r4, #60] ; 0x3c snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); 802eece: f7fc fd14 bl 802b8fa tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); 802eed2: 4638 mov r0, r7 802eed4: f104 012e add.w r1, r4, #46 ; 0x2e snmp_asn1_enc_length_cnt(thl->eidlen, &thl->eidlenlen); tot_len += 1 + thl->eidlen + thl->eidlenlen; thl->pdulen = tot_len; snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); tot_len += 1 + thl->pdulenlen; 802eed8: f894 a02d ldrb.w sl, [r4, #45] ; 0x2d thl->comlen = sizeof(snmp_publiccommunity) - 1; 802eedc: 87e7 strh r7, [r4, #62] ; 0x3e snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); 802eede: f7fc fd0c bl 802b8fa tot_len += 1 + thl->comlenlen + thl->comlen; snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); 802eee2: 4b86 ldr r3, [pc, #536] ; (802f0fc ) snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); tot_len += 1 + thl->comlenlen + thl->comlen; 802eee4: f894 902e ldrb.w r9, [r4, #46] ; 0x2e snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); 802eee8: f8d3 8000 ldr.w r8, [r3] snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); tot_len += 1 + thl->comlenlen + thl->comlen; 802eeec: f8b4 b03e ldrh.w fp, [r4, #62] ; 0x3e snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); 802eef0: 4640 mov r0, r8 802eef2: f104 0140 add.w r1, r4, #64 ; 0x40 802eef6: f7fc fd20 bl 802b93a snmp_asn1_enc_length_cnt(thl->verlen, &thl->verlenlen); 802eefa: f8b4 0040 ldrh.w r0, [r4, #64] ; 0x40 802eefe: f104 012f add.w r1, r4, #47 ; 0x2f 802ef02: f7fc fcfa bl 802b8fa snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); tot_len += 1 + thl->comlenlen + thl->comlen; 802ef06: f8b4 3040 ldrh.w r3, [r4, #64] ; 0x40 802ef0a: 449b add fp, r3 802ef0c: f10b 0b03 add.w fp, fp, #3 snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); snmp_asn1_enc_length_cnt(thl->verlen, &thl->verlenlen); tot_len += 1 + thl->verlen + thl->verlenlen; 802ef10: f894 302f ldrb.w r3, [r4, #47] ; 0x2f snmp_asn1_enc_length_cnt(thl->pdulen, &thl->pdulenlen); tot_len += 1 + thl->pdulenlen; thl->comlen = sizeof(snmp_publiccommunity) - 1; snmp_asn1_enc_length_cnt(thl->comlen, &thl->comlenlen); tot_len += 1 + thl->comlenlen + thl->comlen; 802ef14: 44da add sl, fp snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); snmp_asn1_enc_length_cnt(thl->verlen, &thl->verlenlen); tot_len += 1 + thl->verlen + thl->verlenlen; 802ef16: 44d1 add r9, sl 802ef18: 4499 add r9, r3 802ef1a: fa16 f689 uxtah r6, r6, r9 802ef1e: b2b6 uxth r6, r6 thl->seqlen = tot_len; snmp_asn1_enc_length_cnt(thl->seqlen, &thl->seqlenlen); 802ef20: 4630 mov r0, r6 802ef22: f104 0130 add.w r1, r4, #48 ; 0x30 snmp_asn1_enc_s32t_cnt(snmp_version, &thl->verlen); snmp_asn1_enc_length_cnt(thl->verlen, &thl->verlenlen); tot_len += 1 + thl->verlen + thl->verlenlen; thl->seqlen = tot_len; 802ef26: f8a4 6042 strh.w r6, [r4, #66] ; 0x42 snmp_asn1_enc_length_cnt(thl->seqlen, &thl->seqlenlen); 802ef2a: f7fc fce6 bl 802b8fa tot_len += 1 + thl->seqlenlen; 802ef2e: f894 3030 ldrb.w r3, [r4, #48] ; 0x30 802ef32: 3301 adds r3, #1 802ef34: 18f1 adds r1, r6, r3 /* pass 0, calculate length fields */ tot_len = snmp_varbind_list_sum(&trap_msg.outvb); tot_len = snmp_trap_header_sum(&trap_msg, tot_len); /* allocate pbuf(s) */ p = pbuf_alloc(PBUF_TRANSPORT, tot_len, PBUF_POOL); 802ef36: 2000 movs r0, #0 802ef38: b289 uxth r1, r1 802ef3a: 2203 movs r2, #3 802ef3c: f7f9 fa19 bl 8028372 if (p != NULL) 802ef40: 4606 mov r6, r0 802ef42: 2800 cmp r0, #0 802ef44: f000 80f3 beq.w 802f12e snmp_trap_header_enc(struct snmp_msg_trap *m_trap, struct pbuf *p) { u16_t ofs; ofs = 0; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); 802ef48: 2100 movs r1, #0 802ef4a: 2230 movs r2, #48 ; 0x30 802ef4c: f7fc fd22 bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.seqlen); 802ef50: 2101 movs r1, #1 802ef52: f8b4 2042 ldrh.w r2, [r4, #66] ; 0x42 802ef56: 4630 mov r0, r6 802ef58: f7fc fd30 bl 802b9bc ofs += m_trap->thl.seqlenlen; 802ef5c: f894 9030 ldrb.w r9, [r4, #48] ; 0x30 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802ef60: 2202 movs r2, #2 802ef62: f109 0101 add.w r1, r9, #1 802ef66: 4630 mov r0, r6 ofs += 1; 802ef68: f109 0902 add.w r9, r9, #2 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_CONSTR | SNMP_ASN1_SEQ)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.seqlen); ofs += m_trap->thl.seqlenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802ef6c: f7fc fd12 bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.verlen); 802ef70: 4649 mov r1, r9 802ef72: f8b4 2040 ldrh.w r2, [r4, #64] ; 0x40 802ef76: 4630 mov r0, r6 802ef78: f7fc fd20 bl 802b9bc ofs += m_trap->thl.verlenlen; 802ef7c: f894 302f ldrb.w r3, [r4, #47] ; 0x2f snmp_asn1_enc_s32t(p, ofs, m_trap->thl.verlen, snmp_version); 802ef80: f8b4 2040 ldrh.w r2, [r4, #64] ; 0x40 ofs += m_trap->thl.seqlenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.verlen); ofs += m_trap->thl.verlenlen; 802ef84: 4499 add r9, r3 snmp_asn1_enc_s32t(p, ofs, m_trap->thl.verlen, snmp_version); 802ef86: 4649 mov r1, r9 802ef88: 4643 mov r3, r8 802ef8a: 4630 mov r0, r6 802ef8c: f7fc fd9e bl 802bacc ofs += m_trap->thl.verlen; 802ef90: f8b4 3040 ldrh.w r3, [r4, #64] ; 0x40 802ef94: 4499 add r9, r3 802ef96: fa1f f989 uxth.w r9, r9 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 802ef9a: 462a mov r2, r5 ofs += 1; 802ef9c: f109 0501 add.w r5, r9, #1 snmp_asn1_enc_length(p, ofs, m_trap->thl.verlen); ofs += m_trap->thl.verlenlen; snmp_asn1_enc_s32t(p, ofs, m_trap->thl.verlen, snmp_version); ofs += m_trap->thl.verlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 802efa0: 4649 mov r1, r9 ofs += 1; 802efa2: b2ad uxth r5, r5 snmp_asn1_enc_length(p, ofs, m_trap->thl.verlen); ofs += m_trap->thl.verlenlen; snmp_asn1_enc_s32t(p, ofs, m_trap->thl.verlen, snmp_version); ofs += m_trap->thl.verlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); 802efa4: 4630 mov r0, r6 802efa6: f7fc fcf5 bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.comlen); 802efaa: 4629 mov r1, r5 802efac: 8fe2 ldrh r2, [r4, #62] ; 0x3e 802efae: 4630 mov r0, r6 802efb0: f7fc fd04 bl 802b9bc ofs += m_trap->thl.comlenlen; 802efb4: f894 302e ldrb.w r3, [r4, #46] ; 0x2e snmp_asn1_enc_raw(p, ofs, m_trap->thl.comlen, (u8_t *)&snmp_publiccommunity[0]); 802efb8: 8fe2 ldrh r2, [r4, #62] ; 0x3e ofs += m_trap->thl.verlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.comlen); ofs += m_trap->thl.comlenlen; 802efba: 18ed adds r5, r5, r3 802efbc: b2ad uxth r5, r5 snmp_asn1_enc_raw(p, ofs, m_trap->thl.comlen, (u8_t *)&snmp_publiccommunity[0]); 802efbe: 4629 mov r1, r5 802efc0: 4b4f ldr r3, [pc, #316] ; (802f100 ) 802efc2: 4630 mov r0, r6 802efc4: f7fc fe22 bl 802bc0c ofs += m_trap->thl.comlen; 802efc8: 8fe3 ldrh r3, [r4, #62] ; 0x3e 802efca: 18ed adds r5, r5, r3 802efcc: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP)); 802efce: 4629 mov r1, r5 ofs += 1; 802efd0: 3501 adds r5, #1 snmp_asn1_enc_length(p, ofs, m_trap->thl.comlen); ofs += m_trap->thl.comlenlen; snmp_asn1_enc_raw(p, ofs, m_trap->thl.comlen, (u8_t *)&snmp_publiccommunity[0]); ofs += m_trap->thl.comlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP)); 802efd2: 22a4 movs r2, #164 ; 0xa4 ofs += 1; 802efd4: b2ad uxth r5, r5 snmp_asn1_enc_length(p, ofs, m_trap->thl.comlen); ofs += m_trap->thl.comlenlen; snmp_asn1_enc_raw(p, ofs, m_trap->thl.comlen, (u8_t *)&snmp_publiccommunity[0]); ofs += m_trap->thl.comlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP)); 802efd6: 4630 mov r0, r6 802efd8: f7fc fcdc bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.pdulen); 802efdc: 4629 mov r1, r5 802efde: 8fa2 ldrh r2, [r4, #60] ; 0x3c 802efe0: 4630 mov r0, r6 802efe2: f7fc fceb bl 802b9bc ofs += m_trap->thl.pdulenlen; 802efe6: f894 302d ldrb.w r3, [r4, #45] ; 0x2d 802efea: 18ed adds r5, r5, r3 802efec: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 802efee: 4629 mov r1, r5 ofs += 1; 802eff0: 3501 adds r5, #1 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.pdulen); ofs += m_trap->thl.pdulenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 802eff2: 463a mov r2, r7 ofs += 1; 802eff4: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_CONTXT | SNMP_ASN1_CONSTR | SNMP_ASN1_PDU_TRAP)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.pdulen); ofs += m_trap->thl.pdulenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); 802eff6: 4630 mov r0, r6 802eff8: f7fc fccc bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.eidlen); 802effc: 4629 mov r1, r5 802effe: 8f62 ldrh r2, [r4, #58] ; 0x3a 802f000: 4630 mov r0, r6 802f002: f7fc fcdb bl 802b9bc ofs += m_trap->thl.eidlenlen; 802f006: f894 302c ldrb.w r3, [r4, #44] ; 0x2c 802f00a: 18ed adds r5, r5, r3 snmp_asn1_enc_oid(p, ofs, m_trap->enterprise->len, &m_trap->enterprise->id[0]); 802f00c: 68a3 ldr r3, [r4, #8] ofs += m_trap->thl.pdulenlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OBJ_ID)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.eidlen); ofs += m_trap->thl.eidlenlen; 802f00e: b2ad uxth r5, r5 snmp_asn1_enc_oid(p, ofs, m_trap->enterprise->len, &m_trap->enterprise->id[0]); 802f010: 4629 mov r1, r5 802f012: f813 2b04 ldrb.w r2, [r3], #4 802f016: 4630 mov r0, r6 802f018: f7fc fd85 bl 802bb26 ofs += m_trap->thl.eidlen; 802f01c: 8f63 ldrh r3, [r4, #58] ; 0x3a 802f01e: 18ed adds r5, r5, r3 802f020: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR)); 802f022: 4629 mov r1, r5 ofs += 1; 802f024: 3501 adds r5, #1 snmp_asn1_enc_length(p, ofs, m_trap->thl.eidlen); ofs += m_trap->thl.eidlenlen; snmp_asn1_enc_oid(p, ofs, m_trap->enterprise->len, &m_trap->enterprise->id[0]); ofs += m_trap->thl.eidlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR)); 802f026: 2240 movs r2, #64 ; 0x40 ofs += 1; 802f028: b2ad uxth r5, r5 snmp_asn1_enc_length(p, ofs, m_trap->thl.eidlen); ofs += m_trap->thl.eidlenlen; snmp_asn1_enc_oid(p, ofs, m_trap->enterprise->len, &m_trap->enterprise->id[0]); ofs += m_trap->thl.eidlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR)); 802f02a: 4630 mov r0, r6 802f02c: f7fc fcb2 bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.aaddrlen); 802f030: 4629 mov r1, r5 802f032: 8f22 ldrh r2, [r4, #56] ; 0x38 802f034: 4630 mov r0, r6 802f036: f7fc fcc1 bl 802b9bc ofs += m_trap->thl.aaddrlenlen; 802f03a: f894 302b ldrb.w r3, [r4, #43] ; 0x2b snmp_asn1_enc_raw(p, ofs, m_trap->thl.aaddrlen, &m_trap->sip_raw[0]); 802f03e: 8f22 ldrh r2, [r4, #56] ; 0x38 ofs += m_trap->thl.eidlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_IPADDR)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.aaddrlen); ofs += m_trap->thl.aaddrlenlen; 802f040: 18ed adds r5, r5, r3 802f042: b2ad uxth r5, r5 snmp_asn1_enc_raw(p, ofs, m_trap->thl.aaddrlen, &m_trap->sip_raw[0]); 802f044: 4629 mov r1, r5 802f046: f104 030c add.w r3, r4, #12 802f04a: 4630 mov r0, r6 802f04c: f7fc fdde bl 802bc0c ofs += m_trap->thl.aaddrlen; 802f050: 8f23 ldrh r3, [r4, #56] ; 0x38 802f052: 18ed adds r5, r5, r3 802f054: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802f056: 4629 mov r1, r5 ofs += 1; 802f058: 3501 adds r5, #1 snmp_asn1_enc_length(p, ofs, m_trap->thl.aaddrlen); ofs += m_trap->thl.aaddrlenlen; snmp_asn1_enc_raw(p, ofs, m_trap->thl.aaddrlen, &m_trap->sip_raw[0]); ofs += m_trap->thl.aaddrlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802f05a: 2202 movs r2, #2 ofs += 1; 802f05c: b2ad uxth r5, r5 snmp_asn1_enc_length(p, ofs, m_trap->thl.aaddrlen); ofs += m_trap->thl.aaddrlenlen; snmp_asn1_enc_raw(p, ofs, m_trap->thl.aaddrlen, &m_trap->sip_raw[0]); ofs += m_trap->thl.aaddrlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802f05e: 4630 mov r0, r6 802f060: f7fc fc98 bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.gtrplen); 802f064: 4629 mov r1, r5 802f066: 8ee2 ldrh r2, [r4, #54] ; 0x36 802f068: 4630 mov r0, r6 802f06a: f7fc fca7 bl 802b9bc ofs += m_trap->thl.gtrplenlen; 802f06e: f894 302a ldrb.w r3, [r4, #42] ; 0x2a snmp_asn1_enc_u32t(p, ofs, m_trap->thl.gtrplen, m_trap->gen_trap); 802f072: 8ee2 ldrh r2, [r4, #54] ; 0x36 ofs += m_trap->thl.aaddrlen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.gtrplen); ofs += m_trap->thl.gtrplenlen; 802f074: 18ed adds r5, r5, r3 802f076: b2ad uxth r5, r5 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.gtrplen, m_trap->gen_trap); 802f078: 4629 mov r1, r5 802f07a: 6923 ldr r3, [r4, #16] 802f07c: 4630 mov r0, r6 802f07e: f7fc fce5 bl 802ba4c ofs += m_trap->thl.gtrplen; 802f082: 8ee3 ldrh r3, [r4, #54] ; 0x36 802f084: 18ed adds r5, r5, r3 802f086: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802f088: 4629 mov r1, r5 ofs += 1; 802f08a: 3501 adds r5, #1 snmp_asn1_enc_length(p, ofs, m_trap->thl.gtrplen); ofs += m_trap->thl.gtrplenlen; snmp_asn1_enc_u32t(p, ofs, m_trap->thl.gtrplen, m_trap->gen_trap); ofs += m_trap->thl.gtrplen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802f08c: 2202 movs r2, #2 ofs += 1; 802f08e: b2ad uxth r5, r5 snmp_asn1_enc_length(p, ofs, m_trap->thl.gtrplen); ofs += m_trap->thl.gtrplenlen; snmp_asn1_enc_u32t(p, ofs, m_trap->thl.gtrplen, m_trap->gen_trap); ofs += m_trap->thl.gtrplen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); 802f090: 4630 mov r0, r6 802f092: f7fc fc7f bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.strplen); 802f096: 4629 mov r1, r5 802f098: 8ea2 ldrh r2, [r4, #52] ; 0x34 802f09a: 4630 mov r0, r6 802f09c: f7fc fc8e bl 802b9bc ofs += m_trap->thl.strplenlen; 802f0a0: f894 3029 ldrb.w r3, [r4, #41] ; 0x29 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.strplen, m_trap->spc_trap); 802f0a4: 8ea2 ldrh r2, [r4, #52] ; 0x34 ofs += m_trap->thl.gtrplen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_INTEG)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.strplen); ofs += m_trap->thl.strplenlen; 802f0a6: 18ed adds r5, r5, r3 802f0a8: b2ad uxth r5, r5 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.strplen, m_trap->spc_trap); 802f0aa: 4629 mov r1, r5 802f0ac: 6963 ldr r3, [r4, #20] 802f0ae: 4630 mov r0, r6 802f0b0: f7fc fccc bl 802ba4c ofs += m_trap->thl.strplen; 802f0b4: 8ea3 ldrh r3, [r4, #52] ; 0x34 802f0b6: 18ed adds r5, r5, r3 802f0b8: b2ad uxth r5, r5 snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS)); 802f0ba: 4629 mov r1, r5 ofs += 1; 802f0bc: 3501 adds r5, #1 snmp_asn1_enc_length(p, ofs, m_trap->thl.strplen); ofs += m_trap->thl.strplenlen; snmp_asn1_enc_u32t(p, ofs, m_trap->thl.strplen, m_trap->spc_trap); ofs += m_trap->thl.strplen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS)); 802f0be: 2243 movs r2, #67 ; 0x43 ofs += 1; 802f0c0: b2ad uxth r5, r5 snmp_asn1_enc_length(p, ofs, m_trap->thl.strplen); ofs += m_trap->thl.strplenlen; snmp_asn1_enc_u32t(p, ofs, m_trap->thl.strplen, m_trap->spc_trap); ofs += m_trap->thl.strplen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS)); 802f0c2: 4630 mov r0, r6 802f0c4: f7fc fc66 bl 802b994 ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.tslen); 802f0c8: 4629 mov r1, r5 802f0ca: 8e62 ldrh r2, [r4, #50] ; 0x32 802f0cc: 4630 mov r0, r6 802f0ce: f7fc fc75 bl 802b9bc ofs += m_trap->thl.tslenlen; 802f0d2: f894 3028 ldrb.w r3, [r4, #40] ; 0x28 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.tslen, m_trap->ts); 802f0d6: 8e62 ldrh r2, [r4, #50] ; 0x32 ofs += m_trap->thl.strplen; snmp_asn1_enc_type(p, ofs, (SNMP_ASN1_APPLIC | SNMP_ASN1_PRIMIT | SNMP_ASN1_TIMETICKS)); ofs += 1; snmp_asn1_enc_length(p, ofs, m_trap->thl.tslen); ofs += m_trap->thl.tslenlen; 802f0d8: 18ed adds r5, r5, r3 802f0da: b2ad uxth r5, r5 snmp_asn1_enc_u32t(p, ofs, m_trap->thl.tslen, m_trap->ts); 802f0dc: 4629 mov r1, r5 802f0de: 69a3 ldr r3, [r4, #24] 802f0e0: 4630 mov r0, r6 802f0e2: f7fc fcb3 bl 802ba4c ofs += m_trap->thl.tslen; 802f0e6: 8e63 ldrh r3, [r4, #50] ; 0x32 802f0e8: 18ea adds r2, r5, r3 { u16_t ofs; /* pass 1, encode packet ino the pbuf(s) */ ofs = snmp_trap_header_enc(&trap_msg, p); snmp_varbind_list_enc(&trap_msg.outvb, p, ofs); 802f0ea: 4631 mov r1, r6 802f0ec: e00a b.n 802f104 802f0ee: bf00 nop 802f0f0: 20010648 .word 0x20010648 802f0f4: 20010630 .word 0x20010630 802f0f8: 2001064c .word 0x2001064c 802f0fc: 080383f0 .word 0x080383f0 802f100: 080383f4 .word 0x080383f4 802f104: b292 uxth r2, r2 802f106: f104 001c add.w r0, r4, #28 802f10a: f7ff fcb7 bl 802ea7c snmp_inc_snmpouttraps(); 802f10e: f7fe f859 bl 802d1c4 snmp_inc_snmpoutpkts(); 802f112: f7fd ffaf bl 802d074 /** send to the TRAP destination */ udp_sendto(trap_msg.pcb, p, &trap_msg.dip, SNMP_TRAP_PORT); 802f116: 4622 mov r2, r4 802f118: 4631 mov r1, r6 802f11a: f852 0b04 ldr.w r0, [r2], #4 802f11e: 23a2 movs r3, #162 ; 0xa2 802f120: f7fb fddb bl 802acda pbuf_free(p); 802f124: 4630 mov r0, r6 802f126: f7f9 f8d7 bl 80282d8 { return ERR_MEM; } } } return ERR_OK; 802f12a: 2000 movs r0, #0 802f12c: e000 b.n 802f130 pbuf_free(p); } else { return ERR_MEM; 802f12e: 20ff movs r0, #255 ; 0xff } } } return ERR_OK; } 802f130: b240 sxtb r0, r0 802f132: b005 add sp, #20 802f134: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 0802f138 : snmp_send_trap(SNMP_GENTRAP_COLDSTART, NULL, 0); } void snmp_authfail_trap(void) { 802f138: b507 push {r0, r1, r2, lr} u8_t enable; snmp_get_snmpenableauthentraps(&enable); 802f13a: f10d 0007 add.w r0, sp, #7 802f13e: f7fe f84f bl 802d1e0 if (enable == 1) 802f142: f89d 3007 ldrb.w r3, [sp, #7] 802f146: 2b01 cmp r3, #1 802f148: d109 bne.n 802f15e { trap_msg.outvb.head = NULL; 802f14a: 2100 movs r1, #0 802f14c: 4b04 ldr r3, [pc, #16] ; (802f160 ) trap_msg.outvb.tail = NULL; trap_msg.outvb.count = 0; snmp_send_trap(SNMP_GENTRAP_AUTHFAIL, NULL, 0); 802f14e: 2004 movs r0, #4 802f150: 460a mov r2, r1 { u8_t enable; snmp_get_snmpenableauthentraps(&enable); if (enable == 1) { trap_msg.outvb.head = NULL; 802f152: 61d9 str r1, [r3, #28] trap_msg.outvb.tail = NULL; 802f154: 6219 str r1, [r3, #32] trap_msg.outvb.count = 0; 802f156: f883 1024 strb.w r1, [r3, #36] ; 0x24 snmp_send_trap(SNMP_GENTRAP_AUTHFAIL, NULL, 0); 802f15a: f7ff fe23 bl 802eda4 } } 802f15e: bd0e pop {r1, r2, r3, pc} 802f160: 20010630 .word 0x20010630 0802f164 : * @params dst the destination MAC address to be copied into the ethernet header * @return ERR_OK if the packet was sent, any other err_t on failure */ static err_t etharp_send_ip(struct netif *netif, struct pbuf *p, struct eth_addr *src, struct eth_addr *dst) { 802f164: b5f8 push {r3, r4, r5, r6, r7, lr} struct eth_hdr *ethhdr = (struct eth_hdr *)p->payload; 802f166: 684c ldr r4, [r1, #4] * @params dst the destination MAC address to be copied into the ethernet header * @return ERR_OK if the packet was sent, any other err_t on failure */ static err_t etharp_send_ip(struct netif *netif, struct pbuf *p, struct eth_addr *src, struct eth_addr *dst) { 802f168: 4606 mov r6, r0 802f16a: 460d mov r5, r1 802f16c: 4617 mov r7, r2 struct eth_hdr *ethhdr = (struct eth_hdr *)p->payload; LWIP_ASSERT("netif->hwaddr_len must be the same as ETHARP_HWADDR_LEN for etharp!", (netif->hwaddr_len == ETHARP_HWADDR_LEN)); ETHADDR32_COPY(ðhdr->dest, dst); 802f16e: 4619 mov r1, r3 802f170: 2206 movs r2, #6 802f172: 4620 mov r0, r4 802f174: f7f2 fa0a bl 802158c ETHADDR16_COPY(ðhdr->src, src); 802f178: 4639 mov r1, r7 802f17a: 1da0 adds r0, r4, #6 802f17c: 2206 movs r2, #6 802f17e: f7f2 fa05 bl 802158c ethhdr->type = PP_HTONS(ETHTYPE_IP); 802f182: 2308 movs r3, #8 802f184: 7323 strb r3, [r4, #12] 802f186: 2300 movs r3, #0 802f188: 7363 strb r3, [r4, #13] LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_send_ip: sending packet %p\n", (void *)p)); /* send the packet */ return netif->linkoutput(netif, p); 802f18a: 69b3 ldr r3, [r6, #24] 802f18c: 4630 mov r0, r6 802f18e: 4629 mov r1, r5 802f190: 4798 blx r3 } 802f192: bdf8 pop {r3, r4, r5, r6, r7, pc} 0802f194 : #endif /* ARP_QUEUEING */ /** Clean up ARP table entries */ static void etharp_free_entry(int i) { 802f194: b570 push {r4, r5, r6, lr} /* remove from SNMP ARP index tree */ snmp_delete_arpidx_tree(arp_table[i].netif, &arp_table[i].ipaddr); 802f196: 4d0b ldr r5, [pc, #44] ; (802f1c4 ) 802f198: 2414 movs r4, #20 802f19a: 4344 muls r4, r0 802f19c: 1929 adds r1, r5, r4 #endif /* ARP_QUEUEING */ /** Clean up ARP table entries */ static void etharp_free_entry(int i) { 802f19e: 4606 mov r6, r0 /* remove from SNMP ARP index tree */ snmp_delete_arpidx_tree(arp_table[i].netif, &arp_table[i].ipaddr); 802f1a0: 3104 adds r1, #4 802f1a2: 6848 ldr r0, [r1, #4] 802f1a4: f7fd fc5a bl 802ca5c /* and empty packet queue */ if (arp_table[i].q != NULL) { 802f1a8: 5928 ldr r0, [r5, r4] 802f1aa: b118 cbz r0, 802f1b4 /* remove all queued packets */ LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_free_entry: freeing entry %"U16_F", packet queue %p.\n", (u16_t)i, (void *)(arp_table[i].q))); free_etharp_q(arp_table[i].q); 802f1ac: f7f9 f894 bl 80282d8 arp_table[i].q = NULL; 802f1b0: 2300 movs r3, #0 802f1b2: 512b str r3, [r5, r4] } /* recycle entry for re-use */ arp_table[i].state = ETHARP_STATE_EMPTY; 802f1b4: 2314 movs r3, #20 802f1b6: fb03 5506 mla r5, r3, r6, r5 802f1ba: 2300 movs r3, #0 802f1bc: 74ab strb r3, [r5, #18] 802f1be: 3510 adds r5, #16 802f1c0: bd70 pop {r4, r5, r6, pc} 802f1c2: bf00 nop 802f1c4: 2000de7c .word 0x2000de7c 0802f1c8 : * @return The ARP entry index that matched or is created, ERR_MEM if no * entry is found or could be recycled. */ static s8_t etharp_find_entry(ip_addr_t *ipaddr, u8_t flags) { 802f1c8: e92d 4ff7 stmdb sp!, {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} s8_t empty = ARP_TABLE_SIZE; u8_t i = 0, age_pending = 0, age_stable = 0; /* oldest entry with packets on queue */ s8_t old_queue = ARP_TABLE_SIZE; /* its age */ u8_t age_queue = 0; 802f1cc: 2500 movs r5, #0 { s8_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; s8_t empty = ARP_TABLE_SIZE; u8_t i = 0, age_pending = 0, age_stable = 0; /* oldest entry with packets on queue */ s8_t old_queue = ARP_TABLE_SIZE; 802f1ce: 240a movs r4, #10 802f1d0: 4a35 ldr r2, [pc, #212] ; (802f2a8 ) * @return The ARP entry index that matched or is created, ERR_MEM if no * entry is found or could be recycled. */ static s8_t etharp_find_entry(ip_addr_t *ipaddr, u8_t flags) { 802f1d2: 9101 str r1, [sp, #4] 802f1d4: 4606 mov r6, r0 s8_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; s8_t empty = ARP_TABLE_SIZE; u8_t i = 0, age_pending = 0, age_stable = 0; 802f1d6: 46a8 mov r8, r5 802f1d8: 46aa mov sl, r5 * 4) remember the oldest pending entry with queued packets (if any) * 5) search for a matching IP entry, either pending or stable * until 5 matches, or all entries are searched for. */ for (i = 0; i < ARP_TABLE_SIZE; ++i) { 802f1da: 462b mov r3, r5 */ static s8_t etharp_find_entry(ip_addr_t *ipaddr, u8_t flags) { s8_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; s8_t empty = ARP_TABLE_SIZE; 802f1dc: 4627 mov r7, r4 * entry is found or could be recycled. */ static s8_t etharp_find_entry(ip_addr_t *ipaddr, u8_t flags) { s8_t old_pending = ARP_TABLE_SIZE, old_stable = ARP_TABLE_SIZE; 802f1de: 46a4 mov ip, r4 802f1e0: 46a3 mov fp, r4 */ for (i = 0; i < ARP_TABLE_SIZE; ++i) { u8_t state = arp_table[i].state; /* no empty entry found yet and now we do find one? */ if ((empty == ARP_TABLE_SIZE) && (state == ETHARP_STATE_EMPTY)) { 802f1e2: 2f0a cmp r7, #10 * 5) search for a matching IP entry, either pending or stable * until 5 matches, or all entries are searched for. */ for (i = 0; i < ARP_TABLE_SIZE; ++i) { u8_t state = arp_table[i].state; 802f1e4: f892 9012 ldrb.w r9, [r2, #18] /* no empty entry found yet and now we do find one? */ if ((empty == ARP_TABLE_SIZE) && (state == ETHARP_STATE_EMPTY)) { 802f1e8: d104 bne.n 802f1f4 802f1ea: f1b9 0f00 cmp.w r9, #0 802f1ee: d104 bne.n 802f1fa LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_find_entry: found empty entry %"U16_F"\n", (u16_t)i)); /* remember first empty entry */ empty = i; 802f1f0: b2df uxtb r7, r3 802f1f2: e023 b.n 802f23c } else if (state != ETHARP_STATE_EMPTY) { 802f1f4: f1b9 0f00 cmp.w r9, #0 802f1f8: d020 beq.n 802f23c LWIP_ASSERT("state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE", state == ETHARP_STATE_PENDING || state >= ETHARP_STATE_STABLE); /* if given, does IP address match IP address in ARP entry? */ if (ipaddr && ip_addr_cmp(ipaddr, &arp_table[i].ipaddr)) { 802f1fa: b12e cbz r6, 802f208 802f1fc: 6830 ldr r0, [r6, #0] 802f1fe: 6851 ldr r1, [r2, #4] 802f200: 4288 cmp r0, r1 802f202: d101 bne.n 802f208 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: found matching entry %"U16_F"\n", (u16_t)i)); /* found exact IP address match, simply bail out */ return i; 802f204: 4618 mov r0, r3 802f206: e04b b.n 802f2a0 } /* pending entry? */ if (state == ETHARP_STATE_PENDING) { 802f208: f1b9 0f01 cmp.w r9, #1 802f20c: d10e bne.n 802f22c /* pending with queued packets? */ if (arp_table[i].q != NULL) { 802f20e: 6810 ldr r0, [r2, #0] if (arp_table[i].ctime >= age_queue) { 802f210: f892 9013 ldrb.w r9, [r2, #19] return i; } /* pending entry? */ if (state == ETHARP_STATE_PENDING) { /* pending with queued packets? */ if (arp_table[i].q != NULL) { 802f214: b120 cbz r0, 802f220 if (arp_table[i].ctime >= age_queue) { 802f216: 45a9 cmp r9, r5 802f218: d310 bcc.n 802f23c old_queue = i; 802f21a: b2dc uxtb r4, r3 802f21c: 464d mov r5, r9 802f21e: e00d b.n 802f23c age_queue = arp_table[i].ctime; } } else /* pending without queued packets? */ { if (arp_table[i].ctime >= age_pending) { 802f220: 45d1 cmp r9, sl 802f222: d30b bcc.n 802f23c old_pending = i; 802f224: fa5f fb83 uxtb.w fp, r3 802f228: 46ca mov sl, r9 802f22a: e007 b.n 802f23c age_pending = arp_table[i].ctime; } } /* stable entry? */ } else if (state >= ETHARP_STATE_STABLE) { 802f22c: d906 bls.n 802f23c /* don't record old_stable for static entries since they never expire */ if (state < ETHARP_STATE_STATIC) #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ { /* remember entry with oldest stable entry in oldest, its age in maxtime */ if (arp_table[i].ctime >= age_stable) { 802f22e: f892 9013 ldrb.w r9, [r2, #19] 802f232: 45c1 cmp r9, r8 old_stable = i; 802f234: bf24 itt cs 802f236: fa5f fc83 uxtbcs.w ip, r3 802f23a: 46c8 movcs r8, r9 * 4) remember the oldest pending entry with queued packets (if any) * 5) search for a matching IP entry, either pending or stable * until 5 matches, or all entries are searched for. */ for (i = 0; i < ARP_TABLE_SIZE; ++i) { 802f23c: 3301 adds r3, #1 802f23e: b2db uxtb r3, r3 802f240: 3214 adds r2, #20 802f242: 2b0a cmp r3, #10 802f244: d1cd bne.n 802f1e2 } } /* { we have no match } => try to create a new entry */ /* don't create new entry, only search? */ if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) || 802f246: 9a01 ldr r2, [sp, #4] 802f248: f002 0302 and.w r3, r2, #2 802f24c: b2db uxtb r3, r3 802f24e: bb33 cbnz r3, 802f29e 802f250: 2f0a cmp r7, #10 802f252: d102 bne.n 802f25a /* or no empty entry found and not allowed to recycle? */ ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) { 802f254: 07d3 lsls r3, r2, #31 802f256: d402 bmi.n 802f25e 802f258: e021 b.n 802f29e * { ETHARP_FLAG_TRY_HARD is set at this point } */ /* 1) empty entry available? */ if (empty < ARP_TABLE_SIZE) { i = empty; 802f25a: b2fc uxtb r4, r7 802f25c: e011 b.n 802f282 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting empty entry %"U16_F"\n", (u16_t)i)); } else { /* 2) found recyclable stable entry? */ if (old_stable < ARP_TABLE_SIZE) { 802f25e: f1bc 0f0a cmp.w ip, #10 802f262: d002 beq.n 802f26a /* recycle oldest stable*/ i = old_stable; 802f264: fa5f f48c uxtb.w r4, ip 802f268: e008 b.n 802f27c LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest stable entry %"U16_F"\n", (u16_t)i)); /* no queued packets should exist on stable entries */ LWIP_ASSERT("arp_table[i].q == NULL", arp_table[i].q == NULL); /* 3) found recyclable pending entry without queued packets? */ } else if (old_pending < ARP_TABLE_SIZE) { 802f26a: f1bb 0f0a cmp.w fp, #10 802f26e: d002 beq.n 802f276 /* recycle oldest pending */ i = old_pending; 802f270: fa5f f48b uxtb.w r4, fp 802f274: e002 b.n 802f27c LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: selecting oldest pending entry %"U16_F" (without queue)\n", (u16_t)i)); /* 4) found recyclable pending entry with queued packets? */ } else if (old_queue < ARP_TABLE_SIZE) { 802f276: 2c0a cmp r4, #10 802f278: d011 beq.n 802f29e /* recycle oldest pending (queued packets are free in etharp_free_entry) */ i = old_queue; 802f27a: b2e4 uxtb r4, r4 return (s8_t)ERR_MEM; } /* { empty or recyclable entry found } */ LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); etharp_free_entry(i); 802f27c: 4620 mov r0, r4 802f27e: f7ff ff89 bl 802f194 802f282: 4b09 ldr r3, [pc, #36] ; (802f2a8 ) LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); LWIP_ASSERT("arp_table[i].state == ETHARP_STATE_EMPTY", arp_table[i].state == ETHARP_STATE_EMPTY); /* IP address given? */ if (ipaddr != NULL) { 802f284: b126 cbz r6, 802f290 /* set IP address */ ip_addr_copy(arp_table[i].ipaddr, *ipaddr); 802f286: 2214 movs r2, #20 802f288: 6831 ldr r1, [r6, #0] 802f28a: fb02 3204 mla r2, r2, r4, r3 802f28e: 6051 str r1, [r2, #4] } arp_table[i].ctime = 0; 802f290: 2214 movs r2, #20 802f292: fb02 3304 mla r3, r2, r4, r3 802f296: 2200 movs r2, #0 802f298: 74da strb r2, [r3, #19] return (err_t)i; 802f29a: 4620 mov r0, r4 802f29c: e000 b.n 802f2a0 /* don't create new entry, only search? */ if (((flags & ETHARP_FLAG_FIND_ONLY) != 0) || /* or no empty entry found and not allowed to recycle? */ ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_FLAG_TRY_HARD) == 0))) { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_find_entry: no empty entry found and not allowed to recycle\n")); return (s8_t)ERR_MEM; 802f29e: 20ff movs r0, #255 ; 0xff /* set IP address */ ip_addr_copy(arp_table[i].ipaddr, *ipaddr); } arp_table[i].ctime = 0; return (err_t)i; } 802f2a0: b240 sxtb r0, r0 802f2a2: e8bd 8ffe ldmia.w sp!, {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 802f2a6: bf00 nop 802f2a8: 2000de7c .word 0x2000de7c 0802f2ac : * This function should be called every ETHARP_TMR_INTERVAL milliseconds (5 seconds), * in order to expire entries in the ARP table. */ void etharp_tmr(void) { 802f2ac: b570 push {r4, r5, r6, lr} 802f2ae: 4c0d ldr r4, [pc, #52] ; (802f2e4 ) 802f2b0: 2500 movs r5, #0 etharp_free_entry(i); } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING) { /* Reset state to stable, so that the next transmitted packet will re-send an ARP request. */ arp_table[i].state = ETHARP_STATE_STABLE; 802f2b2: 2602 movs r6, #2 LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer\n")); /* remove expired entries from the ARP table */ for (i = 0; i < ARP_TABLE_SIZE; ++i) { u8_t state = arp_table[i].state; if (state != ETHARP_STATE_EMPTY 802f2b4: 7ca3 ldrb r3, [r4, #18] 802f2b6: b183 cbz r3, 802f2da #if ETHARP_SUPPORT_STATIC_ENTRIES && (state != ETHARP_STATE_STATIC) #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ ) { arp_table[i].ctime++; 802f2b8: 7ce2 ldrb r2, [r4, #19] 802f2ba: 3201 adds r2, #1 802f2bc: b2d2 uxtb r2, r2 if ((arp_table[i].ctime >= ARP_MAXAGE) || 802f2be: 2aef cmp r2, #239 ; 0xef if (state != ETHARP_STATE_EMPTY #if ETHARP_SUPPORT_STATIC_ENTRIES && (state != ETHARP_STATE_STATIC) #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ ) { arp_table[i].ctime++; 802f2c0: 74e2 strb r2, [r4, #19] if ((arp_table[i].ctime >= ARP_MAXAGE) || 802f2c2: d803 bhi.n 802f2cc 802f2c4: 2b01 cmp r3, #1 802f2c6: d105 bne.n 802f2d4 ((arp_table[i].state == ETHARP_STATE_PENDING) && 802f2c8: 2a01 cmp r2, #1 802f2ca: d906 bls.n 802f2da (arp_table[i].ctime >= ARP_MAXPENDING))) { /* pending or stable entry has become old! */ LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer: expired %s entry %"U16_F".\n", arp_table[i].state >= ETHARP_STATE_STABLE ? "stable" : "pending", (u16_t)i)); /* clean up entries that have just been expired */ etharp_free_entry(i); 802f2cc: 4628 mov r0, r5 802f2ce: f7ff ff61 bl 802f194 802f2d2: e002 b.n 802f2da } else if (arp_table[i].state == ETHARP_STATE_STABLE_REREQUESTING) { 802f2d4: 2b03 cmp r3, #3 /* Reset state to stable, so that the next transmitted packet will re-send an ARP request. */ arp_table[i].state = ETHARP_STATE_STABLE; 802f2d6: bf08 it eq 802f2d8: 74a6 strbeq r6, [r4, #18] 802f2da: 3501 adds r5, #1 802f2dc: 3414 adds r4, #20 { u8_t i; LWIP_DEBUGF(ETHARP_DEBUG, ("etharp_timer\n")); /* remove expired entries from the ARP table */ for (i = 0; i < ARP_TABLE_SIZE; ++i) { 802f2de: 2d0a cmp r5, #10 802f2e0: d1e8 bne.n 802f2b4 /* resend an ARP query here? */ } #endif /* ARP_QUEUEING */ } } } 802f2e2: bd70 pop {r4, r5, r6, pc} 802f2e4: 2000de7c .word 0x2000de7c 0802f2e8 : * Remove all ARP table entries of the specified netif. * * @param netif points to a network interface */ void etharp_cleanup_netif(struct netif *netif) { 802f2e8: b570 push {r4, r5, r6, lr} 802f2ea: 4d08 ldr r5, [pc, #32] ; (802f30c ) 802f2ec: 4606 mov r6, r0 802f2ee: 2400 movs r4, #0 u8_t i; for (i = 0; i < ARP_TABLE_SIZE; ++i) { u8_t state = arp_table[i].state; if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) { 802f2f0: 7cab ldrb r3, [r5, #18] 802f2f2: b12b cbz r3, 802f300 802f2f4: 68ab ldr r3, [r5, #8] 802f2f6: 42b3 cmp r3, r6 802f2f8: d102 bne.n 802f300 etharp_free_entry(i); 802f2fa: 4620 mov r0, r4 802f2fc: f7ff ff4a bl 802f194 802f300: 3401 adds r4, #1 802f302: 3514 adds r5, #20 */ void etharp_cleanup_netif(struct netif *netif) { u8_t i; for (i = 0; i < ARP_TABLE_SIZE; ++i) { 802f304: 2c0a cmp r4, #10 802f306: d1f3 bne.n 802f2f0 u8_t state = arp_table[i].state; if ((state != ETHARP_STATE_EMPTY) && (arp_table[i].netif == netif)) { etharp_free_entry(i); } } } 802f308: bd70 pop {r4, r5, r6, pc} 802f30a: bf00 nop 802f30c: 2000de7c .word 0x2000de7c 0802f310 : * @return table index if found, -1 otherwise */ s8_t etharp_find_addr(struct netif *netif, ip_addr_t *ipaddr, struct eth_addr **eth_ret, ip_addr_t **ip_ret) { 802f310: b5f8 push {r3, r4, r5, r6, r7, lr} LWIP_ASSERT("eth_ret != NULL && ip_ret != NULL", eth_ret != NULL && ip_ret != NULL); LWIP_UNUSED_ARG(netif); i = etharp_find_entry(ipaddr, ETHARP_FLAG_FIND_ONLY); 802f312: 4608 mov r0, r1 802f314: 2102 movs r1, #2 * @return table index if found, -1 otherwise */ s8_t etharp_find_addr(struct netif *netif, ip_addr_t *ipaddr, struct eth_addr **eth_ret, ip_addr_t **ip_ret) { 802f316: 4616 mov r6, r2 802f318: 461f mov r7, r3 LWIP_ASSERT("eth_ret != NULL && ip_ret != NULL", eth_ret != NULL && ip_ret != NULL); LWIP_UNUSED_ARG(netif); i = etharp_find_entry(ipaddr, ETHARP_FLAG_FIND_ONLY); 802f31a: f7ff ff55 bl 802f1c8 if((i >= 0) && (arp_table[i].state >= ETHARP_STATE_STABLE)) { 802f31e: 2800 cmp r0, #0 802f320: db0c blt.n 802f33c 802f322: 2414 movs r4, #20 802f324: 4d07 ldr r5, [pc, #28] ; (802f344 ) 802f326: 4344 muls r4, r0 802f328: 1929 adds r1, r5, r4 802f32a: 7c8b ldrb r3, [r1, #18] 802f32c: 2b01 cmp r3, #1 802f32e: d905 bls.n 802f33c *eth_ret = &arp_table[i].ethaddr; 802f330: 460c mov r4, r1 802f332: 340c adds r4, #12 *ip_ret = &arp_table[i].ipaddr; 802f334: 3104 adds r1, #4 LWIP_UNUSED_ARG(netif); i = etharp_find_entry(ipaddr, ETHARP_FLAG_FIND_ONLY); if((i >= 0) && (arp_table[i].state >= ETHARP_STATE_STABLE)) { *eth_ret = &arp_table[i].ethaddr; 802f336: 6034 str r4, [r6, #0] *ip_ret = &arp_table[i].ipaddr; 802f338: 6039 str r1, [r7, #0] return i; 802f33a: e000 b.n 802f33e } return -1; 802f33c: 20ff movs r0, #255 ; 0xff } 802f33e: b240 sxtb r0, r0 802f340: bdf8 pop {r3, r4, r5, r6, r7, pc} 802f342: bf00 nop 802f344: 2000de7c .word 0x2000de7c 0802f348 : * ERR_MEM if the ARP packet couldn't be allocated * any other err_t on failure */ err_t etharp_request(struct netif *netif, ip_addr_t *ipaddr) { 802f348: e92d 43f8 stmdb sp!, {r3, r4, r5, r6, r7, r8, r9, lr} #endif /* LWIP_AUTOIP */ LWIP_ASSERT("netif != NULL", netif != NULL); /* allocate a pbuf for the outgoing ARP request packet */ p = pbuf_alloc(PBUF_RAW, SIZEOF_ETHARP_PACKET, PBUF_RAM); 802f34c: 2200 movs r2, #0 * ERR_MEM if the ARP packet couldn't be allocated * any other err_t on failure */ err_t etharp_request(struct netif *netif, ip_addr_t *ipaddr) { 802f34e: 4606 mov r6, r0 802f350: 4688 mov r8, r1 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_request: sending ARP request.\n")); return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, ðbroadcast, (struct eth_addr *)netif->hwaddr, &netif->ip_addr, ðzero, 802f352: f100 0727 add.w r7, r0, #39 ; 0x27 802f356: f100 0904 add.w r9, r0, #4 #endif /* LWIP_AUTOIP */ LWIP_ASSERT("netif != NULL", netif != NULL); /* allocate a pbuf for the outgoing ARP request packet */ p = pbuf_alloc(PBUF_RAW, SIZEOF_ETHARP_PACKET, PBUF_RAM); 802f35a: 212a movs r1, #42 ; 0x2a 802f35c: 2003 movs r0, #3 802f35e: f7f9 f808 bl 8028372 /* could allocate a pbuf for an ARP request? */ if (p == NULL) { 802f362: 4605 mov r5, r0 802f364: 2800 cmp r0, #0 802f366: d03c beq.n 802f3e2 return ERR_MEM; } LWIP_ASSERT("check that first pbuf can hold struct etharp_hdr", (p->len >= SIZEOF_ETHARP_PACKET)); ethhdr = (struct eth_hdr *)p->payload; 802f368: 6844 ldr r4, [r0, #4] hdr = (struct etharp_hdr *)((u8_t*)ethhdr + SIZEOF_ETH_HDR); LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n")); hdr->opcode = htons(opcode); 802f36a: 2001 movs r0, #1 802f36c: f7f7 fe76 bl 802705c * 'sender IP address' MUST be sent using link-layer broadcast instead of * link-layer unicast. (See RFC3927 Section 2.5, last paragraph) */ ethdst_hwaddr = ip_addr_islinklocal(ipsrc_addr) ? (u8_t*)(ethbroadcast.addr) : ethdst_addr->addr; #endif /* LWIP_AUTOIP */ /* Write the ARP MAC-Addresses */ ETHADDR16_COPY(&hdr->shwaddr, hwsrc_addr); 802f370: 4639 mov r1, r7 (p->len >= SIZEOF_ETHARP_PACKET)); ethhdr = (struct eth_hdr *)p->payload; hdr = (struct etharp_hdr *)((u8_t*)ethhdr + SIZEOF_ETH_HDR); LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_raw: sending raw ARP packet.\n")); hdr->opcode = htons(opcode); 802f372: 82a0 strh r0, [r4, #20] * 'sender IP address' MUST be sent using link-layer broadcast instead of * link-layer unicast. (See RFC3927 Section 2.5, last paragraph) */ ethdst_hwaddr = ip_addr_islinklocal(ipsrc_addr) ? (u8_t*)(ethbroadcast.addr) : ethdst_addr->addr; #endif /* LWIP_AUTOIP */ /* Write the ARP MAC-Addresses */ ETHADDR16_COPY(&hdr->shwaddr, hwsrc_addr); 802f374: 2206 movs r2, #6 802f376: f104 0016 add.w r0, r4, #22 802f37a: f7f2 f907 bl 802158c ETHADDR16_COPY(&hdr->dhwaddr, hwdst_addr); 802f37e: 2206 movs r2, #6 802f380: f104 0020 add.w r0, r4, #32 802f384: 4919 ldr r1, [pc, #100] ; (802f3ec ) 802f386: f7f2 f901 bl 802158c /* Write the Ethernet MAC-Addresses */ #if LWIP_AUTOIP ETHADDR16_COPY(ðhdr->dest, ethdst_hwaddr); #else /* LWIP_AUTOIP */ ETHADDR16_COPY(ðhdr->dest, ethdst_addr); 802f38a: 2206 movs r2, #6 802f38c: 4620 mov r0, r4 802f38e: 4918 ldr r1, [pc, #96] ; (802f3f0 ) 802f390: f7f2 f8fc bl 802158c #endif /* LWIP_AUTOIP */ ETHADDR16_COPY(ðhdr->src, ethsrc_addr); 802f394: 1da0 adds r0, r4, #6 802f396: 4639 mov r1, r7 802f398: 2206 movs r2, #6 802f39a: f7f2 f8f7 bl 802158c /* Copy struct ip_addr2 to aligned ip_addr, to support compilers without * structure packing. */ IPADDR2_COPY(&hdr->sipaddr, ipsrc_addr); 802f39e: 4649 mov r1, r9 802f3a0: 2204 movs r2, #4 802f3a2: f104 001c add.w r0, r4, #28 802f3a6: f7f2 f8f1 bl 802158c IPADDR2_COPY(&hdr->dipaddr, ipdst_addr); 802f3aa: 4641 mov r1, r8 802f3ac: 2204 movs r2, #4 802f3ae: f104 0026 add.w r0, r4, #38 ; 0x26 802f3b2: f7f2 f8eb bl 802158c hdr->hwtype = PP_HTONS(HWTYPE_ETHERNET); 802f3b6: 2300 movs r3, #0 802f3b8: 2201 movs r2, #1 802f3ba: 73a3 strb r3, [r4, #14] 802f3bc: 73e2 strb r2, [r4, #15] hdr->proto = PP_HTONS(ETHTYPE_IP); 802f3be: 7463 strb r3, [r4, #17] 802f3c0: 2208 movs r2, #8 /* set hwlen and protolen */ hdr->hwlen = ETHARP_HWADDR_LEN; 802f3c2: 2306 movs r3, #6 hdr->protolen = sizeof(ip_addr_t); 802f3c4: 2104 movs r1, #4 * structure packing. */ IPADDR2_COPY(&hdr->sipaddr, ipsrc_addr); IPADDR2_COPY(&hdr->dipaddr, ipdst_addr); hdr->hwtype = PP_HTONS(HWTYPE_ETHERNET); hdr->proto = PP_HTONS(ETHTYPE_IP); 802f3c6: 7422 strb r2, [r4, #16] /* set hwlen and protolen */ hdr->hwlen = ETHARP_HWADDR_LEN; hdr->protolen = sizeof(ip_addr_t); 802f3c8: 74e1 strb r1, [r4, #19] ethhdr->type = PP_HTONS(ETHTYPE_ARP); 802f3ca: 7322 strb r2, [r4, #12] IPADDR2_COPY(&hdr->dipaddr, ipdst_addr); hdr->hwtype = PP_HTONS(HWTYPE_ETHERNET); hdr->proto = PP_HTONS(ETHTYPE_IP); /* set hwlen and protolen */ hdr->hwlen = ETHARP_HWADDR_LEN; 802f3cc: 74a3 strb r3, [r4, #18] hdr->protolen = sizeof(ip_addr_t); ethhdr->type = PP_HTONS(ETHTYPE_ARP); 802f3ce: 7363 strb r3, [r4, #13] /* send ARP query */ result = netif->linkoutput(netif, p); 802f3d0: 69b3 ldr r3, [r6, #24] 802f3d2: 4630 mov r0, r6 802f3d4: 4629 mov r1, r5 802f3d6: 4798 blx r3 802f3d8: 4604 mov r4, r0 ETHARP_STATS_INC(etharp.xmit); /* free ARP query packet */ pbuf_free(p); 802f3da: 4628 mov r0, r5 802f3dc: f7f8 ff7c bl 80282d8 802f3e0: e000 b.n 802f3e4 /* could allocate a pbuf for an ARP request? */ if (p == NULL) { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("etharp_raw: could not allocate pbuf for ARP request.\n")); ETHARP_STATS_INC(etharp.memerr); return ERR_MEM; 802f3e2: 24ff movs r4, #255 ; 0xff { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_request: sending ARP request.\n")); return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, ðbroadcast, (struct eth_addr *)netif->hwaddr, &netif->ip_addr, ðzero, ipaddr, ARP_REQUEST); } 802f3e4: b260 sxtb r0, r4 802f3e6: e8bd 83f8 ldmia.w sp!, {r3, r4, r5, r6, r7, r8, r9, pc} 802f3ea: bf00 nop 802f3ec: 08038401 .word 0x08038401 802f3f0: 080383fb .word 0x080383fb 0802f3f4 : * - ERR_ARG Non-unicast address given, those will not appear in ARP cache. * */ err_t etharp_query(struct netif *netif, ip_addr_t *ipaddr, struct pbuf *q) { 802f3f4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 802f3f8: 4607 mov r7, r0 802f3fa: 460e mov r6, r1 struct eth_addr * srcaddr = (struct eth_addr *)netif->hwaddr; err_t result = ERR_MEM; s8_t i; /* ARP entry index */ /* non-unicast address? */ if (ip_addr_isbroadcast(ipaddr, netif) || 802f3fc: 6808 ldr r0, [r1, #0] 802f3fe: 4639 mov r1, r7 * - ERR_ARG Non-unicast address given, those will not appear in ARP cache. * */ err_t etharp_query(struct netif *netif, ip_addr_t *ipaddr, struct pbuf *q) { 802f400: 4615 mov r5, r2 struct eth_addr * srcaddr = (struct eth_addr *)netif->hwaddr; err_t result = ERR_MEM; s8_t i; /* ARP entry index */ /* non-unicast address? */ if (ip_addr_isbroadcast(ipaddr, netif) || 802f402: f7fb fe03 bl 802b00c 802f406: 2800 cmp r0, #0 802f408: d157 bne.n 802f4ba ip_addr_ismulticast(ipaddr) || 802f40a: 6833 ldr r3, [r6, #0] 802f40c: f003 02f0 and.w r2, r3, #240 ; 0xf0 struct eth_addr * srcaddr = (struct eth_addr *)netif->hwaddr; err_t result = ERR_MEM; s8_t i; /* ARP entry index */ /* non-unicast address? */ if (ip_addr_isbroadcast(ipaddr, netif) || 802f410: 2ae0 cmp r2, #224 ; 0xe0 802f412: d052 beq.n 802f4ba ip_addr_ismulticast(ipaddr) || ip_addr_isany(ipaddr)) { 802f414: 2b00 cmp r3, #0 802f416: d050 beq.n 802f4ba LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: will not add non-unicast IP address to ARP cache\n")); return ERR_ARG; } /* find entry in ARP cache, ask to create entry if queueing packet */ i = etharp_find_entry(ipaddr, ETHARP_FLAG_TRY_HARD); 802f418: 2101 movs r1, #1 802f41a: 4630 mov r0, r6 802f41c: f7ff fed4 bl 802f1c8 /* could not find or create entry? */ if (i < 0) { 802f420: 1e04 subs r4, r0, #0 802f422: db4f blt.n 802f4c4 } return (err_t)i; } /* mark a fresh entry as pending (we just sent a request) */ if (arp_table[i].state == ETHARP_STATE_EMPTY) { 802f424: 4931 ldr r1, [pc, #196] ; (802f4ec ) 802f426: 2214 movs r2, #20 802f428: fb02 1304 mla r3, r2, r4, r1 802f42c: 3310 adds r3, #16 802f42e: 7898 ldrb r0, [r3, #2] 802f430: b908 cbnz r0, 802f436 arp_table[i].state = ETHARP_STATE_PENDING; 802f432: 2001 movs r0, #1 802f434: 7098 strb r0, [r3, #2] LWIP_ASSERT("arp_table[i].state == PENDING or STABLE", ((arp_table[i].state == ETHARP_STATE_PENDING) || (arp_table[i].state >= ETHARP_STATE_STABLE))); /* do we have a pending entry? or an implicit query request? */ if ((arp_table[i].state == ETHARP_STATE_PENDING) || (q == NULL)) { 802f436: fb02 1204 mla r2, r2, r4, r1 802f43a: 7c93 ldrb r3, [r2, #18] 802f43c: 2b01 cmp r3, #1 802f43e: d000 beq.n 802f442 802f440: b935 cbnz r5, 802f450 /* try to resolve it; send out ARP request */ result = etharp_request(netif, ipaddr); 802f442: 4638 mov r0, r7 802f444: 4631 mov r1, r6 802f446: f7ff ff7f bl 802f348 802f44a: 4602 mov r2, r0 /* ARP request couldn't be sent */ /* We don't re-send arp request in etharp_tmr, but we still queue packets, since this failure could be temporary, and the next packet calling etharp_query again could lead to sending the queued packets. */ } if (q == NULL) { 802f44c: b90d cbnz r5, 802f452 802f44e: e036 b.n 802f4be */ err_t etharp_query(struct netif *netif, ip_addr_t *ipaddr, struct pbuf *q) { struct eth_addr * srcaddr = (struct eth_addr *)netif->hwaddr; err_t result = ERR_MEM; 802f450: 22ff movs r2, #255 ; 0xff } /* packet given? */ LWIP_ASSERT("q != NULL", q != NULL); /* stable entry? */ if (arp_table[i].state >= ETHARP_STATE_STABLE) { 802f452: 2314 movs r3, #20 802f454: 4925 ldr r1, [pc, #148] ; (802f4ec ) 802f456: 4363 muls r3, r4 802f458: 18c8 adds r0, r1, r3 802f45a: 7c80 ldrb r0, [r0, #18] 802f45c: 2801 cmp r0, #1 802f45e: d90b bls.n 802f478 /* we have a valid IP->Ethernet address mapping */ ETHARP_SET_HINT(netif, i); 802f460: 4a23 ldr r2, [pc, #140] ; (802f4f0 ) /* send the packet */ result = etharp_send_ip(netif, q, srcaddr, &(arp_table[i].ethaddr)); 802f462: 18cb adds r3, r1, r3 /* packet given? */ LWIP_ASSERT("q != NULL", q != NULL); /* stable entry? */ if (arp_table[i].state >= ETHARP_STATE_STABLE) { /* we have a valid IP->Ethernet address mapping */ ETHARP_SET_HINT(netif, i); 802f464: 7014 strb r4, [r2, #0] /* send the packet */ result = etharp_send_ip(netif, q, srcaddr, &(arp_table[i].ethaddr)); 802f466: 4638 mov r0, r7 802f468: 4629 mov r1, r5 802f46a: f107 0227 add.w r2, r7, #39 ; 0x27 802f46e: 330c adds r3, #12 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q)); result = ERR_MEM; } } return result; } 802f470: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} /* stable entry? */ if (arp_table[i].state >= ETHARP_STATE_STABLE) { /* we have a valid IP->Ethernet address mapping */ ETHARP_SET_HINT(netif, i); /* send the packet */ result = etharp_send_ip(netif, q, srcaddr, &(arp_table[i].ethaddr)); 802f474: f7ff be76 b.w 802f164 /* pending entry? (either just created or already pending */ } else if (arp_table[i].state == ETHARP_STATE_PENDING) { 802f478: d123 bne.n 802f4c2 802f47a: 462b mov r3, r5 802f47c: e003 b.n 802f486 * to copy the whole queue into a new PBUF_RAM (see bug #11400) * PBUF_ROMs can be left as they are, since ROM must not get changed. */ p = q; while (p) { LWIP_ASSERT("no packet queues allowed!", (p->len != p->tot_len) || (p->next == 0)); if(p->type != PBUF_ROM) { 802f47e: 7b1a ldrb r2, [r3, #12] 802f480: 2a01 cmp r2, #1 802f482: d128 bne.n 802f4d6 copy_needed = 1; break; } p = p->next; 802f484: 681b ldr r3, [r3, #0] int copy_needed = 0; /* IF q includes a PBUF_REF, PBUF_POOL or PBUF_RAM, we have no choice but * to copy the whole queue into a new PBUF_RAM (see bug #11400) * PBUF_ROMs can be left as they are, since ROM must not get changed. */ p = q; while (p) { 802f486: 2b00 cmp r3, #0 802f488: d1f9 bne.n 802f47e 802f48a: e01e b.n 802f4ca } if(copy_needed) { /* copy the whole packet into new pbufs */ p = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); if(p != NULL) { if (pbuf_copy(p, q) != ERR_OK) { 802f48c: 4629 mov r1, r5 802f48e: f7f9 f827 bl 80284e0 802f492: b120 cbz r0, 802f49e pbuf_free(p); 802f494: 4630 mov r0, r6 802f496: f7f8 ff1f bl 80282d8 802f49a: e024 b.n 802f4e6 /* referencing the old pbuf is enough */ p = q; pbuf_ref(p); } /* packet could be taken over? */ if (p != NULL) { 802f49c: 462e mov r6, r5 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q)); result = ERR_MEM; } #else /* ARP_QUEUEING */ /* always queue one packet per ARP request only, freeing a previously queued packet */ if (arp_table[i].q != NULL) { 802f49e: 2314 movs r3, #20 802f4a0: 4a12 ldr r2, [pc, #72] ; (802f4ec ) 802f4a2: fb03 f104 mul.w r1, r3, r4 802f4a6: 4615 mov r5, r2 802f4a8: 5850 ldr r0, [r2, r1] 802f4aa: 461f mov r7, r3 802f4ac: b108 cbz r0, 802f4b2 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: dropped previously queued packet %p for ARP entry %"S16_F"\n", (void *)q, (s16_t)i)); pbuf_free(arp_table[i].q); 802f4ae: f7f8 ff13 bl 80282d8 } arp_table[i].q = p; 802f4b2: 437c muls r4, r7 802f4b4: 512e str r6, [r5, r4] result = ERR_OK; 802f4b6: 2400 movs r4, #0 802f4b8: e004 b.n 802f4c4 /* non-unicast address? */ if (ip_addr_isbroadcast(ipaddr, netif) || ip_addr_ismulticast(ipaddr) || ip_addr_isany(ipaddr)) { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: will not add non-unicast IP address to ARP cache\n")); return ERR_ARG; 802f4ba: 24f2 movs r4, #242 ; 0xf2 802f4bc: e002 b.n 802f4c4 /* We don't re-send arp request in etharp_tmr, but we still queue packets, since this failure could be temporary, and the next packet calling etharp_query again could lead to sending the queued packets. */ } if (q == NULL) { return result; 802f4be: 4604 mov r4, r0 802f4c0: e000 b.n 802f4c4 /* we have a valid IP->Ethernet address mapping */ ETHARP_SET_HINT(netif, i); /* send the packet */ result = etharp_send_ip(netif, q, srcaddr, &(arp_table[i].ethaddr)); /* pending entry? (either just created or already pending */ } else if (arp_table[i].state == ETHARP_STATE_PENDING) { 802f4c2: 4614 mov r4, r2 802f4c4: b260 sxtb r0, r4 802f4c6: e8bd 81f0 ldmia.w sp!, {r4, r5, r6, r7, r8, pc} } } } else { /* referencing the old pbuf is enough */ p = q; pbuf_ref(p); 802f4ca: 4628 mov r0, r5 802f4cc: f7f8 ffe1 bl 8028492 } /* packet could be taken over? */ if (p != NULL) { 802f4d0: 2d00 cmp r5, #0 802f4d2: d1e3 bne.n 802f49c 802f4d4: e007 b.n 802f4e6 } p = p->next; } if(copy_needed) { /* copy the whole packet into new pbufs */ p = pbuf_alloc(PBUF_RAW, p->tot_len, PBUF_RAM); 802f4d6: 2003 movs r0, #3 802f4d8: 8919 ldrh r1, [r3, #8] 802f4da: 2200 movs r2, #0 802f4dc: f7f8 ff49 bl 8028372 if(p != NULL) { 802f4e0: 4606 mov r6, r0 802f4e2: 2800 cmp r0, #0 802f4e4: d1d2 bne.n 802f48c LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: queued packet %p on ARP entry %"S16_F"\n", (void *)q, (s16_t)i)); #endif /* ARP_QUEUEING */ } else { ETHARP_STATS_INC(etharp.memerr); LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_query: could not queue a copy of PBUF_REF packet %p (out of memory)\n", (void *)q)); result = ERR_MEM; 802f4e6: 24ff movs r4, #255 ; 0xff 802f4e8: e7ec b.n 802f4c4 802f4ea: bf00 nop 802f4ec: 2000de7c .word 0x2000de7c 802f4f0: 2000de78 .word 0x2000de78 0802f4f4 : /** Just a small helper function that sends a pbuf to an ethernet address * in the arp_table specified by the index 'arp_idx'. */ static err_t etharp_output_to_arp_index(struct netif *netif, struct pbuf *q, u8_t arp_idx) { 802f4f4: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", arp_table[arp_idx].state >= ETHARP_STATE_STABLE); /* if arp table entry is about to expire: re-request it, but only if its state is ETHARP_STATE_STABLE to prevent flooding the network with ARP requests if this address is used frequently. */ if ((arp_table[arp_idx].state == ETHARP_STATE_STABLE) && 802f4f8: 4b10 ldr r3, [pc, #64] ; (802f53c ) /** Just a small helper function that sends a pbuf to an ethernet address * in the arp_table specified by the index 'arp_idx'. */ static err_t etharp_output_to_arp_index(struct netif *netif, struct pbuf *q, u8_t arp_idx) { 802f4fa: 4615 mov r5, r2 LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", arp_table[arp_idx].state >= ETHARP_STATE_STABLE); /* if arp table entry is about to expire: re-request it, but only if its state is ETHARP_STATE_STABLE to prevent flooding the network with ARP requests if this address is used frequently. */ if ((arp_table[arp_idx].state == ETHARP_STATE_STABLE) && 802f4fc: 2214 movs r2, #20 /** Just a small helper function that sends a pbuf to an ethernet address * in the arp_table specified by the index 'arp_idx'. */ static err_t etharp_output_to_arp_index(struct netif *netif, struct pbuf *q, u8_t arp_idx) { 802f4fe: 460e mov r6, r1 LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", arp_table[arp_idx].state >= ETHARP_STATE_STABLE); /* if arp table entry is about to expire: re-request it, but only if its state is ETHARP_STATE_STABLE to prevent flooding the network with ARP requests if this address is used frequently. */ if ((arp_table[arp_idx].state == ETHARP_STATE_STABLE) && 802f500: fb02 3105 mla r1, r2, r5, r3 /** Just a small helper function that sends a pbuf to an ethernet address * in the arp_table specified by the index 'arp_idx'. */ static err_t etharp_output_to_arp_index(struct netif *netif, struct pbuf *q, u8_t arp_idx) { 802f504: 4607 mov r7, r0 LWIP_ASSERT("arp_table[arp_idx].state >= ETHARP_STATE_STABLE", arp_table[arp_idx].state >= ETHARP_STATE_STABLE); /* if arp table entry is about to expire: re-request it, but only if its state is ETHARP_STATE_STABLE to prevent flooding the network with ARP requests if this address is used frequently. */ if ((arp_table[arp_idx].state == ETHARP_STATE_STABLE) && 802f506: 7c8a ldrb r2, [r1, #18] 802f508: 2a02 cmp r2, #2 802f50a: f101 0410 add.w r4, r1, #16 802f50e: d108 bne.n 802f522 802f510: 7cca ldrb r2, [r1, #19] 802f512: 2ae3 cmp r2, #227 ; 0xe3 802f514: d905 bls.n 802f522 (arp_table[arp_idx].ctime >= ARP_AGE_REREQUEST_USED)) { if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) { 802f516: 3104 adds r1, #4 802f518: f7ff ff16 bl 802f348 802f51c: b908 cbnz r0, 802f522 arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING; 802f51e: 2303 movs r3, #3 802f520: 70a3 strb r3, [r4, #2] } } return etharp_send_ip(netif, q, (struct eth_addr*)(netif->hwaddr), 802f522: 4b06 ldr r3, [pc, #24] ; (802f53c ) 802f524: 2214 movs r2, #20 802f526: fb02 3305 mla r3, r2, r5, r3 802f52a: 4638 mov r0, r7 802f52c: 4631 mov r1, r6 802f52e: f107 0227 add.w r2, r7, #39 ; 0x27 802f532: 330c adds r3, #12 &arp_table[arp_idx].ethaddr); } 802f534: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} if (etharp_request(netif, &arp_table[arp_idx].ipaddr) == ERR_OK) { arp_table[arp_idx].state = ETHARP_STATE_STABLE_REREQUESTING; } } return etharp_send_ip(netif, q, (struct eth_addr*)(netif->hwaddr), 802f538: f7ff be14 b.w 802f164 802f53c: 2000de7c .word 0x2000de7c 0802f540 : * - ERR_RTE No route to destination (no gateway to external networks), * or the return type of either etharp_query() or etharp_send_ip(). */ err_t etharp_output(struct netif *netif, struct pbuf *q, ip_addr_t *ipaddr) { 802f540: b5f7 push {r0, r1, r2, r4, r5, r6, r7, lr} 802f542: 4604 mov r4, r0 802f544: 460e mov r6, r1 LWIP_ASSERT("netif != NULL", netif != NULL); LWIP_ASSERT("q != NULL", q != NULL); LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL); /* make room for Ethernet header - should not fail */ if (pbuf_header(q, sizeof(struct eth_hdr)) != 0) { 802f546: 4608 mov r0, r1 802f548: 210e movs r1, #14 * - ERR_RTE No route to destination (no gateway to external networks), * or the return type of either etharp_query() or etharp_send_ip(). */ err_t etharp_output(struct netif *netif, struct pbuf *q, ip_addr_t *ipaddr) { 802f54a: 4615 mov r5, r2 LWIP_ASSERT("netif != NULL", netif != NULL); LWIP_ASSERT("q != NULL", q != NULL); LWIP_ASSERT("ipaddr != NULL", ipaddr != NULL); /* make room for Ethernet header - should not fail */ if (pbuf_header(q, sizeof(struct eth_hdr)) != 0) { 802f54c: f7f8 fe99 bl 8028282 802f550: 2800 cmp r0, #0 802f552: d163 bne.n 802f61c /* Determine on destination hardware address. Broadcasts and multicasts * are special, other IP addresses are looked up in the ARP table. */ /* broadcast destination IP address? */ if (ip_addr_isbroadcast(ipaddr, netif)) { 802f554: 6828 ldr r0, [r5, #0] 802f556: 4621 mov r1, r4 802f558: f7fb fd58 bl 802b00c 802f55c: 2800 cmp r0, #0 802f55e: d155 bne.n 802f60c /* broadcast on Ethernet also */ dest = (struct eth_addr *)ðbroadcast; /* multicast destination IP address? */ } else if (ip_addr_ismulticast(ipaddr)) { 802f560: 682b ldr r3, [r5, #0] 802f562: f003 02f0 and.w r2, r3, #240 ; 0xf0 802f566: 2ae0 cmp r2, #224 ; 0xe0 802f568: d114 bne.n 802f594 /* Hash IP multicast address to MAC address.*/ mcastaddr.addr[0] = LL_MULTICAST_ADDR_0; 802f56a: 2301 movs r3, #1 802f56c: f88d 3000 strb.w r3, [sp] mcastaddr.addr[1] = LL_MULTICAST_ADDR_1; mcastaddr.addr[2] = LL_MULTICAST_ADDR_2; 802f570: 235e movs r3, #94 ; 0x5e 802f572: f88d 3002 strb.w r3, [sp, #2] mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; 802f576: 786b ldrb r3, [r5, #1] dest = (struct eth_addr *)ðbroadcast; /* multicast destination IP address? */ } else if (ip_addr_ismulticast(ipaddr)) { /* Hash IP multicast address to MAC address.*/ mcastaddr.addr[0] = LL_MULTICAST_ADDR_0; mcastaddr.addr[1] = LL_MULTICAST_ADDR_1; 802f578: f88d 0001 strb.w r0, [sp, #1] mcastaddr.addr[2] = LL_MULTICAST_ADDR_2; mcastaddr.addr[3] = ip4_addr2(ipaddr) & 0x7f; 802f57c: f003 037f and.w r3, r3, #127 ; 0x7f 802f580: f88d 3003 strb.w r3, [sp, #3] mcastaddr.addr[4] = ip4_addr3(ipaddr); 802f584: 78ab ldrb r3, [r5, #2] 802f586: f88d 3004 strb.w r3, [sp, #4] mcastaddr.addr[5] = ip4_addr4(ipaddr); 802f58a: 78eb ldrb r3, [r5, #3] 802f58c: f88d 3005 strb.w r3, [sp, #5] /* destination Ethernet address is multicast */ dest = &mcastaddr; 802f590: 466b mov r3, sp 802f592: e03c b.n 802f60e /* unicast destination IP address? */ } else { s8_t i; /* outside local network? if so, this can neither be a global broadcast nor a subnet broadcast. */ if (!ip_addr_netcmp(ipaddr, &(netif->ip_addr), &(netif->netmask)) && 802f594: 6862 ldr r2, [r4, #4] 802f596: ea83 0102 eor.w r1, r3, r2 802f59a: 68a2 ldr r2, [r4, #8] 802f59c: 4211 tst r1, r2 802f59e: d009 beq.n 802f5b4 !ip_addr_islinklocal(ipaddr)) { 802f5a0: b29b uxth r3, r3 /* unicast destination IP address? */ } else { s8_t i; /* outside local network? if so, this can neither be a global broadcast nor a subnet broadcast. */ if (!ip_addr_netcmp(ipaddr, &(netif->ip_addr), &(netif->netmask)) && 802f5a2: f64f 62a9 movw r2, #65193 ; 0xfea9 802f5a6: 4293 cmp r3, r2 802f5a8: d004 beq.n 802f5b4 router for forwarding". */ if (!ip_addr_islinklocal(&iphdr->src)) #endif /* LWIP_AUTOIP */ { /* interface has default gateway? */ if (!ip_addr_isany(&netif->gw)) { 802f5aa: 68e3 ldr r3, [r4, #12] 802f5ac: f104 010c add.w r1, r4, #12 802f5b0: b90b cbnz r3, 802f5b6 802f5b2: e035 b.n 802f620 /* unicast destination IP address? */ } else { s8_t i; /* outside local network? if so, this can neither be a global broadcast nor a subnet broadcast. */ if (!ip_addr_netcmp(ipaddr, &(netif->ip_addr), &(netif->netmask)) && 802f5b4: 4629 mov r1, r5 if (netif->addr_hint != NULL) { /* per-pcb cached entry was given */ u8_t etharp_cached_entry = *(netif->addr_hint); if (etharp_cached_entry < ARP_TABLE_SIZE) { #endif /* LWIP_NETIF_HWADDRHINT */ if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) && 802f5b6: 4b1c ldr r3, [pc, #112] ; (802f628 ) 802f5b8: 781a ldrb r2, [r3, #0] 802f5ba: 4b1c ldr r3, [pc, #112] ; (802f62c ) 802f5bc: 2014 movs r0, #20 802f5be: fb00 3302 mla r3, r0, r2, r3 802f5c2: 7c98 ldrb r0, [r3, #18] 802f5c4: 2801 cmp r0, #1 802f5c6: d904 bls.n 802f5d2 802f5c8: 6808 ldr r0, [r1, #0] 802f5ca: 685b ldr r3, [r3, #4] 802f5cc: 4298 cmp r0, r3 802f5ce: d100 bne.n 802f5d2 802f5d0: e00d b.n 802f5ee 802f5d2: 2300 movs r3, #0 * @return * - ERR_RTE No route to destination (no gateway to external networks), * or the return type of either etharp_query() or etharp_send_ip(). */ err_t etharp_output(struct netif *netif, struct pbuf *q, ip_addr_t *ipaddr) 802f5d4: 4f15 ldr r7, [pc, #84] ; (802f62c ) if (netif->addr_hint != NULL) { /* per-pcb cached entry was given */ u8_t etharp_cached_entry = *(netif->addr_hint); if (etharp_cached_entry < ARP_TABLE_SIZE) { #endif /* LWIP_NETIF_HWADDRHINT */ if ((arp_table[etharp_cached_entry].state >= ETHARP_STATE_STABLE) && 802f5d6: 461a mov r2, r3 * @return * - ERR_RTE No route to destination (no gateway to external networks), * or the return type of either etharp_query() or etharp_send_ip(). */ err_t etharp_output(struct netif *netif, struct pbuf *q, ip_addr_t *ipaddr) 802f5d8: 18f8 adds r0, r7, r3 #endif /* LWIP_NETIF_HWADDRHINT */ /* find stable entry: do this here since this is a critical path for throughput and etharp_find_entry() is kind of slow */ for (i = 0; i < ARP_TABLE_SIZE; i++) { if ((arp_table[i].state >= ETHARP_STATE_STABLE) && 802f5da: 7c85 ldrb r5, [r0, #18] 802f5dc: 2d01 cmp r5, #1 802f5de: d90b bls.n 802f5f8 802f5e0: 680d ldr r5, [r1, #0] 802f5e2: 6840 ldr r0, [r0, #4] 802f5e4: 4285 cmp r5, r0 802f5e6: d107 bne.n 802f5f8 (ip_addr_cmp(dst_addr, &arp_table[i].ipaddr))) { /* found an existing, stable entry */ ETHARP_SET_HINT(netif, i); 802f5e8: 4b0f ldr r3, [pc, #60] ; (802f628 ) 802f5ea: b2d2 uxtb r2, r2 802f5ec: 701a strb r2, [r3, #0] return etharp_output_to_arp_index(netif, q, i); 802f5ee: 4620 mov r0, r4 802f5f0: 4631 mov r1, r6 802f5f2: f7ff ff7f bl 802f4f4 802f5f6: e014 b.n 802f622 802f5f8: 3314 adds r3, #20 } #endif /* LWIP_NETIF_HWADDRHINT */ /* find stable entry: do this here since this is a critical path for throughput and etharp_find_entry() is kind of slow */ for (i = 0; i < ARP_TABLE_SIZE; i++) { 802f5fa: 3201 adds r2, #1 802f5fc: 2bc8 cmp r3, #200 ; 0xc8 802f5fe: b2d2 uxtb r2, r2 802f600: d1ea bne.n 802f5d8 return etharp_output_to_arp_index(netif, q, i); } } /* no stable entry found, use the (slower) query function: queue on destination Ethernet address belonging to ipaddr */ return etharp_query(netif, dst_addr, q); 802f602: 4620 mov r0, r4 802f604: 4632 mov r2, r6 802f606: f7ff fef5 bl 802f3f4 802f60a: e00a b.n 802f622 * are special, other IP addresses are looked up in the ARP table. */ /* broadcast destination IP address? */ if (ip_addr_isbroadcast(ipaddr, netif)) { /* broadcast on Ethernet also */ dest = (struct eth_addr *)ðbroadcast; 802f60c: 4b08 ldr r3, [pc, #32] ; (802f630 ) } /* continuation for multicast/broadcast destinations */ /* obtain source Ethernet address of the given interface */ /* send packet directly on the link */ return etharp_send_ip(netif, q, (struct eth_addr*)(netif->hwaddr), dest); 802f60e: 4620 mov r0, r4 802f610: 4631 mov r1, r6 802f612: f104 0227 add.w r2, r4, #39 ; 0x27 802f616: f7ff fda5 bl 802f164 802f61a: e002 b.n 802f622 if (pbuf_header(q, sizeof(struct eth_hdr)) != 0) { /* bail out */ LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE | LWIP_DBG_LEVEL_SERIOUS, ("etharp_output: could not allocate room for header.\n")); LINK_STATS_INC(link.lenerr); return ERR_BUF; 802f61c: 20fe movs r0, #254 ; 0xfe 802f61e: e000 b.n 802f622 /* send to hardware address of default gateway IP address */ dst_addr = &(netif->gw); /* no default gateway available */ } else { /* no route to destination error (default gateway missing) */ return ERR_RTE; 802f620: 20fc movs r0, #252 ; 0xfc /* continuation for multicast/broadcast destinations */ /* obtain source Ethernet address of the given interface */ /* send packet directly on the link */ return etharp_send_ip(netif, q, (struct eth_addr*)(netif->hwaddr), dest); } 802f622: b240 sxtb r0, r0 802f624: bdfe pop {r1, r2, r3, r4, r5, r6, r7, pc} 802f626: bf00 nop 802f628: 2000de78 .word 0x2000de78 802f62c: 2000de7c .word 0x2000de7c 802f630: 080383fb .word 0x080383fb 0802f634 : * @param p the recevied packet, p->payload pointing to the ethernet header * @param netif the network interface on which the packet was received */ err_t ethernet_input(struct pbuf *p, struct netif *netif) { 802f634: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} u16_t type; #if LWIP_ARP || ETHARP_SUPPORT_VLAN s16_t ip_hdr_offset = SIZEOF_ETH_HDR; #endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */ if (p->len <= SIZEOF_ETH_HDR) { 802f638: 8943 ldrh r3, [r0, #10] 802f63a: 2b0e cmp r3, #14 * @param p the recevied packet, p->payload pointing to the ethernet header * @param netif the network interface on which the packet was received */ err_t ethernet_input(struct pbuf *p, struct netif *netif) { 802f63c: b087 sub sp, #28 802f63e: 4604 mov r4, r0 802f640: 460d mov r5, r1 u16_t type; #if LWIP_ARP || ETHARP_SUPPORT_VLAN s16_t ip_hdr_offset = SIZEOF_ETH_HDR; #endif /* LWIP_ARP || ETHARP_SUPPORT_VLAN */ if (p->len <= SIZEOF_ETH_HDR) { 802f642: f240 80ed bls.w 802f820 ETHARP_STATS_INC(etharp.drop); goto free_and_return; } /* points to packet payload, which starts with an Ethernet header */ ethhdr = (struct eth_hdr *)p->payload; 802f646: 6840 ldr r0, [r0, #4] #if LWIP_ARP_FILTER_NETIF netif = LWIP_ARP_FILTER_NETIF_FN(p, netif, htons(type)); #endif /* LWIP_ARP_FILTER_NETIF*/ if (ethhdr->dest.addr[0] & 1) { 802f648: 7803 ldrb r3, [r0, #0] (unsigned)ethhdr->dest.addr[3], (unsigned)ethhdr->dest.addr[4], (unsigned)ethhdr->dest.addr[5], (unsigned)ethhdr->src.addr[0], (unsigned)ethhdr->src.addr[1], (unsigned)ethhdr->src.addr[2], (unsigned)ethhdr->src.addr[3], (unsigned)ethhdr->src.addr[4], (unsigned)ethhdr->src.addr[5], (unsigned)htons(ethhdr->type))); type = ethhdr->type; 802f64a: 8986 ldrh r6, [r0, #12] #if LWIP_ARP_FILTER_NETIF netif = LWIP_ARP_FILTER_NETIF_FN(p, netif, htons(type)); #endif /* LWIP_ARP_FILTER_NETIF*/ if (ethhdr->dest.addr[0] & 1) { 802f64c: 07da lsls r2, r3, #31 802f64e: d513 bpl.n 802f678 /* this might be a multicast or broadcast packet */ if (ethhdr->dest.addr[0] == LL_MULTICAST_ADDR_0) { 802f650: 2b01 cmp r3, #1 802f652: d108 bne.n 802f666 if ((ethhdr->dest.addr[1] == LL_MULTICAST_ADDR_1) && 802f654: 7843 ldrb r3, [r0, #1] 802f656: b97b cbnz r3, 802f678 802f658: 7883 ldrb r3, [r0, #2] 802f65a: 2b5e cmp r3, #94 ; 0x5e 802f65c: d10c bne.n 802f678 (ethhdr->dest.addr[2] == LL_MULTICAST_ADDR_2)) { /* mark the pbuf as link-layer multicast */ p->flags |= PBUF_FLAG_LLMCAST; 802f65e: 7b63 ldrb r3, [r4, #13] 802f660: f043 0310 orr.w r3, r3, #16 802f664: e007 b.n 802f676 } } else if (eth_addr_cmp(ðhdr->dest, ðbroadcast)) { 802f666: 4972 ldr r1, [pc, #456] ; (802f830 ) 802f668: 2206 movs r2, #6 802f66a: f7f1 ff5d bl 8021528 802f66e: b918 cbnz r0, 802f678 /* mark the pbuf as link-layer broadcast */ p->flags |= PBUF_FLAG_LLBCAST; 802f670: 7b63 ldrb r3, [r4, #13] 802f672: f043 0308 orr.w r3, r3, #8 802f676: 7363 strb r3, [r4, #13] } } switch (type) { 802f678: 2e08 cmp r6, #8 802f67a: d004 beq.n 802f686 802f67c: f5b6 6fc1 cmp.w r6, #1544 ; 0x608 802f680: f040 80ce bne.w 802f820 802f684: e014 b.n 802f6b0 #if LWIP_ARP /* IP packet? */ case PP_HTONS(ETHTYPE_IP): if (!(netif->flags & NETIF_FLAG_ETHARP)) { 802f686: f895 302d ldrb.w r3, [r5, #45] ; 0x2d 802f68a: f003 0320 and.w r3, r3, #32 802f68e: b2db uxtb r3, r3 802f690: 2b00 cmp r3, #0 802f692: f000 80c5 beq.w 802f820 #if ETHARP_TRUST_IP_MAC /* update ARP table */ etharp_ip_input(netif, p); #endif /* ETHARP_TRUST_IP_MAC */ /* skip Ethernet header */ if(pbuf_header(p, -ip_hdr_offset)) { 802f696: 4620 mov r0, r4 802f698: f06f 010d mvn.w r1, #13 802f69c: f7f8 fdf1 bl 8028282 802f6a0: 2800 cmp r0, #0 802f6a2: f040 80bd bne.w 802f820 LWIP_ASSERT("Can't move over header in packet", 0); goto free_and_return; } else { /* pass to IP layer */ ip_input(p, netif); 802f6a6: 4620 mov r0, r4 802f6a8: 4629 mov r1, r5 802f6aa: f7fb fdc3 bl 802b234 } break; 802f6ae: e0ba b.n 802f826 case PP_HTONS(ETHTYPE_ARP): if (!(netif->flags & NETIF_FLAG_ETHARP)) { 802f6b0: f895 302d ldrb.w r3, [r5, #45] ; 0x2d 802f6b4: f003 0320 and.w r3, r3, #32 802f6b8: b2db uxtb r3, r3 802f6ba: 2b00 cmp r3, #0 802f6bc: f000 80b0 beq.w 802f820 LWIP_ERROR("netif != NULL", (netif != NULL), return;); /* drop short ARP packets: we have to check for p->len instead of p->tot_len here since a struct etharp_hdr is pointed to p->payload, so it musn't be chained! */ if (p->len < SIZEOF_ETHARP_PACKET) { 802f6c0: 8963 ldrh r3, [r4, #10] 802f6c2: 2b29 cmp r3, #41 ; 0x29 802f6c4: d800 bhi.n 802f6c8 802f6c6: e0ab b.n 802f820 ETHARP_STATS_INC(etharp.drop); pbuf_free(p); return; } ethhdr = (struct eth_hdr *)p->payload; 802f6c8: 6866 ldr r6, [r4, #4] hdr = (struct etharp_hdr *)(((u8_t*)ethhdr) + SIZEOF_ETH_HDR + SIZEOF_VLAN_HDR); } #endif /* ETHARP_SUPPORT_VLAN */ /* RFC 826 "Packet Reception": */ if ((hdr->hwtype != PP_HTONS(HWTYPE_ETHERNET)) || 802f6ca: 89f3 ldrh r3, [r6, #14] 802f6cc: f5b3 7f80 cmp.w r3, #256 ; 0x100 802f6d0: f040 80a6 bne.w 802f820 802f6d4: 7cb3 ldrb r3, [r6, #18] 802f6d6: 2b06 cmp r3, #6 802f6d8: f040 80a2 bne.w 802f820 (hdr->hwlen != ETHARP_HWADDR_LEN) || 802f6dc: 7cf7 ldrb r7, [r6, #19] 802f6de: 2f04 cmp r7, #4 802f6e0: f040 809e bne.w 802f820 (hdr->protolen != sizeof(ip_addr_t)) || 802f6e4: 8a33 ldrh r3, [r6, #16] 802f6e6: 2b08 cmp r3, #8 802f6e8: f040 809a bne.w 802f820 autoip_arp_reply(netif, hdr); #endif /* LWIP_AUTOIP */ /* Copy struct ip_addr2 to aligned ip_addr, to support compilers without * structure packing (not using structure copy which breaks strict-aliasing rules). */ IPADDR2_COPY(&sipaddr, &hdr->sipaddr); 802f6ec: f106 0a1c add.w sl, r6, #28 802f6f0: 4651 mov r1, sl 802f6f2: 463a mov r2, r7 802f6f4: a804 add r0, sp, #16 802f6f6: f7f1 ff49 bl 802158c IPADDR2_COPY(&dipaddr, &hdr->dipaddr); 802f6fa: f106 0226 add.w r2, r6, #38 ; 0x26 802f6fe: 9203 str r2, [sp, #12] 802f700: 4611 mov r1, r2 802f702: a805 add r0, sp, #20 802f704: 463a mov r2, r7 802f706: f7f1 ff41 bl 802158c /* this interface is not configured? */ if (ip_addr_isany(&netif->ip_addr)) { 802f70a: 686b ldr r3, [r5, #4] 802f70c: b12b cbz r3, 802f71a for_us = 0; } else { /* ARP packet directed to us? */ for_us = (u8_t)ip_addr_cmp(&dipaddr, &(netif->ip_addr)); 802f70e: 9a05 ldr r2, [sp, #20] 802f710: 1ad1 subs r1, r2, r3 802f712: 424a negs r2, r1 802f714: 414a adcs r2, r1 802f716: 9201 str r2, [sp, #4] 802f718: e000 b.n 802f71c IPADDR2_COPY(&sipaddr, &hdr->sipaddr); IPADDR2_COPY(&dipaddr, &hdr->dipaddr); /* this interface is not configured? */ if (ip_addr_isany(&netif->ip_addr)) { for_us = 0; 802f71a: 9301 str r3, [sp, #4] /* ARP message directed to us? -> add IP address in ARP cache; assume requester wants to talk to us, can result in directly sending the queued packets for this host. ARP message not directed to us? -> update the source IP address in the cache, if present */ etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr), 802f71c: 9b01 ldr r3, [sp, #4] LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: %"U16_F".%"U16_F".%"U16_F".%"U16_F" - %02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F"\n", ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr), ethaddr->addr[0], ethaddr->addr[1], ethaddr->addr[2], ethaddr->addr[3], ethaddr->addr[4], ethaddr->addr[5])); /* non-unicast address? */ if (ip_addr_isany(ipaddr) || 802f71e: 9804 ldr r0, [sp, #16] /* ARP message directed to us? -> add IP address in ARP cache; assume requester wants to talk to us, can result in directly sending the queued packets for this host. ARP message not directed to us? -> update the source IP address in the cache, if present */ etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr), 802f720: f106 0716 add.w r7, r6, #22 802f724: 2b00 cmp r3, #0 802f726: bf0c ite eq 802f728: f04f 0802 moveq.w r8, #2 802f72c: f04f 0801 movne.w r8, #1 case PP_HTONS(ETHTYPE_ARP): if (!(netif->flags & NETIF_FLAG_ETHARP)) { goto free_and_return; } /* pass p to ARP module */ etharp_arp_input(netif, (struct eth_addr*)(netif->hwaddr), p); 802f730: f105 0927 add.w r9, r5, #39 ; 0x27 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: %"U16_F".%"U16_F".%"U16_F".%"U16_F" - %02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F"\n", ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr), ethaddr->addr[0], ethaddr->addr[1], ethaddr->addr[2], ethaddr->addr[3], ethaddr->addr[4], ethaddr->addr[5])); /* non-unicast address? */ if (ip_addr_isany(ipaddr) || 802f734: 2800 cmp r0, #0 802f736: d03d beq.n 802f7b4 ip_addr_isbroadcast(ipaddr, netif) || 802f738: 4629 mov r1, r5 802f73a: f7fb fc67 bl 802b00c LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: %"U16_F".%"U16_F".%"U16_F".%"U16_F" - %02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F":%02"X16_F"\n", ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr), ethaddr->addr[0], ethaddr->addr[1], ethaddr->addr[2], ethaddr->addr[3], ethaddr->addr[4], ethaddr->addr[5])); /* non-unicast address? */ if (ip_addr_isany(ipaddr) || 802f73e: 9002 str r0, [sp, #8] 802f740: 2800 cmp r0, #0 802f742: d137 bne.n 802f7b4 ip_addr_isbroadcast(ipaddr, netif) || ip_addr_ismulticast(ipaddr)) { 802f744: 9a04 ldr r2, [sp, #16] 802f746: f002 02f0 and.w r2, r2, #240 ; 0xf0 ip4_addr1_16(ipaddr), ip4_addr2_16(ipaddr), ip4_addr3_16(ipaddr), ip4_addr4_16(ipaddr), ethaddr->addr[0], ethaddr->addr[1], ethaddr->addr[2], ethaddr->addr[3], ethaddr->addr[4], ethaddr->addr[5])); /* non-unicast address? */ if (ip_addr_isany(ipaddr) || ip_addr_isbroadcast(ipaddr, netif) || 802f74a: 2ae0 cmp r2, #224 ; 0xe0 802f74c: d032 beq.n 802f7b4 ip_addr_ismulticast(ipaddr)) { LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: will not add non-unicast IP address to ARP cache\n")); return ERR_ARG; } /* find or create ARP entry */ i = etharp_find_entry(ipaddr, flags); 802f74e: a804 add r0, sp, #16 802f750: 4641 mov r1, r8 802f752: f7ff fd39 bl 802f1c8 /* bail out if no entry could be found */ if (i < 0) { 802f756: 2800 cmp r0, #0 802f758: db2c blt.n 802f7b4 arp_table[i].state = ETHARP_STATE_STATIC; } else #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ { /* mark it stable */ arp_table[i].state = ETHARP_STATE_STABLE; 802f75a: 4b36 ldr r3, [pc, #216] ; (802f834 ) 802f75c: f04f 0814 mov.w r8, #20 802f760: fb08 f800 mul.w r8, r8, r0 802f764: eb03 0108 add.w r1, r3, r8 802f768: 2202 movs r2, #2 802f76a: 748a strb r2, [r1, #18] } /* record network interface */ arp_table[i].netif = netif; 802f76c: 608d str r5, [r1, #8] arp_table[i].state = ETHARP_STATE_STATIC; } else #endif /* ETHARP_SUPPORT_STATIC_ENTRIES */ { /* mark it stable */ arp_table[i].state = ETHARP_STATE_STABLE; 802f76e: f101 0b10 add.w fp, r1, #16 } /* record network interface */ arp_table[i].netif = netif; /* insert in SNMP ARP index tree */ snmp_insert_arpidx_tree(netif, &arp_table[i].ipaddr); 802f772: 4628 mov r0, r5 802f774: 3104 adds r1, #4 802f776: 9300 str r3, [sp, #0] 802f778: f7fd f90e bl 802c998 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: updating stable entry %"S16_F"\n", (s16_t)i)); /* update address */ ETHADDR32_COPY(&arp_table[i].ethaddr, ethaddr); 802f77c: 9b00 ldr r3, [sp, #0] 802f77e: eb03 0008 add.w r0, r3, r8 802f782: 2206 movs r2, #6 802f784: 300c adds r0, #12 802f786: 4639 mov r1, r7 802f788: f7f1 ff00 bl 802158c /* reset time stamp */ arp_table[i].ctime = 0; 802f78c: 9a02 ldr r2, [sp, #8] 802f78e: f88b 2003 strb.w r2, [fp, #3] /* get the packet pointer */ p = q->p; /* now queue entry can be freed */ memp_free(MEMP_ARP_QUEUE, q); #else /* ARP_QUEUEING */ if (arp_table[i].q != NULL) { 802f792: 9b00 ldr r3, [sp, #0] 802f794: f853 b008 ldr.w fp, [r3, r8] 802f798: f1bb 0f00 cmp.w fp, #0 802f79c: d00a beq.n 802f7b4 struct pbuf *p = arp_table[i].q; arp_table[i].q = NULL; 802f79e: f843 2008 str.w r2, [r3, r8] #endif /* ARP_QUEUEING */ /* send the queued IP packet */ etharp_send_ip(netif, p, (struct eth_addr*)(netif->hwaddr), ethaddr); 802f7a2: 4628 mov r0, r5 802f7a4: 4659 mov r1, fp 802f7a6: 464a mov r2, r9 802f7a8: 463b mov r3, r7 802f7aa: f7ff fcdb bl 802f164 /* free the queued IP packet */ pbuf_free(p); 802f7ae: 4658 mov r0, fp 802f7b0: f7f8 fd92 bl 80282d8 -> update the source IP address in the cache, if present */ etharp_update_arp_entry(netif, &sipaddr, &(hdr->shwaddr), for_us ? ETHARP_FLAG_TRY_HARD : ETHARP_FLAG_FIND_ONLY); /* now act on the message itself */ switch (hdr->opcode) { 802f7b4: 8ab3 ldrh r3, [r6, #20] 802f7b6: f5b3 7f80 cmp.w r3, #256 ; 0x100 802f7ba: d003 beq.n 802f7c4 802f7bc: f5b3 7f00 cmp.w r3, #512 ; 0x200 802f7c0: d12e bne.n 802f820 802f7c2: e029 b.n 802f818 * reply. In any case, we time-stamp any existing ARP entry, * and possiby send out an IP packet that was queued on it. */ LWIP_DEBUGF (ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_arp_input: incoming ARP request\n")); /* ARP request for our address? */ if (for_us) { 802f7c4: 9b01 ldr r3, [sp, #4] 802f7c6: b35b cbz r3, 802f820 LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_arp_input: replying to ARP request for our IP address\n")); /* Re-use pbuf to send ARP reply. Since we are re-using an existing pbuf, we can't call etharp_raw since that would allocate a new pbuf. */ hdr->opcode = htons(ARP_REPLY); 802f7c8: 2002 movs r0, #2 802f7ca: f7f7 fc47 bl 802705c 802f7ce: 82b0 strh r0, [r6, #20] IPADDR2_COPY(&hdr->dipaddr, &hdr->sipaddr); 802f7d0: 4651 mov r1, sl 802f7d2: 2204 movs r2, #4 802f7d4: 9803 ldr r0, [sp, #12] 802f7d6: f7f1 fed9 bl 802158c IPADDR2_COPY(&hdr->sipaddr, &netif->ip_addr); 802f7da: 1d29 adds r1, r5, #4 802f7dc: 2204 movs r2, #4 802f7de: 4650 mov r0, sl 802f7e0: f7f1 fed4 bl 802158c * 'sender IP address' MUST be sent using link-layer broadcast instead of * link-layer unicast. (See RFC3927 Section 2.5, last paragraph) */ ethdst_hwaddr = ip_addr_islinklocal(&netif->ip_addr) ? (u8_t*)(ethbroadcast.addr) : hdr->shwaddr.addr; #endif /* LWIP_AUTOIP */ ETHADDR16_COPY(&hdr->dhwaddr, &hdr->shwaddr); 802f7e4: 4639 mov r1, r7 802f7e6: 2206 movs r2, #6 802f7e8: f106 0020 add.w r0, r6, #32 802f7ec: f7f1 fece bl 802158c #if LWIP_AUTOIP ETHADDR16_COPY(ðhdr->dest, ethdst_hwaddr); #else /* LWIP_AUTOIP */ ETHADDR16_COPY(ðhdr->dest, &hdr->shwaddr); 802f7f0: 4639 mov r1, r7 802f7f2: 2206 movs r2, #6 802f7f4: 4630 mov r0, r6 802f7f6: f7f1 fec9 bl 802158c #endif /* LWIP_AUTOIP */ ETHADDR16_COPY(&hdr->shwaddr, ethaddr); 802f7fa: 4649 mov r1, r9 802f7fc: 2206 movs r2, #6 802f7fe: 4638 mov r0, r7 802f800: f7f1 fec4 bl 802158c ETHADDR16_COPY(ðhdr->src, ethaddr); 802f804: 4649 mov r1, r9 802f806: 1db0 adds r0, r6, #6 802f808: 2206 movs r2, #6 802f80a: f7f1 febf bl 802158c /* hwtype, hwaddr_len, proto, protolen and the type in the ethernet header are already correct, we tested that before */ /* return ARP reply */ netif->linkoutput(netif, p); 802f80e: 69ab ldr r3, [r5, #24] 802f810: 4628 mov r0, r5 802f812: 4621 mov r1, r4 802f814: 4798 blx r3 802f816: e003 b.n 802f820 #if (LWIP_DHCP && DHCP_DOES_ARP_CHECK) /* DHCP wants to know about ARP replies from any host with an * IP address also offered to us by the DHCP server. We do not * want to take a duplicate IP address on a single network. * @todo How should we handle redundant (fail-over) interfaces? */ dhcp_arp_reply(netif, &sipaddr); 802f818: 4628 mov r0, r5 802f81a: a904 add r1, sp, #16 802f81c: f7f8 f8f4 bl 8027a08 /* This means the pbuf is freed or consumed, so the caller doesn't have to free it again */ return ERR_OK; free_and_return: pbuf_free(p); 802f820: 4620 mov r0, r4 802f822: f7f8 fd59 bl 80282d8 return ERR_OK; } 802f826: 2000 movs r0, #0 802f828: b007 add sp, #28 802f82a: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} 802f82e: bf00 nop 802f830: 080383fb .word 0x080383fb 802f834: 2000de7c .word 0x2000de7c 0802f838 : return ERR_OK; } static void arp_timer(void *arg) { 802f838: b508 push {r3, lr} etharp_tmr(); 802f83a: f7ff fd37 bl 802f2ac sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 802f83e: 4904 ldr r1, [pc, #16] ; (802f850 ) 802f840: f241 3088 movw r0, #5000 ; 0x1388 802f844: 2200 movs r2, #0 } 802f846: e8bd 4008 ldmia.w sp!, {r3, lr} static void arp_timer(void *arg) { etharp_tmr(); sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 802f84a: f7fa bfcb b.w 802a7e4 802f84e: bf00 nop 802f850: 0802f839 .word 0x0802f839 0802f854 : } } */ void ethernetif_input(void * pvParameters) { 802f854: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} struct pbuf *p; for( ;; ) { if(xSemaphoreTake(s_xSemaphore, emacBLOCK_TIME_WAITING_FOR_INPUT)==pdTRUE) 802f858: f8df 80c4 ldr.w r8, [pc, #196] ; 802f920 } } */ void ethernetif_input(void * pvParameters) { 802f85c: b085 sub sp, #20 struct pbuf *p; for( ;; ) { if(xSemaphoreTake(s_xSemaphore, emacBLOCK_TIME_WAITING_FOR_INPUT)==pdTRUE) 802f85e: 2100 movs r1, #0 802f860: 2264 movs r2, #100 ; 0x64 802f862: f8d8 0000 ldr.w r0, [r8] 802f866: 460b mov r3, r1 802f868: f7f5 fd44 bl 80252f4 802f86c: 2801 cmp r0, #1 802f86e: d1f6 bne.n 802f85e } } /* Release descriptors to DMA */ /* Check if received frame with multiple DMA buffer segments */ if (DMA_RX_FRAME_infos->Seg_Count > 1) 802f870: f8df a0b0 ldr.w sl, [pc, #176] ; 802f924 /* Clear Segment_Count */ DMA_RX_FRAME_infos->Seg_Count =0; /* When Rx Buffer unavailable flag is set: clear it and resume reception */ if ((ETH->DMASR & ETH_DMASR_RBUS) != (u32)RESET) 802f874: f8df 90b0 ldr.w r9, [pc, #176] ; 802f928 __IO ETH_DMADESCTypeDef *DMARxNextDesc; p = NULL; /* Get received frame */ frame = ETH_Get_Received_Frame_interrupt(); 802f878: a801 add r0, sp, #4 802f87a: f000 fe2f bl 80304dc 802f87e: 9e03 ldr r6, [sp, #12] /* check that frame has no error */ if ((frame.descriptor->Status & ETH_DMARxDesc_ES) == (uint32_t)RESET) 802f880: 6837 ldr r7, [r6, #0] 802f882: f417 4700 ands.w r7, r7, #32768 ; 0x8000 802f886: d001 beq.n 802f88c uint32_t l=0,i =0; FrameTypeDef frame; u8 *buffer; __IO ETH_DMADESCTypeDef *DMARxNextDesc; p = NULL; 802f888: 2400 movs r4, #0 802f88a: e016 b.n 802f8ba /* Obtain the size of the packet and put it into the "len" variable. */ len = frame.length; buffer = (u8 *)frame.buffer; /* We allocate a pbuf chain of pbufs from the pool. */ p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL); 802f88c: 2003 movs r0, #3 802f88e: f8bd 1004 ldrh.w r1, [sp, #4] if ((frame.descriptor->Status & ETH_DMARxDesc_ES) == (uint32_t)RESET) { /* Obtain the size of the packet and put it into the "len" variable. */ len = frame.length; buffer = (u8 *)frame.buffer; 802f892: f8dd b008 ldr.w fp, [sp, #8] /* We allocate a pbuf chain of pbufs from the pool. */ p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL); 802f896: 4602 mov r2, r0 802f898: f7f8 fd6b bl 8028372 /* Copy received frame from ethernet driver buffer to stack buffer */ if (p != NULL) 802f89c: 4604 mov r4, r0 802f89e: 2800 cmp r0, #0 802f8a0: d0f2 beq.n 802f888 802f8a2: 4605 mov r5, r0 { for (q = p; q != NULL; q = q->next) { memcpy((u8_t*)q->payload, (u8_t*)&buffer[l], q->len); 802f8a4: 6868 ldr r0, [r5, #4] 802f8a6: 896a ldrh r2, [r5, #10] 802f8a8: eb0b 0107 add.w r1, fp, r7 802f8ac: f7f1 fe6e bl 802158c l = l + q->len; 802f8b0: 896b ldrh r3, [r5, #10] p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL); /* Copy received frame from ethernet driver buffer to stack buffer */ if (p != NULL) { for (q = p; q != NULL; q = q->next) 802f8b2: 682d ldr r5, [r5, #0] { memcpy((u8_t*)q->payload, (u8_t*)&buffer[l], q->len); l = l + q->len; 802f8b4: 18ff adds r7, r7, r3 p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL); /* Copy received frame from ethernet driver buffer to stack buffer */ if (p != NULL) { for (q = p; q != NULL; q = q->next) 802f8b6: 2d00 cmp r5, #0 802f8b8: d1f4 bne.n 802f8a4 } } /* Release descriptors to DMA */ /* Check if received frame with multiple DMA buffer segments */ if (DMA_RX_FRAME_infos->Seg_Count > 1) 802f8ba: f8da 3000 ldr.w r3, [sl] 802f8be: 689a ldr r2, [r3, #8] 802f8c0: 2a01 cmp r2, #1 { DMARxNextDesc = DMA_RX_FRAME_infos->FS_Rx_Desc; 802f8c2: bf88 it hi 802f8c4: 681e ldrhi r6, [r3, #0] } /* Set Own bit in Rx descriptors: gives the buffers back to DMA */ for (i=0; iSeg_Count; i++) { DMARxNextDesc->Status = ETH_DMARxDesc_OWN; 802f8c6: f04f 4000 mov.w r0, #2147483648 ; 0x80000000 uint32_t l=0,i =0; FrameTypeDef frame; u8 *buffer; __IO ETH_DMADESCTypeDef *DMARxNextDesc; p = NULL; 802f8ca: 2200 movs r2, #0 802f8cc: e002 b.n 802f8d4 } /* Set Own bit in Rx descriptors: gives the buffers back to DMA */ for (i=0; iSeg_Count; i++) { DMARxNextDesc->Status = ETH_DMARxDesc_OWN; 802f8ce: 6030 str r0, [r6, #0] DMARxNextDesc = (ETH_DMADESCTypeDef *)(DMARxNextDesc->Buffer2NextDescAddr); 802f8d0: 68f6 ldr r6, [r6, #12] { DMARxNextDesc = frame.descriptor; } /* Set Own bit in Rx descriptors: gives the buffers back to DMA */ for (i=0; iSeg_Count; i++) 802f8d2: 3201 adds r2, #1 802f8d4: 6899 ldr r1, [r3, #8] 802f8d6: 428a cmp r2, r1 802f8d8: d3f9 bcc.n 802f8ce DMARxNextDesc->Status = ETH_DMARxDesc_OWN; DMARxNextDesc = (ETH_DMADESCTypeDef *)(DMARxNextDesc->Buffer2NextDescAddr); } /* Clear Segment_Count */ DMA_RX_FRAME_infos->Seg_Count =0; 802f8da: 2200 movs r2, #0 802f8dc: 609a str r2, [r3, #8] /* When Rx Buffer unavailable flag is set: clear it and resume reception */ if ((ETH->DMASR & ETH_DMASR_RBUS) != (u32)RESET) 802f8de: f8d9 3000 ldr.w r3, [r9] 802f8e2: 061b lsls r3, r3, #24 802f8e4: d504 bpl.n 802f8f0 { /* Clear RBUS ETHERNET DMA flag */ ETH->DMASR = ETH_DMASR_RBUS; 802f8e6: 2380 movs r3, #128 ; 0x80 802f8e8: f8c9 3000 str.w r3, [r9] /* Resume DMA reception */ ETH->DMARPDR = 0; 802f8ec: 4b0a ldr r3, [pc, #40] ; (802f918 ) 802f8ee: 601a str r2, [r3, #0] { if(xSemaphoreTake(s_xSemaphore, emacBLOCK_TIME_WAITING_FOR_INPUT)==pdTRUE) { GET_NEXT_FRAGMENT: p = low_level_input( s_pxNetIf ); if (p != NULL) 802f8f0: 2c00 cmp r4, #0 802f8f2: d0b4 beq.n 802f85e { if (ERR_OK != s_pxNetIf->input( p, s_pxNetIf)) 802f8f4: 4b09 ldr r3, [pc, #36] ; (802f91c ) 802f8f6: 6819 ldr r1, [r3, #0] 802f8f8: 4620 mov r0, r4 802f8fa: 690b ldr r3, [r1, #16] 802f8fc: 4798 blx r3 802f8fe: 4601 mov r1, r0 802f900: b118 cbz r0, 802f90a { pbuf_free(p); 802f902: 4620 mov r0, r4 802f904: f7f8 fce8 bl 80282d8 802f908: e7a9 b.n 802f85e p=NULL; } else { xSemaphoreTake(s_xSemaphore, 0); 802f90a: f8d8 0000 ldr.w r0, [r8] 802f90e: 460a mov r2, r1 802f910: 460b mov r3, r1 802f912: f7f5 fcef bl 80252f4 goto GET_NEXT_FRAGMENT; 802f916: e7af b.n 802f878 802f918: 40029008 .word 0x40029008 802f91c: 2000df44 .word 0x2000df44 802f920: 2000df4c .word 0x2000df4c 802f924: 200127b8 .word 0x200127b8 802f928: 40029014 .word 0x40029014 0802f92c : * to become availale since the stack doesn't retry to send a packet * dropped because of memory failure (except for the TCP timers). */ static err_t low_level_output(struct netif *netif, struct pbuf *p) { 802f92c: b570 push {r4, r5, r6, lr} static SemaphoreHandle_t xTxSemaphore = NULL; struct pbuf *q; uint32_t l = 0; u8 *buffer ; if (xTxSemaphore == NULL) 802f92e: 4e19 ldr r6, [pc, #100] ; (802f994 ) 802f930: 6835 ldr r5, [r6, #0] * to become availale since the stack doesn't retry to send a packet * dropped because of memory failure (except for the TCP timers). */ static err_t low_level_output(struct netif *netif, struct pbuf *p) { 802f932: 460c mov r4, r1 static SemaphoreHandle_t xTxSemaphore = NULL; struct pbuf *q; uint32_t l = 0; u8 *buffer ; if (xTxSemaphore == NULL) 802f934: b95d cbnz r5, 802f94e { vSemaphoreCreateBinary (xTxSemaphore); 802f936: 2001 movs r0, #1 802f938: 4629 mov r1, r5 802f93a: 2203 movs r2, #3 802f93c: f7f5 fb69 bl 8025012 802f940: 6030 str r0, [r6, #0] 802f942: b120 cbz r0, 802f94e 802f944: 4629 mov r1, r5 802f946: 462a mov r2, r5 802f948: 462b mov r3, r5 802f94a: f7f5 fb9f bl 802508c } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) 802f94e: 4b11 ldr r3, [pc, #68] ; (802f994 ) 802f950: 2100 movs r1, #0 802f952: 6818 ldr r0, [r3, #0] 802f954: 22fa movs r2, #250 ; 0xfa 802f956: 460b mov r3, r1 802f958: f7f5 fccc bl 80252f4 802f95c: b1c0 cbz r0, 802f990 { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); 802f95e: 4b0e ldr r3, [pc, #56] ; (802f998 ) 802f960: 681b ldr r3, [r3, #0] static err_t low_level_output(struct netif *netif, struct pbuf *p) { static SemaphoreHandle_t xTxSemaphore = NULL; struct pbuf *q; uint32_t l = 0; 802f962: 2500 movs r5, #0 vSemaphoreCreateBinary (xTxSemaphore); } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); 802f964: 689e ldr r6, [r3, #8] 802f966: e007 b.n 802f978 for(q = p; q != NULL; q = q->next) { memcpy((u8_t*)&buffer[l], q->payload, q->len); 802f968: 1970 adds r0, r6, r5 802f96a: 6861 ldr r1, [r4, #4] 802f96c: 8962 ldrh r2, [r4, #10] 802f96e: f7f1 fe0d bl 802158c l = l + q->len; 802f972: 8963 ldrh r3, [r4, #10] } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); for(q = p; q != NULL; q = q->next) 802f974: 6824 ldr r4, [r4, #0] { memcpy((u8_t*)&buffer[l], q->payload, q->len); l = l + q->len; 802f976: 18ed adds r5, r5, r3 } if (xSemaphoreTake(xTxSemaphore, netifGUARD_BLOCK_TIME)) { buffer = (u8 *)(DMATxDescToSet->Buffer1Addr); for(q = p; q != NULL; q = q->next) 802f978: 2c00 cmp r4, #0 802f97a: d1f5 bne.n 802f968 { memcpy((u8_t*)&buffer[l], q->payload, q->len); l = l + q->len; } ETH_Prepare_Transmit_Descriptors(l); 802f97c: b2a8 uxth r0, r5 802f97e: f000 fdfd bl 803057c xSemaphoreGive(xTxSemaphore); 802f982: 4b04 ldr r3, [pc, #16] ; (802f994 ) 802f984: 4621 mov r1, r4 802f986: 6818 ldr r0, [r3, #0] 802f988: 4622 mov r2, r4 802f98a: 4623 mov r3, r4 802f98c: f7f5 fb7e bl 802508c } return ERR_OK; } 802f990: 2000 movs r0, #0 802f992: bd70 pop {r4, r5, r6, pc} 802f994: 2000df48 .word 0x2000df48 802f998: 2001094c .word 0x2001094c 0802f99c : #if LWIP_NETIF_HOSTNAME /* Initialize interface hostname */ netif->hostname = "lwip"; #endif /* LWIP_NETIF_HOSTNAME */ netif->name[0] = IFNAME0; 802f99c: 2373 movs r3, #115 ; 0x73 * @return ERR_OK if the loopif is initialized * ERR_MEM if private data couldn't be allocated * any other err_t on error */ err_t ethernetif_init(struct netif *netif) { 802f99e: b530 push {r4, r5, lr} #if LWIP_NETIF_HOSTNAME /* Initialize interface hostname */ netif->hostname = "lwip"; #endif /* LWIP_NETIF_HOSTNAME */ netif->name[0] = IFNAME0; 802f9a0: f880 302e strb.w r3, [r0, #46] ; 0x2e netif->name[1] = IFNAME1; 802f9a4: 2374 movs r3, #116 ; 0x74 802f9a6: f880 302f strb.w r3, [r0, #47] ; 0x2f netif->output = etharp_output; 802f9aa: 4b37 ldr r3, [pc, #220] ; (802fa88 ) netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; s_pxNetIf =netif; /* create binary semaphore used for informing ethernetif of frame reception */ if (s_xSemaphore == NULL) 802f9ac: 4d37 ldr r5, [pc, #220] ; (802fa8c ) #endif /* LWIP_NETIF_HOSTNAME */ netif->name[0] = IFNAME0; netif->name[1] = IFNAME1; netif->output = etharp_output; 802f9ae: 6143 str r3, [r0, #20] netif->linkoutput = low_level_output; 802f9b0: 4b37 ldr r3, [pc, #220] ; (802fa90 ) * @return ERR_OK if the loopif is initialized * ERR_MEM if private data couldn't be allocated * any other err_t on error */ err_t ethernetif_init(struct netif *netif) { 802f9b2: b087 sub sp, #28 netif->name[0] = IFNAME0; netif->name[1] = IFNAME1; netif->output = etharp_output; netif->linkoutput = low_level_output; 802f9b4: 6183 str r3, [r0, #24] { uint8_t mac[6]; uint32_t i; /* set netif MAC hardware address length */ netif->hwaddr_len = ETHARP_HWADDR_LEN; 802f9b6: 2306 movs r3, #6 * @return ERR_OK if the loopif is initialized * ERR_MEM if private data couldn't be allocated * any other err_t on error */ err_t ethernetif_init(struct netif *netif) { 802f9b8: 4604 mov r4, r0 { uint8_t mac[6]; uint32_t i; /* set netif MAC hardware address length */ netif->hwaddr_len = ETHARP_HWADDR_LEN; 802f9ba: f880 3026 strb.w r3, [r0, #38] ; 0x26 /* set netif MAC hardware address */ SETTINGS_GetMac(mac); 802f9be: a804 add r0, sp, #16 802f9c0: f7f5 f970 bl 8024ca4 netif->hwaddr[0] = mac[0]; 802f9c4: f89d 3010 ldrb.w r3, [sp, #16] netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; s_pxNetIf =netif; /* create binary semaphore used for informing ethernetif of frame reception */ if (s_xSemaphore == NULL) 802f9c8: 6829 ldr r1, [r5, #0] /* set netif MAC hardware address */ SETTINGS_GetMac(mac); netif->hwaddr[0] = mac[0]; 802f9ca: f884 3027 strb.w r3, [r4, #39] ; 0x27 netif->hwaddr[1] = mac[1]; 802f9ce: f89d 3011 ldrb.w r3, [sp, #17] 802f9d2: f884 3028 strb.w r3, [r4, #40] ; 0x28 netif->hwaddr[2] = mac[2]; 802f9d6: f89d 3012 ldrb.w r3, [sp, #18] 802f9da: f884 3029 strb.w r3, [r4, #41] ; 0x29 netif->hwaddr[3] = mac[3]; 802f9de: f89d 3013 ldrb.w r3, [sp, #19] 802f9e2: f884 302a strb.w r3, [r4, #42] ; 0x2a netif->hwaddr[4] = mac[4]; 802f9e6: f89d 3014 ldrb.w r3, [sp, #20] 802f9ea: f884 302b strb.w r3, [r4, #43] ; 0x2b netif->hwaddr[5] = mac[5]; 802f9ee: f89d 3015 ldrb.w r3, [sp, #21] 802f9f2: f884 302c strb.w r3, [r4, #44] ; 0x2c /* set netif maximum transfer unit */ netif->mtu = 1500; 802f9f6: f240 53dc movw r3, #1500 ; 0x5dc 802f9fa: 84a3 strh r3, [r4, #36] ; 0x24 /* Accept broadcast address and ARP traffic */ netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP; 802f9fc: 2322 movs r3, #34 ; 0x22 802f9fe: f884 302d strb.w r3, [r4, #45] ; 0x2d s_pxNetIf =netif; 802fa02: 4b24 ldr r3, [pc, #144] ; (802fa94 ) 802fa04: 601c str r4, [r3, #0] /* create binary semaphore used for informing ethernetif of frame reception */ if (s_xSemaphore == NULL) 802fa06: b919 cbnz r1, 802fa10 { s_xSemaphore= xSemaphoreCreateCounting(20,0); 802fa08: 2014 movs r0, #20 802fa0a: f7f5 fb29 bl 8025060 802fa0e: 6028 str r0, [r5, #0] } /* initialize MAC address in ethernet MAC */ ETH_MACAddressConfig(ETH_MAC_Address0, netif->hwaddr); 802fa10: f104 0127 add.w r1, r4, #39 ; 0x27 802fa14: 2000 movs r0, #0 802fa16: f000 fd49 bl 80304ac /* Initialize Tx Descriptors list: Chain Mode */ ETH_DMATxDescChainInit(DMATxDscrTab, &Tx_Buff[0][0], ETH_TXBUFNB); 802fa1a: 481f ldr r0, [pc, #124] ; (802fa98 ) 802fa1c: 491f ldr r1, [pc, #124] ; (802fa9c ) /* Enable Ethernet Rx interrrupt */ { for(i=0; i) /* initialize MAC address in ethernet MAC */ ETH_MACAddressConfig(ETH_MAC_Address0, netif->hwaddr); /* Initialize Tx Descriptors list: Chain Mode */ ETH_DMATxDescChainInit(DMATxDscrTab, &Tx_Buff[0][0], ETH_TXBUFNB); 802fa20: 2205 movs r2, #5 802fa22: f000 fe31 bl 8030688 /* Initialize Rx Descriptors list: Chain Mode */ ETH_DMARxDescChainInit(DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB); 802fa26: 481e ldr r0, [pc, #120] ; (802faa0 ) 802fa28: 491e ldr r1, [pc, #120] ; (802faa4 ) 802fa2a: 2205 movs r2, #5 802fa2c: f000 fe00 bl 8030630 /* Enable Ethernet Rx interrrupt */ { for(i=0; i /* Initialize Rx Descriptors list: Chain Mode */ ETH_DMARxDescChainInit(DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB); /* Enable Ethernet Rx interrrupt */ { for(i=0; i #ifdef CHECKSUM_BY_HARDWARE /* Enable the checksum insertion for the Tx frames */ { for(i=0; i) /* Initialize Rx Descriptors list: Chain Mode */ ETH_DMARxDescChainInit(DMARxDscrTab, &Rx_Buff[0][0], ETH_RXBUFNB); /* Enable Ethernet Rx interrrupt */ { for(i=0; i } #ifdef CHECKSUM_BY_HARDWARE /* Enable the checksum insertion for the Tx frames */ { for(i=0; i } } #endif /* create the task that handles the ETH_MAC */ xTaskCreate(ethernetif_input, "Eth_if", netifINTERFACE_TASK_STACK_SIZE, NULL, 802fa58: 2400 movs r4, #0 802fa5a: 2304 movs r3, #4 802fa5c: 2296 movs r2, #150 ; 0x96 802fa5e: e88d 0018 stmia.w sp, {r3, r4} 802fa62: 4911 ldr r1, [pc, #68] ; (802faa8 ) 802fa64: 9402 str r4, [sp, #8] 802fa66: 4623 mov r3, r4 802fa68: 9403 str r4, [sp, #12] 802fa6a: 4810 ldr r0, [pc, #64] ; (802faac ) 802fa6c: f7f5 fd20 bl 80254b0 netifINTERFACE_TASK_PRIORITY,NULL); /* Enable MAC and DMA transmission and reception */ ETH_Start(); 802fa70: f000 fe86 bl 8030780 /* initialize the hardware */ low_level_init(netif); etharp_init(); sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); 802fa74: f241 3088 movw r0, #5000 ; 0x1388 802fa78: 490d ldr r1, [pc, #52] ; (802fab0 ) 802fa7a: 4622 mov r2, r4 802fa7c: f7fa feb2 bl 802a7e4 return ERR_OK; } 802fa80: 4620 mov r0, r4 802fa82: b007 add sp, #28 802fa84: bd30 pop {r4, r5, pc} 802fa86: bf00 nop 802fa88: 0802f541 .word 0x0802f541 802fa8c: 2000df4c .word 0x2000df4c 802fa90: 0802f92d .word 0x0802f92d 802fa94: 2000df44 .word 0x2000df44 802fa98: 20010950 .word 0x20010950 802fa9c: 2001285c .word 0x2001285c 802faa0: 200127bc .word 0x200127bc 802faa4: 200109f0 .word 0x200109f0 802faa8: 08038407 .word 0x08038407 802faac: 0802f855 .word 0x0802f855 802fab0: 0802f839 .word 0x0802f839 0802fab4 : * int size -- Size of elements in the mailbox * Outputs: * sys_mbox_t -- Handle to new mailbox *---------------------------------------------------------------------------*/ err_t sys_mbox_new( sys_mbox_t *pxMailBox, int iSize ) { 802fab4: b510 push {r4, lr} err_t xReturn = ERR_MEM; *pxMailBox = xQueueCreate( iSize, sizeof( void * ) ); 802fab6: 2200 movs r2, #0 * int size -- Size of elements in the mailbox * Outputs: * sys_mbox_t -- Handle to new mailbox *---------------------------------------------------------------------------*/ err_t sys_mbox_new( sys_mbox_t *pxMailBox, int iSize ) { 802fab8: 4604 mov r4, r0 err_t xReturn = ERR_MEM; *pxMailBox = xQueueCreate( iSize, sizeof( void * ) ); 802faba: 4608 mov r0, r1 802fabc: 2104 movs r1, #4 802fabe: f7f5 faa8 bl 8025012 802fac2: 6020 str r0, [r4, #0] xReturn = ERR_OK; SYS_STATS_INC_USED( mbox ); } return xReturn; } 802fac4: 2800 cmp r0, #0 802fac6: bf14 ite ne 802fac8: 2000 movne r0, #0 802faca: f06f 0000 mvneq.w r0, #0 802face: bd10 pop {r4, pc} 0802fad0 : * Outputs: * err_t -- ERR_OK if message posted, else ERR_MEM * if not. *---------------------------------------------------------------------------*/ err_t sys_mbox_trypost( sys_mbox_t *pxMailBox, void *pxMessageToPost ) { 802fad0: b51f push {r0, r1, r2, r3, r4, lr} err_t xReturn; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if( xInsideISR != pdFALSE ) 802fad2: 4a0b ldr r2, [pc, #44] ; (802fb00 ) * Outputs: * err_t -- ERR_OK if message posted, else ERR_MEM * if not. *---------------------------------------------------------------------------*/ err_t sys_mbox_trypost( sys_mbox_t *pxMailBox, void *pxMessageToPost ) { 802fad4: 9101 str r1, [sp, #4] err_t xReturn; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if( xInsideISR != pdFALSE ) 802fad6: 6812 ldr r2, [r2, #0] { xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken ); 802fad8: 6800 ldr r0, [r0, #0] * if not. *---------------------------------------------------------------------------*/ err_t sys_mbox_trypost( sys_mbox_t *pxMailBox, void *pxMessageToPost ) { err_t xReturn; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; 802fada: 2300 movs r3, #0 802fadc: 9303 str r3, [sp, #12] if( xInsideISR != pdFALSE ) { xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken ); 802fade: a901 add r1, sp, #4 err_t sys_mbox_trypost( sys_mbox_t *pxMailBox, void *pxMessageToPost ) { err_t xReturn; portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; if( xInsideISR != pdFALSE ) 802fae0: b11a cbz r2, 802faea { xReturn = xQueueSendFromISR( *pxMailBox, &pxMessageToPost, &xHigherPriorityTaskWoken ); 802fae2: aa03 add r2, sp, #12 802fae4: f7f5 fb8a bl 80251fc 802fae8: e002 b.n 802faf0 } else { xReturn = xQueueSend( *pxMailBox, &pxMessageToPost, ( TickType_t ) 0 ); 802faea: 4613 mov r3, r2 802faec: f7f5 face bl 802508c 802faf0: b2c0 uxtb r0, r0 xReturn = ERR_MEM; SYS_STATS_INC( mbox.err ); } return xReturn; } 802faf2: 3801 subs r0, #1 802faf4: bf18 it ne 802faf6: f06f 0000 mvnne.w r0, #0 802fafa: b005 add sp, #20 802fafc: bd00 pop {pc} 802fafe: bf00 nop 802fb00: 2000df50 .word 0x2000df50 0802fb04 : * Outputs: * u32_t -- SYS_ARCH_TIMEOUT if timeout, else number * of milliseconds until received. *---------------------------------------------------------------------------*/ u32_t sys_arch_mbox_fetch( sys_mbox_t *pxMailBox, void **ppvBuffer, u32_t ulTimeOut ) { 802fb04: e92d 41f3 stmdb sp!, {r0, r1, r4, r5, r6, r7, r8, lr} 802fb08: 4607 mov r7, r0 802fb0a: 460c mov r4, r1 802fb0c: 4690 mov r8, r2 void *pvDummy; TickType_t xStartTime, xEndTime, xElapsed; unsigned long ulReturn; xStartTime = xTaskGetTickCount(); 802fb0e: f7f5 fe33 bl 8025778 802fb12: 4605 mov r5, r0 if( NULL == ppvBuffer ) 802fb14: b904 cbnz r4, 802fb18 { ppvBuffer = &pvDummy; 802fb16: ac01 add r4, sp, #4 } if( ulTimeOut != 0UL ) 802fb18: f1b8 0f00 cmp.w r8, #0 802fb1c: d015 beq.n 802fb4a { configASSERT( xInsideISR == ( portBASE_TYPE ) 0 ); 802fb1e: 4b13 ldr r3, [pc, #76] ; (802fb6c ) 802fb20: 681e ldr r6, [r3, #0] 802fb22: b116 cbz r6, 802fb2a 802fb24: f7f6 f942 bl 8025dac 802fb28: e7fe b.n 802fb28 if( pdTRUE == xQueueReceive( *pxMailBox, &( *ppvBuffer ), ulTimeOut/ portTICK_PERIOD_MS ) ) 802fb2a: 6838 ldr r0, [r7, #0] 802fb2c: 4621 mov r1, r4 802fb2e: 4642 mov r2, r8 802fb30: 4633 mov r3, r6 802fb32: f7f5 fbdf bl 80252f4 802fb36: 2801 cmp r0, #1 802fb38: d103 bne.n 802fb42 { xEndTime = xTaskGetTickCount(); 802fb3a: f7f5 fe1d bl 8025778 xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; 802fb3e: 1b40 subs r0, r0, r5 802fb40: e011 b.n 802fb66 ulReturn = xElapsed; } else { /* Timed out. */ *ppvBuffer = NULL; 802fb42: 6026 str r6, [r4, #0] ulReturn = SYS_ARCH_TIMEOUT; 802fb44: f04f 30ff mov.w r0, #4294967295 802fb48: e00d b.n 802fb66 } } else { while( pdTRUE != xQueueReceive( *pxMailBox, &( *ppvBuffer ), portMAX_DELAY ) ); 802fb4a: 2300 movs r3, #0 802fb4c: 6838 ldr r0, [r7, #0] 802fb4e: 4621 mov r1, r4 802fb50: f04f 32ff mov.w r2, #4294967295 802fb54: f7f5 fbce bl 80252f4 802fb58: 2801 cmp r0, #1 802fb5a: d1f6 bne.n 802fb4a xEndTime = xTaskGetTickCount(); 802fb5c: f7f5 fe0c bl 8025778 xElapsed = ( xEndTime - xStartTime ) * portTICK_PERIOD_MS; if( xElapsed == 0UL ) 802fb60: 1b40 subs r0, r0, r5 802fb62: bf08 it eq 802fb64: 2001 moveq r0, #1 ulReturn = xElapsed; } return ulReturn; } 802fb66: e8bd 81fc ldmia.w sp!, {r2, r3, r4, r5, r6, r7, r8, pc} 802fb6a: bf00 nop 802fb6c: 2000df50 .word 0x2000df50 0802fb70 : /** Create a new mutex * @param mutex pointer to the mutex to create * @return a new mutex */ err_t sys_mutex_new( sys_mutex_t *pxMutex ) { 802fb70: b510 push {r4, lr} 802fb72: 4604 mov r4, r0 err_t xReturn = ERR_MEM; *pxMutex = xSemaphoreCreateMutex(); 802fb74: 2001 movs r0, #1 802fb76: f7f5 fb17 bl 80251a8 802fb7a: 6020 str r0, [r4, #0] { SYS_STATS_INC( mutex.err ); } return xReturn; } 802fb7c: 2800 cmp r0, #0 802fb7e: bf14 ite ne 802fb80: 2000 movne r0, #0 802fb82: f06f 0000 mvneq.w r0, #0 802fb86: bd10 pop {r4, pc} 0802fb88 : /** Lock a mutex * @param mutex the mutex to lock */ void sys_mutex_lock( sys_mutex_t *pxMutex ) { 802fb88: b510 push {r4, lr} 802fb8a: 4604 mov r4, r0 while( xSemaphoreTake( *pxMutex, portMAX_DELAY ) != pdPASS ); 802fb8c: 2100 movs r1, #0 802fb8e: 6820 ldr r0, [r4, #0] 802fb90: f04f 32ff mov.w r2, #4294967295 802fb94: 460b mov r3, r1 802fb96: f7f5 fbad bl 80252f4 802fb9a: 2801 cmp r0, #1 802fb9c: d1f6 bne.n 802fb8c } 802fb9e: bd10 pop {r4, pc} 0802fba0 : /** Unlock a mutex * @param mutex the mutex to unlock */ void sys_mutex_unlock(sys_mutex_t *pxMutex ) { xSemaphoreGive( *pxMutex ); 802fba0: 2100 movs r1, #0 802fba2: 6800 ldr r0, [r0, #0] 802fba4: 460a mov r2, r1 802fba6: 460b mov r3, r1 802fba8: f7f5 ba70 b.w 802508c 0802fbac : *---------------------------------------------------------------------------* * Description: * Initialize sys arch *---------------------------------------------------------------------------*/ void sys_init(void) { 802fbac: 4770 bx lr 0802fbae : } u32_t sys_now(void) { return xTaskGetTickCount(); 802fbae: f7f5 bde3 b.w 8025778 0802fbb2 : * int prio -- Thread priority * Outputs: * sys_thread_t -- Pointer to per-thread timeouts. *---------------------------------------------------------------------------*/ sys_thread_t sys_thread_new( const char *pcName, void( *pxThread )( void *pvParameters ), void *pvArg, int iStackSize, int iPriority ) { 802fbb2: b570 push {r4, r5, r6, lr} 802fbb4: b086 sub sp, #24 802fbb6: 4606 mov r6, r0 TaskHandle_t xCreatedTask; portBASE_TYPE xResult; sys_thread_t xReturn; xResult = xTaskCreate( pxThread, pcName, iStackSize, pvArg, iPriority, &xCreatedTask ); 802fbb8: 9c0a ldr r4, [sp, #40] ; 0x28 * int prio -- Thread priority * Outputs: * sys_thread_t -- Pointer to per-thread timeouts. *---------------------------------------------------------------------------*/ sys_thread_t sys_thread_new( const char *pcName, void( *pxThread )( void *pvParameters ), void *pvArg, int iStackSize, int iPriority ) { 802fbba: 4615 mov r5, r2 TaskHandle_t xCreatedTask; portBASE_TYPE xResult; sys_thread_t xReturn; xResult = xTaskCreate( pxThread, pcName, iStackSize, pvArg, iPriority, &xCreatedTask ); 802fbbc: 9400 str r4, [sp, #0] 802fbbe: aa05 add r2, sp, #20 802fbc0: 2400 movs r4, #0 802fbc2: 9201 str r2, [sp, #4] 802fbc4: 9402 str r4, [sp, #8] 802fbc6: b29a uxth r2, r3 802fbc8: 9403 str r4, [sp, #12] 802fbca: 4608 mov r0, r1 802fbcc: 462b mov r3, r5 802fbce: 4631 mov r1, r6 802fbd0: f7f5 fc6e bl 80254b0 if( xResult == pdPASS ) 802fbd4: 2801 cmp r0, #1 { xReturn = xCreatedTask; 802fbd6: bf0c ite eq 802fbd8: 9805 ldreq r0, [sp, #20] } else { xReturn = NULL; 802fbda: 4620 movne r0, r4 } return xReturn; } 802fbdc: b006 add sp, #24 802fbde: bd70 pop {r4, r5, r6, pc} 0802fbe0 : * operating system. * Outputs: * sys_prot_t -- Previous protection level (not used here) *---------------------------------------------------------------------------*/ sys_prot_t sys_arch_protect( void ) { 802fbe0: b508 push {r3, lr} if( xInsideISR == pdFALSE ) 802fbe2: 4b03 ldr r3, [pc, #12] ; (802fbf0 ) 802fbe4: 681b ldr r3, [r3, #0] 802fbe6: b90b cbnz r3, 802fbec { taskENTER_CRITICAL(); 802fbe8: f7f6 f8e8 bl 8025dbc } return ( sys_prot_t ) 1; } 802fbec: 2001 movs r0, #1 802fbee: bd08 pop {r3, pc} 802fbf0: 2000df50 .word 0x2000df50 0802fbf4 : * sys_prot_t -- Previous protection level (not used here) *---------------------------------------------------------------------------*/ void sys_arch_unprotect( sys_prot_t xValue ) { (void) xValue; if( xInsideISR == pdFALSE ) 802fbf4: 4b02 ldr r3, [pc, #8] ; (802fc00 ) 802fbf6: 681b ldr r3, [r3, #0] 802fbf8: b90b cbnz r3, 802fbfe { taskEXIT_CRITICAL(); 802fbfa: f7f6 b90b b.w 8025e14 802fbfe: 4770 bx lr 802fc00: 2000df50 .word 0x2000df50 0802fc04 : * Если флаг не устанавливается в положенное время, то сбрасывается * флаг sSettings.sFlags.netsettingsChanged, сохраняется вся структура * настроек в памяти и контроллер перезагружается. */ void vTaskWebReinit(void * pvParameters) { 802fc04: b538 push {r3, r4, r5, lr} static uint16_t timeCounter = 0; for (;;) { /* Контроль времени работы задачи */ if (timeCounter++ > TIME_COUNTER_10_MIN) 802fc06: 4c20 ldr r4, [pc, #128] ; (802fc88 ) if (fConfirmWebParams) { fConfirmWebParams = false; /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 802fc08: 4d20 ldr r5, [pc, #128] ; (802fc8c ) static uint16_t timeCounter = 0; for (;;) { /* Контроль времени работы задачи */ if (timeCounter++ > TIME_COUNTER_10_MIN) 802fc0a: 8823 ldrh r3, [r4, #0] 802fc0c: 1c5a adds r2, r3, #1 802fc0e: f5b3 7f16 cmp.w r3, #600 ; 0x258 802fc12: 8022 strh r2, [r4, #0] 802fc14: d914 bls.n 802fc40 { SetWebReinitFlag(false); 802fc16: 2000 movs r0, #0 802fc18: f7f4 fe56 bl 80248c8 HTTP_SaveSettings(); 802fc1c: f7f7 f979 bl 8026f12 vTaskDelay(1010); 802fc20: f240 30f2 movw r0, #1010 ; 0x3f2 802fc24: f7f5 feda bl 80259dc 802fc28: f3bf 8f4f dsb sy (SCB->AIRCR & SCB_AIRCR_PRIGROUP_Msk) | 802fc2c: 4a18 ldr r2, [pc, #96] ; (802fc90 ) 802fc2e: 4b19 ldr r3, [pc, #100] ; (802fc94 ) 802fc30: 68d1 ldr r1, [r2, #12] 802fc32: f401 61e0 and.w r1, r1, #1792 ; 0x700 802fc36: 430b orrs r3, r1 __STATIC_INLINE void NVIC_SystemReset(void) //static inline void NVIC_SystemReset(void) { __DSB(); /* Ensure all outstanding memory accesses included buffered write are completed before reset */ SCB->AIRCR = ((0x5FA << SCB_AIRCR_VECTKEY_Pos) | 802fc38: 60d3 str r3, [r2, #12] 802fc3a: f3bf 8f4f dsb sy 802fc3e: e7fe b.n 802fc3e NVIC_SystemReset(); } if (fConfirmWebParams) 802fc40: 4b15 ldr r3, [pc, #84] ; (802fc98 ) 802fc42: 781a ldrb r2, [r3, #0] 802fc44: b1d2 cbz r2, 802fc7c { fConfirmWebParams = false; 802fc46: 2200 movs r2, #0 /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 802fc48: 4814 ldr r0, [pc, #80] ; (802fc9c ) NVIC_SystemReset(); } if (fConfirmWebParams) { fConfirmWebParams = false; 802fc4a: 701a strb r2, [r3, #0] /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 802fc4c: f895 305d ldrb.w r3, [r5, #93] ; 0x5d strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 802fc50: f100 012e add.w r1, r0, #46 ; 0x2e if (fConfirmWebParams) { fConfirmWebParams = false; /* Сохраняем временные сетевые настройки в постоянные */ sSettings.sWebParams.dhcpEnable = sSettings.sWebTempParams.dhcpEnable; 802fc54: f885 302f strb.w r3, [r5, #47] ; 0x2f strcpy(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip); 802fc58: f7f1 fecc bl 80219f4 strcpy(sSettings.sWebParams.gate, sSettings.sWebTempParams.gate); 802fc5c: 4810 ldr r0, [pc, #64] ; (802fca0 ) 802fc5e: f100 012e add.w r1, r0, #46 ; 0x2e 802fc62: f7f1 fec7 bl 80219f4 strcpy(sSettings.sWebParams.mask, sSettings.sWebTempParams.mask); 802fc66: 480f ldr r0, [pc, #60] ; (802fca4 ) 802fc68: f100 012e add.w r1, r0, #46 ; 0x2e 802fc6c: f7f1 fec2 bl 80219f4 HTTP_SaveSettings(); 802fc70: f7f7 f94f bl 8026f12 vTaskDelete(xHandleWebReinit); 802fc74: 4b0c ldr r3, [pc, #48] ; (802fca8 ) 802fc76: 6818 ldr r0, [r3, #0] 802fc78: f7f5 fcf2 bl 8025660 } vTaskDelay(1000); 802fc7c: f44f 707a mov.w r0, #1000 ; 0x3e8 802fc80: f7f5 feac bl 80259dc } 802fc84: e7c1 b.n 802fc0a 802fc86: bf00 nop 802fc88: 2000df56 .word 0x2000df56 802fc8c: 2000dfc0 .word 0x2000dfc0 802fc90: e000ed00 .word 0xe000ed00 802fc94: 05fa0004 .word 0x05fa0004 802fc98: 2000238c .word 0x2000238c 802fc9c: 2000dfc2 .word 0x2000dfc2 802fca0: 2000dfd1 .word 0x2000dfd1 802fca4: 2000dfe0 .word 0x2000dfe0 802fca8: 2000df58 .word 0x2000df58 0802fcac : * @brief LwIP_DHCP_Process_Handle * @param None * @retval None */ void LwIP_DHCP_task(void * pvParameters) { 802fcac: b530 push {r4, r5, lr} DHCP_state = DHCP_TIMEOUT; /* Stop DHCP */ dhcp_stop(&xnetif); if (sSettings.sFlags.netsettingsChanged == true) 802fcae: 4d48 ldr r5, [pc, #288] ; (802fdd0 ) * @brief LwIP_DHCP_Process_Handle * @param None * @retval None */ void LwIP_DHCP_task(void * pvParameters) { 802fcb0: b085 sub sp, #20 struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; uint8_t DHCP_state; DHCP_state = DHCP_START; 802fcb2: 2400 movs r4, #0 for (;;) { switch (DHCP_state) 802fcb4: b11c cbz r4, 802fcbe 802fcb6: 2c01 cmp r4, #1 802fcb8: f040 8085 bne.w 802fdc6 802fcbc: e004 b.n 802fcc8 { case DHCP_START: { dhcp_start(&xnetif); 802fcbe: 4845 ldr r0, [pc, #276] ; (802fdd4 ) 802fcc0: f7f8 f80e bl 8027ce0 DHCP_state = DHCP_WAIT_ADDRESS; 802fcc4: 2401 movs r4, #1 //PRINT_USART("\n\rLooking for DHCP server please wait...\n\r"); } break; 802fcc6: e07e b.n 802fdc6 case DHCP_WAIT_ADDRESS: { /* Read the new IP address */ ipaddr = xnetif.ip_addr; 802fcc8: 4842 ldr r0, [pc, #264] ; (802fdd4 ) netmask = xnetif.netmask; 802fcca: 6882 ldr r2, [r0, #8] break; case DHCP_WAIT_ADDRESS: { /* Read the new IP address */ ipaddr = xnetif.ip_addr; 802fccc: 6843 ldr r3, [r0, #4] netmask = xnetif.netmask; 802fcce: 9202 str r2, [sp, #8] gw = xnetif.gw; 802fcd0: 68c2 ldr r2, [r0, #12] break; case DHCP_WAIT_ADDRESS: { /* Read the new IP address */ ipaddr = xnetif.ip_addr; 802fcd2: 9301 str r3, [sp, #4] netmask = xnetif.netmask; gw = xnetif.gw; 802fcd4: 9203 str r2, [sp, #12] if (ipaddr.addr != 0) 802fcd6: 2b00 cmp r3, #0 802fcd8: d045 beq.n 802fd66 { DHCP_state = DHCP_ADDRESS_ASSIGNED; dhcp_stop(&xnetif); 802fcda: f7f7 ffe9 bl 8027cb0 /* Сохранение полученных сетевый параметров */ /* Если настройки изменили, то сохраняем во временные настройки */ if (sSettings.sFlags.netsettingsChanged == true) 802fcde: f895 32ce ldrb.w r3, [r5, #718] ; 0x2ce { sprintf(sSettings.sWebTempParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 802fce2: a801 add r0, sp, #4 DHCP_state = DHCP_ADDRESS_ASSIGNED; dhcp_stop(&xnetif); /* Сохранение полученных сетевый параметров */ /* Если настройки изменили, то сохраняем во временные настройки */ if (sSettings.sFlags.netsettingsChanged == true) 802fce4: b103 cbz r3, 802fce8 802fce6: e01b b.n 802fd20 sprintf(sSettings.sWebTempParams.mask, "%s", ipaddr_ntoa(&netmask)); sprintf(sSettings.sWebTempParams.gate, "%s", ipaddr_ntoa(&gw)); } else { sprintf(sSettings.sWebParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 802fce8: f7fb fa7a bl 802b1e0 802fcec: 493a ldr r1, [pc, #232] ; (802fdd8 ) 802fcee: 4602 mov r2, r0 802fcf0: 483a ldr r0, [pc, #232] ; (802fddc ) 802fcf2: f7f4 fc07 bl 8024504 sprintf(sSettings.sWebParams.mask, "%s", ipaddr_ntoa(&netmask)); 802fcf6: a802 add r0, sp, #8 802fcf8: f7fb fa72 bl 802b1e0 802fcfc: 4936 ldr r1, [pc, #216] ; (802fdd8 ) 802fcfe: 4602 mov r2, r0 802fd00: 4837 ldr r0, [pc, #220] ; (802fde0 ) 802fd02: f7f4 fbff bl 8024504 sprintf(sSettings.sWebParams.gate, "%s", ipaddr_ntoa(&gw)); 802fd06: a803 add r0, sp, #12 802fd08: f7fb fa6a bl 802b1e0 802fd0c: 4932 ldr r1, [pc, #200] ; (802fdd8 ) 802fd0e: 4602 mov r2, r0 802fd10: 4834 ldr r0, [pc, #208] ; (802fde4 ) 802fd12: f7f4 fbf7 bl 8024504 /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; 802fd16: f895 302f ldrb.w r3, [r5, #47] ; 0x2f sprintf(sSettings.sWebTempParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 802fd1a: a801 add r0, sp, #4 sprintf(sSettings.sWebParams.ip, "%s", ipaddr_ntoa(&ipaddr)); sprintf(sSettings.sWebParams.mask, "%s", ipaddr_ntoa(&netmask)); sprintf(sSettings.sWebParams.gate, "%s", ipaddr_ntoa(&gw)); /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; 802fd1c: f885 305d strb.w r3, [r5, #93] ; 0x5d sprintf(sSettings.sWebTempParams.ip, "%s", ipaddr_ntoa(&ipaddr)); 802fd20: f7fb fa5e bl 802b1e0 802fd24: 492c ldr r1, [pc, #176] ; (802fdd8 ) 802fd26: 4602 mov r2, r0 802fd28: 482f ldr r0, [pc, #188] ; (802fde8 ) 802fd2a: f7f4 fbeb bl 8024504 sprintf(sSettings.sWebTempParams.mask, "%s", ipaddr_ntoa(&netmask)); 802fd2e: a802 add r0, sp, #8 802fd30: f7fb fa56 bl 802b1e0 802fd34: 4928 ldr r1, [pc, #160] ; (802fdd8 ) 802fd36: 4602 mov r2, r0 802fd38: 482c ldr r0, [pc, #176] ; (802fdec ) 802fd3a: f7f4 fbe3 bl 8024504 sprintf(sSettings.sWebTempParams.gate, "%s", ipaddr_ntoa(&gw)); 802fd3e: a803 add r0, sp, #12 802fd40: f7fb fa4e bl 802b1e0 802fd44: 4924 ldr r1, [pc, #144] ; (802fdd8 ) 802fd46: 4602 mov r2, r0 802fd48: 4829 ldr r0, [pc, #164] ; (802fdf0 ) 802fd4a: f7f4 fbdb bl 8024504 PRINT_USART("Gateway: "); PRINT_USART(ipaddr_ntoa(&gw)); PRINT_USART("\n\r"); vTaskDelay(50); 802fd4e: 2032 movs r0, #50 ; 0x32 802fd50: f7f5 fe44 bl 80259dc /* Установлен динамический IP, можно отправить трап о перезагрузке устройства */ SNMP_SendUserTrap(DEVICE_REBOOTED); 802fd54: 2004 movs r0, #4 802fd56: f000 f9bb bl 80300d0 vTaskDelete(xHandleDHCP); 802fd5a: 4b26 ldr r3, [pc, #152] ; (802fdf4 ) 802fd5c: 6818 ldr r0, [r3, #0] 802fd5e: f7f5 fc7f bl 8025660 netmask = xnetif.netmask; gw = xnetif.gw; if (ipaddr.addr != 0) { DHCP_state = DHCP_ADDRESS_ASSIGNED; 802fd62: 2402 movs r4, #2 802fd64: e02f b.n 802fdc6 vTaskDelete(xHandleDHCP); } else { /* DHCP timeout */ if (xnetif.dhcp->tries > MAX_DHCP_TRIES) 802fd66: 6a03 ldr r3, [r0, #32] 802fd68: 7b5b ldrb r3, [r3, #13] 802fd6a: 2b03 cmp r3, #3 802fd6c: d92b bls.n 802fdc6 { DHCP_state = DHCP_TIMEOUT; /* Stop DHCP */ dhcp_stop(&xnetif); 802fd6e: f7f7 ff9f bl 8027cb0 if (sSettings.sFlags.netsettingsChanged == true) 802fd72: f895 32ce ldrb.w r3, [r5, #718] ; 0x2ce 802fd76: b14b cbz r3, 802fd8c { ipaddr.addr = ipaddr_addr(sSettings.sWebTempParams.ip); 802fd78: 481b ldr r0, [pc, #108] ; (802fde8 ) 802fd7a: f7fb f9de bl 802b13a 802fd7e: 9001 str r0, [sp, #4] netmask.addr = ipaddr_addr(sSettings.sWebTempParams.mask); 802fd80: 481a ldr r0, [pc, #104] ; (802fdec ) 802fd82: f7fb f9da bl 802b13a 802fd86: 9002 str r0, [sp, #8] gw.addr = ipaddr_addr(sSettings.sWebTempParams.gate); 802fd88: 4819 ldr r0, [pc, #100] ; (802fdf0 ) 802fd8a: e008 b.n 802fd9e } else { ipaddr.addr = ipaddr_addr(sSettings.sWebParams.ip); 802fd8c: 4813 ldr r0, [pc, #76] ; (802fddc ) 802fd8e: f7fb f9d4 bl 802b13a 802fd92: 9001 str r0, [sp, #4] netmask.addr = ipaddr_addr(sSettings.sWebParams.mask); 802fd94: 4812 ldr r0, [pc, #72] ; (802fde0 ) 802fd96: f7fb f9d0 bl 802b13a 802fd9a: 9002 str r0, [sp, #8] gw.addr = ipaddr_addr(sSettings.sWebParams.gate); 802fd9c: 4811 ldr r0, [pc, #68] ; (802fde4 ) 802fd9e: f7fb f9cc bl 802b13a } /* Static address used */ netif_set_addr(&xnetif, &ipaddr , &netmask, &gw); 802fda2: a901 add r1, sp, #4 802fda4: aa02 add r2, sp, #8 802fda6: ab03 add r3, sp, #12 } else { ipaddr.addr = ipaddr_addr(sSettings.sWebParams.ip); netmask.addr = ipaddr_addr(sSettings.sWebParams.mask); gw.addr = ipaddr_addr(sSettings.sWebParams.gate); 802fda8: 9003 str r0, [sp, #12] } /* Static address used */ netif_set_addr(&xnetif, &ipaddr , &netmask, &gw); 802fdaa: 480a ldr r0, [pc, #40] ; (802fdd4 ) 802fdac: f7f8 f9f0 bl 8028190 PRINT_USART("DHCP timeout\n\r"); PRINT_USART("\n\rStatic IP address\n\r"); PRINT_USART(ipaddr_ntoa(&ipaddr)); PRINT_USART("\n\r"); vTaskDelay(50); 802fdb0: 2032 movs r0, #50 ; 0x32 802fdb2: f7f5 fe13 bl 80259dc /* Установлен статический IP, можно отправить трап о перезагрузке устройства */ SNMP_SendUserTrap(DEVICE_REBOOTED); 802fdb6: 2004 movs r0, #4 802fdb8: f000 f98a bl 80300d0 vTaskDelete(xHandleDHCP); 802fdbc: 4b0d ldr r3, [pc, #52] ; (802fdf4 ) 802fdbe: 6818 ldr r0, [r3, #0] 802fdc0: f7f5 fc4e bl 8025660 else { /* DHCP timeout */ if (xnetif.dhcp->tries > MAX_DHCP_TRIES) { DHCP_state = DHCP_TIMEOUT; 802fdc4: 2403 movs r4, #3 break; default: break; } vTaskDelay(250); 802fdc6: 20fa movs r0, #250 ; 0xfa 802fdc8: f7f5 fe08 bl 80259dc } 802fdcc: e772 b.n 802fcb4 802fdce: bf00 nop 802fdd0: 2000dfc0 .word 0x2000dfc0 802fdd4: 20010674 .word 0x20010674 802fdd8: 08030d40 .word 0x08030d40 802fddc: 2000dfc2 .word 0x2000dfc2 802fde0: 2000dfe0 .word 0x2000dfe0 802fde4: 2000dfd1 .word 0x2000dfd1 802fde8: 2000dff0 .word 0x2000dff0 802fdec: 2000e00e .word 0x2000e00e 802fdf0: 2000dfff .word 0x2000dfff 802fdf4: 2000df5c .word 0x2000df5c 0802fdf8 : TaskHandle_t xHandleWebReinit = NULL; bool dhcp = false; void LwIP_Init(void) { 802fdf8: b530 push {r4, r5, lr} struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; char str[20]; tcpip_init( NULL, NULL ); 802fdfa: 2000 movs r0, #0 sSettings.sFlags.netsettingsChanged = false; 802fdfc: 4c36 ldr r4, [pc, #216] ; (802fed8 ) TaskHandle_t xHandleWebReinit = NULL; bool dhcp = false; void LwIP_Init(void) { 802fdfe: b08d sub sp, #52 ; 0x34 struct ip_addr ipaddr; struct ip_addr netmask; struct ip_addr gw; char str[20]; tcpip_init( NULL, NULL ); 802fe00: 4601 mov r1, r0 802fe02: f7f7 f909 bl 8027018 } } /* Настройки не менялись, используем обычне настройки из флеш памяти */ else { if (sSettings.sWebParams.dhcpEnable) 802fe06: f894 502f ldrb.w r5, [r4, #47] ; 0x2f struct ip_addr netmask; struct ip_addr gw; char str[20]; tcpip_init( NULL, NULL ); sSettings.sFlags.netsettingsChanged = false; 802fe0a: 2300 movs r3, #0 802fe0c: f884 32ce strb.w r3, [r4, #718] ; 0x2ce } } /* Настройки не менялись, используем обычне настройки из флеш памяти */ else { if (sSettings.sWebParams.dhcpEnable) 802fe10: b125 cbz r5, 802fe1c { ipaddr.addr = 0; 802fe12: 9304 str r3, [sp, #16] netmask.addr = 0; 802fe14: 9305 str r3, [sp, #20] gw.addr = 0; 802fe16: 9306 str r3, [sp, #24] netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 802fe18: 9300 str r3, [sp, #0] 802fe1a: e028 b.n 802fe6e netif_set_default(&xnetif); netif_set_up(&xnetif); } else { ipaddr.addr = ipaddr_addr(sSettings.sWebParams.ip); 802fe1c: 1ca0 adds r0, r4, #2 802fe1e: f7fb f98c bl 802b13a 802fe22: 9004 str r0, [sp, #16] netmask.addr = ipaddr_addr(sSettings.sWebParams.mask); 802fe24: f104 0020 add.w r0, r4, #32 802fe28: f7fb f987 bl 802b13a 802fe2c: 9005 str r0, [sp, #20] gw.addr = ipaddr_addr(sSettings.sWebParams.gate); 802fe2e: f104 0011 add.w r0, r4, #17 802fe32: f7fb f982 bl 802b13a /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; 802fe36: f894 302f ldrb.w r3, [r4, #47] ; 0x2f } else { ipaddr.addr = ipaddr_addr(sSettings.sWebParams.ip); netmask.addr = ipaddr_addr(sSettings.sWebParams.mask); gw.addr = ipaddr_addr(sSettings.sWebParams.gate); 802fe3a: 9006 str r0, [sp, #24] /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; strcpy(sSettings.sWebTempParams.ip, sSettings.sWebParams.ip); 802fe3c: 1ca1 adds r1, r4, #2 802fe3e: f104 0030 add.w r0, r4, #48 ; 0x30 ipaddr.addr = ipaddr_addr(sSettings.sWebParams.ip); netmask.addr = ipaddr_addr(sSettings.sWebParams.mask); gw.addr = ipaddr_addr(sSettings.sWebParams.gate); /* Обновляем временные настройки */ sSettings.sWebTempParams.dhcpEnable = sSettings.sWebParams.dhcpEnable; 802fe42: f884 305d strb.w r3, [r4, #93] ; 0x5d strcpy(sSettings.sWebTempParams.ip, sSettings.sWebParams.ip); 802fe46: f7f1 fdd5 bl 80219f4 strcpy(sSettings.sWebTempParams.mask, sSettings.sWebParams.mask); 802fe4a: f104 0120 add.w r1, r4, #32 802fe4e: f104 004e add.w r0, r4, #78 ; 0x4e 802fe52: f7f1 fdcf bl 80219f4 strcpy(sSettings.sWebTempParams.gate, sSettings.sWebParams.gate); 802fe56: f104 0111 add.w r1, r4, #17 802fe5a: f104 003f add.w r0, r4, #63 ; 0x3f 802fe5e: f7f1 fdc9 bl 80219f4 sprintf(str, " %s\n\r", sSettings.sWebParams.ip); 802fe62: a807 add r0, sp, #28 802fe64: 491d ldr r1, [pc, #116] ; (802fedc ) 802fe66: 1ca2 adds r2, r4, #2 802fe68: f7f4 fb4c bl 8024504 PRINT_USART("\n\rStatic IP address \n\r"); PRINT_USART(str); netif_add(&xnetif, &ipaddr, &netmask, &gw, NULL, ðernetif_init, &tcpip_input); 802fe6c: 9500 str r5, [sp, #0] 802fe6e: 4b1c ldr r3, [pc, #112] ; (802fee0 ) 802fe70: 481c ldr r0, [pc, #112] ; (802fee4 ) 802fe72: 9301 str r3, [sp, #4] 802fe74: 4b1c ldr r3, [pc, #112] ; (802fee8 ) 802fe76: a904 add r1, sp, #16 802fe78: aa05 add r2, sp, #20 802fe7a: 9302 str r3, [sp, #8] 802fe7c: ab06 add r3, sp, #24 802fe7e: f7f8 f995 bl 80281ac netif_set_default(&xnetif); 802fe82: 4818 ldr r0, [pc, #96] ; (802fee4 ) 802fe84: f7f8 f9ba bl 80281fc netif_set_up(&xnetif); 802fe88: 4816 ldr r0, [pc, #88] ; (802fee4 ) 802fe8a: f7f8 f9c7 bl 802821c } if (sSettings.sWebParams.dhcpEnable) { 802fe8e: 4b12 ldr r3, [pc, #72] ; (802fed8 ) 802fe90: f893 302f ldrb.w r3, [r3, #47] ; 0x2f 802fe94: b17b cbz r3, 802feb6 xTaskCreate(LwIP_DHCP_task, "DHCPClient", configMINIMAL_STACK_SIZE * 2, NULL, 802fe96: 2302 movs r3, #2 802fe98: 9300 str r3, [sp, #0] 802fe9a: 4b14 ldr r3, [pc, #80] ; (802feec ) 802fe9c: 4814 ldr r0, [pc, #80] ; (802fef0 ) 802fe9e: 9301 str r3, [sp, #4] 802fea0: 2300 movs r3, #0 802fea2: 9302 str r3, [sp, #8] 802fea4: 9303 str r3, [sp, #12] 802fea6: f44f 7280 mov.w r2, #256 ; 0x100 802feaa: 4912 ldr r1, [pc, #72] ; (802fef4 ) 802feac: f7f5 fb00 bl 80254b0 tskIDLE_PRIORITY + 2, &xHandleDHCP); dhcp = true; 802feb0: 4b11 ldr r3, [pc, #68] ; (802fef8 ) 802feb2: 2201 movs r2, #1 802feb4: 701a strb r2, [r3, #0] } } /* Если настройки изменились, запускаем задачу по отсчету времени реакции пользователя*/ if (sSettings.sFlags.netsettingsChanged == true) 802feb6: 4b08 ldr r3, [pc, #32] ; (802fed8 ) 802feb8: f893 32ce ldrb.w r3, [r3, #718] ; 0x2ce 802febc: b153 cbz r3, 802fed4 xTaskCreate(vTaskWebReinit, "webReinit", configMINIMAL_STACK_SIZE, NULL, 802febe: 4a0f ldr r2, [pc, #60] ; (802fefc ) 802fec0: 480f ldr r0, [pc, #60] ; (802ff00 ) 802fec2: 9201 str r2, [sp, #4] 802fec4: 2300 movs r3, #0 802fec6: 9300 str r3, [sp, #0] 802fec8: 9302 str r3, [sp, #8] 802feca: 9303 str r3, [sp, #12] 802fecc: 490d ldr r1, [pc, #52] ; (802ff04 ) 802fece: 2280 movs r2, #128 ; 0x80 802fed0: f7f5 faee bl 80254b0 tskIDLE_PRIORITY, &xHandleWebReinit); } 802fed4: b00d add sp, #52 ; 0x34 802fed6: bd30 pop {r4, r5, pc} 802fed8: 2000dfc0 .word 0x2000dfc0 802fedc: 0803840e .word 0x0803840e 802fee0: 0802f99d .word 0x0802f99d 802fee4: 20010674 .word 0x20010674 802fee8: 08026fd9 .word 0x08026fd9 802feec: 2000df5c .word 0x2000df5c 802fef0: 0802fcad .word 0x0802fcad 802fef4: 08038414 .word 0x08038414 802fef8: 2000df54 .word 0x2000df54 802fefc: 2000df58 .word 0x2000df58 802ff00: 0802fc05 .word 0x0802fc05 802ff04: 0803841f .word 0x0803841f 0802ff08 : /** * @brief Возвращает true если сетевые параметры изменились */ bool GetStateWebReinit(void) { 802ff08: b510 push {r4, lr} /* Статус dhcp изменился? */ if (sSettings.sWebParams.dhcpEnable != sSettings.sWebTempParams.dhcpEnable) 802ff0a: 4c12 ldr r4, [pc, #72] ; (802ff54 ) 802ff0c: f894 202f ldrb.w r2, [r4, #47] ; 0x2f 802ff10: f894 305d ldrb.w r3, [r4, #93] ; 0x5d 802ff14: 429a cmp r2, r3 802ff16: d004 beq.n 802ff22 { /* Включили dhcp */ if (sSettings.sWebTempParams.dhcpEnable == 1) { /* Устанавилваем флаг */ SetWebReinitFlag(true); 802ff18: 2001 movs r0, #1 802ff1a: f7f4 fcd5 bl 80248c8 return true; 802ff1e: 2001 movs r0, #1 802ff20: bd10 pop {r4, pc} return true; } } /* Изменился IP? */ if (strstr(sSettings.sWebParams.ip, sSettings.sWebTempParams.ip) == 0) 802ff22: 1ca0 adds r0, r4, #2 802ff24: f104 0130 add.w r1, r4, #48 ; 0x30 802ff28: f7f2 f842 bl 8021fb0 802ff2c: 2800 cmp r0, #0 802ff2e: d0f3 beq.n 802ff18 SetWebReinitFlag(true); return true; } /* Изменился шлюз? */ if (strstr(sSettings.sWebParams.gate, sSettings.sWebTempParams.gate) == 0) 802ff30: f104 0011 add.w r0, r4, #17 802ff34: f104 013f add.w r1, r4, #63 ; 0x3f 802ff38: f7f2 f83a bl 8021fb0 802ff3c: 2800 cmp r0, #0 802ff3e: d0eb beq.n 802ff18 SetWebReinitFlag(true); return true; } /* Изменилась маска? */ if (strstr(sSettings.sWebParams.mask, sSettings.sWebTempParams.mask) == 0) 802ff40: f104 0020 add.w r0, r4, #32 802ff44: f104 014e add.w r1, r4, #78 ; 0x4e 802ff48: f7f2 f832 bl 8021fb0 802ff4c: 2800 cmp r0, #0 802ff4e: d0e3 beq.n 802ff18 /* Устанавилваем флаг */ SetWebReinitFlag(true); return true; } return false; 802ff50: 2000 movs r0, #0 } 802ff52: bd10 pop {r4, pc} 802ff54: 2000dfc0 .word 0x2000dfc0 0802ff58 : { u8_t id, set_ok; LWIP_UNUSED_ARG(value); set_ok = 0; id = od->id_inst_ptr[0]; 802ff58: 6883 ldr r3, [r0, #8] switch (id) 802ff5a: 781b ldrb r3, [r3, #0] 802ff5c: 2b02 cmp r3, #2 802ff5e: d001 beq.n 802ff64 802ff60: 2b03 cmp r3, #3 802ff62: d103 bne.n 802ff6c static u8_t signals_set_test (struct obj_def *od, u16_t len, void *value) { u8_t id, set_ok; LWIP_UNUSED_ARG(value); set_ok = 0; 802ff64: 1f0b subs r3, r1, #4 802ff66: 4258 negs r0, r3 802ff68: 4158 adcs r0, r3 802ff6a: 4770 bx lr 802ff6c: 2000 movs r0, #0 } break; }; return set_ok; } 802ff6e: 4770 bx lr 0802ff70 : \param len - длина переменной в байтах \param value - указатель на значение переменной \return нет ------------------------------------------------------------------------------*/ static void signals_get_value (struct obj_def *od, u16_t len, void *value) { 802ff70: 4613 mov r3, r2 u8_t id; id = od->id_inst_ptr[0]; 802ff72: 6882 ldr r2, [r0, #8] switch (id) 802ff74: 7812 ldrb r2, [r2, #0] 802ff76: 3a01 subs r2, #1 \param len - длина переменной в байтах \param value - указатель на значение переменной \return нет ------------------------------------------------------------------------------*/ static void signals_get_value (struct obj_def *od, u16_t len, void *value) { 802ff78: b510 push {r4, lr} 802ff7a: 460c mov r4, r1 u8_t id; id = od->id_inst_ptr[0]; switch (id) 802ff7c: 2a0c cmp r2, #12 802ff7e: d812 bhi.n 802ffa6 802ff80: e8df f002 tbb [pc, r2] 802ff84: 0a07070a .word 0x0a07070a 802ff88: 0a0a0a0a .word 0x0a0a0a0a 802ff8c: 0a0a0a0a .word 0x0a0a0a0a 802ff90: 0a .byte 0x0a 802ff91: 00 .byte 0x00 break; case 2: /* RestoreSignal */ *((s32_t*)value) = 0; break; case 3: /* RebootSignal */ *((s32_t*)value) = 0; 802ff92: 2200 movs r2, #0 802ff94: 601a str r2, [r3, #0] break; 802ff96: bd10 pop {r4, pc} break; case 12: /* BatCap */ ocstrncpy((u8_t*)value, (u8_t*)paramStr, len); break; case 13: /* ConnectMonitor */ ocstrncpy((u8_t*)value, (u8_t*)paramStr, len); 802ff98: 4903 ldr r1, [pc, #12] ; (802ffa8 ) 802ff9a: 4618 mov r0, r3 802ff9c: 4622 mov r2, r4 break; default : break; }; } 802ff9e: e8bd 4010 ldmia.w sp!, {r4, lr} break; case 12: /* BatCap */ ocstrncpy((u8_t*)value, (u8_t*)paramStr, len); break; case 13: /* ConnectMonitor */ ocstrncpy((u8_t*)value, (u8_t*)paramStr, len); 802ffa2: f7fc bb77 b.w 802c694 802ffa6: bd10 pop {r4, pc} 802ffa8: 200107c0 .word 0x200107c0 0802ffac : u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 802ffac: 2801 cmp r0, #1 \param ident - points to objectname.0 (object id trailer) \param od - points to object definition. указатель на описание переменной \return нет ------------------------------------------------------------------------------*/ static void signals_get_object_def (u8_t ident_len, s32_t *ident, struct obj_def *od) { 802ffae: b538 push {r3, r4, r5, lr} 802ffb0: 4614 mov r4, r2 u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; if (ident_len == 2) 802ffb2: d16b bne.n 803008c { od->id_inst_len = ident_len; 802ffb4: 2302 movs r3, #2 802ffb6: 7193 strb r3, [r2, #6] { u8_t id; /* return to object name, adding index depth (1) */ ident_len += 1; ident -= 1; 802ffb8: 1f0b subs r3, r1, #4 if (ident_len == 2) { od->id_inst_len = ident_len; od->id_inst_ptr = ident; 802ffba: 6093 str r3, [r2, #8] id = ident[0]; switch (id) 802ffbc: f811 3c04 ldrb.w r3, [r1, #-4] 802ffc0: 3b01 subs r3, #1 802ffc2: 2b0c cmp r3, #12 802ffc4: d862 bhi.n 803008c 802ffc6: e8df f003 tbb [pc, r3] 802ffca: 0d07 .short 0x0d07 802ffcc: 2a241e12 .word 0x2a241e12 802ffd0: 423c3630 .word 0x423c3630 802ffd4: 4e48 .short 0x4e48 802ffd6: 54 .byte 0x54 802ffd7: 00 .byte 0x00 { case 1: /* FWVersion */ GetVersionStr(paramStr, ¶mLength); 802ffd8: 4d2e ldr r5, [pc, #184] ; (8030094 ) 802ffda: 482f ldr r0, [pc, #188] ; (8030098 ) 802ffdc: 4629 mov r1, r5 802ffde: f7f4 fb25 bl 802462c 802ffe2: e04b b.n 803007c od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 2: /* RestoreSignal */ GetRestore(paramStr, ¶mLength); 802ffe4: 482c ldr r0, [pc, #176] ; (8030098 ) 802ffe6: 492b ldr r1, [pc, #172] ; (8030094 ) 802ffe8: f7f4 fc32 bl 8024850 802ffec: e003 b.n 802fff6 od->access = MIB_OBJECT_READ_WRITE; od->asn_type = SNMP_ASN1_INTEG; od->v_len = sizeof(s32_t); break; case 3: /* RebootSignal */ GetReboot(paramStr, ¶mLength); 802ffee: 482a ldr r0, [pc, #168] ; (8030098 ) 802fff0: 4928 ldr r1, [pc, #160] ; (8030094 ) 802fff2: f7f4 fc3b bl 802486c od->instance = MIB_OBJECT_SCALAR; 802fff6: 2301 movs r3, #1 802fff8: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_WRITE; 802fffa: 2303 movs r3, #3 802fffc: 7063 strb r3, [r4, #1] od->asn_type = SNMP_ASN1_INTEG; 802fffe: 2302 movs r3, #2 8030000: 70a3 strb r3, [r4, #2] od->v_len = sizeof(s32_t); 8030002: 2304 movs r3, #4 8030004: e040 b.n 8030088 break; case 4: /* IntTemp */ GetInternalTempStr(paramStr, ¶mLength); 8030006: 4d23 ldr r5, [pc, #140] ; (8030094 ) 8030008: 4823 ldr r0, [pc, #140] ; (8030098 ) 803000a: 4629 mov r1, r5 803000c: f7f4 fab4 bl 8024578 8030010: e034 b.n 803007c od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 5: /* LineFailBit */ GetLineFailBitStr(paramStr, ¶mLength); 8030012: 4d20 ldr r5, [pc, #128] ; (8030094 ) 8030014: 4820 ldr r0, [pc, #128] ; (8030098 ) 8030016: 4629 mov r1, r5 8030018: f7f4 fa80 bl 802451c 803001c: e02e b.n 803007c od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 6: /* LowBatBit */ GetLowBatteryBitStr(paramStr, ¶mLength); 803001e: 4d1d ldr r5, [pc, #116] ; (8030094 ) 8030020: 481d ldr r0, [pc, #116] ; (8030098 ) 8030022: 4629 mov r1, r5 8030024: f7f4 fa7d bl 8024522 8030028: e028 b.n 803007c od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 7: /* InFreq */ GetInputFreqStr(paramStr, ¶mLength); 803002a: 4d1a ldr r5, [pc, #104] ; (8030094 ) 803002c: 481a ldr r0, [pc, #104] ; (8030098 ) 803002e: 4629 mov r1, r5 8030030: f7f4 fa78 bl 8024524 8030034: e022 b.n 803007c od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 8: /* OutFreq */ GetOutputFreqStr(paramStr, ¶mLength); 8030036: 4d17 ldr r5, [pc, #92] ; (8030094 ) 8030038: 4817 ldr r0, [pc, #92] ; (8030098 ) 803003a: 4629 mov r1, r5 803003c: f7f4 fa78 bl 8024530 8030040: e01c b.n 803007c od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 9: /* InVoltVAC */ GetInputVoltageStr(paramStr, ¶mLength); 8030042: 4d14 ldr r5, [pc, #80] ; (8030094 ) 8030044: 4814 ldr r0, [pc, #80] ; (8030098 ) 8030046: 4629 mov r1, r5 8030048: f7f4 fa78 bl 802453c 803004c: e016 b.n 803007c od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 10: /* OutVoltVAC */ GetOutputVoltageStr(paramStr, ¶mLength); 803004e: 4d11 ldr r5, [pc, #68] ; (8030094 ) 8030050: 4811 ldr r0, [pc, #68] ; (8030098 ) 8030052: 4629 mov r1, r5 8030054: f7f4 fa78 bl 8024548 8030058: e010 b.n 803007c od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 11: /* Power */ GetPowerStr(paramStr, ¶mLength); 803005a: 4d0e ldr r5, [pc, #56] ; (8030094 ) 803005c: 480e ldr r0, [pc, #56] ; (8030098 ) 803005e: 4629 mov r1, r5 8030060: f7f4 fa78 bl 8024554 8030064: e00a b.n 803007c od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 12: /* BatCap */ GetBatCapacityStr(paramStr, ¶mLength); 8030066: 4d0b ldr r5, [pc, #44] ; (8030094 ) 8030068: 480b ldr r0, [pc, #44] ; (8030098 ) 803006a: 4629 mov r1, r5 803006c: f7f4 fa78 bl 8024560 8030070: e004 b.n 803007c od->access = MIB_OBJECT_READ_ONLY; od->asn_type = SNMP_ASN1_OC_STR; od->v_len = paramLength; break; case 13: /* ConnectMonitor */ GetConnectMonitorStr(paramStr, ¶mLength); 8030072: 4d08 ldr r5, [pc, #32] ; (8030094 ) 8030074: 4808 ldr r0, [pc, #32] ; (8030098 ) 8030076: 4629 mov r1, r5 8030078: f7f4 fa8a bl 8024590 od->instance = MIB_OBJECT_SCALAR; 803007c: 2301 movs r3, #1 803007e: 7023 strb r3, [r4, #0] od->access = MIB_OBJECT_READ_ONLY; 8030080: 7063 strb r3, [r4, #1] od->asn_type = SNMP_ASN1_OC_STR; 8030082: 2304 movs r3, #4 8030084: 70a3 strb r3, [r4, #2] od->v_len = paramLength; 8030086: 782b ldrb r3, [r5, #0] 8030088: 80a3 strh r3, [r4, #4] break; 803008a: bd38 pop {r3, r4, r5, pc} }; } else { LWIP_DEBUGF(SNMP_MIB_DEBUG,("planar_get_object_def: no scalar\n")); od->instance = MIB_OBJECT_NONE; 803008c: 2300 movs r3, #0 803008e: 7023 strb r3, [r4, #0] 8030090: bd38 pop {r3, r4, r5, pc} 8030092: bf00 nop 8030094: 2000df60 .word 0x2000df60 8030098: 200107c0 .word 0x200107c0 0803009c : \param len - длина переменной в байтах \param value - указатель на значение переменной \return нет ------------------------------------------------------------------------------*/ static void signals_set_value (struct obj_def *od, u16_t len, void *value) { 803009c: b508 push {r3, lr} u8_t id; uint32_t val; id = od->id_inst_ptr[0]; val = *((s32_t*)value); 803009e: 6813 ldr r3, [r2, #0] static void signals_set_value (struct obj_def *od, u16_t len, void *value) { u8_t id; uint32_t val; id = od->id_inst_ptr[0]; 80300a0: 6882 ldr r2, [r0, #8] val = *((s32_t*)value); switch (id) 80300a2: 7812 ldrb r2, [r2, #0] 80300a4: 2a02 cmp r2, #2 80300a6: d002 beq.n 80300ae 80300a8: 2a03 cmp r2, #3 80300aa: d110 bne.n 80300ce 80300ac: e008 b.n 80300c0 { case 2: /* RestoreSignal */ if (val == 1) { 80300ae: 2b01 cmp r3, #1 80300b0: d10d bne.n 80300ce SNMP_SendUserTrap(DEVICE_RESTORED); 80300b2: 2003 movs r0, #3 80300b4: f000 f80c bl 80300d0 break; default : break; }; } 80300b8: e8bd 4008 ldmia.w sp!, {r3, lr} switch (id) { case 2: /* RestoreSignal */ if (val == 1) { SNMP_SendUserTrap(DEVICE_RESTORED); HTTP_ResetSettings(); 80300bc: f7f6 bf22 b.w 8026f04 } break; case 3: /* RebootSignal */ if (val == 1) 80300c0: 2b01 cmp r3, #1 80300c2: d104 bne.n 80300ce HTTP_StartResetTask(false); 80300c4: 2000 movs r0, #0 break; default : break; }; } 80300c6: e8bd 4008 ldmia.w sp!, {r3, lr} HTTP_ResetSettings(); } break; case 3: /* RebootSignal */ if (val == 1) HTTP_StartResetTask(false); 80300ca: f7f6 bf2b b.w 8026f24 80300ce: bd08 pop {r3, pc} 080300d0 : * FIFO буфера. * Если в настройках трапа отправка отключена, то трап игнорируется. * @retval */ void SNMP_SendUserTrap(uint8_t trapName) { 80300d0: b51f push {r0, r1, r2, r3, r4, lr} uint16_t availableSpace; uint8_t dummyTrap; if (traps[trapName].trapEnable) 80300d2: 4b0d ldr r3, [pc, #52] ; (8030108 ) * FIFO буфера. * Если в настройках трапа отправка отключена, то трап игнорируется. * @retval */ void SNMP_SendUserTrap(uint8_t trapName) { 80300d4: f88d 0007 strb.w r0, [sp, #7] uint16_t availableSpace; uint8_t dummyTrap; if (traps[trapName].trapEnable) 80300d8: eb03 00c0 add.w r0, r3, r0, lsl #3 80300dc: 78c3 ldrb r3, [r0, #3] 80300de: b193 cbz r3, 8030106 { availableSpace = uxQueueSpacesAvailable(SNMP_TrapQueue); 80300e0: 4c0a ldr r4, [pc, #40] ; (803010c ) 80300e2: 6820 ldr r0, [r4, #0] 80300e4: f7f5 f99a bl 802541c if (availableSpace == 0) 80300e8: b282 uxth r2, r0 80300ea: b92a cbnz r2, 80300f8 xQueueReceive(SNMP_TrapQueue, &dummyTrap, 0); 80300ec: 6820 ldr r0, [r4, #0] 80300ee: f10d 010f add.w r1, sp, #15 80300f2: 4613 mov r3, r2 80300f4: f7f5 f8fe bl 80252f4 xQueueSend(SNMP_TrapQueue, &trapName, 0); 80300f8: 2200 movs r2, #0 80300fa: 6820 ldr r0, [r4, #0] 80300fc: f10d 0107 add.w r1, sp, #7 8030100: 4613 mov r3, r2 8030102: f7f4 ffc3 bl 802508c } } 8030106: bd1f pop {r0, r1, r2, r3, r4, pc} 8030108: 200108c4 .word 0x200108c4 803010c: 200108c0 .word 0x200108c0 08030110 : * @brief Установить SNMP Descriptor * @retval */ // TODO void SNMP_SetObjDescr(void) { 8030110: b538 push {r3, r4, r5, lr} static uint8_t len; strcpy(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysName); 8030112: 4c15 ldr r4, [pc, #84] ; (8030168 ) strcat(sSettings.sSnmp.sysDescr, " "); 8030114: 4d15 ldr r5, [pc, #84] ; (803016c ) // TODO void SNMP_SetObjDescr(void) { static uint8_t len; strcpy(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysName); 8030116: f104 01fa add.w r1, r4, #250 ; 0xfa 803011a: 4620 mov r0, r4 803011c: f7f1 fc6a bl 80219f4 strcat(sSettings.sSnmp.sysDescr, " "); 8030120: 4629 mov r1, r5 8030122: 4620 mov r0, r4 8030124: f7f1 fb52 bl 80217cc strcat(sSettings.sSnmp.sysDescr, VERSION); 8030128: 4620 mov r0, r4 803012a: 4911 ldr r1, [pc, #68] ; (8030170 ) 803012c: f7f1 fb4e bl 80217cc strcat(sSettings.sSnmp.sysDescr, " "); 8030130: 4629 mov r1, r5 8030132: 4620 mov r0, r4 8030134: f7f1 fb4a bl 80217cc strcat(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysContact); 8030138: f104 01c8 add.w r1, r4, #200 ; 0xc8 803013c: 4620 mov r0, r4 803013e: f7f1 fb45 bl 80217cc strcat(sSettings.sSnmp.sysDescr, " "); 8030142: 4629 mov r1, r5 8030144: 4620 mov r0, r4 8030146: f7f1 fb41 bl 80217cc strcat(sSettings.sSnmp.sysDescr, sSettings.sInfo.serialNumber); 803014a: f504 71f9 add.w r1, r4, #498 ; 0x1f2 803014e: 4620 mov r0, r4 8030150: f7f1 fb3c bl 80217cc len = strlen(sSettings.sSnmp.sysDescr); 8030154: 4620 mov r0, r4 8030156: f7f1 fcab bl 8021ab0 803015a: 4906 ldr r1, [pc, #24] ; (8030174 ) 803015c: 7008 strb r0, [r1, #0] snmp_set_sysdesr((u8_t*)sSettings.sSnmp.sysDescr, &len); 803015e: 4620 mov r0, r4 } 8030160: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} strcat(sSettings.sSnmp.sysDescr, sSettings.sSnmp.sysContact); strcat(sSettings.sSnmp.sysDescr, " "); strcat(sSettings.sSnmp.sysDescr, sSettings.sInfo.serialNumber); len = strlen(sSettings.sSnmp.sysDescr); snmp_set_sysdesr((u8_t*)sSettings.sSnmp.sysDescr, &len); 8030164: f7fc bba0 b.w 802c8a8 8030168: 2000e01e .word 0x2000e01e 803016c: 08033f5f .word 0x08033f5f 8030170: 08030d3c .word 0x08030d3c 8030174: 2000df61 .word 0x2000df61 08030178 : /** * @brief Установить SNMP SysContact * @retval */ void SNMP_SetSysContact(char *con) { 8030178: b510 push {r4, lr} 803017a: 4604 mov r4, r0 static uint8_t len; len = strlen(con); 803017c: f7f1 fc98 bl 8021ab0 8030180: 4903 ldr r1, [pc, #12] ; (8030190 ) 8030182: 7008 strb r0, [r1, #0] snmp_set_syscontact((u8_t*)con, &len); 8030184: 4620 mov r0, r4 } 8030186: e8bd 4010 ldmia.w sp!, {r4, lr} void SNMP_SetSysContact(char *con) { static uint8_t len; len = strlen(con); snmp_set_syscontact((u8_t*)con, &len); 803018a: f7fc bbdf b.w 802c94c 803018e: bf00 nop 8030190: 2000df62 .word 0x2000df62 08030194 : /** * @brief Установить SNMP SysLocation * @retval */ void SNMP_SetSysLocation(char *loc) { 8030194: b510 push {r4, lr} 8030196: 4604 mov r4, r0 static uint8_t len; len = strlen(loc); 8030198: f7f1 fc8a bl 8021ab0 803019c: 4903 ldr r1, [pc, #12] ; (80301ac ) 803019e: 7008 strb r0, [r1, #0] snmp_set_syslocation((u8_t*)loc, &len); 80301a0: 4620 mov r0, r4 } 80301a2: e8bd 4010 ldmia.w sp!, {r4, lr} void SNMP_SetSysLocation(char *loc) { static uint8_t len; len = strlen(loc); snmp_set_syslocation((u8_t*)loc, &len); 80301a6: f7fc bbdb b.w 802c960 80301aa: bf00 nop 80301ac: 2000df68 .word 0x2000df68 080301b0 : /** * @brief Установить SNMP SysManagerIP * @retval */ void SNMP_SetManagerIP(char *ip) { 80301b0: b510 push {r4, lr} static ip_addr_t trap_addr; ipaddr_aton(ip, &trap_addr); 80301b2: 4c05 ldr r4, [pc, #20] ; (80301c8 ) 80301b4: 4621 mov r1, r4 80301b6: f7fa ff42 bl 802b03e snmp_trap_dst_ip_set(0, &trap_addr); 80301ba: 2000 movs r0, #0 80301bc: 4621 mov r1, r4 } 80301be: e8bd 4010 ldmia.w sp!, {r4, lr} void SNMP_SetManagerIP(char *ip) { static ip_addr_t trap_addr; ipaddr_aton(ip, &trap_addr); snmp_trap_dst_ip_set(0, &trap_addr); 80301c2: f7fe bcd9 b.w 802eb78 80301c6: bf00 nop 80301c8: 2000df64 .word 0x2000df64 080301cc : * @brief ETH_BSP_Config * @param None * @retval None */ void ETH_BSP_Config(void) { 80301cc: b570 push {r4, r5, r6, lr} { volatile uint32_t i; GPIO_InitTypeDef GPIO_InitStructure; /* Enable GPIOs clocks */ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB 80301ce: 2007 movs r0, #7 * @brief ETH_BSP_Config * @param None * @retval None */ void ETH_BSP_Config(void) { 80301d0: b0b4 sub sp, #208 ; 0xd0 { volatile uint32_t i; GPIO_InitTypeDef GPIO_InitStructure; /* Enable GPIOs clocks */ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB 80301d2: 2101 movs r1, #1 80301d4: f7f2 fbce bl 8022974 | RCC_AHB1Periph_GPIOC, ENABLE); /* Enable SYSCFG clock */ RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE); 80301d8: 2101 movs r1, #1 80301da: f44f 4080 mov.w r0, #16384 ; 0x4000 80301de: f7f2 fbe1 bl 80229a4 /* MII/RMII Media interface selection --------------------------------------*/ SYSCFG_ETH_MediaInterfaceConfig(SYSCFG_ETH_MediaInterface_RMII); 80301e2: 2001 movs r0, #1 80301e4: f7f2 fdc0 bl 8022d68 ETH_RST_PIN -------> PE2 - замена на PE13 */ /* Configure PA1,PA2 and PA7 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_7; 80301e8: 2386 movs r3, #134 ; 0x86 GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; 80301ea: 2400 movs r4, #0 */ /* Configure PA1,PA2 and PA7 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_7; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; 80301ec: 2502 movs r5, #2 ETH_RST_PIN -------> PE2 - замена на PE13 */ /* Configure PA1,PA2 and PA7 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_7; 80301ee: 9303 str r3, [sp, #12] GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ; GPIO_Init(GPIOA, &GPIO_InitStructure); 80301f0: 4864 ldr r0, [pc, #400] ; (8030384 ) */ /* Configure PA1,PA2 and PA7 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_7; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; 80301f2: f88d 5010 strb.w r5, [sp, #16] */ /* Configure PA1,PA2 and PA7 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_7; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz; 80301f6: 2303 movs r3, #3 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ; GPIO_Init(GPIOA, &GPIO_InitStructure); 80301f8: a903 add r1, sp, #12 */ /* Configure PA1,PA2 and PA7 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_7; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz; 80301fa: f88d 3011 strb.w r3, [sp, #17] GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; 80301fe: f88d 4012 strb.w r4, [sp, #18] GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ; 8030202: f88d 4013 strb.w r4, [sp, #19] GPIO_Init(GPIOA, &GPIO_InitStructure); 8030206: f7f2 fad5 bl 80227b4 GPIO_PinAFConfig(GPIOA, GPIO_PinSource1, GPIO_AF_ETH); 803020a: 2101 movs r1, #1 803020c: 220b movs r2, #11 803020e: 485d ldr r0, [pc, #372] ; (8030384 ) 8030210: f7f2 fb19 bl 8022846 GPIO_PinAFConfig(GPIOA, GPIO_PinSource2, GPIO_AF_ETH); 8030214: 220b movs r2, #11 8030216: 485b ldr r0, [pc, #364] ; (8030384 ) 8030218: 4629 mov r1, r5 803021a: f7f2 fb14 bl 8022846 GPIO_PinAFConfig(GPIOA, GPIO_PinSource7, GPIO_AF_ETH); 803021e: 220b movs r2, #11 8030220: 2107 movs r1, #7 8030222: 4858 ldr r0, [pc, #352] ; (8030384 ) 8030224: f7f2 fb0f bl 8022846 /* Configure PB10,PB11,PB12 and PB13 */ GPIO_InitStructure.GPIO_Pin = /* GPIO_Pin_10 | */ GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13; 8030228: f44f 5360 mov.w r3, #14336 ; 0x3800 GPIO_Init(GPIOB, &GPIO_InitStructure); 803022c: 4856 ldr r0, [pc, #344] ; (8030388 ) GPIO_PinAFConfig(GPIOA, GPIO_PinSource1, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOA, GPIO_PinSource2, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOA, GPIO_PinSource7, GPIO_AF_ETH); /* Configure PB10,PB11,PB12 and PB13 */ GPIO_InitStructure.GPIO_Pin = /* GPIO_Pin_10 | */ GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13; 803022e: 9303 str r3, [sp, #12] GPIO_Init(GPIOB, &GPIO_InitStructure); 8030230: a903 add r1, sp, #12 8030232: f7f2 fabf bl 80227b4 //GPIO_PinAFConfig(GPIOB, GPIO_PinSource10, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOB, GPIO_PinSource11, GPIO_AF_ETH); 8030236: 210b movs r1, #11 8030238: 460a mov r2, r1 803023a: 4853 ldr r0, [pc, #332] ; (8030388 ) 803023c: f7f2 fb03 bl 8022846 GPIO_PinAFConfig(GPIOB, GPIO_PinSource12, GPIO_AF_ETH); 8030240: 210c movs r1, #12 8030242: 220b movs r2, #11 8030244: 4850 ldr r0, [pc, #320] ; (8030388 ) 8030246: f7f2 fafe bl 8022846 GPIO_PinAFConfig(GPIOB, GPIO_PinSource13, GPIO_AF_ETH); 803024a: 220b movs r2, #11 803024c: 210d movs r1, #13 803024e: 484e ldr r0, [pc, #312] ; (8030388 ) 8030250: f7f2 faf9 bl 8022846 /* Configure PC1, PC4 and PC5 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_4 | GPIO_Pin_5; 8030254: 2332 movs r3, #50 ; 0x32 GPIO_Init(GPIOC, &GPIO_InitStructure); 8030256: 484d ldr r0, [pc, #308] ; (803038c ) GPIO_PinAFConfig(GPIOB, GPIO_PinSource11, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOB, GPIO_PinSource12, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOB, GPIO_PinSource13, GPIO_AF_ETH); /* Configure PC1, PC4 and PC5 */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_4 | GPIO_Pin_5; 8030258: 9303 str r3, [sp, #12] GPIO_Init(GPIOC, &GPIO_InitStructure); 803025a: a903 add r1, sp, #12 803025c: f7f2 faaa bl 80227b4 GPIO_PinAFConfig(GPIOC, GPIO_PinSource1, GPIO_AF_ETH); 8030260: 484a ldr r0, [pc, #296] ; (803038c ) 8030262: 2101 movs r1, #1 8030264: 220b movs r2, #11 8030266: f7f2 faee bl 8022846 GPIO_PinAFConfig(GPIOC, GPIO_PinSource4, GPIO_AF_ETH); 803026a: 4848 ldr r0, [pc, #288] ; (803038c ) 803026c: 2104 movs r1, #4 803026e: 220b movs r2, #11 8030270: f7f2 fae9 bl 8022846 GPIO_PinAFConfig(GPIOC, GPIO_PinSource5, GPIO_AF_ETH); 8030274: 220b movs r2, #11 8030276: 4845 ldr r0, [pc, #276] ; (803038c ) 8030278: 2105 movs r1, #5 803027a: f7f2 fae4 bl 8022846 /* Configure the PHY RST pin */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13; 803027e: f44f 5600 mov.w r6, #8192 ; 0x2000 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; 8030282: 2301 movs r3, #1 GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOE, &GPIO_InitStructure); 8030284: 4842 ldr r0, [pc, #264] ; (8030390 ) GPIO_PinAFConfig(GPIOC, GPIO_PinSource4, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOC, GPIO_PinSource5, GPIO_AF_ETH); /* Configure the PHY RST pin */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; 8030286: f88d 3010 strb.w r3, [sp, #16] GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_Init(GPIOE, &GPIO_InitStructure); 803028a: a903 add r1, sp, #12 /* Configure the PHY RST pin */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; 803028c: f88d 3013 strb.w r3, [sp, #19] GPIO_PinAFConfig(GPIOC, GPIO_PinSource1, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOC, GPIO_PinSource4, GPIO_AF_ETH); GPIO_PinAFConfig(GPIOC, GPIO_PinSource5, GPIO_AF_ETH); /* Configure the PHY RST pin */ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13; 8030290: 9603 str r6, [sp, #12] GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; 8030292: f88d 4012 strb.w r4, [sp, #18] GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; 8030296: f88d 5011 strb.w r5, [sp, #17] GPIO_Init(GPIOE, &GPIO_InitStructure); 803029a: f7f2 fa8b bl 80227b4 GPIO_ResetBits(GPIOE, GPIO_Pin_13); 803029e: 483c ldr r0, [pc, #240] ; (8030390 ) 80302a0: 4631 mov r1, r6 80302a2: f7f2 face bl 8022842 for (i = 0; i < 20000; i++); 80302a6: 9401 str r4, [sp, #4] 80302a8: f644 631f movw r3, #19999 ; 0x4e1f 80302ac: e002 b.n 80302b4 80302ae: 9a01 ldr r2, [sp, #4] 80302b0: 3201 adds r2, #1 80302b2: 9201 str r2, [sp, #4] 80302b4: 9a01 ldr r2, [sp, #4] 80302b6: 429a cmp r2, r3 80302b8: d9f9 bls.n 80302ae GPIO_SetBits(GPIOE, GPIO_Pin_13); 80302ba: 4835 ldr r0, [pc, #212] ; (8030390 ) 80302bc: f44f 5100 mov.w r1, #8192 ; 0x2000 80302c0: f7f2 fabd bl 802283e for (i = 0; i < 20000; i++); 80302c4: 2300 movs r3, #0 80302c6: 9301 str r3, [sp, #4] 80302c8: f644 631f movw r3, #19999 ; 0x4e1f 80302cc: e002 b.n 80302d4 80302ce: 9a01 ldr r2, [sp, #4] 80302d0: 3201 adds r2, #1 80302d2: 9201 str r2, [sp, #4] 80302d4: 9a01 ldr r2, [sp, #4] 80302d6: 429a cmp r2, r3 80302d8: d9f9 bls.n 80302ce static void ETH_MACDMA_Config(void) { ETH_InitTypeDef ETH_InitStructure; /* Enable ETHERNET clock */ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_ETH_MAC | RCC_AHB1Periph_ETH_MAC_Tx | 80302da: f04f 6060 mov.w r0, #234881024 ; 0xe000000 80302de: 2101 movs r1, #1 80302e0: f7f2 fb48 bl 8022974 RCC_AHB1Periph_ETH_MAC_Rx, ENABLE); /* Reset ETHERNET on AHB Bus */ ETH_DeInit(); 80302e4: f000 f868 bl 80303b8 /* Software reset */ ETH_SoftwareReset(); 80302e8: f000 f9fe bl 80306e8 /* Wait for software reset */ while (ETH_GetSoftwareResetStatus() == SET); 80302ec: f000 fa04 bl 80306f8 80302f0: 2801 cmp r0, #1 80302f2: d0fb beq.n 80302ec /* ETHERNET Configuration --------------------------------------------------*/ /* Call ETH_StructInit if you don't like to configure all ETH_InitStructure parameter */ ETH_StructInit(Ð_InitStructure); 80302f4: a805 add r0, sp, #20 80302f6: f000 f86c bl 80303d2 //ETH_InitStructure.ETH_AutoNegotiation = ETH_AutoNegotiation_Disable; // ETH_InitStructure.ETH_Speed = ETH_Speed_10M; // ETH_InitStructure.ETH_Mode = ETH_Mode_FullDuplex; ETH_InitStructure.ETH_LoopbackMode = ETH_LoopbackMode_Disable; ETH_InitStructure.ETH_RetryTransmission = ETH_RetryTransmission_Disable; 80302fa: f44f 7300 mov.w r3, #512 ; 0x200 80302fe: 930f str r3, [sp, #60] ; 0x3c /* When we use the Checksum offload feature, we need to enable the Store and Forward mode: the store and forward guarantee that a whole frame is stored in the FIFO, so the MAC can insert/verify the checksum, if the checksum is OK the DMA can handle the frame otherwise the frame is dropped */ ETH_InitStructure.ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Enable; ETH_InitStructure.ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; 8030300: f04f 7300 mov.w r3, #33554432 ; 0x2000000 8030304: 9326 str r3, [sp, #152] ; 0x98 ETH_InitStructure.ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; ETH_InitStructure.ETH_ForwardErrorFrames = ETH_ForwardErrorFrames_Disable; ETH_InitStructure.ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; ETH_InitStructure.ETH_SecondFrameOperate = ETH_SecondFrameOperate_Enable; ETH_InitStructure.ETH_AddressAlignedBeats = ETH_AddressAlignedBeats_Enable; 8030306: 932e str r3, [sp, #184] ; 0xb8 ETH_InitStructure.ETH_FixedBurst = ETH_FixedBurst_Enable; 8030308: f44f 3380 mov.w r3, #65536 ; 0x10000 803030c: 932f str r3, [sp, #188] ; 0xbc ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; 803030e: f44f 0380 mov.w r3, #4194304 ; 0x400000 /* Call ETH_StructInit if you don't like to configure all ETH_InitStructure parameter */ ETH_StructInit(Ð_InitStructure); /* Fill ETH_InitStructure parametrs */ /*------------------------ MAC -----------------------------------*/ ETH_InitStructure.ETH_AutoNegotiation = ETH_AutoNegotiation_Enable; 8030312: 2501 movs r5, #1 /* When we use the Checksum offload feature, we need to enable the Store and Forward mode: the store and forward guarantee that a whole frame is stored in the FIFO, so the MAC can insert/verify the checksum, if the checksum is OK the DMA can handle the frame otherwise the frame is dropped */ ETH_InitStructure.ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Enable; ETH_InitStructure.ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; ETH_InitStructure.ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; 8030314: f44f 1200 mov.w r2, #2097152 ; 0x200000 ETH_InitStructure.ETH_ForwardErrorFrames = ETH_ForwardErrorFrames_Disable; ETH_InitStructure.ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; ETH_InitStructure.ETH_SecondFrameOperate = ETH_SecondFrameOperate_Enable; ETH_InitStructure.ETH_AddressAlignedBeats = ETH_AddressAlignedBeats_Enable; ETH_InitStructure.ETH_FixedBurst = ETH_FixedBurst_Enable; ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; 8030318: 9330 str r3, [sp, #192] ; 0xc0 ETH_InitStructure.ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; 803031a: f44f 5300 mov.w r3, #8192 ; 0x2000 ETH_InitStructure.ETH_AutoNegotiation = ETH_AutoNegotiation_Enable; //ETH_InitStructure.ETH_AutoNegotiation = ETH_AutoNegotiation_Disable; // ETH_InitStructure.ETH_Speed = ETH_Speed_10M; // ETH_InitStructure.ETH_Mode = ETH_Mode_FullDuplex; ETH_InitStructure.ETH_LoopbackMode = ETH_LoopbackMode_Disable; 803031e: 2400 movs r4, #0 /* When we use the Checksum offload feature, we need to enable the Store and Forward mode: the store and forward guarantee that a whole frame is stored in the FIFO, so the MAC can insert/verify the checksum, if the checksum is OK the DMA can handle the frame otherwise the frame is dropped */ ETH_InitStructure.ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Enable; ETH_InitStructure.ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; ETH_InitStructure.ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; 8030320: 9228 str r2, [sp, #160] ; 0xa0 ETH_InitStructure.ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; ETH_InitStructure.ETH_SecondFrameOperate = ETH_SecondFrameOperate_Enable; ETH_InitStructure.ETH_AddressAlignedBeats = ETH_AddressAlignedBeats_Enable; ETH_InitStructure.ETH_FixedBurst = ETH_FixedBurst_Enable; ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; ETH_InitStructure.ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; 8030322: 9331 str r3, [sp, #196] ; 0xc4 ETH_InitStructure.ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; ETH_InitStructure.ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; ETH_InitStructure.ETH_ForwardErrorFrames = ETH_ForwardErrorFrames_Disable; ETH_InitStructure.ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; ETH_InitStructure.ETH_SecondFrameOperate = ETH_SecondFrameOperate_Enable; 8030324: 2204 movs r2, #4 ETH_InitStructure.ETH_AddressAlignedBeats = ETH_AddressAlignedBeats_Enable; ETH_InitStructure.ETH_FixedBurst = ETH_FixedBurst_Enable; ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; ETH_InitStructure.ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; ETH_InitStructure.ETH_DMAArbitration = ETH_DMAArbitration_RoundRobin_RxTx_2_1; 8030326: f44f 4380 mov.w r3, #16384 ; 0x4000 /* Configure Ethernet */ EthInitStatus = ETH_Init(Ð_InitStructure, LAN8720_PHY_ADDRESS); 803032a: 4629 mov r1, r5 803032c: a805 add r0, sp, #20 ETH_InitStructure.ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; ETH_InitStructure.ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; ETH_InitStructure.ETH_ForwardErrorFrames = ETH_ForwardErrorFrames_Disable; ETH_InitStructure.ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; ETH_InitStructure.ETH_SecondFrameOperate = ETH_SecondFrameOperate_Enable; 803032e: 922d str r2, [sp, #180] ; 0xb4 ETH_InitStructure.ETH_AddressAlignedBeats = ETH_AddressAlignedBeats_Enable; ETH_InitStructure.ETH_FixedBurst = ETH_FixedBurst_Enable; ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; ETH_InitStructure.ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; ETH_InitStructure.ETH_DMAArbitration = ETH_DMAArbitration_RoundRobin_RxTx_2_1; 8030330: 9333 str r3, [sp, #204] ; 0xcc /* Call ETH_StructInit if you don't like to configure all ETH_InitStructure parameter */ ETH_StructInit(Ð_InitStructure); /* Fill ETH_InitStructure parametrs */ /*------------------------ MAC -----------------------------------*/ ETH_InitStructure.ETH_AutoNegotiation = ETH_AutoNegotiation_Enable; 8030332: 9505 str r5, [sp, #20] //ETH_InitStructure.ETH_AutoNegotiation = ETH_AutoNegotiation_Disable; // ETH_InitStructure.ETH_Speed = ETH_Speed_10M; // ETH_InitStructure.ETH_Mode = ETH_Mode_FullDuplex; ETH_InitStructure.ETH_LoopbackMode = ETH_LoopbackMode_Disable; 8030334: 940c str r4, [sp, #48] ; 0x30 ETH_InitStructure.ETH_RetryTransmission = ETH_RetryTransmission_Disable; ETH_InitStructure.ETH_AutomaticPadCRCStrip = ETH_AutomaticPadCRCStrip_Disable; 8030336: 9410 str r4, [sp, #64] ; 0x40 ETH_InitStructure.ETH_ReceiveAll = ETH_ReceiveAll_Disable; 8030338: 9413 str r4, [sp, #76] ; 0x4c ETH_InitStructure.ETH_BroadcastFramesReception = ETH_BroadcastFramesReception_Enable; 803033a: 9416 str r4, [sp, #88] ; 0x58 ETH_InitStructure.ETH_PromiscuousMode = ETH_PromiscuousMode_Disable; 803033c: 9418 str r4, [sp, #96] ; 0x60 ETH_InitStructure.ETH_MulticastFramesFilter = ETH_MulticastFramesFilter_Perfect; 803033e: 9419 str r4, [sp, #100] ; 0x64 ETH_InitStructure.ETH_UnicastFramesFilter = ETH_UnicastFramesFilter_Perfect; 8030340: 941a str r4, [sp, #104] ; 0x68 /*------------------------ DMA -----------------------------------*/ /* When we use the Checksum offload feature, we need to enable the Store and Forward mode: the store and forward guarantee that a whole frame is stored in the FIFO, so the MAC can insert/verify the checksum, if the checksum is OK the DMA can handle the frame otherwise the frame is dropped */ ETH_InitStructure.ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Enable; 8030342: 9425 str r4, [sp, #148] ; 0x94 ETH_InitStructure.ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; ETH_InitStructure.ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; ETH_InitStructure.ETH_ForwardErrorFrames = ETH_ForwardErrorFrames_Disable; 8030344: 942a str r4, [sp, #168] ; 0xa8 ETH_InitStructure.ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; 8030346: 942b str r4, [sp, #172] ; 0xac ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; ETH_InitStructure.ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; ETH_InitStructure.ETH_DMAArbitration = ETH_DMAArbitration_RoundRobin_RxTx_2_1; /* Configure Ethernet */ EthInitStatus = ETH_Init(Ð_InitStructure, LAN8720_PHY_ADDRESS); 8030348: f000 fa80 bl 803084c 803034c: 4e11 ldr r6, [pc, #68] ; (8030394 ) /* Enable the Ethernet Rx Interrupt */ ETH_DMAITConfig(ETH_DMA_IT_NIS | ETH_DMA_IT_R, ENABLE); 803034e: 4629 mov r1, r5 ETH_InitStructure.ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; ETH_InitStructure.ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; ETH_InitStructure.ETH_DMAArbitration = ETH_DMAArbitration_RoundRobin_RxTx_2_1; /* Configure Ethernet */ EthInitStatus = ETH_Init(Ð_InitStructure, LAN8720_PHY_ADDRESS); 8030350: 6030 str r0, [r6, #0] /* Enable the Ethernet Rx Interrupt */ ETH_DMAITConfig(ETH_DMA_IT_NIS | ETH_DMA_IT_R, ENABLE); 8030352: 4811 ldr r0, [pc, #68] ; (8030398 ) 8030354: f000 f9e2 bl 803071c void ETH_NVIC_Config(void) { NVIC_InitTypeDef NVIC_InitStructure; /* 2 bit for pre-emption priority, 2 bits for subpriority */ NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); 8030358: f44f 7040 mov.w r0, #768 ; 0x300 803035c: f7f2 f8aa bl 80224b4 /* Enable the Ethernet global Interrupt */ NVIC_InitStructure.NVIC_IRQChannel = ETH_IRQn; 8030360: 233d movs r3, #61 ; 0x3d 8030362: f88d 3008 strb.w r3, [sp, #8] NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 5; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); 8030366: a802 add r0, sp, #8 /* 2 bit for pre-emption priority, 2 bits for subpriority */ NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); /* Enable the Ethernet global Interrupt */ NVIC_InitStructure.NVIC_IRQChannel = ETH_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 5; 8030368: 2305 movs r3, #5 803036a: f88d 3009 strb.w r3, [sp, #9] NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; 803036e: f88d 400a strb.w r4, [sp, #10] NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; 8030372: f88d 500b strb.w r5, [sp, #11] NVIC_Init(&NVIC_InitStructure); 8030376: f7f2 f8a7 bl 80224c8 ETH_MACDMA_Config(); /* Config NVIC for Ethernet */ ETH_NVIC_Config(); if (EthInitStatus == 0) { 803037a: 6833 ldr r3, [r6, #0] 803037c: b903 cbnz r3, 8030380 803037e: e7fe b.n 803037e // LCD_DisplayStringLine(Line5, (uint8_t*)" Ethernet Init "); // LCD_DisplayStringLine(Line6, (uint8_t*)" failed "); // STM_EVAL_LEDOn(LED5); while(1); } } 8030380: b034 add sp, #208 ; 0xd0 8030382: bd70 pop {r4, r5, r6, pc} 8030384: 40020000 .word 0x40020000 8030388: 40020400 .word 0x40020400 803038c: 40020800 .word 0x40020800 8030390: 40021000 .word 0x40021000 8030394: 2000df6c .word 0x2000df6c 8030398: 00010040 .word 0x00010040 0803039c : * @brief Inserts a delay time. * @param nCount: specifies the delay time length. * @retval None */ static void ETH_Delay(__IO uint32_t nCount) { 803039c: b084 sub sp, #16 __IO uint32_t index = 0; 803039e: 2300 movs r3, #0 * @brief Inserts a delay time. * @param nCount: specifies the delay time length. * @retval None */ static void ETH_Delay(__IO uint32_t nCount) { 80303a0: 9001 str r0, [sp, #4] __IO uint32_t index = 0; 80303a2: 9303 str r3, [sp, #12] for(index = nCount; index != 0; index--) 80303a4: 9b01 ldr r3, [sp, #4] 80303a6: e001 b.n 80303ac 80303a8: 9b03 ldr r3, [sp, #12] 80303aa: 3b01 subs r3, #1 80303ac: 9303 str r3, [sp, #12] 80303ae: 9b03 ldr r3, [sp, #12] 80303b0: 2b00 cmp r3, #0 80303b2: d1f9 bne.n 80303a8 { } } 80303b4: b004 add sp, #16 80303b6: 4770 bx lr 080303b8 : * @brief Deinitializes the ETHERNET peripheral registers to their default reset values. * @param None * @retval None */ void ETH_DeInit(void) { 80303b8: b508 push {r3, lr} RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_ETH_MAC, ENABLE); 80303ba: 2101 movs r1, #1 80303bc: f04f 7000 mov.w r0, #33554432 ; 0x2000000 80303c0: f7f2 fafc bl 80229bc RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_ETH_MAC, DISABLE); 80303c4: f04f 7000 mov.w r0, #33554432 ; 0x2000000 80303c8: 2100 movs r1, #0 } 80303ca: e8bd 4008 ldmia.w sp!, {r3, lr} * @retval None */ void ETH_DeInit(void) { RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_ETH_MAC, ENABLE); RCC_AHB1PeriphResetCmd(RCC_AHB1Periph_ETH_MAC, DISABLE); 80303ce: f7f2 baf5 b.w 80229bc 080303d2 : /* Ethernet interframe gap set to 96 bits */ ETH_InitStruct->ETH_InterFrameGap = ETH_InterFrameGap_96Bit; /* Carrier Sense Enabled in Half-Duplex mode */ ETH_InitStruct->ETH_CarrierSense = ETH_CarrierSense_Enable; /* PHY speed configured to 100Mbit/s */ ETH_InitStruct->ETH_Speed = ETH_Speed_100M; 80303d2: f44f 4280 mov.w r2, #16384 ; 0x4000 80303d6: 6142 str r2, [r0, #20] /* Receive own Frames in Half-Duplex mode enabled */ ETH_InitStruct->ETH_ReceiveOwn = ETH_ReceiveOwn_Enable; /* MAC MII loopback disabled */ ETH_InitStruct->ETH_LoopbackMode = ETH_LoopbackMode_Disable; /* Full-Duplex mode selected */ ETH_InitStruct->ETH_Mode = ETH_Mode_FullDuplex; 80303d8: f44f 6200 mov.w r2, #2048 ; 0x800 80303dc: 6202 str r2, [r0, #32] /* Receive all frames disabled */ ETH_InitStruct->ETH_ReceiveAll = ETH_ReceiveAll_Disable; /* Source address filtering (on the optional MAC addresses) disabled */ ETH_InitStruct->ETH_SourceAddrFilter = ETH_SourceAddrFilter_Disable; /* Do not forward control frames that do not pass the address filtering */ ETH_InitStruct->ETH_PassControlFrames = ETH_PassControlFrames_BlockAll; 80303de: 2240 movs r2, #64 ; 0x40 80303e0: 6402 str r2, [r0, #64] ; 0x40 /* Disable reception of Broadcast frames */ ETH_InitStruct->ETH_BroadcastFramesReception = ETH_BroadcastFramesReception_Disable; 80303e2: 2220 movs r2, #32 80303e4: 6442 str r2, [r0, #68] ; 0x44 /* Initialize hash table high and low regs */ ETH_InitStruct->ETH_HashTableHigh = 0x0; ETH_InitStruct->ETH_HashTableLow = 0x0; /* Flow control config (flow control disabled)*/ ETH_InitStruct->ETH_PauseTime = 0x0; ETH_InitStruct->ETH_ZeroQuantaPause = ETH_ZeroQuantaPause_Disable; 80303e6: 2280 movs r2, #128 ; 0x80 { /* ETH_InitStruct members default value */ /*------------------------ MAC Configuration ---------------------------*/ /* PHY Auto-negotiation enabled */ ETH_InitStruct->ETH_AutoNegotiation = ETH_AutoNegotiation_Enable; 80303e8: 2301 movs r3, #1 /* Initialize hash table high and low regs */ ETH_InitStruct->ETH_HashTableHigh = 0x0; ETH_InitStruct->ETH_HashTableLow = 0x0; /* Flow control config (flow control disabled)*/ ETH_InitStruct->ETH_PauseTime = 0x0; ETH_InitStruct->ETH_ZeroQuantaPause = ETH_ZeroQuantaPause_Disable; 80303ea: 6642 str r2, [r0, #100] ; 0x64 ETH_InitStruct->ETH_VLANTagIdentifier = 0x0; /*---------------------- DMA Configuration -------------------------------*/ /* Drops frames with with TCP/IP checksum errors */ ETH_InitStruct->ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Disable; 80303ec: f04f 6280 mov.w r2, #67108864 ; 0x4000000 { /* ETH_InitStruct members default value */ /*------------------------ MAC Configuration ---------------------------*/ /* PHY Auto-negotiation enabled */ ETH_InitStruct->ETH_AutoNegotiation = ETH_AutoNegotiation_Enable; 80303f0: 6003 str r3, [r0, #0] ETH_InitStruct->ETH_VLANTagIdentifier = 0x0; /*---------------------- DMA Configuration -------------------------------*/ /* Drops frames with with TCP/IP checksum errors */ ETH_InitStruct->ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Disable; 80303f2: f8c0 2080 str.w r2, [r0, #128] ; 0x80 /*------------------------ MAC Configuration ---------------------------*/ /* PHY Auto-negotiation enabled */ ETH_InitStruct->ETH_AutoNegotiation = ETH_AutoNegotiation_Enable; /* MAC watchdog enabled: cuts-off long frame */ ETH_InitStruct->ETH_Watchdog = ETH_Watchdog_Enable; 80303f6: 2300 movs r3, #0 /*---------------------- DMA Configuration -------------------------------*/ /* Drops frames with with TCP/IP checksum errors */ ETH_InitStruct->ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Disable; /* Store and forward mode enabled for receive */ ETH_InitStruct->ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; 80303f8: f04f 7200 mov.w r2, #33554432 ; 0x2000000 /*------------------------ MAC Configuration ---------------------------*/ /* PHY Auto-negotiation enabled */ ETH_InitStruct->ETH_AutoNegotiation = ETH_AutoNegotiation_Enable; /* MAC watchdog enabled: cuts-off long frame */ ETH_InitStruct->ETH_Watchdog = ETH_Watchdog_Enable; 80303fc: 6043 str r3, [r0, #4] /* MAC Jabber enabled in Half-duplex mode */ ETH_InitStruct->ETH_Jabber = ETH_Jabber_Enable; 80303fe: 6083 str r3, [r0, #8] /* Ethernet interframe gap set to 96 bits */ ETH_InitStruct->ETH_InterFrameGap = ETH_InterFrameGap_96Bit; 8030400: 60c3 str r3, [r0, #12] /* Carrier Sense Enabled in Half-Duplex mode */ ETH_InitStruct->ETH_CarrierSense = ETH_CarrierSense_Enable; 8030402: 6103 str r3, [r0, #16] /* PHY speed configured to 100Mbit/s */ ETH_InitStruct->ETH_Speed = ETH_Speed_100M; /* Receive own Frames in Half-Duplex mode enabled */ ETH_InitStruct->ETH_ReceiveOwn = ETH_ReceiveOwn_Enable; 8030404: 6183 str r3, [r0, #24] /* MAC MII loopback disabled */ ETH_InitStruct->ETH_LoopbackMode = ETH_LoopbackMode_Disable; 8030406: 61c3 str r3, [r0, #28] /* Full-Duplex mode selected */ ETH_InitStruct->ETH_Mode = ETH_Mode_FullDuplex; /* IPv4 and TCP/UDP/ICMP frame Checksum Offload disabled */ ETH_InitStruct->ETH_ChecksumOffload = ETH_ChecksumOffload_Disable; 8030408: 6243 str r3, [r0, #36] ; 0x24 /* Retry Transmission enabled for half-duplex mode */ ETH_InitStruct->ETH_RetryTransmission = ETH_RetryTransmission_Enable; 803040a: 6283 str r3, [r0, #40] ; 0x28 /* Automatic PAD/CRC strip disabled*/ ETH_InitStruct->ETH_AutomaticPadCRCStrip = ETH_AutomaticPadCRCStrip_Disable; 803040c: 62c3 str r3, [r0, #44] ; 0x2c /* half-duplex mode retransmission Backoff time_limit = 10 slot times*/ ETH_InitStruct->ETH_BackOffLimit = ETH_BackOffLimit_10; 803040e: 6303 str r3, [r0, #48] ; 0x30 /* half-duplex mode Deferral check disabled */ ETH_InitStruct->ETH_DeferralCheck = ETH_DeferralCheck_Disable; 8030410: 6343 str r3, [r0, #52] ; 0x34 /* Receive all frames disabled */ ETH_InitStruct->ETH_ReceiveAll = ETH_ReceiveAll_Disable; 8030412: 6383 str r3, [r0, #56] ; 0x38 /* Source address filtering (on the optional MAC addresses) disabled */ ETH_InitStruct->ETH_SourceAddrFilter = ETH_SourceAddrFilter_Disable; 8030414: 63c3 str r3, [r0, #60] ; 0x3c /* Do not forward control frames that do not pass the address filtering */ ETH_InitStruct->ETH_PassControlFrames = ETH_PassControlFrames_BlockAll; /* Disable reception of Broadcast frames */ ETH_InitStruct->ETH_BroadcastFramesReception = ETH_BroadcastFramesReception_Disable; /* Normal Destination address filtering (not reverse addressing) */ ETH_InitStruct->ETH_DestinationAddrFilter = ETH_DestinationAddrFilter_Normal; 8030416: 6483 str r3, [r0, #72] ; 0x48 /* Promiscuous address filtering mode disabled */ ETH_InitStruct->ETH_PromiscuousMode = ETH_PromiscuousMode_Disable; 8030418: 64c3 str r3, [r0, #76] ; 0x4c /* Perfect address filtering for multicast addresses */ ETH_InitStruct->ETH_MulticastFramesFilter = ETH_MulticastFramesFilter_Perfect; 803041a: 6503 str r3, [r0, #80] ; 0x50 /* Perfect address filtering for unicast addresses */ ETH_InitStruct->ETH_UnicastFramesFilter = ETH_UnicastFramesFilter_Perfect; 803041c: 6543 str r3, [r0, #84] ; 0x54 /* Initialize hash table high and low regs */ ETH_InitStruct->ETH_HashTableHigh = 0x0; 803041e: 6583 str r3, [r0, #88] ; 0x58 ETH_InitStruct->ETH_HashTableLow = 0x0; 8030420: 65c3 str r3, [r0, #92] ; 0x5c /* Flow control config (flow control disabled)*/ ETH_InitStruct->ETH_PauseTime = 0x0; 8030422: 6603 str r3, [r0, #96] ; 0x60 ETH_InitStruct->ETH_ZeroQuantaPause = ETH_ZeroQuantaPause_Disable; ETH_InitStruct->ETH_PauseLowThreshold = ETH_PauseLowThreshold_Minus4; 8030424: 6683 str r3, [r0, #104] ; 0x68 ETH_InitStruct->ETH_UnicastPauseFrameDetect = ETH_UnicastPauseFrameDetect_Disable; 8030426: 66c3 str r3, [r0, #108] ; 0x6c ETH_InitStruct->ETH_ReceiveFlowControl = ETH_ReceiveFlowControl_Disable; 8030428: 6703 str r3, [r0, #112] ; 0x70 ETH_InitStruct->ETH_TransmitFlowControl = ETH_TransmitFlowControl_Disable; 803042a: 6743 str r3, [r0, #116] ; 0x74 /* VLANtag config (VLAN field not checked) */ ETH_InitStruct->ETH_VLANTagComparison = ETH_VLANTagComparison_16Bit; 803042c: 6783 str r3, [r0, #120] ; 0x78 ETH_InitStruct->ETH_VLANTagIdentifier = 0x0; 803042e: 67c3 str r3, [r0, #124] ; 0x7c /*---------------------- DMA Configuration -------------------------------*/ /* Drops frames with with TCP/IP checksum errors */ ETH_InitStruct->ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Disable; /* Store and forward mode enabled for receive */ ETH_InitStruct->ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; 8030430: f8c0 2084 str.w r2, [r0, #132] ; 0x84 ETH_InitStruct->ETH_ReceiveThresholdControl = ETH_ReceiveThresholdControl_64Bytes; /* Disable Operate on second frame (transmit a second frame to FIFO without waiting status of previous frame*/ ETH_InitStruct->ETH_SecondFrameOperate = ETH_SecondFrameOperate_Disable; /* DMA works on 32-bit aligned start source and destinations addresses */ ETH_InitStruct->ETH_AddressAlignedBeats = ETH_AddressAlignedBeats_Enable; 8030434: f8c0 20a4 str.w r2, [r0, #164] ; 0xa4 /* Enabled Fixed Burst Mode (mix of INC4, INC8, INC16 and SINGLE DMA transactions */ ETH_InitStruct->ETH_FixedBurst = ETH_FixedBurst_Enable; 8030438: f44f 3280 mov.w r2, #65536 ; 0x10000 803043c: f8c0 20a8 str.w r2, [r0, #168] ; 0xa8 /* DMA transfer max burst length = 32 beats = 32 x 32bits */ ETH_InitStruct->ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; 8030440: f44f 0280 mov.w r2, #4194304 ; 0x400000 /* Store and forward mode enabled for receive */ ETH_InitStruct->ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; /* Flush received frame that created FIFO overflow */ ETH_InitStruct->ETH_FlushReceivedFrame = ETH_FlushReceivedFrame_Enable; /* Store and forward mode enabled for transmit */ ETH_InitStruct->ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; 8030444: f44f 1100 mov.w r1, #2097152 ; 0x200000 /* DMA works on 32-bit aligned start source and destinations addresses */ ETH_InitStruct->ETH_AddressAlignedBeats = ETH_AddressAlignedBeats_Enable; /* Enabled Fixed Burst Mode (mix of INC4, INC8, INC16 and SINGLE DMA transactions */ ETH_InitStruct->ETH_FixedBurst = ETH_FixedBurst_Enable; /* DMA transfer max burst length = 32 beats = 32 x 32bits */ ETH_InitStruct->ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; 8030448: f8c0 20ac str.w r2, [r0, #172] ; 0xac ETH_InitStruct->ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; 803044c: f44f 5200 mov.w r2, #8192 ; 0x2000 /* Drops frames with with TCP/IP checksum errors */ ETH_InitStruct->ETH_DropTCPIPChecksumErrorFrame = ETH_DropTCPIPChecksumErrorFrame_Disable; /* Store and forward mode enabled for receive */ ETH_InitStruct->ETH_ReceiveStoreForward = ETH_ReceiveStoreForward_Enable; /* Flush received frame that created FIFO overflow */ ETH_InitStruct->ETH_FlushReceivedFrame = ETH_FlushReceivedFrame_Enable; 8030450: f8c0 3088 str.w r3, [r0, #136] ; 0x88 /* Store and forward mode enabled for transmit */ ETH_InitStruct->ETH_TransmitStoreForward = ETH_TransmitStoreForward_Enable; 8030454: f8c0 108c str.w r1, [r0, #140] ; 0x8c /* Threshold TXFIFO level set to 64 bytes (used when threshold mode is enabled) */ ETH_InitStruct->ETH_TransmitThresholdControl = ETH_TransmitThresholdControl_64Bytes; 8030458: f8c0 3090 str.w r3, [r0, #144] ; 0x90 /* Disable forwarding frames with errors (short frames, CRC,...)*/ ETH_InitStruct->ETH_ForwardErrorFrames = ETH_ForwardErrorFrames_Disable; 803045c: f8c0 3094 str.w r3, [r0, #148] ; 0x94 /* Disable undersized good frames */ ETH_InitStruct->ETH_ForwardUndersizedGoodFrames = ETH_ForwardUndersizedGoodFrames_Disable; 8030460: f8c0 3098 str.w r3, [r0, #152] ; 0x98 /* Threshold RXFIFO level set to 64 bytes (used when Cut-through mode is enabled) */ ETH_InitStruct->ETH_ReceiveThresholdControl = ETH_ReceiveThresholdControl_64Bytes; 8030464: f8c0 309c str.w r3, [r0, #156] ; 0x9c /* Disable Operate on second frame (transmit a second frame to FIFO without waiting status of previous frame*/ ETH_InitStruct->ETH_SecondFrameOperate = ETH_SecondFrameOperate_Disable; 8030468: f8c0 30a0 str.w r3, [r0, #160] ; 0xa0 ETH_InitStruct->ETH_AddressAlignedBeats = ETH_AddressAlignedBeats_Enable; /* Enabled Fixed Burst Mode (mix of INC4, INC8, INC16 and SINGLE DMA transactions */ ETH_InitStruct->ETH_FixedBurst = ETH_FixedBurst_Enable; /* DMA transfer max burst length = 32 beats = 32 x 32bits */ ETH_InitStruct->ETH_RxDMABurstLength = ETH_RxDMABurstLength_32Beat; ETH_InitStruct->ETH_TxDMABurstLength = ETH_TxDMABurstLength_32Beat; 803046c: f8c0 20b0 str.w r2, [r0, #176] ; 0xb0 /* DMA Ring mode skip length = 0 */ ETH_InitStruct->ETH_DescriptorSkipLength = 0x0; 8030470: f8c0 30b4 str.w r3, [r0, #180] ; 0xb4 /* Equal priority (round-robin) between transmit and receive DMA engines */ ETH_InitStruct->ETH_DMAArbitration = ETH_DMAArbitration_RoundRobin_RxTx_1_1; 8030474: f8c0 30b8 str.w r3, [r0, #184] ; 0xb8 8030478: 4770 bx lr 803047a: 0000 movs r0, r0 0803047c : * @param NewState: new state of the MAC transmission. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_MACTransmissionCmd(FunctionalState NewState) { 803047c: 4b04 ldr r3, [pc, #16] ; (8030490 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the MAC transmission */ ETH->MACCR |= ETH_MACCR_TE; 803047e: 681a ldr r2, [r3, #0] void ETH_MACTransmissionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8030480: b110 cbz r0, 8030488 { /* Enable the MAC transmission */ ETH->MACCR |= ETH_MACCR_TE; 8030482: f042 0208 orr.w r2, r2, #8 8030486: e001 b.n 803048c } else { /* Disable the MAC transmission */ ETH->MACCR &= ~ETH_MACCR_TE; 8030488: f022 0208 bic.w r2, r2, #8 803048c: 601a str r2, [r3, #0] 803048e: 4770 bx lr 8030490: 40028000 .word 0x40028000 08030494 : * @param NewState: new state of the MAC reception. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_MACReceptionCmd(FunctionalState NewState) { 8030494: 4b04 ldr r3, [pc, #16] ; (80304a8 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the MAC reception */ ETH->MACCR |= ETH_MACCR_RE; 8030496: 681a ldr r2, [r3, #0] void ETH_MACReceptionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8030498: b110 cbz r0, 80304a0 { /* Enable the MAC reception */ ETH->MACCR |= ETH_MACCR_RE; 803049a: f042 0204 orr.w r2, r2, #4 803049e: e001 b.n 80304a4 } else { /* Disable the MAC reception */ ETH->MACCR &= ~ETH_MACCR_RE; 80304a0: f022 0204 bic.w r2, r2, #4 80304a4: 601a str r2, [r3, #0] 80304a6: 4770 bx lr 80304a8: 40028000 .word 0x40028000 080304ac : uint32_t tmpreg; /* Check the parameters */ assert_param(IS_ETH_MAC_ADDRESS0123(MacAddr)); /* Calculate the selected MAC address high register */ tmpreg = ((uint32_t)Addr[5] << 8) | (uint32_t)Addr[4]; 80304ac: 790b ldrb r3, [r1, #4] 80304ae: 794a ldrb r2, [r1, #5] 80304b0: ea43 2202 orr.w r2, r3, r2, lsl #8 /* Load the selected MAC address high register */ (*(__IO uint32_t *) (ETH_MAC_ADDR_HBASE + MacAddr)) = tmpreg; 80304b4: 4b07 ldr r3, [pc, #28] ; (80304d4 ) 80304b6: 50c2 str r2, [r0, r3] /* Calculate the selected MAC address low register */ tmpreg = ((uint32_t)Addr[3] << 24) | ((uint32_t)Addr[2] << 16) | ((uint32_t)Addr[1] << 8) | Addr[0]; 80304b8: 788a ldrb r2, [r1, #2] 80304ba: 78cb ldrb r3, [r1, #3] 80304bc: 0412 lsls r2, r2, #16 80304be: ea42 6203 orr.w r2, r2, r3, lsl #24 80304c2: 780b ldrb r3, [r1, #0] 80304c4: 431a orrs r2, r3 80304c6: 784b ldrb r3, [r1, #1] 80304c8: ea42 2203 orr.w r2, r2, r3, lsl #8 /* Load the selected MAC address low register */ (*(__IO uint32_t *) (ETH_MAC_ADDR_LBASE + MacAddr)) = tmpreg; 80304cc: 4b02 ldr r3, [pc, #8] ; (80304d8 ) 80304ce: 50c2 str r2, [r0, r3] 80304d0: 4770 bx lr 80304d2: bf00 nop 80304d4: 40028040 .word 0x40028040 80304d8: 40028044 .word 0x40028044 080304dc : * the receive frame (should be used with interrupt mode only) * @param None * @retval Structure of type FrameTypeDef */ FrameTypeDef ETH_Get_Received_Frame_interrupt(void) { 80304dc: b537 push {r0, r1, r2, r4, r5, lr} FrameTypeDef frame={0,0,0}; __IO uint32_t descriptor_scan_counter = 0; 80304de: 2300 movs r3, #0 80304e0: 9301 str r3, [sp, #4] /* check if first segment in frame */ if(((DMARxDescToGet->Status & ETH_DMARxDesc_FS) != (uint32_t)RESET)&& ((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)) { DMA_RX_FRAME_infos->FS_Rx_Desc = DMARxDescToGet; 80304e2: 4b24 ldr r3, [pc, #144] ; (8030574 ) 80304e4: 681a ldr r2, [r3, #0] 80304e6: 4b24 ldr r3, [pc, #144] ; (8030578 ) DMA_RX_FRAME_infos->Seg_Count = 1; 80304e8: 2401 movs r4, #1 80304ea: 681b ldr r3, [r3, #0] { FrameTypeDef frame={0,0,0}; __IO uint32_t descriptor_scan_counter = 0; /* scan descriptors owned by CPU */ while (((DMARxDescToGet->Status & ETH_DMARxDesc_OWN) == (uint32_t)RESET)&& 80304ec: e033 b.n 8030556 (descriptor_scan_counterStatus & ETH_DMARxDesc_FS) != (uint32_t)RESET)&& 80304f4: 6819 ldr r1, [r3, #0] 80304f6: 0589 lsls r1, r1, #22 80304f8: d505 bpl.n 8030506 ((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)) 80304fa: 6819 ldr r1, [r3, #0] /* Just by security */ descriptor_scan_counter++; /* check if first segment in frame */ if(((DMARxDescToGet->Status & ETH_DMARxDesc_FS) != (uint32_t)RESET)&& 80304fc: 05c9 lsls r1, r1, #23 80304fe: d402 bmi.n 8030506 ((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)) { DMA_RX_FRAME_infos->FS_Rx_Desc = DMARxDescToGet; 8030500: 6013 str r3, [r2, #0] DMA_RX_FRAME_infos->Seg_Count = 1; 8030502: 6094 str r4, [r2, #8] 8030504: e009 b.n 803051a DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); } /* check if intermediate segment */ else if (((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)&& 8030506: 6819 ldr r1, [r3, #0] 8030508: 05c9 lsls r1, r1, #23 803050a: d408 bmi.n 803051e ((DMARxDescToGet->Status & ETH_DMARxDesc_FS) == (uint32_t)RESET)) 803050c: 6819 ldr r1, [r3, #0] DMA_RX_FRAME_infos->Seg_Count = 1; DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); } /* check if intermediate segment */ else if (((DMARxDescToGet->Status & ETH_DMARxDesc_LS) == (uint32_t)RESET)&& 803050e: 0589 lsls r1, r1, #22 8030510: d500 bpl.n 8030514 8030512: e004 b.n 803051e ((DMARxDescToGet->Status & ETH_DMARxDesc_FS) == (uint32_t)RESET)) { (DMA_RX_FRAME_infos->Seg_Count) ++; 8030514: 6891 ldr r1, [r2, #8] 8030516: 3101 adds r1, #1 8030518: 6091 str r1, [r2, #8] DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); 803051a: 68db ldr r3, [r3, #12] 803051c: e01b b.n 8030556 803051e: 4a16 ldr r2, [pc, #88] ; (8030578 ) 8030520: 6013 str r3, [r2, #0] /* should be last segment */ else { /* last segment */ DMA_RX_FRAME_infos->LS_Rx_Desc = DMARxDescToGet; 8030522: 4a14 ldr r2, [pc, #80] ; (8030574 ) 8030524: 6812 ldr r2, [r2, #0] 8030526: 6053 str r3, [r2, #4] (DMA_RX_FRAME_infos->Seg_Count)++; 8030528: 6891 ldr r1, [r2, #8] 803052a: 3101 adds r1, #1 803052c: 6091 str r1, [r2, #8] /* first segment is last segment */ if ((DMA_RX_FRAME_infos->Seg_Count)==1) 803052e: 6891 ldr r1, [r2, #8] 8030530: 2901 cmp r1, #1 DMA_RX_FRAME_infos->FS_Rx_Desc = DMARxDescToGet; 8030532: bf08 it eq 8030534: 6013 streq r3, [r2, #0] /* Get the Frame Length of the received packet: substruct 4 bytes of the CRC */ frame.length = ((DMARxDescToGet->Status & ETH_DMARxDesc_FL) >> ETH_DMARxDesc_FrameLengthShift) - 4; 8030536: 6819 ldr r1, [r3, #0] /* Get the address of the buffer start address */ /* Check if more than one segment in the frame */ if (DMA_RX_FRAME_infos->Seg_Count >1) 8030538: 6894 ldr r4, [r2, #8] /* first segment is last segment */ if ((DMA_RX_FRAME_infos->Seg_Count)==1) DMA_RX_FRAME_infos->FS_Rx_Desc = DMARxDescToGet; /* Get the Frame Length of the received packet: substruct 4 bytes of the CRC */ frame.length = ((DMARxDescToGet->Status & ETH_DMARxDesc_FL) >> ETH_DMARxDesc_FrameLengthShift) - 4; 803053a: f3c1 410d ubfx r1, r1, #16, #14 803053e: 3904 subs r1, #4 /* Get the address of the buffer start address */ /* Check if more than one segment in the frame */ if (DMA_RX_FRAME_infos->Seg_Count >1) 8030540: 2c01 cmp r4, #1 { frame.buffer =(DMA_RX_FRAME_infos->FS_Rx_Desc)->Buffer1Addr; 8030542: bf8a itet hi 8030544: 6812 ldrhi r2, [r2, #0] } else { frame.buffer = DMARxDescToGet->Buffer1Addr; 8030546: 689a ldrls r2, [r3, #8] /* Get the address of the buffer start address */ /* Check if more than one segment in the frame */ if (DMA_RX_FRAME_infos->Seg_Count >1) { frame.buffer =(DMA_RX_FRAME_infos->FS_Rx_Desc)->Buffer1Addr; 8030548: 6892 ldrhi r2, [r2, #8] } frame.descriptor = DMARxDescToGet; /* Update the ETHERNET DMA global Rx descriptor with next Rx descriptor */ DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); 803054a: 4c0b ldr r4, [pc, #44] ; (8030578 ) 803054c: 68dd ldr r5, [r3, #12] /* Return Frame */ return (frame); 803054e: e880 0006 stmia.w r0, {r1, r2} } frame.descriptor = DMARxDescToGet; /* Update the ETHERNET DMA global Rx descriptor with next Rx descriptor */ DMARxDescToGet = (ETH_DMADESCTypeDef*) (DMARxDescToGet->Buffer2NextDescAddr); 8030552: 6025 str r5, [r4, #0] 8030554: e007 b.n 8030566 { FrameTypeDef frame={0,0,0}; __IO uint32_t descriptor_scan_counter = 0; /* scan descriptors owned by CPU */ while (((DMARxDescToGet->Status & ETH_DMARxDesc_OWN) == (uint32_t)RESET)&& 8030556: 6819 ldr r1, [r3, #0] 8030558: 2900 cmp r1, #0 803055a: da06 bge.n 803056a 803055c: 4a06 ldr r2, [pc, #24] ; (8030578 ) 803055e: 6013 str r3, [r2, #0] /* Return Frame */ return (frame); } } return (frame); 8030560: 2300 movs r3, #0 8030562: 6003 str r3, [r0, #0] 8030564: 6043 str r3, [r0, #4] 8030566: 6083 str r3, [r0, #8] 8030568: e003 b.n 8030572 FrameTypeDef frame={0,0,0}; __IO uint32_t descriptor_scan_counter = 0; /* scan descriptors owned by CPU */ while (((DMARxDescToGet->Status & ETH_DMARxDesc_OWN) == (uint32_t)RESET)&& (descriptor_scan_counterStatus & ETH_DMARxDesc_OWN) == (uint32_t)RESET)&& 803056c: 2904 cmp r1, #4 803056e: d9be bls.n 80304ee 8030570: e7f4 b.n 803055c /* Return Frame */ return (frame); } } return (frame); } 8030572: bd3e pop {r1, r2, r3, r4, r5, pc} 8030574: 200127b8 .word 0x200127b8 8030578: 20010948 .word 0x20010948 0803057c : { uint32_t buf_count =0, size=0,i=0; __IO ETH_DMADESCTypeDef *DMATxNextDesc; /* Check if the descriptor is owned by the ETHERNET DMA (when set) or CPU (when reset) */ if((DMATxDescToSet->Status & ETH_DMATxDesc_OWN) != (u32)RESET) 803057c: 4b29 ldr r3, [pc, #164] ; (8030624 ) 803057e: 681b ldr r3, [r3, #0] 8030580: 681a ldr r2, [r3, #0] 8030582: 2a00 cmp r2, #0 * @brief Prepares DMA Tx descriptors to transmit an ethernet frame * @param FrameLength : length of the frame to send * @retval error status */ uint32_t ETH_Prepare_Transmit_Descriptors(u16 FrameLength) { 8030584: b5f0 push {r4, r5, r6, r7, lr} uint32_t buf_count =0, size=0,i=0; __IO ETH_DMADESCTypeDef *DMATxNextDesc; /* Check if the descriptor is owned by the ETHERNET DMA (when set) or CPU (when reset) */ if((DMATxDescToSet->Status & ETH_DMATxDesc_OWN) != (u32)RESET) 8030586: db48 blt.n 803061a return ETH_ERROR; } DMATxNextDesc = DMATxDescToSet; if (FrameLength > ETH_TX_BUF_SIZE) 8030588: f240 52f4 movw r2, #1524 ; 0x5f4 803058c: 4290 cmp r0, r2 803058e: d917 bls.n 80305c0 { buf_count = FrameLength/ETH_TX_BUF_SIZE; 8030590: fbb0 f4f2 udiv r4, r0, r2 if (FrameLength%ETH_TX_BUF_SIZE) buf_count++; 8030594: fb02 0214 mls r2, r2, r4, r0 8030598: b292 uxth r2, r2 DMATxNextDesc = DMATxDescToSet; if (FrameLength > ETH_TX_BUF_SIZE) { buf_count = FrameLength/ETH_TX_BUF_SIZE; 803059a: b2a1 uxth r1, r4 if (FrameLength%ETH_TX_BUF_SIZE) buf_count++; 803059c: b10a cbz r2, 80305a2 803059e: 3101 adds r1, #1 80305a0: e001 b.n 80305a6 } else buf_count =1; if (buf_count ==1) 80305a2: 2901 cmp r1, #1 80305a4: d00c beq.n 80305c0 if (i== (buf_count-1)) { /* Setting the last segment bit */ DMATxNextDesc->Status |= ETH_DMATxDesc_LS; size = FrameLength - (buf_count-1)*ETH_TX_BUF_SIZE; 80305a6: 4d20 ldr r5, [pc, #128] ; (8030628 ) 80305a8: f200 50f4 addw r0, r0, #1524 ; 0x5f4 80305ac: fb05 0501 mla r5, r5, r1, r0 DMATxNextDesc->ControlBufferSize = (size & ETH_DMATxDesc_TBS1); 80305b0: 04ed lsls r5, r5, #19 80305b2: 0ced lsrs r5, r5, #19 80305b4: 461a mov r2, r3 80305b6: 2000 movs r0, #0 /* Setting the first segment bit */ DMATxDescToSet->Status |= ETH_DMATxDesc_FS; } /* Program size */ DMATxNextDesc->ControlBufferSize = (ETH_TX_BUF_SIZE & ETH_DMATxDesc_TBS1); 80305b8: f240 56f4 movw r6, #1524 ; 0x5f4 if (i== (buf_count-1)) 80305bc: 1e4f subs r7, r1, #1 80305be: e00c b.n 80305da else buf_count =1; if (buf_count ==1) { /*set LAST and FIRST segment */ DMATxDescToSet->Status |=ETH_DMATxDesc_FS|ETH_DMATxDesc_LS; 80305c0: 681a ldr r2, [r3, #0] /* Set frame size */ DMATxDescToSet->ControlBufferSize = (FrameLength& ETH_DMATxDesc_TBS1); 80305c2: 04c0 lsls r0, r0, #19 else buf_count =1; if (buf_count ==1) { /*set LAST and FIRST segment */ DMATxDescToSet->Status |=ETH_DMATxDesc_FS|ETH_DMATxDesc_LS; 80305c4: f042 5240 orr.w r2, r2, #805306368 ; 0x30000000 /* Set frame size */ DMATxDescToSet->ControlBufferSize = (FrameLength& ETH_DMATxDesc_TBS1); 80305c8: 0cc0 lsrs r0, r0, #19 else buf_count =1; if (buf_count ==1) { /*set LAST and FIRST segment */ DMATxDescToSet->Status |=ETH_DMATxDesc_FS|ETH_DMATxDesc_LS; 80305ca: 601a str r2, [r3, #0] /* Set frame size */ DMATxDescToSet->ControlBufferSize = (FrameLength& ETH_DMATxDesc_TBS1); 80305cc: 6058 str r0, [r3, #4] /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; 80305ce: 681a ldr r2, [r3, #0] 80305d0: f042 4200 orr.w r2, r2, #2147483648 ; 0x80000000 80305d4: 601a str r2, [r3, #0] DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); 80305d6: 68da ldr r2, [r3, #12] 80305d8: e014 b.n 8030604 } else { for (i=0; i< buf_count; i++) { if (i==0) 80305da: b918 cbnz r0, 80305e4 { /* Setting the first segment bit */ DMATxDescToSet->Status |= ETH_DMATxDesc_FS; 80305dc: 681c ldr r4, [r3, #0] 80305de: f044 5480 orr.w r4, r4, #268435456 ; 0x10000000 80305e2: 601c str r4, [r3, #0] } /* Program size */ DMATxNextDesc->ControlBufferSize = (ETH_TX_BUF_SIZE & ETH_DMATxDesc_TBS1); if (i== (buf_count-1)) 80305e4: 42b8 cmp r0, r7 /* Setting the first segment bit */ DMATxDescToSet->Status |= ETH_DMATxDesc_FS; } /* Program size */ DMATxNextDesc->ControlBufferSize = (ETH_TX_BUF_SIZE & ETH_DMATxDesc_TBS1); 80305e6: 6056 str r6, [r2, #4] if (i== (buf_count-1)) 80305e8: d104 bne.n 80305f4 { /* Setting the last segment bit */ DMATxNextDesc->Status |= ETH_DMATxDesc_LS; 80305ea: 6814 ldr r4, [r2, #0] 80305ec: f044 5400 orr.w r4, r4, #536870912 ; 0x20000000 80305f0: 6014 str r4, [r2, #0] size = FrameLength - (buf_count-1)*ETH_TX_BUF_SIZE; DMATxNextDesc->ControlBufferSize = (size & ETH_DMATxDesc_TBS1); 80305f2: 6055 str r5, [r2, #4] } /*give back descriptor to DMA */ DMATxNextDesc->Status |= ETH_DMATxDesc_OWN; 80305f4: 6814 ldr r4, [r2, #0] DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); } else { for (i=0; i< buf_count; i++) 80305f6: 3001 adds r0, #1 size = FrameLength - (buf_count-1)*ETH_TX_BUF_SIZE; DMATxNextDesc->ControlBufferSize = (size & ETH_DMATxDesc_TBS1); } /*give back descriptor to DMA */ DMATxNextDesc->Status |= ETH_DMATxDesc_OWN; 80305f8: f044 4400 orr.w r4, r4, #2147483648 ; 0x80000000 80305fc: 6014 str r4, [r2, #0] DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); } else { for (i=0; i< buf_count; i++) 80305fe: 4288 cmp r0, r1 } /*give back descriptor to DMA */ DMATxNextDesc->Status |= ETH_DMATxDesc_OWN; DMATxNextDesc = (ETH_DMADESCTypeDef *)(DMATxNextDesc->Buffer2NextDescAddr); 8030600: 68d2 ldr r2, [r2, #12] DMATxDescToSet->Status |= ETH_DMATxDesc_OWN; DMATxDescToSet= (ETH_DMADESCTypeDef *)(DMATxDescToSet->Buffer2NextDescAddr); } else { for (i=0; i< buf_count; i++) 8030602: d3ea bcc.n 80305da DMATxNextDesc->Status |= ETH_DMATxDesc_OWN; DMATxNextDesc = (ETH_DMADESCTypeDef *)(DMATxNextDesc->Buffer2NextDescAddr); /* Set Own bit of the Tx descriptor Status: gives the buffer back to ETHERNET DMA */ } DMATxDescToSet = DMATxNextDesc ; 8030604: 4b07 ldr r3, [pc, #28] ; (8030624 ) 8030606: 601a str r2, [r3, #0] } /* When Tx Buffer unavailable flag is set: clear it and resume transmission */ if ((ETH->DMASR & ETH_DMASR_TBUS) != (u32)RESET) 8030608: 4b08 ldr r3, [pc, #32] ; (803062c ) 803060a: 695a ldr r2, [r3, #20] 803060c: 0750 lsls r0, r2, #29 803060e: d506 bpl.n 803061e { /* Clear TBUS ETHERNET DMA flag */ ETH->DMASR = ETH_DMASR_TBUS; 8030610: 2204 movs r2, #4 8030612: 615a str r2, [r3, #20] /* Resume DMA transmission*/ ETH->DMATPDR = 0; 8030614: 2200 movs r2, #0 8030616: 605a str r2, [r3, #4] 8030618: e001 b.n 803061e /* Check if the descriptor is owned by the ETHERNET DMA (when set) or CPU (when reset) */ if((DMATxDescToSet->Status & ETH_DMATxDesc_OWN) != (u32)RESET) { /* Return ERROR: OWN bit set */ return ETH_ERROR; 803061a: 2000 movs r0, #0 803061c: bdf0 pop {r4, r5, r6, r7, pc} /* Resume DMA transmission*/ ETH->DMATPDR = 0; } /* Return SUCCESS */ return ETH_SUCCESS; 803061e: 2001 movs r0, #1 } 8030620: bdf0 pop {r4, r5, r6, r7, pc} 8030622: bf00 nop 8030624: 2001094c .word 0x2001094c 8030628: fffffa0c .word 0xfffffa0c 803062c: 40029000 .word 0x40029000 08030630 : { uint32_t i = 0; ETH_DMADESCTypeDef *DMARxDesc; /* Set the DMARxDescToGet pointer with the first one of the DMARxDescTab list */ DMARxDescToGet = DMARxDescTab; 8030630: 4b11 ldr r3, [pc, #68] ; (8030678 ) * @param RxBuff: Pointer on the first RxBuffer list * @param RxBuffCount: Number of the used Rx desc in the list * @retval None */ void ETH_DMARxDescChainInit(ETH_DMADESCTypeDef *DMARxDescTab, uint8_t *RxBuff, uint32_t RxBuffCount) { 8030632: b5f0 push {r4, r5, r6, r7, lr} uint32_t i = 0; ETH_DMADESCTypeDef *DMARxDesc; /* Set the DMARxDescToGet pointer with the first one of the DMARxDescTab list */ DMARxDescToGet = DMARxDescTab; 8030634: 6018 str r0, [r3, #0] /* Fill each DMARxDesc descriptor with the right values */ for(i=0; i < RxBuffCount; i++) 8030636: 2400 movs r4, #0 * @param DMARxDescTab: Pointer on the first Rx desc list * @param RxBuff: Pointer on the first RxBuffer list * @param RxBuffCount: Number of the used Rx desc in the list * @retval None */ void ETH_DMARxDescChainInit(ETH_DMADESCTypeDef *DMARxDescTab, uint8_t *RxBuff, uint32_t RxBuffCount) 8030638: f100 0320 add.w r3, r0, #32 for(i=0; i < RxBuffCount; i++) { /* Get the pointer on the ith member of the Rx Desc list */ DMARxDesc = DMARxDescTab+i; /* Set Own bit of the Rx descriptor Status */ DMARxDesc->Status = ETH_DMARxDesc_OWN; 803063c: f04f 4500 mov.w r5, #2147483648 ; 0x80000000 /* Set Buffer1 size and Second Address Chained bit */ DMARxDesc->ControlBufferSize = ETH_DMARxDesc_RCH | (uint32_t)ETH_RX_BUF_SIZE; 8030640: f244 56f4 movw r6, #17908 ; 0x45f4 /* Set Buffer1 address pointer */ DMARxDesc->Buffer1Addr = (uint32_t)(&RxBuff[i*ETH_RX_BUF_SIZE]); /* Initialize the next descriptor with the Next Descriptor Polling Enable */ if(i < (RxBuffCount-1)) 8030644: 1e57 subs r7, r2, #1 ETH_DMADESCTypeDef *DMARxDesc; /* Set the DMARxDescToGet pointer with the first one of the DMARxDescTab list */ DMARxDescToGet = DMARxDescTab; /* Fill each DMARxDesc descriptor with the right values */ for(i=0; i < RxBuffCount; i++) 8030646: e00f b.n 8030668 /* Initialize the next descriptor with the Next Descriptor Polling Enable */ if(i < (RxBuffCount-1)) { /* Set next descriptor address register with next descriptor base address */ DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab+i+1); 8030648: 42bc cmp r4, r7 803064a: bf2c ite cs 803064c: 4684 movcs ip, r0 803064e: 469c movcc ip, r3 DMARxDesc->Status = ETH_DMARxDesc_OWN; /* Set Buffer1 size and Second Address Chained bit */ DMARxDesc->ControlBufferSize = ETH_DMARxDesc_RCH | (uint32_t)ETH_RX_BUF_SIZE; /* Set Buffer1 address pointer */ DMARxDesc->Buffer1Addr = (uint32_t)(&RxBuff[i*ETH_RX_BUF_SIZE]); 8030650: f843 1c18 str.w r1, [r3, #-24] for(i=0; i < RxBuffCount; i++) { /* Get the pointer on the ith member of the Rx Desc list */ DMARxDesc = DMARxDescTab+i; /* Set Own bit of the Rx descriptor Status */ DMARxDesc->Status = ETH_DMARxDesc_OWN; 8030654: f843 5c20 str.w r5, [r3, #-32] /* Set Buffer1 size and Second Address Chained bit */ DMARxDesc->ControlBufferSize = ETH_DMARxDesc_RCH | (uint32_t)ETH_RX_BUF_SIZE; 8030658: f843 6c1c str.w r6, [r3, #-28] /* Initialize the next descriptor with the Next Descriptor Polling Enable */ if(i < (RxBuffCount-1)) { /* Set next descriptor address register with next descriptor base address */ DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab+i+1); 803065c: f843 cc14 str.w ip, [r3, #-20] ETH_DMADESCTypeDef *DMARxDesc; /* Set the DMARxDescToGet pointer with the first one of the DMARxDescTab list */ DMARxDescToGet = DMARxDescTab; /* Fill each DMARxDesc descriptor with the right values */ for(i=0; i < RxBuffCount; i++) 8030660: 3401 adds r4, #1 8030662: 3320 adds r3, #32 8030664: f201 51f4 addw r1, r1, #1524 ; 0x5f4 8030668: 4294 cmp r4, r2 803066a: d1ed bne.n 8030648 DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab); } } /* Set Receive Descriptor List Address Register */ ETH->DMARDLAR = (uint32_t) DMARxDescTab; 803066c: 4b03 ldr r3, [pc, #12] ; (803067c ) DMA_RX_FRAME_infos = &RX_Frame_Descriptor; 803066e: 4a04 ldr r2, [pc, #16] ; (8030680 ) DMARxDesc->Buffer2NextDescAddr = (uint32_t)(DMARxDescTab); } } /* Set Receive Descriptor List Address Register */ ETH->DMARDLAR = (uint32_t) DMARxDescTab; 8030670: 60d8 str r0, [r3, #12] DMA_RX_FRAME_infos = &RX_Frame_Descriptor; 8030672: 4b04 ldr r3, [pc, #16] ; (8030684 ) 8030674: 601a str r2, [r3, #0] 8030676: bdf0 pop {r4, r5, r6, r7, pc} 8030678: 20010948 .word 0x20010948 803067c: 40029000 .word 0x40029000 8030680: 2001093c .word 0x2001093c 8030684: 200127b8 .word 0x200127b8 08030688 : { uint32_t i = 0; ETH_DMADESCTypeDef *DMATxDesc; /* Set the DMATxDescToSet pointer with the first one of the DMATxDescTab list */ DMATxDescToSet = DMATxDescTab; 8030688: 4b0e ldr r3, [pc, #56] ; (80306c4 ) * @param TxBuff: Pointer on the first TxBuffer list * @param TxBuffCount: Number of the used Tx desc in the list * @retval None */ void ETH_DMATxDescChainInit(ETH_DMADESCTypeDef *DMATxDescTab, uint8_t* TxBuff, uint32_t TxBuffCount) { 803068a: b5f0 push {r4, r5, r6, r7, lr} uint32_t i = 0; ETH_DMADESCTypeDef *DMATxDesc; /* Set the DMATxDescToSet pointer with the first one of the DMATxDescTab list */ DMATxDescToSet = DMATxDescTab; 803068c: 6018 str r0, [r3, #0] /* Fill each DMATxDesc descriptor with the right values */ for(i=0; i < TxBuffCount; i++) 803068e: 2400 movs r4, #0 * @param DMATxDescTab: Pointer on the first Tx desc list * @param TxBuff: Pointer on the first TxBuffer list * @param TxBuffCount: Number of the used Tx desc in the list * @retval None */ void ETH_DMATxDescChainInit(ETH_DMADESCTypeDef *DMATxDescTab, uint8_t* TxBuff, uint32_t TxBuffCount) 8030690: f100 0320 add.w r3, r0, #32 for(i=0; i < TxBuffCount; i++) { /* Get the pointer on the ith member of the Tx Desc list */ DMATxDesc = DMATxDescTab + i; /* Set Second Address Chained bit */ DMATxDesc->Status = ETH_DMATxDesc_TCH; 8030694: f44f 1580 mov.w r5, #1048576 ; 0x100000 /* Set Buffer1 address pointer */ DMATxDesc->Buffer1Addr = (uint32_t)(&TxBuff[i*ETH_TX_BUF_SIZE]); /* Initialize the next descriptor with the Next Descriptor Polling Enable */ if(i < (TxBuffCount-1)) 8030698: 1e56 subs r6, r2, #1 ETH_DMADESCTypeDef *DMATxDesc; /* Set the DMATxDescToSet pointer with the first one of the DMATxDescTab list */ DMATxDescToSet = DMATxDescTab; /* Fill each DMATxDesc descriptor with the right values */ for(i=0; i < TxBuffCount; i++) 803069a: e00d b.n 80306b8 /* Initialize the next descriptor with the Next Descriptor Polling Enable */ if(i < (TxBuffCount-1)) { /* Set next descriptor address register with next descriptor base address */ DMATxDesc->Buffer2NextDescAddr = (uint32_t)(DMATxDescTab+i+1); 803069c: 42b4 cmp r4, r6 803069e: bf2c ite cs 80306a0: 4607 movcs r7, r0 80306a2: 461f movcc r7, r3 DMATxDesc = DMATxDescTab + i; /* Set Second Address Chained bit */ DMATxDesc->Status = ETH_DMATxDesc_TCH; /* Set Buffer1 address pointer */ DMATxDesc->Buffer1Addr = (uint32_t)(&TxBuff[i*ETH_TX_BUF_SIZE]); 80306a4: f843 1c18 str.w r1, [r3, #-24] for(i=0; i < TxBuffCount; i++) { /* Get the pointer on the ith member of the Tx Desc list */ DMATxDesc = DMATxDescTab + i; /* Set Second Address Chained bit */ DMATxDesc->Status = ETH_DMATxDesc_TCH; 80306a8: f843 5c20 str.w r5, [r3, #-32] /* Initialize the next descriptor with the Next Descriptor Polling Enable */ if(i < (TxBuffCount-1)) { /* Set next descriptor address register with next descriptor base address */ DMATxDesc->Buffer2NextDescAddr = (uint32_t)(DMATxDescTab+i+1); 80306ac: f843 7c14 str.w r7, [r3, #-20] ETH_DMADESCTypeDef *DMATxDesc; /* Set the DMATxDescToSet pointer with the first one of the DMATxDescTab list */ DMATxDescToSet = DMATxDescTab; /* Fill each DMATxDesc descriptor with the right values */ for(i=0; i < TxBuffCount; i++) 80306b0: 3401 adds r4, #1 80306b2: 3320 adds r3, #32 80306b4: f201 51f4 addw r1, r1, #1524 ; 0x5f4 80306b8: 4294 cmp r4, r2 80306ba: d1ef bne.n 803069c DMATxDesc->Buffer2NextDescAddr = (uint32_t) DMATxDescTab; } } /* Set Transmit Desciptor List Address Register */ ETH->DMATDLAR = (uint32_t) DMATxDescTab; 80306bc: 4b02 ldr r3, [pc, #8] ; (80306c8 ) 80306be: 6118 str r0, [r3, #16] 80306c0: bdf0 pop {r4, r5, r6, r7, pc} 80306c2: bf00 nop 80306c4: 2001094c .word 0x2001094c 80306c8: 40029000 .word 0x40029000 080306cc : { /* Check the parameters */ assert_param(IS_ETH_DMA_TXDESC_CHECKSUM(DMATxDesc_Checksum)); /* Set the selected DMA Tx desc checksum insertion control */ DMATxDesc->Status |= DMATxDesc_Checksum; 80306cc: 6803 ldr r3, [r0, #0] 80306ce: 4319 orrs r1, r3 80306d0: 6001 str r1, [r0, #0] 80306d2: 4770 bx lr 080306d4 : * @param NewState: new state of the specified DMA Rx Desc interrupt. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_DMARxDescReceiveITConfig(ETH_DMADESCTypeDef *DMARxDesc, FunctionalState NewState) { 80306d4: 6843 ldr r3, [r0, #4] /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 80306d6: b111 cbz r1, 80306de { /* Enable the DMA Rx Desc receive interrupt */ DMARxDesc->ControlBufferSize &=(~(uint32_t)ETH_DMARxDesc_DIC); 80306d8: f023 4300 bic.w r3, r3, #2147483648 ; 0x80000000 80306dc: e001 b.n 80306e2 } else { /* Disable the DMA Rx Desc receive interrupt */ DMARxDesc->ControlBufferSize |= ETH_DMARxDesc_DIC; 80306de: f043 4300 orr.w r3, r3, #2147483648 ; 0x80000000 80306e2: 6043 str r3, [r0, #4] 80306e4: 4770 bx lr 80306e6: 0000 movs r0, r0 080306e8 : */ void ETH_SoftwareReset(void) { /* Set the SWR bit: resets all MAC subsystem internal registers and logic */ /* After reset all the registers holds their respective reset values */ ETH->DMABMR |= ETH_DMABMR_SR; 80306e8: 4b02 ldr r3, [pc, #8] ; (80306f4 ) 80306ea: 681a ldr r2, [r3, #0] 80306ec: f042 0201 orr.w r2, r2, #1 80306f0: 601a str r2, [r3, #0] 80306f2: 4770 bx lr 80306f4: 40029000 .word 0x40029000 080306f8 : * @retval The new state of DMA Bus Mode register SR bit (SET or RESET). */ FlagStatus ETH_GetSoftwareResetStatus(void) { FlagStatus bitstatus = RESET; if((ETH->DMABMR & ETH_DMABMR_SR) != (uint32_t)RESET) 80306f8: 4b02 ldr r3, [pc, #8] ; (8030704 ) 80306fa: 6818 ldr r0, [r3, #0] else { bitstatus = RESET; } return bitstatus; } 80306fc: f000 0001 and.w r0, r0, #1 8030700: 4770 bx lr 8030702: bf00 nop 8030704: 40029000 .word 0x40029000 08030708 : FlagStatus ETH_GetDMAFlagStatus(uint32_t ETH_DMA_FLAG) { FlagStatus bitstatus = RESET; /* Check the parameters */ assert_param(IS_ETH_DMA_GET_IT(ETH_DMA_FLAG)); if ((ETH->DMASR & ETH_DMA_FLAG) != (uint32_t)RESET) 8030708: 4b03 ldr r3, [pc, #12] ; (8030718 ) 803070a: 695b ldr r3, [r3, #20] 803070c: 4218 tst r0, r3 else { bitstatus = RESET; } return bitstatus; } 803070e: bf0c ite eq 8030710: 2000 moveq r0, #0 8030712: 2001 movne r0, #1 8030714: 4770 bx lr 8030716: bf00 nop 8030718: 40029000 .word 0x40029000 0803071c : * @param NewState: new state of the specified ETHERNET DMA interrupts. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_DMAITConfig(uint32_t ETH_DMA_IT, FunctionalState NewState) { 803071c: 4b04 ldr r3, [pc, #16] ; (8030730 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the selected ETHERNET DMA interrupts */ ETH->DMAIER |= ETH_DMA_IT; 803071e: 69da ldr r2, [r3, #28] { /* Check the parameters */ assert_param(IS_ETH_DMA_IT(ETH_DMA_IT)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8030720: b109 cbz r1, 8030726 { /* Enable the selected ETHERNET DMA interrupts */ ETH->DMAIER |= ETH_DMA_IT; 8030722: 4310 orrs r0, r2 8030724: e001 b.n 803072a } else { /* Disable the selected ETHERNET DMA interrupts */ ETH->DMAIER &=(~(uint32_t)ETH_DMA_IT); 8030726: ea22 0000 bic.w r0, r2, r0 803072a: 61d8 str r0, [r3, #28] 803072c: 4770 bx lr 803072e: bf00 nop 8030730: 40029000 .word 0x40029000 08030734 : { /* Check the parameters */ assert_param(IS_ETH_DMA_IT(ETH_DMA_IT)); /* Clear the selected ETHERNET DMA IT */ ETH->DMASR = (uint32_t) ETH_DMA_IT; 8030734: 4b01 ldr r3, [pc, #4] ; (803073c ) 8030736: 6158 str r0, [r3, #20] 8030738: 4770 bx lr 803073a: bf00 nop 803073c: 40029000 .word 0x40029000 08030740 : * @retval None */ void ETH_FlushTransmitFIFO(void) { /* Set the Flush Transmit FIFO bit */ ETH->DMAOMR |= ETH_DMAOMR_FTF; 8030740: 4b02 ldr r3, [pc, #8] ; (803074c ) 8030742: 699a ldr r2, [r3, #24] 8030744: f442 1280 orr.w r2, r2, #1048576 ; 0x100000 8030748: 619a str r2, [r3, #24] 803074a: 4770 bx lr 803074c: 40029000 .word 0x40029000 08030750 : * @param NewState: new state of the DMA transmission. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_DMATransmissionCmd(FunctionalState NewState) { 8030750: 4b04 ldr r3, [pc, #16] ; (8030764 ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the DMA transmission */ ETH->DMAOMR |= ETH_DMAOMR_ST; 8030752: 699a ldr r2, [r3, #24] void ETH_DMATransmissionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 8030754: b110 cbz r0, 803075c { /* Enable the DMA transmission */ ETH->DMAOMR |= ETH_DMAOMR_ST; 8030756: f442 5200 orr.w r2, r2, #8192 ; 0x2000 803075a: e001 b.n 8030760 } else { /* Disable the DMA transmission */ ETH->DMAOMR &= ~ETH_DMAOMR_ST; 803075c: f422 5200 bic.w r2, r2, #8192 ; 0x2000 8030760: 619a str r2, [r3, #24] 8030762: 4770 bx lr 8030764: 40029000 .word 0x40029000 08030768 : * @param NewState: new state of the DMA reception. * This parameter can be: ENABLE or DISABLE. * @retval None */ void ETH_DMAReceptionCmd(FunctionalState NewState) { 8030768: 4b04 ldr r3, [pc, #16] ; (803077c ) assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { /* Enable the DMA reception */ ETH->DMAOMR |= ETH_DMAOMR_SR; 803076a: 699a ldr r2, [r3, #24] void ETH_DMAReceptionCmd(FunctionalState NewState) { /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) 803076c: b110 cbz r0, 8030774 { /* Enable the DMA reception */ ETH->DMAOMR |= ETH_DMAOMR_SR; 803076e: f042 0202 orr.w r2, r2, #2 8030772: e001 b.n 8030778 } else { /* Disable the DMA reception */ ETH->DMAOMR &= ~ETH_DMAOMR_SR; 8030774: f022 0202 bic.w r2, r2, #2 8030778: 619a str r2, [r3, #24] 803077a: 4770 bx lr 803077c: 40029000 .word 0x40029000 08030780 : * @brief Enables ENET MAC and DMA reception/transmission * @param None * @retval None */ void ETH_Start(void) { 8030780: b508 push {r3, lr} /* Enable transmit state machine of the MAC for transmission on the MII */ ETH_MACTransmissionCmd(ENABLE); 8030782: 2001 movs r0, #1 8030784: f7ff fe7a bl 803047c /* Flush Transmit FIFO */ ETH_FlushTransmitFIFO(); 8030788: f7ff ffda bl 8030740 /* Enable receive state machine of the MAC for reception from the MII */ ETH_MACReceptionCmd(ENABLE); 803078c: 2001 movs r0, #1 803078e: f7ff fe81 bl 8030494 /* Start DMA transmission */ ETH_DMATransmissionCmd(ENABLE); 8030792: 2001 movs r0, #1 8030794: f7ff ffdc bl 8030750 /* Start DMA reception */ ETH_DMAReceptionCmd(ENABLE); 8030798: 2001 movs r0, #1 } 803079a: e8bd 4008 ldmia.w sp!, {r3, lr} ETH_MACReceptionCmd(ENABLE); /* Start DMA transmission */ ETH_DMATransmissionCmd(ENABLE); /* Start DMA reception */ ETH_DMAReceptionCmd(ENABLE); 803079e: f7ff bfe3 b.w 8030768 80307a2: 0000 movs r0, r0 080307a4 : * @arg More PHY register could be read depending on the used PHY * @retval ETH_ERROR: in case of timeout * MAC MIIDR register value: Data read from the selected PHY register (correct read ) */ uint16_t ETH_ReadPHYRegister(uint16_t PHYAddress, uint16_t PHYReg) { 80307a4: b082 sub sp, #8 uint32_t tmpreg = 0; __IO uint32_t timeout = 0; 80307a6: 2300 movs r3, #0 80307a8: 9301 str r3, [sp, #4] /* Check the parameters */ assert_param(IS_ETH_PHY_ADDRESS(PHYAddress)); assert_param(IS_ETH_PHY_REG(PHYReg)); /* Get the ETHERNET MACMIIAR value */ tmpreg = ETH->MACMIIAR; 80307aa: 4b11 ldr r3, [pc, #68] ; (80307f0 ) 80307ac: 691a ldr r2, [r3, #16] /* Keep only the CSR Clock Range CR[2:0] bits value */ tmpreg &= ~MACMIIAR_CR_MASK; /* Prepare the MII address register value */ tmpreg |=(((uint32_t)PHYAddress<<11) & ETH_MACMIIAR_PA); /* Set the PHY device address */ 80307ae: 06c0 lsls r0, r0, #27 assert_param(IS_ETH_PHY_REG(PHYReg)); /* Get the ETHERNET MACMIIAR value */ tmpreg = ETH->MACMIIAR; /* Keep only the CSR Clock Range CR[2:0] bits value */ tmpreg &= ~MACMIIAR_CR_MASK; 80307b0: f002 021c and.w r2, r2, #28 /* Prepare the MII address register value */ tmpreg |=(((uint32_t)PHYAddress<<11) & ETH_MACMIIAR_PA); /* Set the PHY device address */ tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */ 80307b4: 0189 lsls r1, r1, #6 /* Get the ETHERNET MACMIIAR value */ tmpreg = ETH->MACMIIAR; /* Keep only the CSR Clock Range CR[2:0] bits value */ tmpreg &= ~MACMIIAR_CR_MASK; /* Prepare the MII address register value */ tmpreg |=(((uint32_t)PHYAddress<<11) & ETH_MACMIIAR_PA); /* Set the PHY device address */ 80307b6: ea42 4210 orr.w r2, r2, r0, lsr #16 tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */ 80307ba: f401 61f8 and.w r1, r1, #1984 ; 0x7c0 tmpreg &= ~ETH_MACMIIAR_MW; /* Set the read mode */ 80307be: 430a orrs r2, r1 tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ 80307c0: f042 0201 orr.w r2, r2, #1 /* Write the result value into the MII Address register */ ETH->MACMIIAR = tmpreg; 80307c4: 611a str r2, [r3, #16] /* Check for the Busy flag */ do { timeout++; tmpreg = ETH->MACMIIAR; } while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_READ_TO)); 80307c6: 4a0b ldr r2, [pc, #44] ; (80307f4 ) /* Write the result value into the MII Address register */ ETH->MACMIIAR = tmpreg; /* Check for the Busy flag */ do { timeout++; 80307c8: 9901 ldr r1, [sp, #4] 80307ca: 3101 adds r1, #1 80307cc: 9101 str r1, [sp, #4] tmpreg = ETH->MACMIIAR; 80307ce: 6919 ldr r1, [r3, #16] } while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_READ_TO)); 80307d0: 07c9 lsls r1, r1, #31 80307d2: d502 bpl.n 80307da 80307d4: 9901 ldr r1, [sp, #4] 80307d6: 4291 cmp r1, r2 80307d8: d9f6 bls.n 80307c8 /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) 80307da: 4b07 ldr r3, [pc, #28] ; (80307f8 ) 80307dc: 9a01 ldr r2, [sp, #4] 80307de: 429a cmp r2, r3 { return (uint16_t)ETH_ERROR; } /* Return data register value */ return (uint16_t)(ETH->MACMIIDR); 80307e0: bf1d ittte ne 80307e2: 4b03 ldrne r3, [pc, #12] ; (80307f0 ) 80307e4: 6958 ldrne r0, [r3, #20] 80307e6: b280 uxthne r0, r0 tmpreg = ETH->MACMIIAR; } while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_READ_TO)); /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) { return (uint16_t)ETH_ERROR; 80307e8: 2000 moveq r0, #0 } /* Return data register value */ return (uint16_t)(ETH->MACMIIDR); } 80307ea: b002 add sp, #8 80307ec: 4770 bx lr 80307ee: bf00 nop 80307f0: 40028000 .word 0x40028000 80307f4: 0004fffe .word 0x0004fffe 80307f8: 0004ffff .word 0x0004ffff 080307fc : * @param PHYValue: the value to write * @retval ETH_ERROR: in case of timeout * ETH_SUCCESS: for correct write */ uint32_t ETH_WritePHYRegister(uint16_t PHYAddress, uint16_t PHYReg, uint16_t PHYValue) { 80307fc: b513 push {r0, r1, r4, lr} uint32_t tmpreg = 0; __IO uint32_t timeout = 0; 80307fe: 2300 movs r3, #0 8030800: 9301 str r3, [sp, #4] /* Check the parameters */ assert_param(IS_ETH_PHY_ADDRESS(PHYAddress)); assert_param(IS_ETH_PHY_REG(PHYReg)); /* Get the ETHERNET MACMIIAR value */ tmpreg = ETH->MACMIIAR; 8030802: 4b0f ldr r3, [pc, #60] ; (8030840 ) 8030804: 691c ldr r4, [r3, #16] tmpreg |=(((uint32_t)PHYAddress<<11) & ETH_MACMIIAR_PA); /* Set the PHY device address */ tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */ tmpreg |= ETH_MACMIIAR_MW; /* Set the write mode */ tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ /* Give the value to the MII data register */ ETH->MACMIIDR = PHYValue; 8030806: 615a str r2, [r3, #20] assert_param(IS_ETH_PHY_REG(PHYReg)); /* Get the ETHERNET MACMIIAR value */ tmpreg = ETH->MACMIIAR; /* Keep only the CSR Clock Range CR[2:0] bits value */ tmpreg &= ~MACMIIAR_CR_MASK; 8030808: f004 041c and.w r4, r4, #28 /* Prepare the MII register address value */ tmpreg |=(((uint32_t)PHYAddress<<11) & ETH_MACMIIAR_PA); /* Set the PHY device address */ 803080c: f044 0403 orr.w r4, r4, #3 8030810: 06c0 lsls r0, r0, #27 tmpreg |=(((uint32_t)PHYReg<<6) & ETH_MACMIIAR_MR); /* Set the PHY register address */ 8030812: 0189 lsls r1, r1, #6 8030814: ea44 4410 orr.w r4, r4, r0, lsr #16 8030818: f401 61f8 and.w r1, r1, #1984 ; 0x7c0 tmpreg |= ETH_MACMIIAR_MW; /* Set the write mode */ tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ 803081c: 430c orrs r4, r1 /* Check for the Busy flag */ do { timeout++; tmpreg = ETH->MACMIIAR; } while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_WRITE_TO)); 803081e: 4a09 ldr r2, [pc, #36] ; (8030844 ) tmpreg |= ETH_MACMIIAR_MW; /* Set the write mode */ tmpreg |= ETH_MACMIIAR_MB; /* Set the MII Busy bit */ /* Give the value to the MII data register */ ETH->MACMIIDR = PHYValue; /* Write the result value into the MII Address register */ ETH->MACMIIAR = tmpreg; 8030820: 611c str r4, [r3, #16] /* Check for the Busy flag */ do { timeout++; 8030822: 9901 ldr r1, [sp, #4] 8030824: 3101 adds r1, #1 8030826: 9101 str r1, [sp, #4] tmpreg = ETH->MACMIIAR; 8030828: 6919 ldr r1, [r3, #16] } while ((tmpreg & ETH_MACMIIAR_MB) && (timeout < (uint32_t)PHY_WRITE_TO)); 803082a: 07c8 lsls r0, r1, #31 803082c: d502 bpl.n 8030834 803082e: 9901 ldr r1, [sp, #4] 8030830: 4291 cmp r1, r2 8030832: d9f6 bls.n 8030822 /* Return ERROR in case of timeout */ if(timeout == PHY_WRITE_TO) 8030834: 9801 ldr r0, [sp, #4] return ETH_ERROR; } /* Return SUCCESS */ return ETH_SUCCESS; } 8030836: 4b04 ldr r3, [pc, #16] ; (8030848 ) 8030838: 1ac0 subs r0, r0, r3 803083a: bf18 it ne 803083c: 2001 movne r0, #1 803083e: bd1c pop {r2, r3, r4, pc} 8030840: 40028000 .word 0x40028000 8030844: 0004fffe .word 0x0004fffe 8030848: 0004ffff .word 0x0004ffff 0803084c : * @param PHYAddress: external PHY address * @retval ETH_ERROR: Ethernet initialization failed * ETH_SUCCESS: Ethernet successfully initialized */ uint32_t ETH_Init(ETH_InitTypeDef* ETH_InitStruct, uint16_t PHYAddress) { 803084c: b5f0 push {r4, r5, r6, r7, lr} 803084e: b087 sub sp, #28 uint32_t RegValue = 0, tmpreg = 0; __IO uint32_t i = 0; 8030850: 2300 movs r3, #0 assert_param(IS_ETH_DMA_DESC_SKIP_LENGTH(ETH_InitStruct->ETH_DescriptorSkipLength)); assert_param(IS_ETH_DMA_ARBITRATION_ROUNDROBIN_RXTX(ETH_InitStruct->ETH_DMAArbitration)); /*-------------------------------- MAC Config ------------------------------*/ /*---------------------- ETHERNET MACMIIAR Configuration -------------------*/ /* Get the ETHERNET MACMIIAR value */ tmpreg = ETH->MACMIIAR; 8030852: 4f90 ldr r7, [pc, #576] ; (8030a94 ) * ETH_SUCCESS: Ethernet successfully initialized */ uint32_t ETH_Init(ETH_InitTypeDef* ETH_InitStruct, uint16_t PHYAddress) { uint32_t RegValue = 0, tmpreg = 0; __IO uint32_t i = 0; 8030854: 9300 str r3, [sp, #0] * @param PHYAddress: external PHY address * @retval ETH_ERROR: Ethernet initialization failed * ETH_SUCCESS: Ethernet successfully initialized */ uint32_t ETH_Init(ETH_InitTypeDef* ETH_InitStruct, uint16_t PHYAddress) { 8030856: 4604 mov r4, r0 uint32_t RegValue = 0, tmpreg = 0; __IO uint32_t i = 0; RCC_ClocksTypeDef rcc_clocks; uint32_t hclk = 60000000; __IO uint32_t timeout = 0; 8030858: 9301 str r3, [sp, #4] /* Get the ETHERNET MACMIIAR value */ tmpreg = ETH->MACMIIAR; /* Clear CSR Clock Range CR[2:0] bits */ tmpreg &= MACMIIAR_CR_MASK; /* Get hclk frequency value */ RCC_GetClocksFreq(&rcc_clocks); 803085a: a802 add r0, sp, #8 * @param PHYAddress: external PHY address * @retval ETH_ERROR: Ethernet initialization failed * ETH_SUCCESS: Ethernet successfully initialized */ uint32_t ETH_Init(ETH_InitTypeDef* ETH_InitStruct, uint16_t PHYAddress) { 803085c: 460e mov r6, r1 assert_param(IS_ETH_DMA_DESC_SKIP_LENGTH(ETH_InitStruct->ETH_DescriptorSkipLength)); assert_param(IS_ETH_DMA_ARBITRATION_ROUNDROBIN_RXTX(ETH_InitStruct->ETH_DMAArbitration)); /*-------------------------------- MAC Config ------------------------------*/ /*---------------------- ETHERNET MACMIIAR Configuration -------------------*/ /* Get the ETHERNET MACMIIAR value */ tmpreg = ETH->MACMIIAR; 803085e: 693d ldr r5, [r7, #16] /* Clear CSR Clock Range CR[2:0] bits */ tmpreg &= MACMIIAR_CR_MASK; /* Get hclk frequency value */ RCC_GetClocksFreq(&rcc_clocks); 8030860: f7f2 f824 bl 80228ac hclk = rcc_clocks.HCLK_Frequency; 8030864: 9b03 ldr r3, [sp, #12] /* Set CR bits depending on hclk value */ if((hclk >= 20000000)&&(hclk < 35000000)) 8030866: 4a8c ldr r2, [pc, #560] ; (8030a98 ) 8030868: 498c ldr r1, [pc, #560] ; (8030a9c ) 803086a: 189a adds r2, r3, r2 803086c: 428a cmp r2, r1 /*-------------------------------- MAC Config ------------------------------*/ /*---------------------- ETHERNET MACMIIAR Configuration -------------------*/ /* Get the ETHERNET MACMIIAR value */ tmpreg = ETH->MACMIIAR; /* Clear CSR Clock Range CR[2:0] bits */ tmpreg &= MACMIIAR_CR_MASK; 803086e: f025 051c bic.w r5, r5, #28 /* Get hclk frequency value */ RCC_GetClocksFreq(&rcc_clocks); hclk = rcc_clocks.HCLK_Frequency; /* Set CR bits depending on hclk value */ if((hclk >= 20000000)&&(hclk < 35000000)) 8030872: d802 bhi.n 803087a { /* CSR Clock Range between 20-35 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div16; 8030874: f045 0508 orr.w r5, r5, #8 8030878: e015 b.n 80308a6 } else if((hclk >= 35000000)&&(hclk < 60000000)) 803087a: 4a89 ldr r2, [pc, #548] ; (8030aa0 ) 803087c: 4989 ldr r1, [pc, #548] ; (8030aa4 ) 803087e: 189a adds r2, r3, r2 8030880: 428a cmp r2, r1 8030882: d802 bhi.n 803088a { /* CSR Clock Range between 35-60 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div26; 8030884: f045 050c orr.w r5, r5, #12 8030888: e00d b.n 80308a6 } else if((hclk >= 60000000)&&(hclk < 100000000)) 803088a: 4a87 ldr r2, [pc, #540] ; (8030aa8 ) 803088c: 4987 ldr r1, [pc, #540] ; (8030aac ) 803088e: 189a adds r2, r3, r2 8030890: 428a cmp r2, r1 8030892: d908 bls.n 80308a6 { /* CSR Clock Range between 60-100 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div42; } else if((hclk >= 100000000)&&(hclk < 150000000)) 8030894: 4a86 ldr r2, [pc, #536] ; (8030ab0 ) 8030896: 189a adds r2, r3, r2 8030898: 4b86 ldr r3, [pc, #536] ; (8030ab4 ) 803089a: 429a cmp r2, r3 { /* CSR Clock Range between 100-150 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div62; 803089c: bf94 ite ls 803089e: f045 0504 orrls.w r5, r5, #4 } else /* ((hclk >= 150000000)&&(hclk <= 168000000)) */ { /* CSR Clock Range between 150-168 MHz */ tmpreg |= (uint32_t)ETH_MACMIIAR_CR_Div102; 80308a2: f045 0510 orrhi.w r5, r5, #16 } /* Write to ETHERNET MAC MIIAR: Configure the ETHERNET CSR Clock Range */ ETH->MACMIIAR = (uint32_t)tmpreg; 80308a6: 613d str r5, [r7, #16] /*-------------------- PHY initialization and configuration ----------------*/ /* Put the PHY in reset mode */ if(!(ETH_WritePHYRegister(PHYAddress, PHY_BCR, PHY_Reset))) 80308a8: 4630 mov r0, r6 80308aa: 2100 movs r1, #0 80308ac: f44f 4200 mov.w r2, #32768 ; 0x8000 80308b0: f7ff ffa4 bl 80307fc 80308b4: b908 cbnz r0, 80308ba { /* Return ERROR in case of write timeout */ return ETH_ERROR; 80308b6: 2000 movs r0, #0 80308b8: e0e9 b.n 8030a8e } /* Delay to assure PHY reset */ _eth_delay_(PHY_RESET_DELAY); 80308ba: 487f ldr r0, [pc, #508] ; (8030ab8 ) 80308bc: f7ff fd6e bl 803039c if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) 80308c0: 6821 ldr r1, [r4, #0] 80308c2: 2900 cmp r1, #0 80308c4: d050 beq.n 8030968 { /* We wait for linked status... */ do { timeout++; } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 80308c6: 4d7d ldr r5, [pc, #500] ; (8030abc ) if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { /* We wait for linked status... */ do { timeout++; 80308c8: 9b01 ldr r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 80308ca: 4630 mov r0, r6 if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { /* We wait for linked status... */ do { timeout++; 80308cc: 3301 adds r3, #1 } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 80308ce: 2101 movs r1, #1 if(ETH_InitStruct->ETH_AutoNegotiation != ETH_AutoNegotiation_Disable) { /* We wait for linked status... */ do { timeout++; 80308d0: 9301 str r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_Linked_Status) && (timeout < PHY_READ_TO)); 80308d2: f7ff ff67 bl 80307a4 80308d6: f000 0004 and.w r0, r0, #4 80308da: b280 uxth r0, r0 80308dc: b910 cbnz r0, 80308e4 80308de: 9b01 ldr r3, [sp, #4] 80308e0: 42ab cmp r3, r5 80308e2: d9f1 bls.n 80308c8 /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) 80308e4: 9a01 ldr r2, [sp, #4] 80308e6: 4b76 ldr r3, [pc, #472] ; (8030ac0 ) 80308e8: 429a cmp r2, r3 80308ea: d0e4 beq.n 80308b6 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 80308ec: 2100 movs r1, #0 /* Enable Auto-Negotiation */ if(!(ETH_WritePHYRegister(PHYAddress, PHY_BCR, PHY_AutoNegotiation))) 80308ee: 4630 mov r0, r6 80308f0: f44f 5280 mov.w r2, #4096 ; 0x1000 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 80308f4: 9101 str r1, [sp, #4] /* Enable Auto-Negotiation */ if(!(ETH_WritePHYRegister(PHYAddress, PHY_BCR, PHY_AutoNegotiation))) 80308f6: f7ff ff81 bl 80307fc 80308fa: 2800 cmp r0, #0 80308fc: d0db beq.n 80308b6 /* Wait until the auto-negotiation will be completed */ do { timeout++; } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 80308fe: 4d6f ldr r5, [pc, #444] ; (8030abc ) } /* Wait until the auto-negotiation will be completed */ do { timeout++; 8030900: 9b01 ldr r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 8030902: 4630 mov r0, r6 } /* Wait until the auto-negotiation will be completed */ do { timeout++; 8030904: 3301 adds r3, #1 } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 8030906: 2101 movs r1, #1 } /* Wait until the auto-negotiation will be completed */ do { timeout++; 8030908: 9301 str r3, [sp, #4] } while (!(ETH_ReadPHYRegister(PHYAddress, PHY_BSR) & PHY_AutoNego_Complete) && (timeout < (uint32_t)PHY_READ_TO)); 803090a: f7ff ff4b bl 80307a4 803090e: f000 0020 and.w r0, r0, #32 8030912: b280 uxth r0, r0 8030914: b910 cbnz r0, 803091c 8030916: 9b01 ldr r3, [sp, #4] 8030918: 42ab cmp r3, r5 803091a: d9f1 bls.n 8030900 /* Return ERROR in case of timeout */ if(timeout == PHY_READ_TO) 803091c: 9a01 ldr r2, [sp, #4] 803091e: 4b68 ldr r3, [pc, #416] ; (8030ac0 ) 8030920: 429a cmp r2, r3 8030922: d0c8 beq.n 80308b6 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 8030924: 2500 movs r5, #0 /* Read the result of the auto-negotiation */ RegValue = ETH_ReadPHYRegister(PHYAddress, PHY_SR); 8030926: 211f movs r1, #31 8030928: 4630 mov r0, r6 { return ETH_ERROR; } /* Reset Timeout counter */ timeout = 0; 803092a: 9501 str r5, [sp, #4] /* Read the result of the auto-negotiation */ RegValue = ETH_ReadPHYRegister(PHYAddress, PHY_SR); 803092c: f7ff ff3a bl 80307a4 switch (RegValue & PHY_DUPLEX_SPEED_STATUS_MASK) 8030930: f000 001c and.w r0, r0, #28 8030934: 2808 cmp r0, #8 8030936: d00b beq.n 8030950 8030938: d802 bhi.n 8030940 803093a: 2804 cmp r0, #4 803093c: d123 bne.n 8030986 803093e: e010 b.n 8030962 8030940: 280e cmp r0, #14 8030942: d00a beq.n 803095a 8030944: 2812 cmp r0, #18 8030946: d11e bne.n 8030986 { case PHY_100BTX_FULL: ETH_InitStruct->ETH_Mode = ETH_Mode_FullDuplex; 8030948: f44f 6300 mov.w r3, #2048 ; 0x800 803094c: 6223 str r3, [r4, #32] 803094e: e000 b.n 8030952 ETH_InitStruct->ETH_Speed = ETH_Speed_100M; break; case PHY_100BTX_HALF: ETH_InitStruct->ETH_Mode = ETH_Mode_HalfDuplex; 8030950: 6225 str r5, [r4, #32] ETH_InitStruct->ETH_Speed = ETH_Speed_100M; 8030952: f44f 4380 mov.w r3, #16384 ; 0x4000 8030956: 6163 str r3, [r4, #20] break; 8030958: e015 b.n 8030986 case PHY_10M_FULL: ETH_InitStruct->ETH_Mode = ETH_Mode_FullDuplex; 803095a: f44f 6300 mov.w r3, #2048 ; 0x800 803095e: 6223 str r3, [r4, #32] 8030960: e000 b.n 8030964 ETH_InitStruct->ETH_Speed = ETH_Speed_10M; break; case PHY_10M_HALF: ETH_InitStruct->ETH_Mode = ETH_Mode_HalfDuplex; 8030962: 6225 str r5, [r4, #32] ETH_InitStruct->ETH_Speed = ETH_Speed_10M; 8030964: 6165 str r5, [r4, #20] break; 8030966: e00e b.n 8030986 break; } } else { if(!ETH_WritePHYRegister(PHYAddress, PHY_BCR, ((uint16_t)(ETH_InitStruct->ETH_Mode >> 3) | 8030968: 6a22 ldr r2, [r4, #32] (uint16_t)(ETH_InitStruct->ETH_Speed >> 1)))) 803096a: 6963 ldr r3, [r4, #20] break; } } else { if(!ETH_WritePHYRegister(PHYAddress, PHY_BCR, ((uint16_t)(ETH_InitStruct->ETH_Mode >> 3) | 803096c: 08d2 lsrs r2, r2, #3 803096e: ea42 0253 orr.w r2, r2, r3, lsr #1 8030972: 4630 mov r0, r6 8030974: b292 uxth r2, r2 8030976: f7ff ff41 bl 80307fc 803097a: 2800 cmp r0, #0 803097c: d09b beq.n 80308b6 { /* Return ERROR in case of write timeout */ return ETH_ERROR; } /* Delay to assure PHY configuration */ _eth_delay_(PHY_CONFIG_DELAY); 803097e: f06f 407f mvn.w r0, #4278190080 ; 0xff000000 8030982: f7ff fd0b bl 803039c } /*------------------------ ETHERNET MACCR Configuration --------------------*/ /* Get the ETHERNET MACCR value */ tmpreg = ETH->MACCR; 8030986: 4b43 ldr r3, [pc, #268] ; (8030a94 ) /* Clear WD, PCE, PS, TE and RE bits */ tmpreg &= MACCR_CLEAR_MASK; 8030988: 4a4e ldr r2, [pc, #312] ; (8030ac4 ) _eth_delay_(PHY_CONFIG_DELAY); } /*------------------------ ETHERNET MACCR Configuration --------------------*/ /* Get the ETHERNET MACCR value */ tmpreg = ETH->MACCR; 803098a: 6819 ldr r1, [r3, #0] /* Set the IPCO bit according to ETH_ChecksumOffload value */ /* Set the DR bit according to ETH_RetryTransmission value */ /* Set the ACS bit according to ETH_AutomaticPadCRCStrip value */ /* Set the BL bit according to ETH_BackOffLimit value */ /* Set the DC bit according to ETH_DeferralCheck value */ tmpreg |= (uint32_t)(ETH_InitStruct->ETH_Watchdog | 803098c: 68a0 ldr r0, [r4, #8] } /*------------------------ ETHERNET MACCR Configuration --------------------*/ /* Get the ETHERNET MACCR value */ tmpreg = ETH->MACCR; /* Clear WD, PCE, PS, TE and RE bits */ tmpreg &= MACCR_CLEAR_MASK; 803098e: 400a ands r2, r1 /* Set the IPCO bit according to ETH_ChecksumOffload value */ /* Set the DR bit according to ETH_RetryTransmission value */ /* Set the ACS bit according to ETH_AutomaticPadCRCStrip value */ /* Set the BL bit according to ETH_BackOffLimit value */ /* Set the DC bit according to ETH_DeferralCheck value */ tmpreg |= (uint32_t)(ETH_InitStruct->ETH_Watchdog | 8030990: 6861 ldr r1, [r4, #4] 8030992: 4308 orrs r0, r1 ETH_InitStruct->ETH_Jabber | 8030994: 68e1 ldr r1, [r4, #12] 8030996: 4308 orrs r0, r1 ETH_InitStruct->ETH_InterFrameGap | 8030998: 6921 ldr r1, [r4, #16] 803099a: 4308 orrs r0, r1 ETH_InitStruct->ETH_CarrierSense | 803099c: 6961 ldr r1, [r4, #20] 803099e: 4308 orrs r0, r1 ETH_InitStruct->ETH_Speed | 80309a0: 69a1 ldr r1, [r4, #24] 80309a2: 4308 orrs r0, r1 ETH_InitStruct->ETH_ReceiveOwn | 80309a4: 69e1 ldr r1, [r4, #28] 80309a6: 4308 orrs r0, r1 ETH_InitStruct->ETH_LoopbackMode | 80309a8: 6a21 ldr r1, [r4, #32] 80309aa: 4308 orrs r0, r1 ETH_InitStruct->ETH_Mode | 80309ac: 6a61 ldr r1, [r4, #36] ; 0x24 80309ae: 4308 orrs r0, r1 ETH_InitStruct->ETH_ChecksumOffload | 80309b0: 6aa1 ldr r1, [r4, #40] ; 0x28 80309b2: 4308 orrs r0, r1 ETH_InitStruct->ETH_RetryTransmission | 80309b4: 6ae1 ldr r1, [r4, #44] ; 0x2c 80309b6: 4308 orrs r0, r1 ETH_InitStruct->ETH_AutomaticPadCRCStrip | 80309b8: 6b21 ldr r1, [r4, #48] ; 0x30 80309ba: 4308 orrs r0, r1 /* Set the IPCO bit according to ETH_ChecksumOffload value */ /* Set the DR bit according to ETH_RetryTransmission value */ /* Set the ACS bit according to ETH_AutomaticPadCRCStrip value */ /* Set the BL bit according to ETH_BackOffLimit value */ /* Set the DC bit according to ETH_DeferralCheck value */ tmpreg |= (uint32_t)(ETH_InitStruct->ETH_Watchdog | 80309bc: 6b61 ldr r1, [r4, #52] ; 0x34 80309be: 4301 orrs r1, r0 80309c0: 430a orrs r2, r1 ETH_InitStruct->ETH_RetryTransmission | ETH_InitStruct->ETH_AutomaticPadCRCStrip | ETH_InitStruct->ETH_BackOffLimit | ETH_InitStruct->ETH_DeferralCheck); /* Write to ETHERNET MACCR */ ETH->MACCR = (uint32_t)tmpreg; 80309c2: 601a str r2, [r3, #0] /* Set the DAIF bit according to ETH_DestinationAddrFilter value */ /* Set the PR bit according to ETH_PromiscuousMode value */ /* Set the PM, HMC and HPF bits according to ETH_MulticastFramesFilter value */ /* Set the HUC and HPF bits according to ETH_UnicastFramesFilter value */ /* Write to ETHERNET MACFFR */ ETH->MACFFR = (uint32_t)(ETH_InitStruct->ETH_ReceiveAll | 80309c4: 6ba2 ldr r2, [r4, #56] ; 0x38 80309c6: 6be1 ldr r1, [r4, #60] ; 0x3c 80309c8: 4311 orrs r1, r2 ETH_InitStruct->ETH_SourceAddrFilter | 80309ca: 6c22 ldr r2, [r4, #64] ; 0x40 80309cc: 4311 orrs r1, r2 ETH_InitStruct->ETH_PassControlFrames | 80309ce: 6c62 ldr r2, [r4, #68] ; 0x44 80309d0: 4311 orrs r1, r2 ETH_InitStruct->ETH_BroadcastFramesReception | 80309d2: 6ca2 ldr r2, [r4, #72] ; 0x48 80309d4: 4311 orrs r1, r2 ETH_InitStruct->ETH_DestinationAddrFilter | 80309d6: 6ce2 ldr r2, [r4, #76] ; 0x4c 80309d8: 4311 orrs r1, r2 ETH_InitStruct->ETH_PromiscuousMode | 80309da: 6d22 ldr r2, [r4, #80] ; 0x50 80309dc: 4311 orrs r1, r2 /* Set the DAIF bit according to ETH_DestinationAddrFilter value */ /* Set the PR bit according to ETH_PromiscuousMode value */ /* Set the PM, HMC and HPF bits according to ETH_MulticastFramesFilter value */ /* Set the HUC and HPF bits according to ETH_UnicastFramesFilter value */ /* Write to ETHERNET MACFFR */ ETH->MACFFR = (uint32_t)(ETH_InitStruct->ETH_ReceiveAll | 80309de: 6d62 ldr r2, [r4, #84] ; 0x54 80309e0: 430a orrs r2, r1 80309e2: 605a str r2, [r3, #4] ETH_InitStruct->ETH_PromiscuousMode | ETH_InitStruct->ETH_MulticastFramesFilter | ETH_InitStruct->ETH_UnicastFramesFilter); /*--------------- ETHERNET MACHTHR and MACHTLR Configuration ---------------*/ /* Write to ETHERNET MACHTHR */ ETH->MACHTHR = (uint32_t)ETH_InitStruct->ETH_HashTableHigh; 80309e4: 6da2 ldr r2, [r4, #88] ; 0x58 80309e6: 609a str r2, [r3, #8] /* Write to ETHERNET MACHTLR */ ETH->MACHTLR = (uint32_t)ETH_InitStruct->ETH_HashTableLow; 80309e8: 6de2 ldr r2, [r4, #92] ; 0x5c 80309ea: 60da str r2, [r3, #12] /* Set the DZPQ bit according to ETH_ZeroQuantaPause value */ /* Set the PLT bit according to ETH_PauseLowThreshold value */ /* Set the UP bit according to ETH_UnicastPauseFrameDetect value */ /* Set the RFE bit according to ETH_ReceiveFlowControl value */ /* Set the TFE bit according to ETH_TransmitFlowControl value */ tmpreg |= (uint32_t)((ETH_InitStruct->ETH_PauseTime << 16) | 80309ec: 6e62 ldr r2, [r4, #100] ; 0x64 80309ee: 6ea1 ldr r1, [r4, #104] ; 0x68 ETH->MACHTHR = (uint32_t)ETH_InitStruct->ETH_HashTableHigh; /* Write to ETHERNET MACHTLR */ ETH->MACHTLR = (uint32_t)ETH_InitStruct->ETH_HashTableLow; /*----------------------- ETHERNET MACFCR Configuration --------------------*/ /* Get the ETHERNET MACFCR value */ tmpreg = ETH->MACFCR; 80309f0: 6998 ldr r0, [r3, #24] /* Set the DZPQ bit according to ETH_ZeroQuantaPause value */ /* Set the PLT bit according to ETH_PauseLowThreshold value */ /* Set the UP bit according to ETH_UnicastPauseFrameDetect value */ /* Set the RFE bit according to ETH_ReceiveFlowControl value */ /* Set the TFE bit according to ETH_TransmitFlowControl value */ tmpreg |= (uint32_t)((ETH_InitStruct->ETH_PauseTime << 16) | 80309f2: 4311 orrs r1, r2 ETH_InitStruct->ETH_ZeroQuantaPause | 80309f4: 6ee2 ldr r2, [r4, #108] ; 0x6c 80309f6: 4311 orrs r1, r2 ETH_InitStruct->ETH_PauseLowThreshold | 80309f8: 6f22 ldr r2, [r4, #112] ; 0x70 80309fa: 4311 orrs r1, r2 ETH_InitStruct->ETH_UnicastPauseFrameDetect | 80309fc: 6f62 ldr r2, [r4, #116] ; 0x74 80309fe: 4311 orrs r1, r2 ETH->MACHTLR = (uint32_t)ETH_InitStruct->ETH_HashTableLow; /*----------------------- ETHERNET MACFCR Configuration --------------------*/ /* Get the ETHERNET MACFCR value */ tmpreg = ETH->MACFCR; /* Clear xx bits */ tmpreg &= MACFCR_CLEAR_MASK; 8030a00: f64f 7241 movw r2, #65345 ; 0xff41 8030a04: 4002 ands r2, r0 /* Set the DZPQ bit according to ETH_ZeroQuantaPause value */ /* Set the PLT bit according to ETH_PauseLowThreshold value */ /* Set the UP bit according to ETH_UnicastPauseFrameDetect value */ /* Set the RFE bit according to ETH_ReceiveFlowControl value */ /* Set the TFE bit according to ETH_TransmitFlowControl value */ tmpreg |= (uint32_t)((ETH_InitStruct->ETH_PauseTime << 16) | 8030a06: 430a orrs r2, r1 8030a08: 6e21 ldr r1, [r4, #96] ; 0x60 8030a0a: ea42 4101 orr.w r1, r2, r1, lsl #16 ETH_InitStruct->ETH_PauseLowThreshold | ETH_InitStruct->ETH_UnicastPauseFrameDetect | ETH_InitStruct->ETH_ReceiveFlowControl | ETH_InitStruct->ETH_TransmitFlowControl); /* Write to ETHERNET MACFCR */ ETH->MACFCR = (uint32_t)tmpreg; 8030a0e: 6199 str r1, [r3, #24] /*----------------------- ETHERNET MACVLANTR Configuration -----------------*/ /* Set the ETV bit according to ETH_VLANTagComparison value */ /* Set the VL bit according to ETH_VLANTagIdentifier value */ ETH->MACVLANTR = (uint32_t)(ETH_InitStruct->ETH_VLANTagComparison | 8030a10: 6fe1 ldr r1, [r4, #124] ; 0x7c 8030a12: 6fa2 ldr r2, [r4, #120] ; 0x78 8030a14: 430a orrs r2, r1 8030a16: 61da str r2, [r3, #28] ETH_InitStruct->ETH_VLANTagIdentifier); /*-------------------------------- DMA Config ------------------------------*/ /*----------------------- ETHERNET DMAOMR Configuration --------------------*/ /* Get the ETHERNET DMAOMR value */ tmpreg = ETH->DMAOMR; 8030a18: f503 5380 add.w r3, r3, #4096 ; 0x1000 /* Clear xx bits */ tmpreg &= DMAOMR_CLEAR_MASK; 8030a1c: 4a2a ldr r2, [pc, #168] ; (8030ac8 ) ETH_InitStruct->ETH_VLANTagIdentifier); /*-------------------------------- DMA Config ------------------------------*/ /*----------------------- ETHERNET DMAOMR Configuration --------------------*/ /* Get the ETHERNET DMAOMR value */ tmpreg = ETH->DMAOMR; 8030a1e: 6999 ldr r1, [r3, #24] /* Set the TTC bit according to ETH_TransmitThresholdControl value */ /* Set the FEF bit according to ETH_ForwardErrorFrames value */ /* Set the FUF bit according to ETH_ForwardUndersizedGoodFrames value */ /* Set the RTC bit according to ETH_ReceiveThresholdControl value */ /* Set the OSF bit according to ETH_SecondFrameOperate value */ tmpreg |= (uint32_t)(ETH_InitStruct->ETH_DropTCPIPChecksumErrorFrame | 8030a20: f8d4 0084 ldr.w r0, [r4, #132] ; 0x84 /*-------------------------------- DMA Config ------------------------------*/ /*----------------------- ETHERNET DMAOMR Configuration --------------------*/ /* Get the ETHERNET DMAOMR value */ tmpreg = ETH->DMAOMR; /* Clear xx bits */ tmpreg &= DMAOMR_CLEAR_MASK; 8030a24: 400a ands r2, r1 /* Set the TTC bit according to ETH_TransmitThresholdControl value */ /* Set the FEF bit according to ETH_ForwardErrorFrames value */ /* Set the FUF bit according to ETH_ForwardUndersizedGoodFrames value */ /* Set the RTC bit according to ETH_ReceiveThresholdControl value */ /* Set the OSF bit according to ETH_SecondFrameOperate value */ tmpreg |= (uint32_t)(ETH_InitStruct->ETH_DropTCPIPChecksumErrorFrame | 8030a26: f8d4 1080 ldr.w r1, [r4, #128] ; 0x80 8030a2a: 4308 orrs r0, r1 ETH_InitStruct->ETH_ReceiveStoreForward | 8030a2c: f8d4 1088 ldr.w r1, [r4, #136] ; 0x88 8030a30: 4308 orrs r0, r1 ETH_InitStruct->ETH_FlushReceivedFrame | 8030a32: f8d4 108c ldr.w r1, [r4, #140] ; 0x8c 8030a36: 4308 orrs r0, r1 ETH_InitStruct->ETH_TransmitStoreForward | 8030a38: f8d4 1090 ldr.w r1, [r4, #144] ; 0x90 8030a3c: 4308 orrs r0, r1 ETH_InitStruct->ETH_TransmitThresholdControl | 8030a3e: f8d4 1094 ldr.w r1, [r4, #148] ; 0x94 8030a42: 4308 orrs r0, r1 ETH_InitStruct->ETH_ForwardErrorFrames | 8030a44: f8d4 1098 ldr.w r1, [r4, #152] ; 0x98 8030a48: 4308 orrs r0, r1 ETH_InitStruct->ETH_ForwardUndersizedGoodFrames | 8030a4a: f8d4 109c ldr.w r1, [r4, #156] ; 0x9c 8030a4e: 4308 orrs r0, r1 /* Set the TTC bit according to ETH_TransmitThresholdControl value */ /* Set the FEF bit according to ETH_ForwardErrorFrames value */ /* Set the FUF bit according to ETH_ForwardUndersizedGoodFrames value */ /* Set the RTC bit according to ETH_ReceiveThresholdControl value */ /* Set the OSF bit according to ETH_SecondFrameOperate value */ tmpreg |= (uint32_t)(ETH_InitStruct->ETH_DropTCPIPChecksumErrorFrame | 8030a50: f8d4 10a0 ldr.w r1, [r4, #160] ; 0xa0 8030a54: 4301 orrs r1, r0 8030a56: 430a orrs r2, r1 ETH_InitStruct->ETH_ForwardErrorFrames | ETH_InitStruct->ETH_ForwardUndersizedGoodFrames | ETH_InitStruct->ETH_ReceiveThresholdControl | ETH_InitStruct->ETH_SecondFrameOperate); /* Write to ETHERNET DMAOMR */ ETH->DMAOMR = (uint32_t)tmpreg; 8030a58: 619a str r2, [r3, #24] /* Set the FB bit according to ETH_FixedBurst value */ /* Set the RPBL and 4*PBL bits according to ETH_RxDMABurstLength value */ /* Set the PBL and 4*PBL bits according to ETH_TxDMABurstLength value */ /* Set the DSL bit according to ETH_DesciptorSkipLength value */ /* Set the PR and DA bits according to ETH_DMAArbitration value */ ETH->DMABMR = (uint32_t)(ETH_InitStruct->ETH_AddressAlignedBeats | 8030a5a: f8d4 20a8 ldr.w r2, [r4, #168] ; 0xa8 8030a5e: f8d4 10a4 ldr.w r1, [r4, #164] ; 0xa4 8030a62: 4311 orrs r1, r2 ETH_InitStruct->ETH_FixedBurst | ETH_InitStruct->ETH_RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */ 8030a64: f8d4 20ac ldr.w r2, [r4, #172] ; 0xac /* Set the RPBL and 4*PBL bits according to ETH_RxDMABurstLength value */ /* Set the PBL and 4*PBL bits according to ETH_TxDMABurstLength value */ /* Set the DSL bit according to ETH_DesciptorSkipLength value */ /* Set the PR and DA bits according to ETH_DMAArbitration value */ ETH->DMABMR = (uint32_t)(ETH_InitStruct->ETH_AddressAlignedBeats | ETH_InitStruct->ETH_FixedBurst | 8030a68: f441 0100 orr.w r1, r1, #8388608 ; 0x800000 ETH_InitStruct->ETH_RxDMABurstLength | /* !! if 4xPBL is selected for Tx or Rx it is applied for the other */ 8030a6c: 4311 orrs r1, r2 ETH_InitStruct->ETH_TxDMABurstLength | 8030a6e: f8d4 20b0 ldr.w r2, [r4, #176] ; 0xb0 8030a72: 4311 orrs r1, r2 (ETH_InitStruct->ETH_DescriptorSkipLength << 2) | 8030a74: f8d4 20b8 ldr.w r2, [r4, #184] ; 0xb8 8030a78: 430a orrs r2, r1 8030a7a: f8d4 10b4 ldr.w r1, [r4, #180] ; 0xb4 /* Set the FB bit according to ETH_FixedBurst value */ /* Set the RPBL and 4*PBL bits according to ETH_RxDMABurstLength value */ /* Set the PBL and 4*PBL bits according to ETH_TxDMABurstLength value */ /* Set the DSL bit according to ETH_DesciptorSkipLength value */ /* Set the PR and DA bits according to ETH_DMAArbitration value */ ETH->DMABMR = (uint32_t)(ETH_InitStruct->ETH_AddressAlignedBeats | 8030a7e: ea42 0281 orr.w r2, r2, r1, lsl #2 8030a82: 601a str r2, [r3, #0] ETH_InitStruct->ETH_DMAArbitration | ETH_DMABMR_USP); /* Enable use of separate PBL for Rx and Tx */ #ifdef USE_ENHANCED_DMA_DESCRIPTORS /* Enable the Enhanced DMA descriptors */ ETH->DMABMR |= ETH_DMABMR_EDE; 8030a84: 681a ldr r2, [r3, #0] 8030a86: f042 0280 orr.w r2, r2, #128 ; 0x80 8030a8a: 601a str r2, [r3, #0] #endif /* USE_ENHANCED_DMA_DESCRIPTORS */ /* Return Ethernet configuration success */ return ETH_SUCCESS; 8030a8c: 2001 movs r0, #1 } 8030a8e: b007 add sp, #28 8030a90: bdf0 pop {r4, r5, r6, r7, pc} 8030a92: bf00 nop 8030a94: 40028000 .word 0x40028000 8030a98: feced300 .word 0xfeced300 8030a9c: 00e4e1bf .word 0x00e4e1bf 8030aa0: fde9f140 .word 0xfde9f140 8030aa4: 017d783f .word 0x017d783f 8030aa8: fc6c7900 .word 0xfc6c7900 8030aac: 026259ff .word 0x026259ff 8030ab0: fa0a1f00 .word 0xfa0a1f00 8030ab4: 02faf07f .word 0x02faf07f 8030ab8: 000fffff .word 0x000fffff 8030abc: 0004fffe .word 0x0004fffe 8030ac0: 0004ffff .word 0x0004ffff 8030ac4: ff20810f .word 0xff20810f 8030ac8: f8de3f23 .word 0xf8de3f23 08030acc : .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 8030acc: 2100 movs r1, #0 b LoopCopyDataInit 8030ace: f000 b804 b.w 8030ada 08030ad2 : CopyDataInit: ldr r3, =_sidata 8030ad2: 4b0d ldr r3, [pc, #52] ; (8030b08 ) ldr r3, [r3, r1] 8030ad4: 585b ldr r3, [r3, r1] str r3, [r0, r1] 8030ad6: 5043 str r3, [r0, r1] adds r1, r1, #4 8030ad8: 3104 adds r1, #4 08030ada : LoopCopyDataInit: ldr r0, =_sdata 8030ada: 480c ldr r0, [pc, #48] ; (8030b0c ) ldr r3, =_edata 8030adc: 4b0c ldr r3, [pc, #48] ; (8030b10 ) adds r2, r0, r1 8030ade: 1842 adds r2, r0, r1 cmp r2, r3 8030ae0: 429a cmp r2, r3 bcc CopyDataInit 8030ae2: f4ff aff6 bcc.w 8030ad2 ldr r2, =_sbss 8030ae6: 4a0b ldr r2, [pc, #44] ; (8030b14 ) b LoopFillZerobss 8030ae8: f000 b803 b.w 8030af2 08030aec : /* Zero fill the bss segment. */ FillZerobss: movs r3, #0 8030aec: 2300 movs r3, #0 str r3, [r2], #4 8030aee: f842 3b04 str.w r3, [r2], #4 08030af2 : LoopFillZerobss: ldr r3, = _ebss 8030af2: 4b09 ldr r3, [pc, #36] ; (8030b18 ) cmp r2, r3 8030af4: 429a cmp r2, r3 bcc FillZerobss 8030af6: f4ff aff9 bcc.w 8030aec /* Call the clock system intitialization function.*/ bl SystemInit 8030afa: f7f2 fa3d bl 8022f78 /* Call static constructors */ bl __libc_init_array 8030afe: f7f0 fce7 bl 80214d0 <__libc_init_array> /* Call the application's entry point.*/ bl main 8030b02: f7f3 f8cb bl 8023c9c
bx lr 8030b06: 4770 bx lr /* Copy the data segment initializers from flash to SRAM */ movs r1, #0 b LoopCopyDataInit CopyDataInit: ldr r3, =_sidata 8030b08: 080385e4 .word 0x080385e4 ldr r3, [r3, r1] str r3, [r0, r1] adds r1, r1, #4 LoopCopyDataInit: ldr r0, =_sdata 8030b0c: 20000000 .word 0x20000000 ldr r3, =_edata 8030b10: 2000141c .word 0x2000141c adds r2, r0, r1 cmp r2, r3 bcc CopyDataInit ldr r2, =_sbss 8030b14: 2000141c .word 0x2000141c FillZerobss: movs r3, #0 str r3, [r2], #4 LoopFillZerobss: ldr r3, = _ebss 8030b18: 20014620 .word 0x20014620 08030b1c : * @retval None */ .section .text.Default_Handler,"ax",%progbits Default_Handler: Infinite_Loop: b Infinite_Loop 8030b1c: f7ff bffe b.w 8030b1c 08030b20 <_ctype_>: 8030b20: 2000 2020 2020 2020 2020 2828 2828 2028 . ((((( 8030b30: 2020 2020 2020 2020 2020 2020 2020 2020 8030b40: 8820 1010 1010 1010 1010 1010 1010 1010 ............... 8030b50: 0410 0404 0404 0404 0404 1004 1010 1010 ................ 8030b60: 1010 4141 4141 4141 0101 0101 0101 0101 ..AAAAAA........ 8030b70: 0101 0101 0101 0101 0101 0101 1010 1010 ................ 8030b80: 1010 4242 4242 4242 0202 0202 0202 0202 ..BBBBBB........ 8030b90: 0202 0202 0202 0202 0202 0202 1010 1010 ................ 8030ba0: 0020 0000 0000 0000 0000 0000 0000 0000 ............... 8030bb0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8030bc0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8030bd0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8030be0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8030bf0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8030c00: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8030c10: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8030c20: 0000 0000 454c 5f44 6c42 6e69 006b 7542 ....LED_Blink.Bu 8030c30: 7474 6e6f 0073 6e49 7469 6154 6b73 4800 ttons.InitTask.H 8030c40: 7261 4664 7561 746c 0a3a 000d 0d0a 6552 ardFault:.....Re 8030c50: 6967 7473 7265 3a73 0d0a 5300 2050 2020 gisters:...SP 8030c60: 2020 2020 2020 3020 2578 3830 786c 0d0a 0x%08lx.. 8030c70: 5200 2030 2020 2020 2020 2020 3020 2578 .R0 0x% 8030c80: 3830 786c 0d0a 5200 2031 2020 2020 2020 08lx...R1 8030c90: 2020 3020 2578 3830 786c 0d0a 5200 2032 0x%08lx...R2 8030ca0: 2020 2020 2020 2020 3020 2578 3830 786c 0x%08lx 8030cb0: 0d0a 5200 2033 2020 2020 2020 2020 3020 ...R3 0 8030cc0: 2578 3830 786c 0d0a 5200 3231 2020 2020 x%08lx...R12 8030cd0: 2020 2020 3020 2578 3830 786c 0d0a 4c00 0x%08lx...L 8030ce0: 2052 2020 2020 2020 2020 3020 2578 3830 R 0x%08 8030cf0: 786c 0d0a 5000 2043 2020 2020 2020 2020 lx...PC 8030d00: 3020 2578 3830 786c 0d0a 5000 5253 2020 0x%08lx...PSR 8030d10: 2020 2020 2020 3020 2578 3830 786c 0d0a 0x%08lx.. 8030d20: 2500 2064 b4d0 bdd0 202e 6425 d120 2e87 .%d ..... %d ... 8030d30: 2520 2064 bcd0 b8d0 bdd0 002e 2e31 0030 %d ........1.0. 8030d40: 7325 7400 7572 0065 6166 736c 0065 6e6f %s.true.false.on 8030d50: 3100 3239 312e 3836 312e 322e 3100 3239 .192.168.1.2.192 8030d60: 312e 3836 312e 312e 3200 3535 322e 3535 .168.1.1.255.255 8030d70: 322e 3535 302e 7000 6275 696c 0063 5442 .255.0.public.BT 8030d80: 362d 3037 0031 2e30 2e30 2e30 0030 3830 -6701.0.0.0.0.08 8030d90: 302e 2e37 3032 3631 4500 2d43 4334 342d .07.2016.EC-4C-4 8030da0: 2d44 3030 302d 2d30 4130 4b00 2d4e 3330 D-00-00-0A.KN-03 8030db0: 302d 3030 3130 5400 4f32 004b 4449 454c -00001.T2OK.IDLE 8030dc0: 0900 6325 2509 0975 7525 2509 0d75 000a ..%c.%u.%u.%u... 08030dd0 : 8030dd0: 72b4 0803 3b1d 0803 3b29 0803 0434 0000 .r...;..);..4... 8030de0: 0001 0000 .... 08030de4 : 8030de4: 692f 666e 2e6f 7468 6c6d 0000 5448 5054 /info.html..HTTP 8030df4: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 8030e04: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 8030e14: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 8030e24: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 8030e34: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 8030e44: 6e65 2d74 654c 676e 6874 203a 3131 3230 ent-Length: 1102 8030e54: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 8030e64: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 8030e74: 3a65 7420 7865 2f74 7468 6c6d 0a0d 6f43 e: text/html..Co 8030e84: 746e 6e65 2d74 6e45 6f63 6964 676e 203a ntent-Encoding: 8030e94: 7a67 7069 0a0d 0a0d 8b1f 0008 0000 0000 gzip............ 8030ea4: 0a04 569d 6edd 36db 7e14 9615 45db 580c ...V.n.6.~...E.X 8030eb4: 7376 6037 8092 0b22 0eb6 1b4d 19a0 5db0 vs7`.."...M....] 8030ec4: b40d db44 256c a352 2728 50c1 4920 eebb ..D.l%R.('.P I.. 8030ed4: 05a2 040a 18bb 6e86 df43 1bc0 2dea ea5d .......nC....-]. 8030ee4: 15f4 37a8 39da e4a4 8844 61bb 90bb f22d ...7.9..D..a..-. 8030ef4: f2fc f7e3 3b1d f1bc bdc9 bdad 76af c9b7 .....;.......v.. 8030f04: e4d4 1c59 27e2 98c9 449c c294 b38a 0e34 ..Y..'...D....4. 8030f14: 6e73 4918 4ca6 dc97 b444 e332 23e0 b9b0 sn.I.L..D.2..#.. 8030f24: a9dd 4531 bfc0 c4a9 a22c 065f dc5f b60a ..1E....,._._... 8030f34: 5e54 2330 1946 24a7 d251 0970 b721 23b7 T^0#F..$Q.p.!..# 8030f44: 4e9e 1b78 5924 23ce 133a bf7c da50 f15c .Nx.$Y.#:.|.P.\. 8030f54: 17db 99a9 2946 899f 0784 d16e 5217 c118 ....F)....n..R.. 8030f64: a0b2 584c a3c6 7ecd 0ece 5e44 abe5 5575 ..LX...~..D^..uU 8030f74: ed72 0c16 464a a137 1184 e326 fdb1 2ed1 r...JF7...&..... 8030f84: 27eb a2f6 b23e ed6f 7ebc cf6a 17ea d0e1 .'..>.o..~j..... 8030f94: c2db c84c 6487 f9aa a238 1339 9072 2594 ..L..d..8.9.r..% 8030fa4: 9a25 1167 cd2d c661 29cb 06e7 0d32 f1fd %.g.-.a..)..2... 8030fb4: 2a47 8c3d 54c3 48cc b192 8cb2 64a8 11b3 G*=..T.H.....d.. 8030fc4: c4d3 057f 1f29 2ab3 ed33 2c72 780e 181a ....)..*3.r,.x.. 8030fd4: 4055 6b82 0131 e466 9bda 90e2 4d35 9908 U@.k1.f.....5M.. 8030fe4: 83f2 4201 600f 1af8 9a99 6c28 c181 6903 ...B.`....(l...i 8030ff4: cfda e236 4a03 0a44 73dd 0559 7002 5c6e ..6..JD..sY..pn\ 8031004: acab 878d dae6 e08e 7bd5 4be3 870c 5b5f .........{.K.._[ 8031014: b638 02bf 474e 0e76 2d78 93ea a8fa e67e 8...NGv.x-....~. 8031024: a3ab d5ff 2018 1181 5272 7efa fb63 8433 ..... ..rR.~c.3. 8031034: 631d bd80 6fb0 5fec 6cf6 987d 6390 3dd5 .c...o._.l}..c.= 8031044: 4b22 988c 2901 5fd6 1e15 cb1c 2b0e a560 "K...)._.....+`. 8031054: e087 9c0a 9afb 0515 e900 6850 0678 9b67 ..........Phx.g. 8031064: be6e 1b27 4218 0700 9b31 4cb1 40a4 2551 n.'..B..1..L.@Q% 8031074: 9183 403a b0e0 58c2 dce9 ef99 dddf c5d9 ..:@...X........ 8031084: 295e fec1 8c94 eba8 993c 4a08 f280 0553 ^)......<..J..S. 8031094: 3e29 dedd 3883 9483 f16b 8bf6 ada6 2715 )>...8..k......' 80310a4: 28cc b970 59c0 93c3 deb6 4952 d50e e3b5 .(p..Y....RI.... 80310b4: 3d82 ec05 f616 fd6d 3882 7ffc d603 209e .=....m..8..... 80310c4: 06fa b7b4 c63e 5a75 4615 28e4 e72a 7438 ....>.uZ.F.(*.8t 80310d4: 5c15 d895 84be 78bb 390d ebcf abe7 8e34 .\.....x.9....4. 80310e4: 2a2f d9e5 88da e01f 4f16 9cec 77d8 22ee /*.......O...w." 80310f4: eccf f69f 4c77 5782 6f0b 4ef3 429a 402b ....wL.W.o.N.B+@ 8031104: 7d70 53e9 cf60 7d51 7a8c 4023 5fa9 813a p}.S`.Q}.z#@._:. 8031114: fde3 d719 a025 aeba 9d87 5b5b e804 1af7 ....%.....[[.... 8031124: a8d1 3b8f 3971 584b a29a ae6e f59f 1615 ...;q9KX..n..... 8031134: 67b4 bdc0 fd65 becc 7621 7d09 8723 3a8f .g..e...!v.}#..: 8031144: 6029 484e 28a7 b544 d603 3da9 b2c7 1708 )`NH.(D....=.... 8031154: 3d44 a36d 50e2 a2c8 c432 161c ad30 3f0c D=m..P..2...0..? 8031164: 4980 27e5 da97 2d97 9af5 46d7 48b4 00a2 .I.'...-...F.H.. 8031174: a8d9 2815 4619 c655 04e5 1a26 bcdd 9389 ...(.FU...&..... 8031184: 7ae9 2fef a4f1 f000 7d85 cf07 3c39 407f .z./.....}..9<.@ 8031194: 4b1b cd38 dfe2 28db cb0f 2a3b 4c71 3af6 .K8....(..;*qL.: 80311a4: 56c8 ffab cfdb 0e4f 003a b00f 3604 5c38 .V....O.:....68\ 80311b4: cf41 889e 07ef 5124 4c39 c022 3907 5ab6 A.....$Q9L"..9.Z 80311c4: d7fc 8626 434e 3871 8caa b251 ddc1 282f ..&.NCq8..Q.../( 80311d4: 3251 44c9 30f2 9aa2 4a9b 524b a356 985c Q2.D.0...JKRV.\. 80311e4: 20db 8dd4 ff5e e6c6 6e6a 8c8e f024 8504 . ..^...jn..$... 80311f4: 3916 87d3 5d30 815e be9c 9383 11cc 1057 .9..0]^.......W. 8031204: 2816 27c2 0b85 0bc1 2f83 603f 9cfd 132f .(.'...../?`../. 8031214: 8a2d b7ab 7c3e 66c0 efcc 5252 a4ea cdf9 -...>|.f..RR.... 8031224: 5078 8de2 fdfa fc38 a8c7 c278 e7cd eff7 xP....8...x..... 8031234: dddd 1cb8 fd25 2571 78dd 90d9 6fbd dc3f ....%.q%.x...o?. 8031244: 8da0 7b96 2103 5b81 ed9f dced e489 6fc0 ...{.!.[.......o 8031254: c1f6 3b9c 76dd 6ead 8d0f 1aad e6bb 1766 ...;.v.n......f. 8031264: 2e1d d755 5975 bbed 8d12 bac4 8d2e d0f0 ..U.uY.......... 8031274: 0bc1 6ba8 7b76 f468 e83a 600d 56b8 5a1c ...kv{h.:..`.V.Z 8031284: 6b77 ac34 7938 bb69 5bc2 68f4 72f9 d0e9 wk4.8yi..[.h.r.. 8031294: f4ec 932b 32ec 72cd c284 7d24 4dc9 dbfb ..+..2.r..$}.M.. 80312a4: 35f3 1bfc 1391 829e cd65 a3ee ba0e bff0 .5......e....... 80312b4: 9b41 0a0d 53bf 520b 063f cf9d 6851 bb20 A....S.R?...Qh . 80312c4: 30e7 50ec f575 fae3 cf7b e20c 4bac 4837 .0.Pu...{....K7H 80312d4: 0316 7bda fbd4 f2f8 878a 0fee dfd2 c2d1 ...{............ 80312e4: d382 0930 0000 ..0... 080312ea : 80312ea: 732f 7465 6974 676e 2e73 7468 6c6d 0000 /settings.html.. 80312fa: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 803130a: 530a 7265 6576 3a72 6c20 4977 2f50 2e31 .Server: lwIP/1. 803131a: 2e33 2031 6828 7474 3a70 2f2f 6173 6176 3.1 (http://sava 803132a: 6e6e 6861 6e2e 6e6f 6e67 2e75 726f 2f67 nnah.nongnu.org/ 803133a: 7270 6a6f 6365 7374 6c2f 6977 2970 0a0d projects/lwip).. 803134a: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 803135a: 3032 3337 0a0d 6f43 6e6e 6365 6974 6e6f 2073..Connection 803136a: 203a 6c43 736f 0d65 430a 6e6f 6574 746e : Close..Content 803137a: 742d 7079 3a65 7420 7865 2f74 7468 6c6d -type: text/html 803138a: 0a0d 6f43 746e 6e65 2d74 6e45 6f63 6964 ..Content-Encodi 803139a: 676e 203a 7a67 7069 0a0d 0a0d 8b1f 0008 ng: gzip........ 80313aa: 0000 0000 0a04 58b5 6edd c6dc 7e15 9a15 .......X.n...~.. 80313ba: 8369 405d 95dc 246c ec28 8125 7656 5f03 i.]@..l$(.%.Vv._ 80313ca: 1524 a712 ae6e 598c b472 113b 4aff 770e $...n..Yr.;..J.w 80313da: 1aa5 6406 4d3b 2403 8068 26f6 da28 7d18 ...d;M.$h..&(..} 80313ea: b583 2722 648a 40cb 809f a37c 677e e486 .."'.d.@..|.~g.. 80313fa: 52ce 7ff2 b17c 3912 399c e7ff 733b e8ce .R..|..9.9..;s.. 803140a: d5c2 6c3f f8de eb6c 359a 5195 8de8 afe8 ..?l..l..5.Q.... 803141a: b215 e278 36da 38de bc0b c451 b325 29fc ..x..6.8..Q.%..) 803142a: 72cb 5d2e 90bb cedb f06f ad4d a54e 1d4c .r.]....o.M.N.L. 803143a: e7fe cc42 fb5c ce4f bfa7 3675 2893 5265 ..B.\.O...u6.(eR 803144a: 438c 5b6e 127e 1e4b c8e3 6bf5 0f2e bc26 .Cn[~.K....k..&. 803145a: 1439 88b3 f6bb f04c 9a79 d264 37d8 8117 9.....L.y.d..7.. 803146a: ba9c 9f01 9f09 ea3b 4d65 42c4 160a b93a ......;.eM.B..:. 803147a: 42cf 6eee 45ac 576c 4544 bed4 3917 d4cf .B.n.ElWDE...9.. 803148a: 030b 774b 2c1d 90a4 f721 ffca 8b94 6eea ..Kw.,..!......n 803149a: af75 2fda cb4f cb9f f2e3 3468 5fd4 a146 u../O.....h4._F. 80314aa: 7788 69ac b7c6 3b5d 2262 f81e 6e79 195b .w.i..];b"..yn[. 80314ba: 5d0f 973b 217b a7cf 4b9c 19d0 e56a 49c7 .];.{!...K..j..I 80314ca: e7b0 028d b331 e044 7eda c452 99d2 2c67 ....1.D..~R...g, 80314da: 8ec5 c595 9920 58c7 bd4b 5ff2 f8e0 e6a4 .... ..XK.._.... 80314ea: 527c 949e aa8f ab7d 587c 2fdd f10f cf78 |R....}.|X./..x. 80314fa: 9f2a 4ad2 a8f9 a9fc 945c 543f f8fb 23f0 *..J....\.?T...# 803150a: 9ede d558 9adf d60f 4f28 6c59 8c30 688b ..X.....(OYl0..h 803151a: 33cc 7bdb 346f 2fa4 559e c5dd 6391 7d1c .3.{o4./.U...c.} 803152a: 1e52 460e 14c3 42e2 431a 29a4 77f7 4d3e R..F...B.C.).w>M 803153a: 2603 16f9 7e83 68de c93b 8b22 52f9 3124 .&...~.h;."..R$1 803154a: 6b5c 7bc1 04d3 a50a 4e49 42ca 7fec 0794 \k.{....IN.B.... 803155a: 79a0 1e58 f755 47ca e524 d942 a4ee c6fa .yX.U..G$.B..... 803156a: eac2 f549 55ad 541e 857f 876e 02e5 968f ..I..U.T..n..... 803157a: e1d2 f2c7 7ca8 616c 21f1 3924 0505 8ba8 .....|la.!$9.... 803158a: 23a7 fdda ce94 5f57 c761 d901 8b5f e229 .#....W_a..._.). 803159a: 90b4 b34a 1e74 96d8 4bdc 0a11 4429 279c ..J.t....K..)D.' 80315aa: de19 10fd ae8f c24d 143a 593e da12 1a56 ......M.:.>Y..V. 80315ba: 9f32 934f e030 6b99 0f97 8296 fbb5 64c3 2.O.0..k.......d 80315ca: 6222 cadb 5fc5 ed40 3ae2 63d4 21bb 278f "b..._@..:.c.!.' 80315da: 2688 e37b db7d 11d2 b2d7 46f1 4ce3 b4ff .&{.}......F.L.. 80315ea: 5a38 718a 6521 2a02 cfca 9261 8773 b40e 8Z.q!e.*..a.s... 80315fa: c63c b632 73f0 2402 7c07 cd61 5858 5b80 <.2..s.$.|a.XX.[ 803160a: 3df9 f5ec 6958 b0bd 6b3d 5264 8bcc 2471 .=..Xi..=kdR..q$ 803161a: c028 56b5 850d f0bc 4e7d 9394 0fd8 bf85 (..V....}N...... 803162a: dae3 9719 1645 c723 b5e0 9bad 7b57 b5fd ....E.#.....W{.. 803163a: 1b0b 1cab 98c8 180b de12 bea9 c381 6486 ...............d 803164a: c6a2 4beb d7df 629c 1b36 0cb3 d36a 273f ...K...b6...j.?' 803165a: dbe0 08ac f365 2dba 7976 c8e0 09a4 95e1 ....e..-vy...... 803166a: 0e33 3d45 1a85 b745 6237 a275 3888 bbe0 3.E=..E.7bu..8.. 803167a: 0203 5687 d81b 213c d841 14aa 89cd b477 ...V....b 803170a: c9a3 56e4 7f57 9622 fd59 b5c1 381b e0d8 ...VW.".Y....8.. 803171a: 6493 6c63 a1c3 d3da 5dfa 506f 976c 70eb .dcl.....]oPl..p 803172a: 8100 6985 77cd 38f2 974a ac41 78cd 8d83 ...i.w.8J.A..x.. 803173a: ef6d 8f93 dc3e 9a5a e561 cc4c 1ce5 fea6 m...>.Z.a.L..... 803174a: 392f b90a 5071 bd7d 94c4 fd73 31d7 6922 /9..qP}...s..1"i 803175a: 792a 9a94 0332 a8f8 9084 b556 b4c0 aa12 *y..2.....V..... 803176a: 8588 c1bb 056e 8179 8a5b e3f7 701a 0817 ....n.y.[....p.. 803177a: fb99 683a a85a a15c 4843 4abf 109f b9c8 ..:hZ.\.CH.J.... 803178a: b588 e031 02d1 1d94 fbc3 545f 47f7 f1c3 ..1......._T.G.. 803179a: 1c8a ae0a 5926 5052 854a cc6c 0b43 ae4b ....&YRPJ.l.C.K. 80317aa: 77cd 2925 2b71 3802 db91 808f 4ff4 6faa .w%)q+.8.....O.o 80317ba: 1c09 fc01 67c8 ca42 cb2f 8205 0e8f a379 .....gB./.....y. 80317ca: 879c 97dc 7a8d 6c8a 828d c296 2715 748f .....z.l.....'.t 80317da: 9940 6b94 3374 1097 9a34 4814 bd52 dff8 @..kt3..4..HR... 80317ea: b362 1cae f90a 110c d721 213f 2a04 5365 b.......!.?!.*eS 80317fa: e87c 15ad 7088 adb2 0645 5b87 a153 86ea |....p..E..[S... 803180a: 472e e88a 0c99 a178 1855 1ba2 0765 10d5 .G....x.U...e... 803181a: e575 b617 680b ed77 ec42 aede d85d c76e u....hw.B...].n. 803182a: da2e 6726 632c d5c6 ca77 a7f6 fe28 8608 ..&g,c..w...(... 803183a: 18f2 0537 e418 7b6e 7849 aa88 b3fa adaa ..7...n{Ix...... 803184a: 943f 54a7 a995 eb3c 01c0 3d04 0c27 348d ?..T..<....='..4 803185a: 6551 6345 1d49 6667 6a91 d6bf 1af6 1d33 QeEcI.gf.j....3. 803186a: beb4 00cc 94f6 ab88 282b 535a 812a faed ........+(ZS*... 803187a: 1227 8cb7 1f5e 0fc5 3cce 4dc6 efe1 4650 '...^....<.M..PF 803188a: a9d5 8c36 05b4 b08c 486b f2fe 6199 ee52 ..6.....kH...aR. 803189a: a468 bd98 0895 9830 2276 1280 8ce8 9fff h.....0.v"...... 80318aa: 1995 992d 90b7 2619 aeed de5d 665a 4c18 ..-....&..].Zf.L 80318ba: 763b 3331 7cc3 6a6e 6ad6 41d1 22c5 57ac ;v13.|nj.j.A.".W 80318ca: 6f55 1b86 0bed 810a 4c2e 45cf 2379 3316 Uo.......L.Ey#.3 80318da: 78dc f96e 1449 e815 5035 3e01 bbc6 3e85 .xn.I...5P.>...> 80318ea: bf46 31b7 9e4c f334 0246 db0e 64f2 b542 F..1L.4.F....dB. 80318fa: 9a4e d50e e4da 55dd 9ef3 1efa 89e0 1898 N......U........ 803190a: cda2 2133 29b9 4ddb 785a e173 74ba e96b ..3!.).MZxs..tk. 803191a: 2cce 40bf 88bc 0cc5 e177 5beb 71c0 f52a .,.@....w..[.q*. 803192a: d4fb a042 d9db 5d78 2da3 d609 2d12 ce17 ..B...x].-...-.. 803193a: a6d8 84fd bd02 fdc2 1be2 bf73 d4d8 930e ..........s..... 803194a: d747 ed37 4bb7 fe1d de97 ff98 33a5 c1fc G.7..K.......3.. 803195a: 86a3 2591 1098 ab34 567b 5f73 b3a8 5b04 ...%..4.{Vs_...[ 803196a: f00d deef 5e91 257c 6e7b 18de db94 51c2 .....^|%{n.....Q 803197a: ec87 7a6a 5fb4 4f6b 5306 b71f 9239 3f59 ..jz._kO.S..9.Y? 803198a: cb2d bd08 351b 01e4 de2a 6e09 756a b10d -....5..*..nju.. 803199a: 6fae 2839 8778 2e08 45d4 9a8b 5420 53c0 .o9(x....E.. T.S 80319aa: 1175 87bf 4332 f34d dd5d d7df 6dc5 b909 u...2CM.]....m.. 80319ba: 2646 9489 0105 9ada 6a55 d360 08ce 1d54 F&......Uj`...T. 80319ca: 303e 632e 98af 35f0 5a87 86dd 375f 266a >0.c...5.Z.._7j& 80319da: 16b8 6477 8af8 264a 034d 375e 406e e6b3 ..wd..J&M.^7n@.. 80319ea: d44a 1cbb 9623 20ef ff42 ab8d d92b bd09 J...#.. B...+... 80319fa: 53fb ef98 2f10 3774 58c7 30c4 2bdb 9be0 .S.../t7.X.0.+.. 8031a0a: db22 2966 50b1 4d8c d72c a9cf c6a5 ae2a ".f).P.M,.....*. 8031a1a: 06ad 973a d637 7fd7 7b4d b355 f75d 4dff ..:.7...M{U.]..M 8031a2a: 5de7 c75f 3e9b cd39 c444 bdb2 7db3 eeb2 .]_..>9.D....}.. 8031a3a: 7fab 4e8f d728 32ad 435a 07c4 1146 f4f5 ...N(..2ZC..F... 8031a4a: 3d01 2e32 8a47 5a05 97f2 d5e1 f574 402a .=2.G..Z....t.*@ 8031a5a: ccf9 38c9 265a d895 410f 94f9 c4ae 44af ...8Z&...A.....D 8031a6a: ce6f 98b2 129a f11d e08a 4938 e288 8203 o.........8I.... 8031a7a: c848 1cb9 fcff 6e44 4579 edfa a10c b811 H.....DnyE...... 8031a8a: c350 d01e beff 8b3b 9d51 5297 9da2 b4c5 P.....;.Q..R.... 8031a9a: f4cc 88e8 57aa 2f8b e07a fb95 4899 ed65 .....W./z....He. 8031aaa: 2a1f c375 d9cf e98c 0c55 325a 1ebf 7d9e .*u.....U.Z2...} 8031aba: ed4e 50e2 a3af 7855 29de eaef 1f67 badd N..P..Ux.)..g... 8031aca: ed79 0377 8f34 00f9 2de6 ded2 116d b65c y.w.4....-..m.\. 8031ada: 5b81 3faa c35d 6f30 4933 0476 2fcf 585f .[.?].0o3Iv../_X 8031aea: d3bf 32bf 19a3 4c86 e231 899b 8ff4 6f34 ...2...L1.....4o 8031afa: 82b9 aa8d 47b7 0b87 ffd7 67aa 5a63 d4e8 .....G.....gcZ.. 8031b0a: f7ba cd07 6540 88bb a4d5 d7ab 8dbf c62d ....@e........-. 8031b1a: aed0 503f 38c1 4408 a98e 1ed2 b0ee e261 ..?P.8.D......a. 8031b2a: d8ef 4844 9601 3231 c67b 3bd6 ef6a 3c72 ..DH..12{..;j.r< 8031b3a: 3af4 e34c 1704 9798 a9e2 2a76 a496 0ea7 .:L.......v*.... 8031b4a: 73ca 3639 5b1a 89b8 9edf 5c63 cc93 5007 .s96.[....c\...P 8031b5a: cd4d 0611 d87a 9689 9cd0 dc8b 70d9 09dd M...z........p.. 8031b6a: 9b97 5c1f 61ef 84fe 036f 211a dff4 177d ...\.a..o..!..}. 8031b7a: 378f c444 4293 f8f6 06da d4bf f837 18ab .7D..B......7... 8031b8a: 573e 4600 2c53 acfa acc8 892d 9033 bdec >W.FS,....-.3... 8031b9a: 17bc c068 66aa cfa9 ffb0 f29a ed26 5de8 ..h..f......&..] 8031baa: ef58 eff7 595c df46 8d50 ffb0 0b0f 5d40 X...\YF.P.....@] 8031bba: d23d 0016 2f00 =.... 08031bbf : 8031bbf: 6d2f 6961 2e6e 736a 0000 0000 5448 5054 /main.js....HTTP 8031bcf: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 8031bdf: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 8031bef: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 8031bff: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 8031c0f: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 8031c1f: 6e65 2d74 654c 676e 6874 203a 3737 3239 ent-Length: 7792 8031c2f: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 8031c3f: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 8031c4f: 3a65 6120 7070 696c 6163 6974 6e6f 782f e: application/x 8031c5f: 6a2d 7661 7361 7263 7069 0d74 430a 6e6f -javascript..Con 8031c6f: 6574 746e 452d 636e 646f 6e69 3a67 6720 tent-Encoding: g 8031c7f: 697a 0d70 430a 6361 6568 432d 6e6f 7274 zip..Cache-Contr 8031c8f: 6c6f 203a 7270 7669 7461 2c65 6d20 7861 ol: private, max 8031c9f: 612d 6567 383d 3436 3030 0a0d 0a0d 8b1f -age=86400...... 8031caf: 0008 0000 0000 0a04 5ccd 7379 c6dc ff95 .........\ys.... 8031cbf: 202a 50a2 0f03 1c38 b0ea 1993 5382 6cba * .P..8......S.l 8031ccf: 6b2b 2b1d ebd1 2964 8586 67a3 e206 300c +k.+..d)...g...0 8031cdf: 3006 18a2 5592 bc49 aa39 8aec bcab ec7f .0...UI.9....... 8031cef: d6d6 a56e 1bf6 5e38 512b c4ec daa9 404f ..n...8^+Q....O@ 8031cff: a37e bdfd ddd7 0340 9433 a3e4 b776 8b12 ~.....@.3...v... 8031d0f: 4683 af1f bf5f bdfb 70c6 849e 9c45 d626 .F.._....p..E.&. 8031d1f: 9685 1cef a265 6798 1589 e1a5 2a7c a292 ....e..g....|*.. 8031d2f: 1233 adc5 a089 d79f 6f0f e847 3271 fdd4 3........oG.q2.. 8031d3f: eaf1 9a46 c7ee c682 f3d9 585c 9179 61c5 ..F.......\Xy..a 8031d4f: f761 6987 7ad6 67e2 e056 f395 dc84 0dd3 a..i.z.gV....... 8031d5f: a0bd cf93 7126 b2d1 96fb b8ed d791 47ed ....&q.........G 8031d6f: 619b 2267 5192 ee31 ed47 73b6 2344 1785 .ag".Q1.G..sD#.. 8031d7f: 44ee babb 67ab fd3b d878 3b12 5ddd f3cf .D...g;.x..;.].. 8031d8f: 051d 41e3 449c 41e9 9e67 3c88 67f4 af02 ...A.D.Ag..<.g.. 8031d9f: 7637 139d d2f9 2bb6 f338 4e0a 7037 b943 7v.....+8..N7pC. 8031daf: e440 6df9 b3db 6adb 3512 c045 84eb 5d5b @..m...j.5E...[] 8031dbf: 450d 0e22 9bac 217e a2fa 6983 e3b6 9629 .E"...~!...i..). 8031dcf: 9c21 2ff0 7da7 f5f9 f76e f0b5 0db5 9971 !../.}..n.....q. 8031ddf: 12b6 b1b5 f129 1674 2267 d4c7 53a2 6fa4 ....).t.g"...S.o 8031def: d9dd 087e 24a4 96a3 d273 85c0 5517 4620 ..~..$..s....U F 8031dff: 2262 510a b361 95d9 ad60 dea6 cf1e ab5d b".Qa...`.....]. 8031e0f: 61bb c8fd ac4f 1f8d d1be bab5 1edd 7ffd .a..O........... 8031e1f: c2c3 7d72 e763 3f43 b712 9c93 c7ce e4ef ..r}c.C?........ 8031e2f: e1c5 7444 99d2 c61f a1c5 75d7 73cb 5a0c ..Dt.......u.s.Z 8031e3f: b772 37a1 b3f3 bc5c 4939 a2fd e8d5 78cf r..7..\.9I.....x 8031e4f: 8569 af6d bdd3 6cec ac6d 2b78 5140 8fa3 i.m....lm.x+@Q.. 8031e5f: f617 e8e9 2f22 ef13 45cf bc5e f999 9740 ...."/...E^...@. 8031e6f: 9ead 8470 2b51 4e70 804e 7289 c8e9 fc2f ..p.Q+pNN..r../. 8031e7f: 1937 c048 a9a0 f7c6 fc76 8dd0 3742 f64e 7.H.....v...B7N. 8031e8f: 1886 a6ed 42f3 98fe 641d e06e 7b17 6e38 .....B...dn..{8n 8031e9f: 4cbc b644 8857 8ce9 0a9a cc9c 0c44 370b .LD.W.......D..7 8031eaf: 9fbf 881e cdcc a3af 644d bb87 006e 0b0a ........Md..n... 8031ebf: 7d36 614d 2801 44ac 4ecb 8200 8129 c709 6}Ma.(.D.N..)... 8031ecf: dc22 587f b4e0 4c01 3cd5 13f3 9131 becd "..X...L.<..1... 8031edf: 681b 0554 429d 053c 27fd 5805 afa3 d228 .hT..B<..'.X..(. 8031eef: b41f de40 e78c 9d30 99a4 ed77 6b9d ee0f ..@...0...w..k.. 8031eff: bdec e0f5 add6 eebb 3493 0206 0c3a dbf7 .........4..:... 8031f0f: 77db f1de 6e2e 98e6 0adb 7e27 720e fa99 .w...n....'~.r.. 8031f1f: fed9 ba5a 6f6f ae6d f353 c5d6 e876 bd38 ..Z.oom.S...v.8. 8031f2f: f3a5 b83d f375 6695 27f3 ff53 7d71 6ac2 ..=.u..f.'S.q}.j 8031f3f: 045b 9842 da09 c82d c9a3 fcad a6e2 0212 [.B...-......... 8031f4f: c838 4911 9680 fe03 48ad fb93 e128 b2d0 8..I.....H..(... 8031f5f: f8a3 8e09 ce98 3430 e8f6 c3f7 30ce f2ce ......04.....0.. 8031f6f: c6e2 9e38 7d44 e827 b3f8 4899 7e22 cf44 ..8.D}'....H"~D. 8031f7f: 9dea 91a3 5418 d230 dd41 839b 1718 6d69 .....T0.A.....im 8031f8f: 4ea3 90bf 900e 9338 d035 55e7 b367 68eb .N....8.5..Ug..h 8031f9f: 8cd2 4862 ff1b b3d0 3493 7611 4c5f c172 ..bH.....4.v_Lr. 8031faf: 0d7b 25cf 70d2 4881 b925 f8b4 f5f0 15bc {..%.p.H%....... 8031fbf: e91b bd16 7052 6c7c 9307 dc34 2bb7 4308 ....Rp|l..4..+.C 8031fcf: 61c5 4bc1 2c39 0e20 7abb 872e 2f05 b0e5 .a.K9, ..z.../.. 8031fdf: c1b0 8961 2028 0ab8 a048 2f7c fb1c 48c9 ..a.( ..H.|/...H 8031fef: f700 73a0 0440 d99c 3645 b617 2de7 b5e9 ...s@...E6...-.. 8031fff: baba b662 a78a 9c22 2217 8e72 b596 1c42 ..b...".."r...B. 803200f: 6430 67be d590 4dc5 84d0 4715 8d9e 9f33 0d.g...M...G..3. 803201f: ae1c 3869 9140 adb3 4fd3 ff4e fa7a f4fc ..i8@....ON.z... 803202f: a72f f29f 67df 75ae f9fa 97e9 1f67 a75b /....g.u....g.[. 803203f: 3b7f 39fb 78bf 1786 dff4 3473 fd9e f4e2 .;.9.x....s4.... 803204f: d9d9 f12f d9f8 87d9 bf67 d0b2 e9fa 2fd9 ../.....g....../ 803205f: 7ece 9e89 a15f 0bf1 786a 9f86 387f 15fb .~.._...jx...8.. 803206f: fdfe 879c 657f 2461 feba 5a8d f630 cc33 .....ea$...Z0.3. 803207f: 73f0 877a 1f61 ac75 7fd3 49e5 737e ccfa .sz.a.u....I~s.. 803208f: 0742 62ac f461 e807 c1f9 2fd9 b969 d03f B..ba....../i.?. 803209f: 67dc 25bf ce08 b43e 3f4e 68b3 33f9 a774 .g.%..>.N?.h.3t. 80320af: e8be d1bd 00b5 73fc c5bc ce80 fae6 6b6c .......s......lk 80320bf: b7d3 99c6 7a18 9876 2026 69eb 1c27 b6c5 .....zv.& .i'... 80320cf: eee6 48a0 fc2c 16b7 09d1 f664 e9d6 97ef ...H,.....d..... 80320df: b581 eeb9 fd83 b581 8bad 9690 055a 6907 ............Z..i 80320ef: 0874 ca96 5645 175c 3060 ac30 7f5b 1219 t...EV\.`00.[... 80320ff: dd73 234d 4391 3a43 22ae 0bd8 26ad 1de2 s.M#.CC:."...&.. 803210f: 4710 ee25 4852 b0d0 9bd8 49a6 a45c 4199 .G%.RH.....I\..A 803211f: d815 f980 2986 0565 e88d 57b9 41d1 e1a3 .....)e....W.A.. 803212f: 127c 2ad8 20e9 4f12 50e2 89ac 4b2c 8381 |..*. .O.P..,K.. 803213f: 60cd 1509 f500 9d9f 7c7d a7fa 8fb3 0a70 .`......}|....p. 803214f: bbd6 1ff7 d9f2 c05a ce32 899b 2be5 e51c ......Z.2....+.. 803215f: 7c97 9f0e 6cae 07ae 610a 29df 6ada 1270 .|...l...a.).jp. 803216f: 48d2 586e 0d8d aeaf 1ab6 de2d 86ca a40b .HnX......-..... 803217f: 47d7 a077 2154 e93b 0c74 68b9 86db c1e2 .Gw.T!;.t..h.... 803218f: 4e99 c1ff c49f 86d0 c3b0 ac94 3df0 054c .N...........=L. 803219f: 1b11 85ed 74e9 c73a 1d19 5ec2 a80a 20f5 .....t:....^... 80321af: 0b8b 6b51 a90e ea79 3e27 eb88 7df6 abb6 ..Qk..y.'>...}.. 80321bf: 86cc 684b b511 972e 32d1 96a4 e678 5147 ..Kh.....2..x.GQ 80321cf: a786 3d11 0e8d 6bf0 7b2c fbe6 1df8 2d7b ...=...k,{....{- 80321df: 2734 0cc5 f7d4 9e24 05a1 5f8a 6a4b 89bc 4'....$...._Kj.. 80321ef: 21c6 3b1a 3aac 7445 dc7c fb52 b710 d3ef .!.;.:Et|.R..... 80321ff: 22bc 5bcf d743 6eb6 5fdf d9c3 0e7d 7a9e .".[C..n._..}..z 803220f: 5386 8795 ccc9 67fb d63e 4ecf b53f 0c1d .S.....g>..N?... 803221f: 818e c741 9c5d b462 c538 216f 7e2c fa77 ..A.].b.8.o!,~w. 803222f: 97a7 1c0c f6bb a7e9 e9d6 93bf 38b8 82fd .............8.. 803223f: 4a7e 2071 c9c5 6af3 65d1 86ab f558 3ff4 ~Jq ...j.e..X..? 803224f: 6c59 f0b0 1eb0 bdde df73 a8da 9506 5e90 Yl......s......^ 803225f: cc9b 5a20 3061 fcc3 7305 0fda 6c70 8dd6 .. Za0...s..pl.. 803226f: d8ea b616 1b56 b810 7bf6 a274 1c2f e151 ....V....{t./.Q. 803227f: 5a33 160a 788e 9561 8c6a 3a58 4406 8e50 3Z...xa.j.X:.DP. 803228f: 2b89 b0c1 7f88 eec3 0529 b48f 4a1d 3ff5 .+......)....J.? 803229f: a189 95fd 6419 001a e9f6 807f 4957 7fa6 .....d......WI.. 80322af: be0a 8e7d fb53 1208 c214 4719 6907 e90c ..}.S......G.i.. 80322bf: b76f b683 62bd ebbb 6d3f ba5d d3ba bb5d o....b..?m]...]. 80322cf: 7bba 097c ae7f e2ec 1f9f 1eee 74ef 7637 .{|..........t7v 80322df: fc07 ff93 3819 3a8f 37ff 2efd c3ac cbe4 .....8.:.7...... 80322ef: 32c9 e27e e64f 19c2 74ac c47b 781c 9c52 .2~.O....t{..xR. 80322ff: 16bb 4fa4 0cc1 0b35 0c07 61b3 bab0 edc6 ...O..5....a.... 803230f: ec36 9156 f0f9 48b5 979a e556 c7d7 27ee 6.V....H..V....' 803231f: 9f44 7b50 3d7f 98fb e794 317f 49a2 fe69 D.P{.=.....1.Ii. 803232f: d41a 2ace 2ff3 79a0 7d52 429f 7df1 be80 ...*./.yR}.B.}.. 803233f: 66d0 439f 7cf9 fa79 d247 5280 4adf fac5 .f.C.|y.G..R.J.. 803234f: ee5b 11f3 dc49 f4e7 ecf6 6777 c3bf dcc1 [...I.....wg.... 803235f: 4f9d 9103 fb95 54de c1cf 8177 3b87 7271 .O.....T..w..;qr 803236f: 7fc7 284a 1ca8 17b3 0121 cc62 0f87 7243 ..J(....!.b...Cr 803237f: ef32 e34c 9e24 a7ce 6410 9b46 94ff 48db 2.L.$....dF....H 803238f: 059c 9824 cd0c 0128 7c86 b583 48a2 6c55 ..$...(..|...HUl 803239f: 068d c8ad cc14 ffa7 6842 3529 33fd 6ecb ........Bh)5.3.n 80323af: 6d87 0208 1858 f1a4 02bf 6062 908a f0b5 .m..X.....b`.... 80323bf: 5921 1a12 d459 904f 7ff4 3921 2444 415d !Y..Y.O...!9D$]A 80323cf: bd10 d6d1 dbf0 4bae 10a6 13ec 3bac f57c .......K.....;|. 80323df: 6975 eeef 9178 6bd7 e902 0915 1e12 faef ui..x..k........ 80323ef: 894f fd29 9fb5 5b5d c7fb f6dd 7585 d68d O.)...][.....u.. 80323ff: 04ba 5b20 1a07 901b d382 244d 2842 b993 .. [......M$B(.. 803240f: d446 47f9 7b45 5920 8674 f890 8482 97c4 F..GE{ Yt....... 803241f: cad4 1656 ef89 74e7 6404 7da5 7641 ec20 ..V....t.d.}Av . 803242f: 0b3b fe54 ecfc 889f 6da8 fa37 d80e 9f33 ;.T......m7...3. 803243f: d307 78b8 fa13 8738 861a 277a ae43 9f65 ...x..8...z'C.e. 803244f: 827e b0e5 b4ae a521 7849 1bf6 d502 8b22 ~.....!.Ix....". 803245f: 4093 7fc4 ce00 5db4 d0d9 f224 4ca8 3fd5 .@.....]..$..L.? 803246f: 26d3 b606 d303 6a41 b5d5 8138 2cfa b51f .&....Aj..8..,.. 803247f: d592 be14 7973 d257 692c 2864 d961 f15d ....syW.,id(a.]. 803248f: db9d 1b34 3406 3529 4542 e475 e04e 99b1 ..4..4)5BEu.N... 803249f: 7ae6 01dd b170 d33f 6bce 07f8 6f4e 3519 .z..p.?..k..No.5 80324af: ef4b 3b56 ca3b 31d3 1c04 0782 8fd1 bcef K.V;;..1........ 80324bf: 3373 4525 3158 3f75 54f2 05a4 df2f 8a2e s3%EX1u?.T../... 80324cf: 03d9 2319 5018 a580 d4de a6a3 086b 3d49 ...#.P......k.I= 80324df: 3f11 17be 863c da89 efb2 61c4 e696 b0e9 .?..<......a.... 80324ef: 50e8 eddf fbed 4430 6022 2449 c0ad d9f5 .P....0D"`I$.... 80324ff: e126 51a8 8d1f 1909 874d f939 72f1 9ebf &..Q....M.9..r.. 803250f: 7936 a471 3c57 ea2f 0770 e8f6 7981 0681 6yq.W....p.][O 803253f: af06 38a9 899c 6874 ab85 21ab fd09 61c9 ...8..th...!...a 803254f: 822b 0ecb e6ac 2229 932d d474 6fb2 a9b1 +.....)"-.t..o.. 803255f: 130b e012 f0e6 cd7b 07e0 4d1b dff7 a9bb ......{....M.... 803256f: 3e0d dc69 7161 1f1c 18ab db78 0c0b 4a16 .>i.aq....x....J 803257f: 0f2a 819c 6981 a79b 48c2 39f2 3306 13c4 *....i...H.9.3.. 803258f: d20e 7e0c 1b57 c5a6 7bfd b70f 572b 6b14 ...~W....{..+W.k 803259f: d2f9 bd09 7f0d 18be 39c7 51b0 cf6d 3771 .........9.Qm.q7 80325af: 6010 4263 29e2 9ddf 26c1 f715 2131 1491 .`cB.)...&..1!.. 80325bf: 3607 a3ca 8f67 249a 984f 93ce 9102 64b8 .6..g..$O......d 80325cf: 8fb1 8472 1ecb e02d 9fc7 91c0 4f01 1efd ..r...-......O.. 80325df: 418c 1bfe dd98 06b0 d058 da2e 300b 9d97 .A......X....0.. 80325ef: 4e1e e107 1943 1c2a 69e8 213e 94ae 1d7e .N..C.*..i>!..~. 80325ff: 6073 ab35 cdfd d2d7 0c87 5f9b aded 920a s`5........_.... 803260f: ed5c 91c3 f605 1060 93fb ee96 c409 952a \.....`.......*. 803261f: 0c02 ab06 3eab 5d60 e2e9 4290 ea36 6581 .....>`]...B6..e 803262f: af3a ac16 9ee7 b0ea 1d42 8040 2f8a 9eca :.......B.@../.. 803263f: 89d2 075c 0785 785b ac1f 95ad 5e48 8d83 ..\...[x....H^.. 803264f: 5509 3c0c 5157 c0a4 4e0d 0a5c 5640 9d42 .U.u...W[.. 803266f: bcd4 2056 1940 b7c0 18a7 ee4e 1307 d911 ..V @.....N..... 803267f: f56e a1d3 c9d5 782f bed5 9f53 873c e957 n...../x..S.<.W. 803268f: f08d e616 612e c4c9 7d34 9622 5381 f0c1 .....a..4}"..S.. 803269f: 3e92 ed6a f417 d032 2714 54c3 63d9 b70d .>j...2..'.T.c.. 80326af: b40b 58cc 5c96 3ec8 3e97 ec1e f34c 9326 ...X.\.>.>..L.&. 80326bf: 94fe 6302 6365 9864 6a16 616a d6aa e44b ...cecd..jja..K. 80326cf: 201d 01f4 46bd 8f7a e2b4 afd9 0ad9 48c7 . ...Fz........H 80326df: f5c3 8fa9 1701 85c3 e781 1a44 3d87 2f98 ..........D..=./ 80326ef: 17f1 0876 6a1b 5ecf 1e3a cc8e bfe9 c461 ..v..j.^:.....a. 80326ff: f05f 523f f05e c1a3 8879 1862 8d23 f460 _.?R^...y.b.#.`. 803270f: 8079 92bf da95 0a30 591e 1664 ff4c d83f y.....0..Yd.L.?. 803271f: f005 5675 6ffc b464 5d4b 1b7a 02e4 ff2e ..uV.od.K]z..... 803272f: 8c4e e782 7f70 2cf8 19e4 7d9e 8d2c 2682 N...p..,...},..& 803273f: 0e45 6240 74e4 3b52 14b1 275b 6fad 98a6 E.@b.tR;..['.o.. 803274f: b491 d1f8 7bc3 ff77 b497 fdb2 2dd6 1d68 .....{w......-h. 803275f: ccd6 a8a4 a85f 4993 fb73 e8ae ea2f bf66 ...._..Is.../.f. 803276f: 9ba1 99a1 4784 a0bb 4aa0 602e d7b8 5795 .....G...J.`...W 803277f: 12d0 80a4 ab21 2a97 4a5c bd58 bb75 e494 ....!..*\JX.u... 803278f: a86e 12c8 1661 41c8 d78e fb41 2441 de87 n...a..A..A.A$.. 803279f: 3ed7 9865 32b2 f864 190b 6461 4fc3 b5ea .>e..2d...ad.O.. 80327af: c0cf 9f7a fc73 0d81 65d8 a106 02e3 2086 ..z.s....e..... 80327bf: bf4d 1025 d3ca c67b 35ce 415c ac98 527f M.%...{..5\A...R 80327cf: 2ce0 b989 057c c3a2 73c2 f1d6 6edf d8f7 .,..|....s...n.. 80327df: 1fe1 8c20 3428 cca7 b25e 2984 fa7e 4d1c .. .(4..^..)~..M 80327ef: 9c5f b07d e634 ebc3 c887 7c99 b6e7 2061 _.}.4......|..a 80327ff: 436d 0a93 9891 fb61 8c8b 1ec5 62e5 6eac mC....a......b.n 803280f: 31a5 4e41 34fe 207f 6e90 c7ca 7260 2ccd .1AN.4. .n..`r., 803281f: fd36 d3c8 ed84 bb2a c77d c62f cc9d da47 6.....*.}./...G. 803282f: 0a71 bacb fd54 4f48 4918 15a2 9ae4 44e2 q...T.HO.I.....D 803283f: 0dec 78fd ba42 6653 08a4 8dd5 e94e 1ec1 ...xB.Sf....N... 803284f: ae65 a590 6ee2 632a 1d45 ea31 0dda 7c30 e....n*cE.1...0| 803285f: e5a5 996b 6bb9 1c37 a3f2 b13e 8ecb ce66 ..k..k7...>...f. 803286f: 58c9 207e 4ff3 17c8 ecf5 5def 74ba 0789 .X~ .O.....].t.. 803287f: 7cdc ccc1 cd37 b999 d7e3 5999 ebe5 07ce .|..7......Y.... 803288f: 755c e860 19ff 8f8a afe0 7d06 a59d 4a74 \u`........}..tJ 803289f: fcf0 74b5 da8f ba62 8491 91a9 7ba6 ca19 ...t..b......{.. 80328af: 7790 7f3c bc21 35a4 cfbe 91bb 1b3d c373 .w<.!..5....=.s. 80328bf: d3f0 f651 27a5 2a02 94a0 f9e6 a84b d50e ..Q..'.*....K... 80328cf: d532 e688 2552 2d4d a95d 9a4a bf9e d558 2...R%M-].J...X. 80328df: d687 effb 6f4f 63a8 e9d2 05d6 51dc f60e ....Oo.c.....Q.. 80328ef: fba5 04a3 1eed 6865 5fcf 3698 7655 63e3 ......eh._.6Uv.c 80328ff: 04e3 2f0b 7b5f 00b7 a4c1 a562 dba5 27f6 .../_{....b....' 803290f: 367e 2dad 77ec cdb8 179d 7de1 7de2 9044 ~6.-.w.....}.}D. 803291f: 73f0 b399 378c 5c4b a6e8 8cef 0d5e da6f .s...7K\....^.o. 803292f: 0765 994a 2ee1 0bf4 0c95 fe80 355a 2359 e.J.........Z5Y# 803293f: f72d 289a c2e9 2031 a425 1c1d 4fc4 f629 -..(..1 %....O). 803294f: b140 9852 307d e102 512e fb14 884b dff4 @.R.}0...Q..K... 803295f: 7168 91cb 9854 1f76 3e9e c0eb 3873 b97f hq..T.v..>..s8.. 803296f: f0ab e014 554b 6fa2 c79a 89e2 72c8 04d3 ....KU.o.....r.. 803297f: 2e56 e249 893f 3e47 4372 141d 6477 46d7 V.I.?.G>rC..wd.F 803298f: 74b0 a3e1 10fa 914b 7a78 d90f 3bc3 6f0f .t....K.xz...;.o 803299f: 42df 8715 a352 286b 400b 73f6 a8c9 d4ce .B..R.k(.@.s.... 80329af: c22f 6b71 3b7d 238b d24c 2d79 f27b b7a8 /.qk};.#L.y-{... 80329bf: f1b1 b3a8 51ce 95d4 0a8d 401c c9ce d84a .....Q.....@..J. 80329cf: a60f d61c accd 6aa6 82e8 3108 1f12 38d2 .......j...1...8 80329df: 8c07 1b65 98c9 1a66 eca5 7f55 5d41 7217 ..e...f...U.A].r 80329ef: 652b c6df ea1b 2e5c e882 d97b 6aaf 75ac +e....\...{..j.u 80329ff: b041 b17d 65cb 52ea 403a 58ec 7e10 2739 A.}..e.R:@.X.~9' 8032a0f: af43 efd8 cdd2 03a3 2139 57bb 91ba 1e3c C.......9!.W..<. 8032a1f: ae6a 793b 8498 5c1a 47fa e093 2a12 b746 j.;y...\.G...*F. 8032a2f: ad25 3527 7efc 320b c934 e1ec 4e2c a7ae %.'5.~.24...,N.. 8032a3f: e91c b145 1510 250a 2aa3 c284 5ef4 1695 ..E....%.*...^.. 8032a4f: eb40 c4aa 2a82 723a 0e5c a855 afc0 0c17 @....*:r\.U..... 8032a5f: de82 89d1 736b c4e9 545d 4099 588b 0f66 ....ks..]T.@.Xf. 8032a6f: 35a4 c7cc d94e b3d1 0973 9808 5004 d988 .5..N...s....P.. 8032a7f: 46cb 1f52 9e0f b219 617a f53c f927 06cb .FR.....za<.'... 8032a8f: 7ee8 f21e 6464 86d9 7240 9fb5 fafc b6e1 .~..dd..@r...... 8032a9f: 223f 4990 cdf3 10e6 7d87 6b0a 0ae8 81a8 ?".I.....}.k.... 8032aaf: 9b84 555f 68f8 5ae4 40d4 1389 0670 b61c .._U.h.Z.@..p... 8032abf: e639 9263 8268 a837 81e1 f4bb 0aba 189d 9.c.h.7......... 8032acf: 212a 9649 b0a0 903e f47a b490 2174 8d38 *!I...>.z...t!8. 8032adf: 0e02 9c9e a1c1 955a 09ea 5bd5 dddd 7c06 ......Z....[...| 8032aef: 808b 97d4 b090 7355 6e48 2471 5116 a55c ......UsHnq$.Q\. 8032aff: e1d3 640d b150 900c d518 7ae0 6771 1d8a ...dP......zqg.. 8032b0f: a656 dd95 a386 1f52 d72d 6444 c5f0 8a6b V.....R.-.Dd..k. 8032b1f: a8fa 7617 0246 5cd6 ad73 a6b9 d420 6496 ...vF..\s... ..d 8032b2f: f6da 446c 6bcb 2b18 01df f2f8 b7b7 4bbc ..lD.k.+.......K 8032b3f: 7edb 6677 c163 f797 49bb 3b61 5079 d7c8 .~wfc....Ia;yP.. 8032b4f: 7ade e902 4efc 9a0c b287 8e37 b5d3 29a7 .z...N....7....) 8032b5f: c054 58c1 8988 8dea 677c 1134 a877 3df9 T..X....|g4.w..= 8032b6f: 766a 7677 b2c9 857e 6ea9 bbde c3c3 221e jvwv..~..n....." 8032b7f: 3ba4 f6f9 edd3 438b 3d8e 95ca 5825 277f .;.....C.=..%X.' 8032b8f: 690e af63 130e 9926 f4c1 6bcf c39b f72c .ic...&....k..,. 8032b9f: f1a9 4d6b 0733 f9e2 f250 9d22 879d a40e ..kM3...P."..... 8032baf: 1970 06a1 08e0 6741 bb85 42b3 1bf5 7e3c p.....Ag...B..<~ 8032bbf: 38e1 a0f4 b5af 0c02 578e 0780 e1e9 e0f3 .8.......W...... 8032bcf: 4941 39e5 e8f0 af41 8f04 dcee e780 5944 AI.9..A.......DY 8032bdf: 391a 5a98 9d24 3883 c62a 6f9b febc 9843 .9.Z$..8*..o..C. 8032bef: d03f b069 4a24 af53 761e 1766 9109 f9b7 ?.i.$JS..vf..... 8032bff: 0c5a 0bb3 d29d 9c24 e1c4 57be 64fa f91c Z.....$....W.d.. 8032c0f: 7f3c 8f02 2a33 f38b 540f a346 0b27 4ec6 <...3*...TF.'..N 8032c1f: 5564 9713 9057 8647 44aa 481a 919e 4eae dU..W.G..D.H...N 8032c2f: e7a4 87d2 4b29 a915 72b5 5c36 05b8 c2d4 ....)K...r6\.... 8032c3f: 81de 60ae 86a4 8ed2 ca37 e519 9584 6db5 ...`....7......m 8032c4f: 3796 31ea 99a5 124c 8c99 7a5b aca1 555c .7.1..L...[z..\U 8032c5f: 4902 da2d 2cf5 21cb f1b9 74ba 313a cb14 .I-..,.!...t:1.. 8032c6f: f193 a37e 26c8 a837 4c28 6e44 31e9 f67a ..~..&7.(LDn.1z. 8032c7f: 86f7 abc3 abdd 5b5d fdb5 d6e4 ef3b 7bdc ......][....;..{ 8032c8f: 9a8f 7ebb 4574 66e8 6e2e eb44 cbe5 d861 ...~tE.f.nD...a. 8032c9f: e745 0625 ad45 174d 2110 59de a40b 192f E.%.E.M..!.Y../. 8032caf: 30c7 1bb9 ad5d eb49 2ae9 c132 8acd e6a4 .0..].I..*2..... 8032cbf: 0d84 bc7b 9931 e399 2be9 a4e3 cb33 22d2 ..{.1....+..3.." 8032ccf: aca5 690e d66c 26aa a941 bef8 8ae1 a333 ...il..&A.....3. 8032cdf: fab2 ca53 c4ea 9c5d 694a 6ad9 8426 8c0b ..S...].Ji.j&... 8032cef: a481 3d59 9cff 0d81 3018 56d2 ef49 9ea6 ..Y=.....0.VI... 8032cff: 8727 e3c1 c4f8 f914 9e74 99bf 4726 0c54 '.......t...>. 8032d0f: 2e7c e3f3 182f 271e e18d a32a e18e 0dcc |.../..'..*..... 8032d1f: a828 f2dd f607 0d9a a07b d6af 03f4 322a (.......{.....*2 8032d2f: f656 430e 4b31 5a0f 5d1b 3a29 2034 34da V..C1K.Z.]):4 .4 8032d3f: f472 0cb0 15d9 94d4 16bf c2ca 3251 2297 r...........Q2." 8032d4f: e5af f9af 0fdf f59d b910 db7e e36e 8a37 ..........~.n.7. 8032d5f: 65af 67d2 b6b3 3d2f df5d c741 d22e 54ef .e.g../=].A....T 8032d6f: 6e23 9660 0a0d 682f ed47 86fa b8f4 eead #n`.../hG....... 8032d7f: eec0 1860 35db f094 9198 c297 b03a 8f44 ..`..5......:.D. 8032d8f: 6db4 8a8e f0ec a088 a21b f252 e2c0 c82e .m........R..... 8032d9f: 717b a539 1eed f305 5900 bc93 d487 e87a {q9......Y....z. 8032daf: a127 5098 0512 b04f 917f 81fd 33e3 0592 '..P..O......3.. 8032dbf: c3b6 8305 f482 922d f484 3607 10cc 4216 ......-....6...B 8032dcf: 345c c766 d0a4 27ab bec6 906a 86b6 4f28 \4f....'..j...(O 8032ddf: 425b 4d75 61f5 1f90 65a5 c8dd a815 d6b8 [BuM.a...e...... 8032def: fca5 0a43 fa8a 9ab0 1d7d 138a 1304 7dea ..C.....}......} 8032dff: c4c9 6241 e473 f8ee e4bb 62e2 9443 74e5 ..Abs......bC..t 8032e0f: 7505 c306 bf70 629b cfe8 c527 d9a0 5080 .u..p..b..'....P 8032e1f: 8fb5 2d10 28dd 9490 b54c 8430 11c7 2e1b ...-.(..L.0..... 8032e2f: 987d 0d5d 03a3 3453 909b 1de1 1152 a60d }.]...S4....R... 8032e3f: b882 d5f2 4109 26bc df94 f6c4 ec97 69be .....A.&.......i 8032e4f: 189d 77bb 4a8e ceab 24e7 f2b3 9034 a5ce ...w.J...$..4... 8032e5f: 286c 381f 5331 ad87 9b9d 5262 d2f8 654e l(.81S....bR..Ne 8032e6f: 8d0d b9f0 66f9 c18b 448a 5881 eadf 4f2a .....f...D.X..*O 8032e7f: 7550 cd93 709b d41e 748b a886 1361 af47 Pu...p...t..a.G. 8032e8f: b486 f773 4ca8 da9d 2f06 00ff 8411 6c0e ..s..L.../.....l 8032e9f: 1b9a 3a28 806c 3645 15da 1c78 bee7 09c7 ..(:l.E6..x..... 8032eaf: 68bd b631 6a88 d1ab 0679 7aa8 fb1d ad19 .h1..j..y..z.... 8032ebf: ac47 63e3 fa53 c719 20a6 4761 0107 9c02 G..cS.... aG.... 8032ecf: a4e3 dc00 2bf4 ea84 3f51 c0a7 ff22 5d6c .....+..Q?..".l] 8032edf: cab9 8481 45f3 4add a19d 4895 d944 9537 .....E.J...HD.7. 8032eef: 5c52 9d79 b013 f38c e4a6 ead9 1f1e 5b07 R\y............[ 8032eff: 95de ac1f 5eae 637d a28b df15 888c e297 .....^}c........ 8032f0f: 4f88 40de 8b8d 5984 5345 9d1d 455c 387d .O.@...YES..\E}8 8032f1f: 6fa9 84b2 d794 bdaa 1955 7f89 1e48 5067 .o......U...H.gP 8032f2f: 8df7 0bc8 aded b6d5 4d44 b092 6cd4 5520 ........DM...l U 8032f3f: ba14 ed5f a12a 272b c243 d97d 9271 5a71 .._.*.+'C.}.q.qZ 8032f4f: 0a41 d2ad 0880 5468 5996 1138 b67e 42ad A.....hT.Y8.~..B 8032f5f: 0c57 ea80 5b0a d048 15a5 77e9 c6eb 8b65 W....[H....w..e. 8032f6f: 4849 e5cc 6488 1954 bc82 626d 89a0 36a5 IH...dT...mb...6 8032f7f: 9bae 77e4 247d e8ab 7d40 d2b8 858a afb4 ...w}$..@}...... 8032f8f: 4beb a8df 9842 a0ea 90c0 28a8 e1b5 aea5 .K..B......(.... 8032f9f: bfcb 9387 d714 3a13 7c3f dccd f707 552d .......:?|....-U 8032faf: bd1b 9be9 b5af 843c d716 d058 1352 a9f1 ......<...X.R... 8032fbf: a3a0 7cd1 78b2 8e16 1eb4 fe6f eee4 7bde ...|.x....o....{ 8032fcf: aeb7 ea7b f1ef d1f1 5f49 eefd acb0 8ef7 ..{.....I_...... 8032fdf: f220 957a 6a54 c48a 3d72 a82e 5171 0f82 .z.Tj..r=..qQ.. 8032fef: 186f ccc9 720d 1b5b 219d 212c 9ddb 5e93 o....r[..!,!...^ 8032fff: 107d 9fdd 2258 713c c059 b995 6af2 f979 }...X"c..? 803303f: cd21 2cf2 8254 517c 2ec4 72e1 1a93 5d95 !..,T.|Q...r...] 803304f: d4d7 d054 2739 1734 caf1 0cfd 3e17 0a10 ..T.9'4......>.. 803305f: 9045 2794 b46b b399 a641 0db1 9d70 028d E..'k...A...p... 803306f: 03d4 24d0 2e27 de00 b066 bb6b 8244 60f3 ...$'...f.k.D..` 803307f: 718f 61dd 6814 8a23 aca2 6b72 733a b14e .q.a.h#...rk:sN. 803308f: 4ed5 f902 0dba 14f3 114c 11e0 2896 3494 .N......L....(.4 803309f: 9655 94c3 1587 a9a0 de4a f323 408e c6b3 U.......J.#..@.. 80330af: 5a6a 43ed b265 332d c772 5b7d 9415 b598 jZ.Ce.-3r.}[.... 80330bf: ad4c 1b11 3739 f851 8ee3 8ca8 e883 35be L...97Q........5 80330cf: 9322 7f98 ed39 574b e770 f5ed fd2e 6f9f "...9.KWp......o 80330df: 8dbe 51bd aafd 641b 1943 e10c 7f7b b2ea ...Q...dC...{... 80330ef: 489d 0042 eefb db83 8da8 4946 8015 8d47 .HB.......FI..G. 80330ff: bb66 1e35 eed4 8dcd 20c9 b76b 6a22 4985 f.5...... k."j.I 803310f: 4636 531d 9b24 3504 f921 c7e6 dd09 93af 6F.S$..5!....... 803311f: 438d cc6a 3b71 1325 9264 9a82 a900 efb1 .Cj.q;%.d....... 803312f: 62ea 7819 b0c3 18c0 7530 70c3 ffbd 5f28 .b.x....0u.p..(_ 803313f: 011f 5c6c a316 878b 117c d611 c064 10d7 ..l\....|...d... 803314f: 595d a478 dec3 717c d1d0 10b7 4d61 ec2e ]Yx...|q....aM.. 803315f: 93a9 19c3 6145 32af db5b ae1b 5b2e a082 ....Ea.2[....[.. 803316f: e451 cc96 1327 8554 8989 aa01 982c 4903 Q...'.T.....,..I 803317f: 13c8 9424 114b 1cb8 ad9d 40c0 2051 11b1 ..$.K......@Q .. 803318f: 50d6 7214 81a3 755d 7075 570d d707 171a .P.r..]uup.W.... 803319f: 8107 8ab9 de84 e22d 2809 535d 3d14 4c42 ......-..(]S.=BL 80331af: f9cd 581a 600d 1f75 5e4e b2fc d0a0 dc02 ...X.`u.N^...... 80331bf: 1af1 f9fb 83bd 9884 a506 875e 10ad 7c52 ..........^...R| 80331cf: dfc5 7709 9849 8fe3 e017 9c1f 05d3 a663 ...wI.........c. 80331df: e392 adcb f362 20f5 09f0 4938 b403 8f0d ....b.. ..8I.... 80331ef: e4c3 2d3a 2ca1 141f b525 222e 1253 398d ..:-.,..%.."S..9 80331ff: a558 907a 3a72 8be0 7b34 e463 f023 78d6 X.z.r:..4{c.#..x 803320f: 3e3a 53d6 bc41 a12b 6b8e 6c2f 822a d023 :>.SA.+..k/l*.#. 803321f: 78d9 a73a 5933 b2f1 fd23 746a 7c82 2748 .x:.3Y..#.jt.|H' 803322f: b83b 1807 b2ed 09c5 4309 e8bd 2066 76e4 ;........C..f .v 803323f: 8b29 c9d0 fac3 2d64 9f2a 3bd4 8902 c313 ).....d-*..;.... 803324f: 24f7 f8e9 49b8 4559 e5ea f839 cb5a e874 .$...IYE..9.Z.t. 803325f: 90c4 d1ac 62f8 0319 d7f2 12cf a033 dd77 .....b......3.w. 803326f: 0840 7b25 1e5c 2b71 4972 cc7a d567 a909 @.%{\.q+rIz.g... 803327f: 8683 b653 4bb3 568e a744 3d7c 0f4b 1a90 ..S..K.VD.|=K... 803328f: 387a cd9f 1452 39f5 af15 890d 3c93 3c48 z8..R..9......& 80332df: 2ccf 25c2 1f60 45a4 bca4 9e00 17b9 e785 .,.%`..E........ 80332ef: 8873 756d c975 2a8b bf74 6aba 6fc3 4315 s.muu..*t..j.o.C 80332ff: f964 7b23 9745 9681 0082 5e54 6f0e e7ea d.#{E.....T^.o.. 803330f: e3e3 55ea cce5 2ce8 a218 a640 541a 9557 ...U...,..@..TW. 803331f: fc05 081f 376b 1f76 fbbb c4ee ba9d 9b89 ....k7v......... 803332f: 32a2 e886 dc28 6775 49f8 99b2 f07c 71d0 .2..(.ug.I..|..q 803333f: 87df c0ea bbe3 de0f d229 7db7 3354 cae8 ........)..}T3.. 803334f: a735 594f bc4e 5762 cdec 9d2c fdfe b51c 5.OYN.bW..,..... 803335f: ea07 327a a646 9706 0f60 5a13 a282 9242 ..z2F...`..Z..B. 803336f: 3056 5d37 9a07 a60e c9bd c260 5834 f3de V07]......`.4X.. 803337f: e8ce bc1c 4ed9 dbb6 70cf a012 118e 775c .....N...p....\w 803338f: ba94 1fe3 ce2a c1af 6503 c895 0636 8f0f ....*....e..6... 803339f: 4882 bc69 faba e7be b10d f430 050f 23cb .Hi.......0....# 80333af: 750f 7bf7 767b 721b 0e19 b934 63e0 bb8c .u.{{v.r..4..c.. 80333bf: 6f00 b95a 39d5 f438 a431 63d4 5d0f de30 .oZ..98.1..c.]0. 80333cf: 79a7 d06e da75 e216 d28d 03bb a85a dac0 .yn.u.......Z... 80333df: 8578 413b d5f2 5c7d e5ec ebe2 a3b4 cb38 x.;A..}\......8. 80333ef: a7db 2499 61f1 0e06 1a29 c784 f175 728a ...$.a..)...u..r 80333ff: 294a 4381 6942 38ef b83d 0141 1148 42b5 J).CBi.8=.A.H..B 803340f: 3d94 2005 f840 40cc 49d9 1d8c a5d1 0b85 .=. @..@.I...... 803341f: 3db8 dbcd d989 914b c15b 41ef 7f6b 7575 .=....K.[..Ak.uu 803342f: 391f 745f 4f04 2041 90dd 8e6c f689 fec9 .9_t.OA ..l..... 803343f: 0900 db2d f993 b1a6 9c25 dea4 ec50 56f4 ..-.....%...P..V 803344f: ff30 0063 cc61 4064 18f3 2131 5303 ace6 0.c.a.d@..1!.S.. 803345f: abd4 2d7a 65b1 8d4c 2957 4309 5e96 eb52 ..z-.eL.W).C.^R. 803346f: 0d12 5c56 eba6 2905 c0d6 0808 16f8 8af9 ..V\...)........ 803347f: 8a70 e431 c586 14a1 8faa d96e 5377 ce0b p.1.......n.wS.. 803348f: 9504 5a52 8a53 2098 6839 9815 144c 3fb8 ..RZS.. 9h..L..? 803349f: 0d6a 4c29 41d4 0480 b584 4e90 dc63 34c8 j.)L.A.....Nc..4 80334af: 4616 e220 208b 3dbe 5e47 8401 6665 96d6 .F .. .=G^..ef.. 80334bf: aa2e 5846 32b8 e42e a432 8ac2 bc31 5e1a ..FX.2..2...1..^ 80334cf: 169d a2d5 7382 445a 4aca 552b 00f2 57a1 .....sZD.J+U...W 80334df: 3b32 220c 90a8 2880 6956 7970 4943 0201 2;."...(VipyCI.. 80334ef: 219c 17d9 7152 6a6c d01f 750c 8a47 24c7 .!..Rqlj...uG..$ 80334ff: a184 d63b 5a07 0823 0cc9 f3b5 13eb 349b ..;..Z#........4 803350f: 1a4e a888 bc51 9ee2 f498 e364 8c1c 582d N...Q.....d...-X 803351f: 6330 162f 8416 045c 2c2b 1611 2ad8 630d 0c/...\.+,...*.c 803352f: c0e8 3ac8 8b88 6131 63a8 5471 7e95 c45a ...:..1a.cqT.~Z. 803353f: 16c2 4292 73b2 e74c b5a5 0959 87bd d79d ...B.sL...Y..... 803354f: 0c84 c515 8feb 0c48 c4e9 a6c6 d57a 40d8 ......H.....z..@ 803355f: 3d81 a3d4 9034 a721 46c2 09d8 876a 756c .=..4.!..F..j.lu 803356f: 40d7 8559 eaff 820a 4124 0279 4598 24f1 .@Y.....$Ay..E.$ 803357f: 9162 5088 e151 64b1 6432 ea59 60ec 2cbe b..PQ..d2dY..`., 803358f: 8aa5 8664 5913 21e3 63e5 24b5 6942 131c ..d..Y.!.c.$Bi.. 803359f: ba61 890f 9062 3f9e dbd8 4506 1a49 e446 a...b..?...EI.F. 80335af: f22d 41f0 f909 0c1d 8d17 a15a d691 b48c -..A......Z..... 80335bf: 64ae 93fb 169e cfed aa1e 34c4 6a5d 93fb .d.........4]j.. 80335cf: 153e be70 a9d9 42cf 0eda d625 a80d b421 >.p....B..%...!. 80335df: 6e18 56e2 db96 40cb ef87 7910 65c3 8fa0 .n.V...@...y.e.. 80335ef: f418 6ed1 247f 0035 5ef1 33b4 85da 2375 ...n.$5..^.3..u# 80335ff: 45ab 3660 d813 d447 fe48 8f40 77c2 fb74 .E`6..G.H.@..wt. 803360f: 71e2 908a 9833 e9d6 a807 d8c7 a13f a2d0 .q..3.......?... 803361f: 5e20 1171 95fd 1cfd 0379 6717 9f26 55f1 ^q.....y..g&..U 803362f: 6c01 42a1 b82b 3686 dae6 9b28 9987 52f8 .l.B+..6..(....R 803363f: c8cb 74b0 177c 25aa 1a9e e088 cefb 2d52 ...t|..%......R- 803364f: d656 8757 693a c39c c339 4b53 c3c7 7fd7 V.W.:i..9.SK.... 803365f: 28fa 1f6f bfe3 eb0b 2d23 882e f0aa 01e5 .(o.....#-...... 803366f: 0178 cb81 494e 8b82 b839 f829 2133 ae67 x...NI..9.).3!g. 803367f: d3d6 d262 7f5b 6394 730e 5e0a 7025 a9ca ..b.[..c.s.^%p.. 803368f: 46e8 492a ad1a aae6 5849 1135 85d5 bcec .F*I....IX5..... 803369f: 103d 5ba3 674f fb2d a3d1 2f80 d15d d75f =..[Og-..../]._. 80336af: 5dae 54d1 1977 5243 2497 4b3e 441b 9beb .].Tw.CR.$>K.D.. 80336bf: 726a 21e6 8343 33d2 28ce f230 0acb 4623 jr.!C..3.(0...#F 80336cf: 6a13 70c7 8e73 4fc2 0706 e635 ba34 3b83 .j.ps..O..5.4..; 80336df: 181b e732 606f 6a40 4a9b 970e a03a 9f9a ..2.o`@j.J..:... 80336ef: 2563 927c e628 841d 7c65 d203 26a3 cbc2 c%|.(...e|...&.. 80336ff: faa1 cf6c 4f7b 39ae 6e9c ef44 ab5e 703e ..l.{O.9.nD.^.>p 803370f: c113 0618 930d ab26 1ca1 5a64 1ca2 5016 ......&...dZ...P 803371f: 4e63 015d d012 ebad 7f6e 8608 ae60 07c1 cN].....n...`... 803372f: e863 2982 573d 85a8 12f1 6675 1873 d472 c..)=W....ufs.r. 803373f: a95e 7623 9773 7299 1c35 4420 d5c5 2a32 ^.#vs..r5. D..2* 803374f: a282 c16d 933e 1b8a 4691 c2a5 3f58 610b ..m.>....F..X?.a 803375f: e93f 255f 52cb 1745 3ed2 fc47 1ed5 a4ee ?._%.RE..>G..... 803376f: cc44 ea06 a527 5af4 a435 c097 c266 b11d D...'..Z5...f... 803377f: 17db 0452 82c0 93c3 89ee f88f 91b8 82fc ..R............. 803378f: b60f df44 d1ea 0c12 95bf c278 7b67 7bc8 ..D.......x.g{.{ 803379f: 8d2f 6357 742f c971 0588 76d5 e142 ba12 /.Wc/tq....vB... 80337af: 0336 8707 b03e aaa2 bed3 0b47 b47a 7087 6...>.....G.z..p 80337bf: 65a0 3223 4e34 d02f 1a4c 6af1 436f bd73 .e#24N/.L..joCs. 80337cf: 42f2 79c8 b029 2199 3580 0904 cfe4 3712 .B.y)..!.5.....7 80337df: 8d14 1b71 8e0e 80b1 b416 9600 00ee 0c6d ..q...........m. 80337ef: da2e 54d6 b144 e28f ce24 db83 fad6 a3d6 ...TD...$....... 80337ff: 62e4 a2ef 7fcd 2fab f041 ad9c 8f8b 4d92 .b...../A......M 803380f: 1854 5bef 53b8 2184 43e4 e4e5 d943 fbea T..[.S.!.C..C... 803381f: 1713 3521 a829 4156 60f0 7c8e 6954 1ab1 ..!5).VA.`.|Ti.. 803382f: 42b2 d003 7f58 62eb decf 97b2 cbad 59ab .B..X..b.......Y 803383f: 2294 6cf5 00fa 3ace 39dc 9f1b 21aa 8d41 .".l...:.9...!A. 803384f: d70f 2c10 8b5b 1822 511a 6eaf e405 97a0 ...,[."..Q.n.... 803385f: f44f 9465 21f2 97d0 3413 1186 1fac 47d0 O.e..!...4.....G 803386f: f816 dd3e 9f81 e425 50e0 b6fd 3159 5348 ..>...%..P..Y1HS 803387f: 01a8 078f 3c01 e157 d592 c1bb 2689 e67c .....7... 8033a8f: 1c0b f982 8122 7a44 e882 ce35 3540 ba23 ....".Dz..5.@5#. 8033a9f: 1944 def5 8782 76a6 d2ca ae0b 7d16 0d62 D......v.....}b. 8033aaf: 434c 2652 0b49 0b88 5eae 0481 c756 3d3f LCR&I....^..V.?= 8033abf: 53b1 43be d55d 4eda 08d3 00ea ac31 2fe5 .S.C]..N....1../ 8033acf: f83a 1d80 7962 40f9 d3f6 9e8f f66a 6710 :...by.@....j..g 8033adf: 88d6 e6a9 c194 a830 0e75 758a 69fc 9034 ......0.u..u.i4. 8033aef: 2b3f 2846 3229 4dc0 85de b9b5 5800 1e93 ?+F()2.M.....X.. 8033aff: ce6f 4c83 1969 b671 4532 4d21 c199 89d1 o..Li.q.2E!M.... 8033b0f: 0b4a fd39 01ff 79b5 91d0 50c2 0000 J.9....y...P.. 08033b1d : 8033b1d: 692f 646e 7865 682e 6d74 006c 5448 5054 /index.html.HTTP 8033b2d: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 8033b3d: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 8033b4d: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 8033b5d: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 8033b6d: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 8033b7d: 6e65 2d74 654c 676e 6874 203a 3039 0d35 ent-Length: 905. 8033b8d: 430a 6e6f 656e 7463 6f69 3a6e 4320 6f6c .Connection: Clo 8033b9d: 6573 0a0d 6f43 746e 6e65 2d74 7974 6570 se..Content-type 8033bad: 203a 6574 7478 682f 6d74 0d6c 430a 6e6f : text/html..Con 8033bbd: 6574 746e 452d 636e 646f 6e69 3a67 6720 tent-Encoding: g 8033bcd: 697a 0d70 0d0a 1f0a 088b 0000 0000 0400 zip............. 8033bdd: 9d0a 5d55 d46f 1446 2bfd f753 9125 b662 ..U]o.F..+S.%.b. 8033bed: 21bc 6d75 0429 f12a 8454 aada 453c f6b3 .!um).*.T.....k.=.... 8033c2d: 0cee babf fdf1 0fd6 6f77 14df 6709 3869 ........wo...gi8 8033c3d: 77b4 ca91 277c 3cf0 2444 70e3 1198 114b .w..|'..u.. 8033d3d: 5db3 7f6d d884 a5fc 6585 6ac4 4682 c9f5 .]m......e.j.F.. 8033d4d: c967 f4d8 0855 8238 be55 5ba3 a1fa 0579 g...U.8.U..[..y. 8033d5d: 1fd5 bd58 99cd 3639 e627 dda8 f9c3 9534 ..X...96'.....4. 8033d6d: 8b8f e52e 39a5 7e6d 6735 5948 f920 39b1 .....9m~5gHY ..9 8033d7d: 666a 26ff 6a0d b278 6095 ce45 2569 12cb jf.&.jx..`E.i%.. 8033d8d: 3a42 9615 c32e 92de bdab f1bc b57a a517 B:..........z... 8033d9d: 29cc ee15 75de b90f e82b 27ed 2bdb acec .)...u..+..'.+.. 8033dad: a1ad 176f db53 f338 eed2 640e 337f e6a7 ..o.S.8....d.3.. 8033dbd: 9cc8 f308 7c01 600f 8433 b796 d66b 2c05 .....|.`3...k.., 8033dcd: 21eb 60d4 d1eb 45ae c06d 5f23 b4b3 e376 .!.`...Em.#_..v. 8033ddd: 570a 9a1c cde7 6823 1ef7 6780 2e66 38f0 .W....#h...gf..8 8033ded: 1f34 df60 f999 ccd3 d15d 58b9 69fb 6b73 4.`.....]..X.isk 8033dfd: 761d 68c6 4bda b083 6253 0b73 0338 e21b .v.h.K..Sbs.8... 8033e0d: bf61 1c0c 47e8 27e0 1fff c6fa a067 ce3b a....G.'....g.;. 8033e1d: cd87 404c 671c c802 6504 787a 7caa 5c7b ..L@.g...ezx.|{\ 8033e2d: fdd1 252f 45fb 4598 9fcd 8505 cd39 683b ../%.E.E....9.;h 8033e3d: d0f9 05fc f66b 2b31 76a7 7b3a ec24 96ba ....k.1+.v:{$... 8033e4d: 38a8 3b26 b66f 7055 1a2e 1b05 be74 2815 .8&;o.Up....t..( 8033e5d: 07f0 7d82 3cbc ad86 b821 1e68 8758 a6a0 ...}.<..!.h.X... 8033e6d: b6f3 ee39 43d1 b2a6 faca 0eea 499c a840 ..9..C.......I@. 8033e7d: 56df 5a9f baf4 a664 3e0a cf33 e8c0 1504 .V.Z..d..>3..... 8033e8d: b817 6efe ce66 fbb0 8e96 d435 105b 5b41 ...nf.....5.[.A[ 8033e9d: 71c0 a76e 1fb3 bff9 f618 e605 04f6 b6bd .qn............. 8033ead: ff63 02f4 05fe 8e93 6f24 d247 3ffe c8f6 c.......$oG..?.. 8033ebd: 1cbc 7001 e87d 44fe e3ac b14f 9803 00ea ...p}..D..O..... 8033ecd: 177c b718 9839 0763 8058 8f67 2a98 a9cf |...9.c.X.g..*.. 8033edd: 66da 2eca f12d cdda ba31 fcd5 dc0e a239 .f..-...1.....9. 8033eed: 4099 4560 d859 f66a 78e4 0d6b ceec f38d .@`EY.j..xk..... 8033efd: 6683 c0f7 a32a 94ed eec6 38a8 733f 369f .f..*......8?s.6 8033f0d: 15ae 7979 cf6f 1d13 aa55 c164 257b 424e ..yyo...U.d.{%NB 8033f1d: 5da6 dc1e 1393 bed9 84f5 a2ae d9e5 4f74 .]............tO 8033f2d: a13b 6adc fa4c 5965 2c61 7e59 0387 56e6 ;..jL.eYa,Y~...V 8033f3d: b6be 51be 4aca fa66 610e 74d0 b6b2 2dfe ...Q.Jf..a.t...- 8033f4d: 5ed4 0c82 41dc 0fff f11e ea43 07f8 0000 .^...A....C..... 8033f5d: 0026 0020 6170 7373 6f77 6472 003d 6f72 &. .password=.ro 8033f6d: 6574 756b 7370 4800 5454 0050 6572 6461 tekups.HTTP.read 8033f7d: 635f 6d6f 756d 696e 7974 003d 7277 7469 _community=.writ 8033f8d: 5f65 6f63 6d6d 6e75 7469 3d79 6d00 6e61 e_community=.man 8033f9d: 6761 7265 5049 003d 616d 616e 6567 4972 agerIP=.managerI 8033fad: 3250 003d 616d 616e 6567 4972 3350 003d P2=.managerIP3=. 8033fbd: 6864 7063 003d 7069 6461 7264 003d 7767 dhcp=.ipaddr=.gw 8033fcd: 003d 616d 6b73 003d 003f 7270 646f 7461 =.mask=.?.prodat 8033fdd: 3d65 4800 5454 2f50 2e31 2030 3032 2030 e=.HTTP/1.0 200 8033fed: 4b4f 0a0d 6f43 746e 6e65 2d74 7954 6570 OK..Content-Type 8033ffd: 743a 7865 2f74 7468 6c6d 0a0d 0a0d 7254 :text/html....Tr 803400d: 6575 6f00 6e77 7265 003d 7973 4c73 636f ue.owner=.sysLoc 803401d: 7461 6f69 3d6e 6300 6d6f 656d 746e 003d ation=.comment=. 803402d: 4547 2054 6d2f 6961 2e6e 7363 0073 4547 GET /main.css.GE 803403d: 2054 722f 746f 6b65 702e 676e 4700 5445 T /rotek.png.GET 803404d: 2f20 6166 6976 6f63 2e6e 6369 006f 4547 /favicon.ico.GE 803405d: 2054 6d2f 6961 2e6e 736a 4700 5445 2f20 T /main.js.GET / 803406d: 6573 7474 6e69 7367 682e 6d74 006c 4547 settings.html.GE 803407d: 2054 692f 666e 2e6f 7468 6c6d 4700 5445 T /info.html.GET 803408d: 2f20 6567 4a74 6f73 2e6e 6763 0069 4547 /getJson.cgi.GE 803409d: 2054 732f 7465 6974 676e 2e73 6763 0069 T /settings.cgi. 80340ad: 4547 2054 692f 666e 2e6f 6763 0069 4547 GET /info.cgi.GE 80340bd: 2054 722f 7365 7465 632e 6967 4700 5445 T /reset.cgi.GET 80340cd: 2f20 6572 6f62 746f 632e 6967 4700 5445 /reboot.cgi.GET 80340dd: 2f20 6f63 666e 7269 2e6d 6763 0069 692f /confirm.cgi./i 80340ed: 646e 7865 682e 6d74 006c 4f50 5453 2f20 ndex.html.POST / 80340fd: 6863 6365 706b 6477 632e 6967 4700 5445 checkpwd.cgi.GET 803410d: 2f20 6573 5074 6f72 6164 6574 632e 6967 /setProdate.cgi 803411d: 4700 5445 2f20 7270 676f 6e6f 632e 6967 .GET /progon.cgi 803412d: 0000 d000 ... 08034130 : 8034130: 0dd0 0803 0de4 0803 0df0 0803 04fa 0000 ................ 8034140: 0001 0000 .... 08034144 : 8034144: 7814 0803 12ea 0803 12fa 0803 08c5 0000 .x.............. 8034154: 0001 0000 .... 08034158 : 8034158: 4130 0803 416c 0803 4178 0803 192d 0000 0A..lA..xA..-... 8034168: 0001 0000 .... 0803416c : 803416c: 6d2f 6961 2e6e 7363 0073 0000 5448 5054 /main.css...HTTP 803417c: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 803418c: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 803419c: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 80341ac: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 80341bc: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 80341cc: 6e65 2d74 654c 676e 6874 203a 3236 3533 ent-Length: 6235 80341dc: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 80341ec: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 80341fc: 3a65 7420 7865 2f74 7363 0d73 430a 6e6f e: text/css..Con 803420c: 6574 746e 452d 636e 646f 6e69 3a67 6720 tent-Encoding: g 803421c: 697a 0d70 430a 6361 6568 432d 6e6f 7274 zip..Cache-Contr 803422c: 6c6f 203a 7270 7669 7461 2c65 6d20 7861 ol: private, max 803423c: 612d 6567 383d 3436 3030 0a0d 0a0d 8b1f -age=86400...... 803424c: 0008 0000 0000 0a04 3cd5 8f6b 38e3 7f8e .........LO..<..`..3. 803426c: 3b87 06e0 0fd8 9f3b eafa 1383 152b 3b4f .;....;.....+.O; 803427c: 6076 d53b 93d5 7fcb 523f 2522 afca e764 v`;.....?R"%..d. 803428c: 0380 e90e 2d87 1251 9149 4514 fad1 fbe1 .....-Q.I..E.... 803429c: 053f 5945 921d fb3c 4d5d 75b6 bc1d 262d ?.EY..<.]M.u..-& 80342ac: c9d3 f83c e0ef ff97 47f8 9ff0 56d9 b515 ..<......G...V.. 80342bc: b782 acd7 6499 0fe5 3616 fef8 4987 be5e .....d...6...I^. 80342cc: 6196 3552 36d9 6157 6752 0aa9 d553 5924 .aR5.6WaRg..S.$Y 80342dc: 875e ecbb 9b75 9b1c 2cac f1f0 a954 5770 ^...u....,..T.pW 80342ec: 8d96 c2aa 4abd fc52 b5ef 4f2a f0c7 6490 .....JR...*O...d 80342fc: 7845 c550 2c29 b792 56b0 dd5b 3ea2 0e1d ExP.),...V[..>.. 803430c: f549 9ced f566 4f31 c5be bc9b 7edc 4cb9 I...f.1O.....~.L 803431c: 63ea 6c56 f7ca 925f 4bea ee98 f38a 2cae .cVl.._..K....., 803432c: a89a be6e 2ae5 1ace 6020 406b 2a7e 43df ..n..*.. `k@~*.C 803433c: 0b0d 410f 1c56 4d4f ffa8 dcfd 3b7c 1faa ...AV.OM....|;.. 803434c: 956b db54 cbfd fa39 36aa b25f 4a26 478e k.T...9..6_.&J.G 803435c: 4928 ad8a 8b8a 50b2 0997 b220 aa49 3eb0 (I.....P.. .I..> 803436c: e06d f1ef 2c7c 0ceb 8a91 952b 4d27 a6f6 m...|,....+.'M.. 803437c: 4c2e b357 373f 1dea c87a d7b3 ce22 aed5 .LW.?7..z..."... 803438c: 4cb9 2012 4de0 9385 534d 764c f6e5 eb54 .L. .M..MSLv..T. 803439c: 58c7 ee3c 37cb 1f20 7947 b3ce 84e7 ecab .X<..7 .Gy...... 80343ac: aebb 1d37 6aa7 565b 2630 6e0c 0b51 f94f ..7..j[V0&.nQ.O. 80343bc: 49a4 0036 9f5e acf3 fa66 7d75 7876 730d .I6.^...f.u}vx.s 80343cc: aaf5 f48a 29bc e02b 3c72 98bd b0f7 4349 .....)+.r<....IC 80343dc: f740 a498 5669 42bc bef1 e439 7f86 e4bb @...iV.B..9..... 80343ec: e590 e2df 54bf 9259 ff87 f2ae 0537 99d3 .....TY.....7... 80343fc: 7584 d452 ad51 6caa 66b7 694e 6b62 9310 .uR.Q..l.fNibk.. 803440c: 4928 3b7f 4dd5 9b3c 3f4e a3ac 1d43 d6f5 (I.;.M<.N?..C... 803441c: 365c fa65 0ced f8f3 159a 74f1 49bd 5fb6 \6e........t.I._ 803442c: ce70 348b 96da 5979 77c5 7b7f dbfc ff4f p..4..yY.w.{..O. 803443c: 5b36 dbd3 b162 2358 766b f979 fa35 d716 6[..b.X#kvy.5... 803444c: aadb f3cc 724b b34a dc32 c526 525b c787 ....KrJ.2.&.[R.. 803445c: 7caa 54ad 875d 206f a569 8e95 c8ac 42b3 .|.T].o i......B 803446c: 5a45 d648 03d0 9fe2 acd3 926c 615a e9ad EZH.......l.Za.. 803447c: d808 7cd8 79f7 620b 9d03 2fd7 6d1f c817 ...|.y.b.../.m.. 803448c: f5be 655e fbaf 9806 79f3 a59f 2aa9 c25e ..^e.....y...*^. 803449c: 1d46 fe40 e51a 5dc1 7392 9687 0406 3ea8 F.@....].s.....> 80344ac: 9526 9a2a 124b 1093 b124 cb99 d4f2 0a20 &.*.K...$..... . 80344bc: 71d0 d9b2 9f54 ac9b d5c9 cd0b b450 9b29 .q..T.......P.). 80344cc: 3ca6 b3c4 7be3 c290 4aa3 9b2f 3cb0 4636 .<...{...J/..<6F 80344dc: 6a3b b3c0 3578 f4f3 60d5 30f7 c985 319b ;j..x5...`.0...1 80344ec: 275b 0ff7 10ea d74c 1346 6a60 b9e2 5c3a ['....L.F.`j..:\ 80344fc: e780 ce5f d6c4 54e9 3eb2 dbbe a6ed 1a97 .._....T.>...... 803450c: 9db4 1f66 33a7 9c7e b87e b8b0 9ebb 561e ..f..3~.~......V 803451c: d61f b19a 97cc de41 9aa2 e534 8e31 2b26 ......A...4.1.&+ 803452c: 1d18 027a 34e2 d155 ae64 de4b 355e e3e7 ..z..4U.d.K.^5.. 803453c: 4c0a c7c0 cf33 6c72 7cd8 f631 4981 019a .L..3.rl.|1..I.. 803454c: cb41 f1e9 b2fd ceaf 6476 4116 fed0 5008 A.......vd.A...P 803455c: 1946 59c6 7604 0303 41df cb06 f1df afa1 F..Y.v...A...... 803456c: bfae 72f8 8b04 6284 730b 3896 928c 5353 ...r...b.s.8..SS 803457c: b65e d825 2fb1 149b 4de4 1e81 8e1c a29e ^.%../...M...... 803458c: ca1c 84a2 dea9 d0aa 093e 03f6 97f6 09cd ........>....... 803459c: 2f88 6342 dc79 aa5c ac1c 1b9b 2ad3 7206 ./Bcy.\......*.r 80345ac: ce3c 3d8a 5ae8 ca43 6f40 3417 da23 4480 <..=.ZC.@o.4#..D 80345bc: 1130 c25f d7c9 ad0a 1555 0080 79e8 9922 0._.....U....y". 80345cc: 8258 984c 1d41 6f25 9d59 726d c8c5 1680 X.L.A.%oY.mr.... 80345dc: e8c0 acc6 6168 81dd 37cd 8556 45d0 608b ....ha...7V..E.` 80345ec: a5ac 93b1 f8a6 90c5 8a61 f740 e354 c095 ........a.@.T... 80345fc: 1f5c a6b2 98d7 f69a edeb aaa9 d941 658f \...........A..e 803460c: d306 1155 9f3a b0c1 8027 fa5d 8a12 6d61 ..U.:...'.]...am 803461c: 99e1 a51a 976a f29c 1a86 b1c5 669e 4a6d ....j........fmJ 803462c: aca3 c028 6a8a 7716 9dcb 5b9d 3b5b 41a8 ..(..j.w...[[;.A 803463c: 62c1 a182 a920 2b32 45d9 0d2c bddb 7eda .b.. .2+.E,....~ 803464c: 7901 48f1 12ac 40b0 428e 4e21 efa6 015e .y.H...@.B!N..^. 803465c: 5514 0dfd 259c e316 a717 46c3 2f55 1040 .U...%.....FU/@. 803466c: 4dad ca9a 9708 88bd 6966 1a0c 8cec 24aa .M......fi.....$ 803467c: eb34 968f d16a bdb2 0a04 ff14 5a77 9765 4...j.......wZe. 803468c: b10a a2a8 ed92 9532 92a7 84d3 a381 14d4 ......2......... 803469c: 6044 b7e8 ef2a 7621 81a8 225b 1707 3d74 D`..*.!v..["..t= 80346ac: 0838 95ae c98a 8c02 3052 47b9 14db 1e4c 8.......R0.G..L. 80346bc: dfe0 2b35 3063 be3f ccb3 49a0 cbae 4b3c ..5+c0?....I...b`&.. 803474c: 7279 95ac f100 5b8a c6e0 6d1b 5301 0fa1 yr.....[...m.S.. 803475c: c3ea 61d8 c98f f82b 3459 e6f7 db85 931d ...a..+.Y4...... 803476c: 6502 bc19 5720 4b6f a818 bf2a 2d72 9a3e .e.. WoK..*.r->. 803477c: eb62 806f 97a7 582b f414 1752 39ff f3f8 b.o...+X..R..9.. 803478c: cd25 9ede dfb5 fe7d a59a 3ecd 2f9e 2057 %.....}....>./W 803479c: 64b2 1ed2 99f1 7964 6b86 81a8 ee74 7c4a .d....dy.k..t.J| 80347ac: f2aa 2aef c3f0 4cbf c58e c7eb 8220 4106 ...*...L.... ..A 80347bc: c334 8b7f aa32 b814 cdc2 74da 9dac ea3b 4...2......t..;. 80347cc: 0d17 7488 b4e0 b0d7 75c5 32fc 6741 9c03 ...t.....u.2Ag.. 80347dc: 43ad 5bf2 9f68 a7c1 cf37 249b a7a5 8bf2 .C.[h...7..$.... 80347ec: ca25 6a38 ca34 c3bd b67e d8b4 9547 c576 %.8j4...~...G.v. 80347fc: 0690 07a2 e5b4 a318 8276 987f e434 eb6d ........v...4.m. 803480c: a1b1 61e7 a702 f441 f0b0 73a8 e8b0 a82d ...a..A....s..-. 803481c: f678 bd00 8f06 c80f a62d 2b25 ba46 568c x.......-.%+F..V 803482c: e0d8 748f fc9b d636 e2ed 750f 1c0b eb1e ...t..6....u.... 803483c: 0674 fdfc 70a7 9505 7d02 1f39 c960 c9a1 t....p...}9.`... 803484c: 4107 b370 8e40 5cdd 970b 8d81 9968 6816 .Ap.@..\....h..h 803485c: 87b0 dbbf c0ed 829a b65b 524f ee10 8069 ........[.OR..i. 803486c: 1536 ad85 dd7a df24 434d 4dfc 1fe6 cf79 6...z.$.MC.M..y. 803487c: 3dc5 b405 8b07 e036 a756 c9ec 162e c90f .=....6.V....... 803488c: 61e6 561c a6ec eb50 3309 3fbf caf2 3fc9 .a.V..P..3.?...? 803489c: 25de d9b3 61fc a42d 54c2 8f48 d19e 7769 .%...a-..TH...iw 80348ac: 4b87 631b f0f7 8c30 f01a ef49 3cf5 03f7 .K.c..0...I..<.. 80348bc: 453c f6f2 0cee d265 448b d0ad 2a9b beb7 .A3.;F...S..Q. 8034d3c: b3e5 23df 9dad ccce 600f e06c 03da 3d33 ...#.....`l...3= 8034d4c: f328 f03c 1cd8 9073 618c 97c9 7bd1 4363 (.<...s..a...{cC 8034d5c: 8502 9ebd b2c9 abb2 3be4 3d3d fbfe eb6d .........;==..m. 8034d6c: 8f3a eadf 4dbe 5716 b24b 22d0 8adf 306e :....M.WK.."..n0 8034d7c: 4881 abe9 18e2 6e0f 762d 6eab 05f0 7162 .H.....n-v.n..bq 8034d8c: 160b 16ba fddd eeec 8bc3 2bd6 1a89 dc9d ...........+.... 8034d9c: d052 e9fe 85de 2154 8a2a 75e1 6ced e45e R.....T!*..u.l^. 8034dac: ef09 86d0 3784 0f33 87cb 23d5 aa6c 6ba8 .....73....#l..k 8034dbc: e3e6 a7a0 8b7e dd7f 0bea a702 1890 5b41 ....~.........A[ 8034dcc: 7b48 ccfc 8923 193d 135b 520a 049a e208 H{..#.=.[..R.... 8034ddc: ec35 2f3d 9513 aa42 3e8d aecd 3793 b1e8 5.=/..B..>...7.. 8034dec: 22f1 53ec bd70 5b88 8573 cbbf cf04 a23c .".Sp..[s.....<. 8034dfc: 6879 5ffe 6888 5da5 cc32 622a 8b6c 2681 yh._.h.]2.*bl..& 8034e0c: 2eee 3e1f fb50 9505 162c 0593 9994 037c ...>P...,.....|. 8034e1c: 0e7b 93a1 4a3e 120c df36 c550 4718 04d2 {...>J..6.P..G.. 8034e2c: 554f 29e7 d6fc 92a4 9f64 5360 db4c 8d30 OU.)....d.`SL.0. 8034e3c: 240a 591f 4cd2 8df6 f5d4 0e81 772e fc98 .$.Y.L.......w.. 8034e4c: 6514 8040 978f fd59 2857 5e27 de1c 7c44 .e@...Y.W('^..D| 8034e5c: 80f5 7a42 0a63 424a 89f2 5dde 5e8b 629d ..Bzc.JB...].^.b 8034e6c: 77c6 e5cb 7612 1b81 99c8 204a 87a2 64aa .w...v....J ...d 8034e7c: 8bf6 2562 8e61 3f2d 9dc8 dda0 6e41 e4e0 ..b%a.-?....An.. 8034e8c: 577d 6d5e f97b 03d7 3370 ca09 ff22 1c16 }W^m{...p3.."... 8034e9c: 382b 3ffb 1053 929d 9e63 b94f f98e 2c42 +8.?S...c.O...B, 8034eac: 1e1b d23d 5e2f c863 5203 08aa 1ce0 f820 ..=./^c..R.... . 8034ebc: 46ce 8331 e1f8 221e 1f89 9ccf 6108 724e .F1....".....aNr 8034ecc: 9026 d30c 50c7 2099 61c4 ebf0 ac78 e66d &....P. .a..x.m. 8034edc: b257 1081 1c18 b3ae 79e8 4cd9 5298 a783 W........y.L.R.. 8034eec: 7a1c 0c23 110b cb87 4a28 a4ec 8d74 5fe6 .z#.....(J..t.._ 8034efc: 3e2b edcf f587 c0ef 54ce 63bd 1526 1623 +>.......T.c&.#. 8034f0c: a899 e5b4 9e4e b775 62f2 bff7 eda6 a60b ....N.u..b...... 8034f1c: 7162 db88 05f4 7561 d7cb 0e3e 5098 cbbf bq....au..>..P.. 8034f2c: 99f7 f661 b74e d80f 720a 98bf 639a 7efb ..a.N....r...c.~ 8034f3c: 384e 2e6c 4c25 e03d 958f 8bd9 6ba4 60db N8l.%L=......k.` 8034f4c: 77fb 817d 1808 95a1 4082 feb1 d996 8c84 .w}......@...... 8034f5c: c624 1a65 64e8 9123 9322 0526 c51c 0cca $.e..d#.".&..... 8034f6c: c8bc 7114 963e 9a3e a327 83ee 3c99 0f13 ...q>.>.'....<.. 8034f7c: c50e 03dc 02c2 020f 1ac4 e9dc 1e6f 9510 ............o... 8034f8c: 7079 69f5 85bb 35a4 8e0f 3cca afb8 5549 yp.i...5...<..IU 8034f9c: b380 c1e2 9951 2b85 aa8f 2170 0a02 180c ....Q..+..p!.... 8034fac: 34ba e1f5 0464 50c2 0639 3482 d58e 7913 .4..d..P9..4...y 8034fbc: 2063 d944 0818 d511 d1ca eb94 3016 95f6 c D..........0.. 8034fcc: 31d3 a2cd 2901 3f30 5a41 9e67 946c 16b3 .1...)0?AZg.l... 8034fdc: 549e c593 4671 7e22 b5c0 e3e1 bdb9 f494 .T..qF"~........ 8034fec: 8c2a 2396 e82b 6878 433a def3 2fda 2389 *..#+.xh:C.../.# 8034ffc: c9ba 2813 7f8b 7192 250f a89d fadb 1eeb ...(...q.%...... 803500c: 1402 2cfa 290a 8142 381e d0e9 9489 69e5 ...,.)B..8.....i 803501c: 8fbb f970 9c84 43cf 6452 13c7 9d26 0596 ..p....CRd..&... 803502c: 8f18 1aa1 c33f 46ca 4edd bc90 0909 989c ....?..F.N...... 803503c: 65f6 4f34 4f67 94f5 51d6 b0a7 4053 cde6 .e4OgO...Q..S@.. 803504c: 682d ce32 afe7 608a 3820 8a8f 8ba6 78f7 -h2....` 8.....x 803505c: 53d6 2987 2925 b89f 58c4 e12a 5c13 7184 .S.)%)...X*..\.q 803506c: a495 dd00 0112 1e6e 9ccf 696d 29b2 6683 ......n...mi.).f 803507c: 159f 2e6b bce3 932a 0643 d2cb f1ab 8d1f ..k...*.C....... 803508c: 8607 51fb 8482 f680 520e e286 0748 5bbe ...Q.....R..H..[ 803509c: 08b8 4cb4 2782 2eb9 75da b474 cc99 725f ...L.'...ut..._r 80350ac: 9c85 8c8d 709c 68f3 9eb0 6630 0c22 c19a .....p.h..0f"... 80350bc: 49e1 4c13 4c03 c05f 4575 999e e6cf c87e .I.L.L_.uE....~. 80350cc: 1af4 16ac 09ef d827 cc69 f33e 0bdb 6824 ......'.i.>...$h 80350dc: 7a43 0c16 8ae6 5bc0 0f06 928d 22f6 06f5 Cz.....[.....".. 80350ec: e401 48da 4911 241b c2d2 1b21 eaa4 74aa ...H.I.$..!....t 80350fc: cbbd 8872 c5f5 7e49 27dc 91df f53f 3de3 ..r...I~.'..?..= 803510c: d820 9443 b9f6 9104 0f9e b936 7087 0c3f .C.......6..p?. 803511c: 0ecc 3926 e890 0b93 875f 7e5d ecb7 c972 ..&9...._.]~..r. 803512c: 0b76 e019 bda2 4a67 f0d9 d9bb 61e3 75ac v.....gJ.....a.u 803513c: 4d15 5c85 3059 d93d 8663 868d 4718 dd5b .M.\Y0=.c....G[. 803514c: 8fe3 495d 9d12 c524 8f9f cf3c 498f 6329 ..]I..$...<..I)c 803515c: b9f4 97b4 5b36 25d9 4ed2 1f7e aeb5 ac72 ....6[.%.N~...r. 803516c: d121 b82f 04e4 43c6 15d2 61f7 6a29 a3bb !./....C...a)j.. 803517c: cab9 3c3e ed45 5368 e983 5880 7cf3 890e ..>........,1.3. 80354cc: 2aa3 8eb8 5542 0c30 1238 de6d 41cb e412 .*..BU0.8.m..A.. 80354dc: b897 237a b3c8 3120 b2e7 33a2 660c 7c3b ..z#.. 1...3.f;| 80354ec: 671c 98db 9a89 0571 f4d1 8b8f 60a3 5111 .g....q......`.Q 80354fc: 5f0a 7500 d4c8 9998 33c3 d624 da7e 2f67 ._.u.....3$.~.g/ 803550c: f94c 642b db1c b903 8f5f 97de f86a 14f5 L.+d...._...j... 803551c: dd9e 7b4c b74e 5f5a 98dc 768f 2720 b665 ..L{N.Z_...v 'e. 803552c: 659f 728a e409 a497 6cf8 7507 ee79 b77c .e.r.....l.uy.|. 803553c: 1f0a f2ef 4d87 b13a bf0b 877f 3fc3 3973 .....M:......?s9 803554c: 19c1 adac 13bb 07a6 3e23 8620 00fc 8673 ........#> ...s. 803555c: 4e27 f1b8 5303 d2e2 d56a fd97 02e3 32a8 'N...S..j......2 803556c: 03fb 15ce cefa f832 05d0 c54f aff0 a03c ......2...O...<. 803557c: 3e99 1ff4 0cd0 5ac1 189e 8d2a 9cc4 d0fd .>.....Z..*..... 803558c: fdd1 b27d 4f53 1db7 0d1a 138d aa42 804d ..}.SO......B.M. 803559c: d1ac cec8 f3a6 f670 0ab0 8be7 3845 f7b9 ......p.....E8.. 80355ac: f092 11af da37 8b51 271a c2ef 408c c4de ....7.Q..'...@.. 80355bc: 7f14 b616 822d f4dd 7f0b cdea 2e39 270a ....-.......9..' 80355cc: c825 a3e0 18e1 f27c be67 a7ee 974f 14d4 %.....|.g...O... 80355dc: 427f 61c5 9370 d69d 3c3a 1f95 e043 2b4d .B.ap...:<..C.M+ 80355ec: 28f6 d033 03ca 48e9 4574 6c04 5136 c291 .(3....HtE.l6Q.. 80355fc: 5a09 92df f56b 550b 6fb5 b0e8 ada2 5d53 .Z..k..U.o....S] 803560c: 68f1 75ba 4637 b0fb 32d9 6e86 60e5 e337 .h.u7F...2.n.`7. 803561c: 13e5 557c 94e8 b7b5 8356 30f4 879b 37d4 ..|U....V..0...7 803562c: f042 491d f8c8 ebc0 d7f3 7ea3 e96f 1d1a B..I.......~o... 803563c: 3b9c e386 2765 09dc 0cd8 ea93 4fe2 59e8 .;..e'.......O.Y 803564c: 4b53 7065 f7ee 5e0b d34d d99d b1ee ab39 SKep...^M.....9. 803565c: 64f1 c621 ac9b d4e0 f2fd 2e19 51ef d23f .d!..........Q?. 803566c: 24fd 577c 5f08 0230 c7df ba63 de30 60f7 .$|W._0...c.0..` 803567c: ef0e 9d63 4269 3269 29cb 76f4 6f80 5d9b ..c.iBi2.).v.o.] 803568c: 0012 517e 2d8f d730 12d1 8fac f525 0b65 ..~Q.-0.....%.e. 803569c: 2431 edf3 ee79 9f3a 4885 412b 2fa9 759d 1$..y.:..H+A./.u 80356ac: f284 6e83 bf48 4c43 b78c 77f3 4640 372c ...nH.CL...w@F,7 80356bc: 2f16 e9f3 fb7c 1d02 8141 4bb9 7c00 ba74 ./..|...A..K.|t. 80356cc: e031 8a5f 7d4d ff5c ad79 83af 72c9 74cc 1._.M}\.y....r.t 80356dc: 5ba3 fc77 cec1 899c bf34 0b88 88a6 6883 .[w.....4......h 80356ec: 2233 28b0 0d96 21f0 ca37 60af 6ba2 4b04 3".(...!7..`.k.K 80356fc: 45a3 28d7 cd89 5a72 be88 0acd c3da 992c .E.(..rZ......,. 803570c: da35 5ec3 0b96 81f7 458e 5112 4c04 93e1 5..^.....E.Q.L.. 803571c: 7b14 0045 a8a1 2fef 52b0 1767 5c1b a0d4 .{E..../.Rg..\.. 803572c: 1b4d 18ab 54d7 7dc1 6a8d 1c8c eb84 7899 M....T.}.j.....x 803573c: f3fb 8f78 4ebf 21d3 10b7 f763 8f1e 4e02 ..x..N.!..c....N 803574c: fa9f b247 1de9 2490 ab01 435b fbb3 76d7 ..G....$..[C...v 803575c: 4458 1a22 9faf 11c8 81b2 6966 2ebb 7685 XD".......fi...v 803576c: 66b6 879c 5327 4c6a 9dda c4a3 b54e 30f6 .f..'SjL....N..0 803577c: 2084 0ada b223 9764 5eb5 0999 28b3 2482 . ..#.d..^...(.$ 803578c: 0eb1 d6a2 a10a 8e02 bddd a7c1 a968 814e ............h.N. 803579c: 0681 b6ef dd57 2791 0b0b 4894 4f27 5eb1 ....W..'...H'O.^ 80357ac: e6e0 558b ff78 7f84 8f26 bcb8 beb5 6b56 ...Ux...&.....Vk 80357bc: ccc1 b23e a077 5a8f adf4 a825 6049 ec6f ..>.w..Z..%.I`o. 80357cc: 32c0 c8e7 83ea 17cd f96a 9e1a e5af 74be .2......j......t 80357dc: eebe b882 15a9 22d9 f41d feef 1c4f c913 ......."....O... 80357ec: ff86 7ef7 4789 b98c 0a50 c9bc daad 3997 ...~.G..P......9 80357fc: 046c b958 9e9f cdc0 c4a2 d9e0 2205 7013 l.X..........".p 803580c: 0da1 0209 a9b4 8561 4b87 a305 86fe 702d ......a..K....-p 803581c: 9771 3fd3 06d1 50c6 b0ef a522 0d62 30a7 q..?...P..".b..0 803582c: d8a1 b096 c340 2af2 fc51 3d6c d085 872f ....@..*Q.l=../. 803583c: ceab cc52 edc8 f8cf 5d91 8774 53bd 0d4a ..R......]t..SJ. 803584c: 44f1 d80c b5b7 3af6 e6ee 5d0f f170 6bc7 .D.....:...]p..k 803585c: 3cd8 bd64 abbb b728 e64f f302 1396 f317 .`. 80358ec: 3d7f 8131 6fda 7c8c 3f94 4a59 a069 664f .=1..o.|.?YJi.Of 80358fc: f23c f4f4 5377 a378 e391 f932 3ee2 0e5e <...wSx...2..>^. 803590c: 0e8b 3dcf 3eeb b7b0 6665 df51 a90e c1de ...=.>..efQ..... 803591c: 4508 93aa 4e98 523d 8dcd ad24 6dbe debc .E...N=R..$..m.. 803592c: 8bcd f22d 9b26 b7ba 4495 7db0 e027 ed3e ..-.&....D.}'.>. 803593c: 21e4 006f 0261 bafb 1231 7661 8349 23f5 .!o.a...1.avI..# 803594c: 081d 6259 7a8c 94cd 2380 1399 b625 25a5 ..Yb.z...#..%..% 803595c: ea5c adb9 f615 344a dd36 b6f5 5534 19ae \.....J46...4U.. 803596c: 3a6f 1644 6fa4 f582 1617 56d9 1f6a 3fea o:D..o.....Vj..? 803597c: 0c3b 525a c6e1 fb29 1f4e 6168 af91 d3e0 ;.ZR..).N.ha.... 803598c: 9dcb fb46 23d7 a1da c3bf 03fd dde1 2e16 ..F..#.......... 803599c: 6d51 13f0 1ef1 b641 112e 24b8 1bc2 23e2 Qm....A....$...# 80359ac: 9ba6 409d c5bb 3bd0 3bc5 cfb8 ff2f d906 ...@...;.;../... 80359bc: 4dc4 3903 80b3 5902 555c 6555 df65 7ae0 .M.9...Y\UUee..z 80359cc: 4856 c505 0c0d cc7c dce2 2638 3692 7262 VH....|...8&.6br 80359dc: bd8b 2d82 a776 61ef ed7a 2348 b2e3 d4f5 ...-v..az.H#.... 80359ec: 620e 5b77 b869 df4b 015c 916f 1195 6526 .bw[i.K.\.o...&e 80359fc: bd9f 7686 00af ef77 8641 89ab 997e acad ...v..w.A...~... 8035a0c: f5d8 e070 0741 9cb8 49eb 96cc 20e1 3e70 ..p.A....I... p> 8035a1c: 8379 c005 1a33 cf58 f621 84bd 378f bbd8 y...3.X.!....7.. 8035a2c: 5f43 5d92 a9f6 e23e 2d74 1de7 3869 f363 C_.]..>.t-..i8c. 8035a3c: 3405 fc37 e85e babb ba7a eca2 d705 a2d5 .47.^...z....... 8035a4c: 78cd e4b1 7443 6b64 c83f 64c2 9e40 6f6f .x..Ctdk?..d@.oo 8035a5c: 1d86 f0c1 d1f5 bdd3 9d74 5e19 93cf 31d7 ........t..^...1 8035a6c: 6184 8ba7 0795 d70b 45de a49b 2b79 66f3 .a.......E..y+.f 8035a7c: de16 b789 f7b9 f0b6 96de ed67 9907 999b ..........g..... 8035a8c: 1121 9839 81d5 bb82 c09f 44c2 c390 f97d !.9........D..}. 8035a9c: e41f dda7 d7bc 005a 2f00 ......Z.. 08035aa5 : 8035aa5: 722f 746f 6b65 702e 676e 0000 5448 5054 /rotek.png..HTTP 8035ab5: 312f 312e 3220 3030 4f20 0d4b 530a 7265 /1.1 200 OK..Ser 8035ac5: 6576 3a72 6c20 4977 2f50 2e31 2e33 2031 ver: lwIP/1.3.1 8035ad5: 6828 7474 3a70 2f2f 6173 6176 6e6e 6861 (http://savannah 8035ae5: 6e2e 6e6f 6e67 2e75 726f 2f67 7270 6a6f .nongnu.org/proj 8035af5: 6365 7374 6c2f 6977 2970 0a0d 6f43 746e ects/lwip)..Cont 8035b05: 6e65 2d74 654c 676e 6874 203a 3935 3935 ent-Length: 5959 8035b15: 0a0d 6f43 6e6e 6365 6974 6e6f 203a 6c43 ..Connection: Cl 8035b25: 736f 0d65 430a 6e6f 6574 746e 742d 7079 ose..Content-typ 8035b35: 3a65 6920 616d 6567 702f 676e 0a0d 6143 e: image/png..Ca 8035b45: 6863 2d65 6f43 746e 6f72 3a6c 7020 6972 che-Control: pri 8035b55: 6176 6574 202c 616d 2d78 6761 3d65 3638 vate, max-age=86 8035b65: 3034 0d30 0d0a 890a 4e50 0d47 1a0a 000a 400.....PNG..... 8035b75: 0000 490d 4448 0052 0100 0057 0000 08ae ...IHDR...W..... 8035b85: 0006 0000 db82 7d4e 0000 0e17 4449 5441 ......N}....IDAT 8035b95: da78 9ded ac7d 672c c059 a1cf 7a80 3285 x...}.,gY....z.2 8035ba5: 4b45 1014 4db6 a62d ae0a b68a 52d8 45c7 EK...M-......R.E 8035bb5: 4131 1b2d 1045 0b7a 7a53 bc69 6060 634d 1A-.E.z.Szi.``Mc 8035bc5: d894 c326 6c55 d2ac c6c5 285e 2c91 951f ..&.Ul....^(.,.. 8035bd5: 4a92 885d 4ad5 dd02 6a3f 9352 1ba2 36ac .J]..J..?jR....6 8035be5: a246 011b 6d69 e76b 72d2 71fb 7729 df7d F...imk..r.q)w}. 8035bf5: 7793 9c75 cece 9fbc b333 7e7b fc7f 6f72 .wu.....3.{~..ro 8035c05: 39ce fb3b bf39 e67d 9e79 79f7 9677 e5cb .9;.9.}.y..yw... 8035c15: 000e f800 1785 0001 b900 0002 5720 0000 ............ W.. 8035c25: 0ae4 0000 15c8 0000 02b9 2000 0057 4000 ........... W..@ 8035c35: 00ae c800 0015 b900 0002 7200 0005 ae40 ...........r..@. 8035c45: 0000 15c8 0000 2b90 0000 0572 4000 00ae .......+..r..@.. 8035c55: 8000 015c 9000 002b 7200 0005 e400 000a ..\...+..r...... 8035c65: 5c80 0001 2b90 0000 5720 0000 0ae4 8000 .\...+.. W...... 8035c75: 015c 0000 02b9 2000 0057 e400 000a c800 \...... W....... 8035c85: 0015 b900 0002 5720 0000 eae4 c19f 5f6b ...... W......k_ 8035c95: 96b7 8fdd bede 440d 3882 9a47 ff23 def3 .......D.8G.#... 8035ca5: 3c96 d6df ed38 377d 7e56 009e c824 3375 .<..8.}7V~..$.u3 8035cb5: dae5 8c17 1304 5cc1 b4b0 de40 aa6e 138e .......\..@.n... 8035cc5: 4d23 0ae4 75c8 ca3f 4655 89a5 6192 2966 #M...u?.UF...af) 8035cd5: 3ad3 7532 44fc 1fdd 4522 80ae b75c ae56 .:2u.D.."E..\.V. 8035ce5: 8ab1 974e 202d 3b45 a644 15c8 eb90 c936 ..N.- E;D.....6. 8035cf5: 4655 8b8f a496 645a 3441 5c8b b901 ba6e UF....ZdA4.\..n. 8035d05: bb5c d524 b4b2 08c1 22b9 4057 9bae d724 \.$......"W@..$. 8035d15: a1d8 5530 2cc5 2450 231b e457 c801 cbb5 ..0U.,P$.#W..... 8035d25: 9572 da97 0763 cdd1 edd5 1557 48ff 5db3 r...c.....W..H.] 8035d35: 512b 9bb7 e63b 2364 0ae4 5c80 26bb bed7 +Q..;.d#...\.&.. 8035d45: 0a45 5320 ae05 47a1 45b1 78ea 8b13 844e E. S...G.E.x..N. 8035d55: 3f6c bd16 2b90 d720 caee 6475 7971 54df l?...+ ...udqy.T 8035d65: 2951 48b1 8c27 2b91 7200 5b6d 13ae a943 Q).H'..+.rm[..C. 8035d75: 95b6 ecdf 3c59 08d6 02b9 d720 e5a6 191a ....Y<.... ..... 8035d85: 38e4 1d67 1a2a 0cf5 d922 7ef9 2c10 0572 .8g.*..."..~.,r. 8035d95: dae4 b91d 8aea b5d5 a9dd 9857 1023 9c7b ..........W.#.{. 8035da5: 302b ccd4 cec9 7db7 017e 0572 dae4 b90d +0.....}~.r..... 8035db5: 8aea 6675 a521 caa1 ce77 722c 63b8 c28b ..uf!...w.,r.c.. 8035dc5: a458 04ba 75f6 8b04 015c b6b9 572f b15d X....u..\.../W]. 8035dd5: 86a6 9d42 faee ea5f 189a bd16 adf6 9160 ..B..._.......`. 8035de5: 202b 4d57 06b9 ec14 53d4 532b d2a4 a105 + WM.....S+S.... 8035df5: 6f57 4a65 3af4 ec52 a46b e609 15c8 2b90 WoeJ.:R.k......+ 8035e05: f572 58cd 6443 8efd 892e 34cd 69a3 c11d r..XCd.....4.i.. 8035e15: 904e 202b e457 8bea 07a1 f6b1 2d03 f55f N.+ W........-_. 8035e25: d4bd 4755 09b0 0572 8ae4 7d5c 59e4 4733 ..UG..r...\}.Y3G 8035e35: 8eb1 bb76 b435 7525 6c14 4db6 041d 15c8 ..v.5.%u.l.M.... 8035e45: ab90 5c81 0a3d 2eb6 1acf 88d7 6279 9059 ...\=.......ybY. 8035e55: 6b4a 0be6 e6ac 8c0a 872c d76e 122d 13a8 Jk......,.n.-... 8035e65: 0cec 02b9 4572 a1ae 01d2 4f23 0c8b 4bf2 ....rE....#O...K 8035e75: 5d62 af1f e749 5d41 4007 f0e2 91fc 202b b]..I.A].@....+ 8035e85: e457 56ba 8b8e e89a 87d2 2758 2e01 4db1 W..V......X'...M 8035e95: ba96 09d6 5c76 1e93 9088 202b 7dd7 5726 ....v\....+ .}&W 8035ea5: c147 35a6 a185 51c8 f3ac 9606 eac4 752e G..5...Q.......u 8035eb5: 13ad 7cec bb9b 9007 202b e6d7 5ae4 c457 ...|....+ ...ZW. 8035ec5: 1d8a b472 8ba6 9a0c da9a af35 bfc9 dd56 ..r.......5...V. 8035ed5: 87b6 015c eeb9 b933 0a5a b536 074c 01a4 ..\...3.Z.6.L... 8035ee5: a5e6 9e46 0ae6 f6b8 8eb0 35b7 457a 80ae ..F........5zE.. 8035ef5: 9b5c 6b91 d45d abda dad8 c7c5 8322 2155 \..k].......".U! 8035f05: 6749 b5d8 f6e9 3ad9 1d82 7e7a 905d 202b Ig.....:..z~].+ 8035f15: 6dd7 ab95 60a1 8b13 f9cb e2ba 8e97 2358 .m...`........X# 8035f25: fc75 376c 52ec 9d57 d61e 22c8 f732 ea91 u.l7.RW...."2... 8035f35: 0d58 f1ad 58c5 ae3d 2ab4 afda 6b91 8824 X....X=..*...k$. 8035f45: a905 2c60 8198 9277 6bc2 323e bdbc 07ae ..`,..w..k>2.... 8035f55: de5c 1ebf 7572 ec17 22c2 ab3a 074b 1ac4 \...ru...":.K... 8035f65: 542d 52b6 19b5 5873 d827 4589 baf4 20f0 -T.R..sX'..E... 8035f75: a6d7 a956 f38d 65ef 5c89 7523 cf82 4b05 ..V....e.\#u...K 8035f85: ce08 f0a8 cffa 6e0c 2bab 89d7 63e5 04cb .......n.+...c.. 8035f95: 227d 7757 f6b9 842d 73d3 85ec 049d 4892 }"Ww..-..s.....H 8035fa5: 22dd c481 48b2 5a95 14a4 5f5c 50fb d7c8 ."...H.Z..\_.P.. 8035fb5: ca3e b5c9 70e7 8212 713d 5ce1 0ccd 3b6e >....p..=q.\..n; 8035fc5: 280e c5d6 ac4a d5c8 b05d 4555 be9b 36c5 .(..J...].UE...6 8035fd5: 332f 8b8f 6c0c 9377 2c8d 1b3b be6c 5c4c /3...lw..,;.l.L\ 8035fe5: 5b0a ddc3 e696 082d c6b9 24ea 7445 90ed .[....-....$Et.. 8035ff5: 473f 8e7b 6f51 0af1 f6c4 63ea 6eae ce4f ?G{.Qo.....c.nO. 8036005: 93d5 1760 6d86 914a fae5 26fb aac4 5823 ..`..mJ....&..#X 8036015: 22db b4d5 39e2 e887 0e2b 77ca e07c cb33 ."...9..+..w|.3. 8036025: 5f0b 3177 6b92 4587 fce1 1d8c 5ea3 621f ._w1.k.E.....^.b 8036035: 169d 8ac5 dd5c dae4 b8b3 1fb4 1659 7478 ....\.......Y.xt 8036045: a897 3aae 7a01 8f25 6875 0ab8 a6cb 7607 ...:.z%.uh.....v 8036055: 916c b052 185d dd31 716d cd98 bf99 07fd l.R.].1.mq...... 8036065: ae88 8a1d d339 f0d4 91f6 b167 e84e 7016 ....9.....g.N..p 8036075: ab6c 9430 cf4c d230 aaad 8fb8 fd76 892e l.0.L.0.....v... 8036085: 348d cd66 6dd6 bd97 8c30 a344 5d00 8b03 .4f..m..0.D..].. 8036095: e536 8cfa bd3f d10d 43b5 90ea 5d1f 9c94 6...?....C...].. 80360a5: 7ddb 9cc3 6ead 018a 3ab9 7608 5862 ef05 .}...n...:.vbX.. 80360b5: 885b a7ac 06d1 5b65 8a14 3a35 fa0e 8b1e [.....e[..5:.... 80360c5: 3354 d3cf 5ab2 c51f a3f8 de87 ec85 679a T3...Z.........g 80360d5: 3858 e72f 510e 8baf 1358 5cfa ca3d 20b5 X8/..Q..X..\=.. 80360e5: 45d8 915d f0a6 a9f7 a445 f13b c8b4 f7c0 .E].....E.;..... 80360f5: c098 a2c8 5548 fcf5 be6d 9018 feeb 5fa4 ....HU..m......_ 8036105: 2738 a36d d8de ac52 c959 4063 beae 7ae4 8'm...R.Y.c@...z 8036115: fae0 4ee9 d4dd 57fd e9bc 45ad cf21 f2ea ...N...W...E!... 8036125: 059b d719 6cb5 1af9 52e2 d827 61be 73ce .....l...R'..a.s 8036135: 2161 d344 892f a2c4 accd 508a cd72 9537 a!D./......Pr.7. 8036145: 102f f7a3 814e 65be 99b4 68f8 42b5 feae /...N..e...h.B.. 8036155: dae5 7213 891d 9c76 a4a5 144c eff2 72f2 ...r..v...L....r 8036165: 2715 4ee1 ce5d dcf1 2e4b 8937 7d74 720f .'.N]...K.7.t}.r 8036175: 5919 a244 8255 0c8b dda3 7038 80a7 61af .YD.U.....8p...a 8036185: 3a35 cd72 8454 5654 8938 241d 6b1b 5a92 5:r.T.TV8..$.k.Z 8036195: 0de4 0363 ab4c b1e8 f267 e7af 22d0 b5ea ..c.L...g....".. 80361a5: eb15 cd7c 8a7b 2b5c 845e 87fc 5532 881f ..|.{.\+^...2U.. 80361b5: b455 9b61 598f b90a ab66 88e3 7093 ab26 U.a..Y..f....p&. 80361c5: dfcb d577 f7fb 2c84 795b 62f2 8f91 2563 ..w....,[y.b..c% 80361d5: 9cd7 8d60 5f8a f43f dff6 79da afe5 dc1c ..`.._?....y.... 80361e5: c9f9 5e37 23ba 6bee 95e7 bfaf ef64 1e98 ..7^.#.k....d... 80361f5: 440a 4599 c4b7 593a 9e66 2cbe 8666 6b51 .D.E..:Yf..,f.Qk 8036205: e388 7f2e cde2 56bf 0276 6af6 ba4e 52c8 .......Vv..jN..R 8036215: b1b0 49e6 3a9d 8244 1a3b dd8f f8a5 9be4 ...I.:D.;....... 8036225: e2d4 78f1 b56b ae42 27ff 9ed7 d6fa bb1a ...xk.B..'...... 8036235: d38a f217 14e4 9412 258f 2215 564c 1c97 .........%."LV.. 8036245: e235 8b4a 7d42 a5f9 bebf ae56 1fa2 e773 5.J.B}....V...s. 8036255: 5ffc f64d e67e a970 f7dd cb24 2799 9ab9 ._M.~.p...$..'.. 8036265: fd2c 849d ab92 6443 fb13 4cae 98e7 563a ,.....Cd...L..:V 8036275: 7dcf ee3e b038 675c 9c0d 13a7 b706 cbd4 .}>.8.\g........ 8036285: dd35 bc94 9092 5ce4 ba46 5fa7 e1fd 96bd 5......\F.._.... 8036295: b29f 97e2 a894 5ca9 166b 4444 7d16 a6bb .......\k.DD.}.. 80362a5: 9cb2 8c5a 3465 9c79 e2ae 6ed6 92ef 8def ..Z.e4y....n.... 80362b5: 914d b2c3 6dca 0512 0c2e b223 9190 1462 M....m....#...b. 80362c5: ae58 f3a1 c9d8 a980 db58 d725 08b2 ecf7 X.......X.%..... 80362d5: 8e2b 9dec 52d0 e72e 3c1d 2d64 9ad7 7608 +....R..... ..\.. 8036355: d542 5738 4ac0 bf2d f351 9fb7 28f8 5982 B.8W.J-.Q....(.Y 8036365: 10a6 4216 e3ae 6895 e575 26ba 9045 806e ...B...hu..&E.n. 8036375: 275c 9116 3aeb 3646 68cb 850b 91ac c9e5 \'...:F6.h...... 8036385: 0717 ab90 2569 34dc d195 eb76 7155 6b86 ....i%.4..v.Uq.k 8036395: c8c8 4235 0dae 62b7 d019 2753 fc90 a7c0 ..5B...b..S'.... 80363a5: 70aa 0f35 5a2d d119 810a b6f6 ae58 36b3 .p5.-Z......X..6 80363b5: 0e17 d214 4b01 ee8d 2680 3ae5 841e 14eb .....K...&.:.... 80363c5: b7e8 d620 c799 bae7 341c e9dc 5c80 621b .. ......4...\.b 80363d5: b425 07dc 1135 dbd2 5ceb 3108 4961 5cca %...5....\.1aI.\ 80363e5: 2076 c954 44b5 33b0 82c3 1b53 ed72 5892 v T..D.3..S.r..X 80363f5: 0ee7 099f 28d3 e473 b2f9 167d 8d38 fa11 .....(s...}.8... 8036405: 3cf2 8a74 39c2 457a edae 75c8 290f f93d ...6 8036485: 5791 145d ba15 7fc1 82da e35c f38a edaf .W].......\..... 8036495: 1a82 0d72 d724 62b4 b91d a8f7 1577 cad9 ..r.$..b....w... 80364a5: aa7c bc8f caad c6ff b905 2d8e cb06 ee84 |..........-.... 80364b5: 6d8b 407d 5cb6 b74d 6a26 6d75 3792 c2f9 .m}@.\M.&jum.7.. 80364c5: 0c5c 6fda 6ff0 3663 d442 a742 8b00 5a08 \..o.oc6B.B....Z 80364d5: 6b96 586c 8824 7894 b927 84ee 50c8 7bae .klX$..x'....P.{ 80364e5: 009d d2ea f7be 8b8a 1b2f 4929 16ba 620c ......../.)I...b 80364f5: 8dcb 6304 de8b 9b52 c37d 1f5a 2d90 d823 ...c..R.}.Z..-#. 8036505: 8235 95b5 30eb 09c0 ba1e bfc1 1ded da07 5....0.......... 8036515: 514c 90f4 736b ed72 445b d904 0f9a f690 LQ..ksr.[D...... 8036525: 59e5 ae4e 423b 7bae d3b9 6895 225d 1fda .YN.;B.{...h]".. 8036535: cb7f 4ce1 15e6 c50d 3a67 b042 a1e7 7fd1 ...L....g:B..... 8036545: 56de ab31 dbd0 2aea d357 fc66 e7a1 6663 .V1....*W.f...cf 8036555: 3b81 4c1b c187 d194 b00f e081 32dc 9f02 .;.L.........2.. 8036565: d720 0b66 a65a b879 a7a9 fa0f 391e eeb9 .f.Z.y......9.. 8036575: 3ffd 8b97 6d4a e12f 7e64 30b1 a654 09aa .?..Jm/.d~.0T... 8036585: 6e7f 9c58 1c4a fd1b 1f5b 2d90 dcbe 2c7c .nX.J...[..-..|, 8036595: 348f 17cd 0166 b872 e9a6 d0ab b3fd cca6 .4..f.r......... 80365a5: c52d 391a c54c 21ea e6d7 3ae4 5c33 9daf -..9L..!...:3\.. 80365b5: 4458 2326 bc75 d551 9b9b eb93 bbff bcf4 XD&#u.Q......... 80365c5: f5e0 b66f 422a b9c8 6a06 c1a6 3578 a620 ..o.*B...j..x5 . 80365d5: 55d0 b7d0 cb58 363f 3b4c 2eb8 1d7b 1c56 .U..X.?6L;..{.V. 80365e5: 3527 fe1c c7b2 0ecb a6ff 6a8f 34f2 d450 '5.........j.4P. 80365f5: b214 1e0a 7fb2 67d6 a360 1afb 1236 22bd .......g`...6.." 8036605: 7b57 86c6 4691 1964 2c49 690a b184 646e W{...Fd.I,.i..nd 8036615: e420 8f9a 8d66 0e3a 9464 2226 54d9 faae ...f.:.d.&".T.. 8036625: 912a c4eb 8262 c2d6 6871 e98b ec80 c6be *...b...qh...... 8036635: 5792 4dd7 b309 11c0 6ea0 64c4 343b a77a .W.M.....n.d;4z. 8036645: 5103 cfb1 9c94 14ae 26d3 57a2 6ae4 d0cf .Q.......&.W.j.. 8036655: ef22 b53a e378 15fa ff09 d14a b92a 4f16 ".:.x.....J.*..O 8036665: a36e 6d6f a139 2e4b cdad b5c9 772a f0ba n.om9.K.....*w.. 8036675: 53b8 136e b203 8ea7 3572 6969 d9b2 69af .Sn.....r5ii...i 8036685: 0832 2053 cd33 6715 0683 ebaa 9e81 7f6b 2.S 3..g......k. 8036695: a04d 8593 5e8e ab91 913d 65c5 6257 8df9 M....^..=..eWb.. 80366a5: 175f acf1 630a df5a a2ac 3580 8934 d446 _....cZ....54.F. 80366b5: b20a e554 2746 b79e ef14 b6ed 2037 48db ..T.F'......7 .H 80366c5: 15d8 badb 45d4 a382 91c0 9752 6406 7977 .....E....R..dwy 80366d5: 185b cb1f 6367 dae4 0acc 99ad 1145 6162 [...gc......E.ba 80366e5: 1559 189e 965c 3525 cd72 8157 0667 ec51 Y...\.%5r.W.g.Q. 80366f5: a2a2 a0ab 7b6a 85f0 be63 d435 ec80 d778 ....j{..c.5...x. 8036705: 9edf 9359 89c2 b7d7 52b9 6cb0 eff2 80d2 ..Y......R.l.... 8036715: 2eec f731 5858 4e34 207b 3757 1646 ad79 ..1.XX4N{ W7F.y. 8036725: 61c4 b33d 8449 a992 e76f 855e ad5c 2b24 .a=.I...o.^.\.$+ 8036735: abb7 2831 c564 5b16 bb8a 0a76 21a4 1ae4 ..1(d..[..v..!.. 8036745: 0662 8584 5c14 e7ab 07a1 7764 ba89 3ae7 b....\....dw...: 8036755: 1909 22bd 70d7 81a9 6599 3af4 c8d5 6539 ...".p...e.:..9e 8036765: 1f16 58b2 4a33 8ad1 64b4 9714 25db 2aa1 ...X3J...d...%.* 8036775: 9d6a faec f5d9 c435 6c80 e5a3 0db4 2109 j.....5..l.....! 8036785: 68b3 09fb ecb9 9375 9ae5 fc0e c716 a28c .h....u......... 8036795: e457 ceea e2d4 ae1b 292e d63f fa90 32c4 W........)?....2 80367a5: d222 14a9 3a27 9702 9c91 01da b477 1ada "...':......w... 80367b5: a07c 3dbf dcf8 df70 df2c b203 728d f2ae |..=..p.,....r.. 80367c5: a48b b121 03f6 b65f 0e9b 4ec8 5836 f1ae ..!..._....N6X.. 80367d5: 6fc0 8427 b1d1 6b91 a5d8 33b0 3c87 8e99 .o'....k...3.<.. 80367e5: 7b04 b24a 91a6 42ec 1073 5688 22d4 6ea7 .{J....Bs..V.".n 80367f5: 96c9 12ad 4eb9 862c b8c1 ceae 42ca d16c .....N,......Bl. 8036805: bf2d 3a44 d628 1a26 7bfc 2c1b 5ed7 9cc0 -.D:(.&..{.,.^.. 8036815: 0cf2 36b9 7233 6170 0df1 d3a7 620e 0972 ...63rpa.....br. 8036825: 1c37 dfac 36d9 edcb 30c0 5c34 de57 f9d3 7....6...04\W... 8036835: 9776 5b2d e3ab f46a 6691 6286 e935 3573 v.-[..j..f.b5.s5 8036845: 0d99 ed3b 5c88 0e17 9aab 7642 b40a bdb9 ..;..\....Bv.... 8036855: c84b 014e 435f 6269 1ae4 ae5e 6589 5675 K.N._Cib..^..euV 8036865: 5be7 3273 bf08 a68b bcae bab3 b1d9 1252 .[s2..........R. 8036875: be2f daf2 d6ba d4a9 ae42 edba e358 00dd /.......B...X... 8036885: 1abb 9404 d4eb fdf1 a26d dfc1 47a6 6db7 ........m....G.m 8036895: 0d66 3ea4 c866 99b5 d961 cb0b 3408 ccd1 f..>f...a....4.. 80368a5: f695 203b 48d8 3fa3 1330 9d72 44d6 91ad ..; .H.?0.r..D.. 80368b5: 5ca5 8d23 3368 2109 35d7 5b83 a35c a1d5 .\#.h3.!.5.[\... 80368c5: f787 a9a4 ff06 4b7e 0763 1a9b 9d74 8ef9 ......~Kc...t... 80368d5: 915e 336b d7b9 5cba 6e97 7343 301a cd8a ^.k3...\.nCs.0.. 80368e5: 58e7 35a7 aaf9 aeda ef82 723d 75d4 5645 .X.5......=r.uEV 80368f5: 0b5d 64d5 1e4d de36 b40d 971f e8a7 316d ]..dM.6.......m1 8036905: b0f0 736d 9d43 6502 919f 8a91 bad8 da2e ..msC..e........ 8036915: a0d1 ae99 0588 6d72 b226 399b 9114 ab74 ......rm&..9..t. 8036925: 99ff c967 1546 07b3 eeaa 36a7 3d8a 8afb ..g.F......6.=.. 8036935: ae23 021d 229d 9727 c5b9 3809 b1f6 057b #...."'....8..{. 8036945: 0e6c d5c8 f6ff 992f 0f43 c8eb 5f22 5897 l...../.C..."_.X 8036955: 768a d9a8 5069 f977 995a 958b 0c63 a32d .v..iPw.Z...c.-. 8036965: 2eca b5ca e5f8 ab12 2cf7 435d 91dc 397c .........,]C..|9 8036975: d720 d8ad 30a0 cc75 0d7b 2f2d e73f 9db9 ....0u.{.-/?... 8036985: 860e c325 d387 375c cd81 4fe5 26bf 9dfa ..%...\7...O.&.. 8036995: 08d5 3c76 df28 7671 e553 800a 5b5c fdd8 ..v<(.qvS...\[.. 80369a5: 4eb5 8960 0446 ef3c ee48 a4ca b698 8bf6 .N`.F.<.H....... 80369b5: bce5 8783 ad8a c85a 9015 722b cab5 6663 ......Z...+r..cf 80369c5: f703 0245 a0e9 16dd 9b18 4802 f15c f798 ..E........H\... 80369d5: 8b04 015c 22b9 90d7 03dd f2ba 39ea 980c ..\..".......9.. 80369e5: d970 b2f1 f9a7 8cd8 6f22 d8b9 a1c0 0b15 p......."o...... 80369f5: 02b9 4572 daae ac3d bdba 3d87 3395 150d ..rE..=....=.3.. 8036a05: 66c9 5206 77cd ac37 e45b 3550 c0ff dfa8 .f.R.w7.[.P5.... 8036a15: b912 7202 ae45 fdb6 7373 49c3 8948 14ea ...rE...ss.IH... 8036a25: 21f0 d35a 838e e2b2 5555 365e 16dd 22c1 .!Z.....UU^6..." 8036a35: 400c ddae ab92 0f6e 666b f8d1 5abc 3339 .@....n.kf...Z93 8036a45: f752 d551 bddc 2f9a c930 09b5 5cf9 9b02 R.Q..../0....\.. 8036a55: cc59 ddb0 c128 0c22 ae40 93dd e9ab 024e Y...(.".@.....N. 8036a65: 8ebd 507d 037a 69fd 89f7 fae1 64f4 0453 ..}Pz..i.....dS. 8036a75: 308b b900 5376 a6ae 2203 1dc6 4068 0c8f .0..vS..."..h@.. 8036a85: 163b 1ac6 7651 3ae6 1463 02b9 4572 d6ae ;...Qv.:c...rE.. 8036a95: a883 3507 b55b 1034 9aa9 81b6 0625 9ec7 ...5[.4.....%... 8036aa5: 98fb 8a65 015c 22b9 b2d7 ce08 9174 d4c0 ..e.\.."....t... 8036ab5: c0f3 aa8f b125 67a1 4691 cf25 617f a913 ....%..g.F%..a.. 8036ac5: 5723 ae40 d5c8 7c66 badf 7668 da25 87be #W@...f|..hv%... 8036ad5: 3508 d819 66ed 3ae0 b48b b04c f3b6 9146 .5...f.:..L...F. 8036ae5: 202b e457 bf6a 6029 174d b8c0 ae62 ac40 + W.j.)`M...b.@. 8036af5: 9e7e 2f9f d2e0 e5c6 166b 9969 c760 c72e ~../....k.i.`... 8036b05: ae44 5c80 6b91 96d7 b6ba ee31 9d70 8760 D..\.k....1.p.`. 8036b15: 5e21 e463 c80a 7f75 d5ca 3aa6 c5df b125 !^c...u....:..%. 8036b25: 043e 859b 94e8 ae40 5c80 aff7 8b5c 5d92 >.....@..\..\..] 8036b35: 2474 6d52 5ba2 df21 35a6 7221 e405 5c8a t$Rm.[!..5!r...\ 8036b45: 3343 6834 f7e0 69b9 d25e 73c2 bbed 5ce6 C34h...i^..s...\ 8036b55: 2b91 5720 6ae4 cd13 5aae 7ca5 b447 750b .+ W.j...Z.|G..u 8036b65: 64dc c5b0 f393 2b91 5720 aae4 db2b 0ed5 .d.....+ W..+... 8036b75: 7503 0573 12f2 a99d 74c8 59d5 dbd0 1f2f .us......t.Y../. 8036b85: e476 c80a 0015 9000 002b 7200 0005 ae40 v.......+..r..@. 8036b95: 0000 5c80 0001 2b90 0000 0572 0000 0ae4 ...\...+..r..... 8036ba5: 8000 015c 9000 002b 2000 0057 e400 000a ..\...+.. W..... 8036bb5: 5c80 0001 b900 0002 5720 0000 0ae4 0000 .\...... W...... 8036bc5: 15c8 0000 02b9 2000 0057 4000 00ae c800 ....... W..@.... 8036bd5: 0015 b900 0002 7200 0005 ae40 0000 15c8 .......r..@..... 8036be5: 0000 2b90 0000 0572 4000 00ae fb00 ae5c ...+..r..@....\. 8036bf5: f63f 6685 ca79 1883 db0e 3781 001f 6b90 ?..fy......7...k 8036c05: b940 75b6 9aff 3f92 cb76 ad45 89c3 d002 @..u...?v.E..... 8036c15: b96d 761e eb90 0433 0917 283e 82f8 41e0 m..v..3...>(...A 8036c25: 49c1 23c1 7f82 dc13 7822 e087 0d79 f5cb .I.#...."x..y... 8036c35: 824d 3af3 d72c 0b97 412e 00ae 2bdb 8bd7 M..:,....A...+.. 8036c45: 9905 5c85 2e9f 4cb8 9ff0 a582 2706 d704 ...\...L.....'.. 8036c55: be0b 01bb 1eb9 7c10 7045 60a7 83b7 dd72 .......|Ep.`..r. 8036c65: dc15 f821 e09a c859 6015 e4fb 103a 213c ..!...Y..`..:...\?.F.:r.[ 8036f55: 0a70 0572 2308 a4d7 9044 ac7f d621 9577 p.r..#..D...!.w. 8036f65: eedc 6a4b 9665 c8e9 7cc1 7ae4 8543 de8c ..Kje....|.zC... 8036f75: 905d 3dd7 bfaa 4ab5 7160 e661 8980 0f5c ]..=...J`qa...\. 8036f85: f455 eab4 75c8 eea9 943f 2f5c b5c8 d95e U....u..?.\/..^. 8036f95: 55c8 1872 02b9 9184 6cab fffa 495c d4fb .Ur......l..\I.. 8036fa5: 2a6b 7924 e091 92c9 0245 5967 73ce e7cd k*$y....E.gY.s.. 8036fb5: 6f5c 235b b7a2 a417 eff5 456a 9d56 df20 \o[#......jEV. . 8036fc5: 996a 3d73 7055 079f ceb9 8a4b 3e6c 2ae4 j.s=Up....K.l>.* 8036fd5: 0317 55dc 4d21 b95d 2fde 9088 402b 8298 ...U!M]../..+@.. 8036fe5: 19d6 8782 b20b 4fbc 3df0 c31a 9658 572a .......O.=..X.*W 8036ff5: ae7b b0c3 7cec c0b7 3531 35bf a12f 8583 {....|..15.5/... 8037005: a725 0472 59e1 c59a 8fa8 6ee5 9377 5c81 %.r..Y.....nw..\ 8037015: a9af bc99 2ba5 65d7 12e5 7b5e 26b9 c215 .....+.e..^{.&.. 8037025: 9134 e4ab e45a 100a 5bae 6de0 9725 b7f9 4...Z....[.m%... 8037035: c8a9 f576 cf37 7c13 f0a5 4f37 48aa 65d6 ..v.7..|..7O.H.e 8037045: 8227 3eaa d7d7 9e0a fdcc 01ee 4795 6dd5 '..>.........G.m 8037055: fffc 45ba eb9f 0bf7 f71e d728 52ff b091 ...E......(..R.. 8037065: b92f 5b3e af70 b947 109e 04bc 02b9 9184 /.>[p.G......... 8037075: 94ab 5fe8 0897 a476 7f7e 64a0 cb18 1653 ..._..v.~..d..S. 8037085: 3809 f36c b652 eb42 8555 5909 6252 1ae7 .8l.R.B.U..YRb.. 8037095: fe34 5717 3d68 5357 53ae 998d 26b1 9572 4..Wh=WS.S...&r. 80370a5: a1fc b947 5d5e 4b23 b953 6e4a ae45 e100 ..G.^]#KS.JnE... 80370b5: 1116 5f3c 50f0 9e41 0b8f 447e 5370 5889 ..<_.PA...~DpS.X 80370c5: f3af 87b8 a0d6 3664 f1c0 d4c2 9fa9 1036 ......d6......6. 80370d5: 4beb ab0a 74b3 0b67 4abc 2073 a9b7 1f5c .K...tg..Js ..\. 80370e5: 1157 abb1 cf5c f350 7d59 55cb 6af2 0ae4 W...\.P.Y}.U.j.. 80370f5: 6e10 d685 4b1b fa24 4988 ab2f 06c3 7f85 .n...K$..I/..... 8037105: 46b5 324c fd7a 0379 cab1 b4bd a5fe dfd0 .FL2z.y......... 8037115: 02fa b90d c2ca ddd3 729a e995 9b89 2715 .........r.....' 8037125: 6f34 69f3 720f 94fd 28a6 a84f ae19 0792 4o.i.r...(O..... 8037135: 6f34 8f73 e9e0 15c8 dc20 d7f2 28b2 cf35 4os..... ....(5. 8037145: aabc d597 ae41 2e2f 73cc ed5d f040 0306 ....A./..s].@... 8037155: feb1 daa0 70b4 9a59 ad6b eb96 cb61 656d .....pY.k...a.me 8037165: f84c 0719 c6b9 929a e174 c89d 2015 5c9c L.......t.... .\ 8037175: 134f 797c 588d 4165 85eb b701 2ed6 89db O.|y.XeA........ 8037185: e640 cf40 28d6 fd5e c39e 044e c872 fdcb @.@..(^...N.r... 8037195: 9206 57bc e4f5 50de 78f2 b8ab 6d5b 68bc ...W...P.x..[m.h 80371a5: d72a d453 563c 495d 213e 41b8 af71 edc1 *.S.!.Aq... 80371b5: 141e 177c 0572 3708 65b8 3250 f03e d511 ..|.r..7.eP2>... 80371c5: b58a 5013 abae b43d 978e b044 0bb7 54ae ...P..=...D....T 80371d5: 3fbf ed5f 25a5 cda3 af8f 7bc9 6f5e 87b0 .?_..%.....{^o.. 80371e5: b5d6 1186 69a8 35ce 61cf b90b 321e 408c .....i.5.a...2.@ 80371f5: 726d 2bae 43ae 00ae a761 bd62 b6cf cae5 mr.+.C..a.b..... 8037205: ae51 be92 eec3 8faf ee18 fafe 0603 d379 Q.............y. 8037215: dcfc 33d6 0f15 de1b 01f6 2915 caeb 54f5 ...3.......)...T 8037225: ecd5 226f 87c8 6705 ee2a bc32 1cad 7dae ..o"...g*.2....} 8037235: 720e 0805 5727 6339 1fe0 5c95 f0af 9e31 .r..'W9c...\..1. 8037245: 40d0 3bae f2ea f2f9 90c2 2aea a84e f568 .@.;.......*N.h. 8037255: ed74 fd35 dd4f a65e c629 7206 a3fd 7206 t.5.O.^.)..r...r 8037265: 45ad 8b3e 015c cec2 7d73 bad9 81f1 c80d .E>.\...s}...... 8037275: 3f35 fb14 9522 94df 5a83 541e fa82 5a86 5?.."....Z.T...Z 8037285: fb06 8217 a877 012e 21b3 76d5 bfbb c3fa ....w....!.v.... 8037295: b0df 60ec a270 9800 3ff3 637f aecb 24e6 ...`p....?.c...$ 80372a5: 24ed 0000 0000 4549 444e 42ae 8260 0000 .$....IEND.B`.. 080372b4 : 80372b4: 0000 0000 72c8 0803 72d8 0803 053c 0000 .....r...r..<... 80372c4: 0001 0000 .... 080372c8 : 80372c8: 662f 7661 6369 6e6f 692e 6f63 0000 0000 /favicon.ico.... 80372d8: 5448 5054 312f 312e 3220 3030 4f20 0d4b HTTP/1.1 200 OK. 80372e8: 530a 7265 6576 3a72 6c20 4977 2f50 2e31 .Server: lwIP/1. 80372f8: 2e33 2031 6828 7474 3a70 2f2f 6173 6176 3.1 (http://sava 8037308: 6e6e 6861 6e2e 6e6f 6e67 2e75 726f 2f67 nnah.nongnu.org/ 8037318: 7270 6a6f 6365 7374 6c2f 6977 2970 0a0d projects/lwip).. 8037328: 6f43 746e 6e65 2d74 654c 676e 6874 203a Content-Length: 8037338: 3131 3035 0a0d 6f43 6e6e 6365 6974 6e6f 1150..Connection 8037348: 203a 6c43 736f 0d65 430a 6e6f 6574 746e : Close..Content 8037358: 742d 7079 3a65 6920 616d 6567 782f 692d -type: image/x-i 8037368: 6f63 0d6e 430a 6361 6568 432d 6e6f 7274 con..Cache-Contr 8037378: 6c6f 203a 7270 7669 7461 2c65 6d20 7861 ol: private, max 8037388: 612d 6567 383d 3436 3030 0a0d 0a0d 0000 -age=86400...... 8037398: 0001 0001 1010 0000 0000 0020 0468 0000 .......... .h... 80373a8: 0016 0000 0028 0000 0010 0000 0020 0000 ....(....... ... 80373b8: 0001 0020 0000 0000 0440 0000 0000 0000 .. .....@....... 80373c8: 0000 0000 0000 0000 0000 0000 ffff 01ff ................ 80373d8: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 80373e8: ffff 01ff ffff 01ff d2d2 ffd2 d2d2 ffd2 ................ 80373f8: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 8037408: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 8037418: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 8037428: 8d8d ff8d 8484 ff84 8989 ff89 8989 ff89 ................ 8037438: 8484 ff84 8d8d ff8d ffff 01ff ffff 01ff ................ 8037448: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 8037458: ffff 01ff ffff 01ff a4a4 ffa4 8484 ff84 ................ 8037468: aeae ffae ffff 01ff ffff 01ff ffff 01ff ................ 8037478: ffff 01ff aeae ffae 8484 ff84 a4a4 ffa4 ................ 8037488: ffff 01ff ffff 01ff 8181 ff81 ffff 01ff ................ 8037498: ffff 01ff a0a0 ffa0 9a9a ff9a ffff 01ff ................ 80374a8: c7c7 ffc7 8f8f ff8f 8585 ff85 8585 ff85 ................ 80374b8: 8f8f ff8f caca ffca ffff 01ff d5d5 ffd5 ................ 80374c8: ffff 01ff 7777 ff77 ffff 01ff ffff 01ff ....www......... 80374d8: d5d5 ffd5 8484 ff84 ffff 01ff a8a8 ffa8 ................ 80374e8: 8c8c ff8c bbbb ffbb ffff 01ff ffff 01ff ................ 80374f8: baba ffba afaf ffaf ffff 01ff ffff 01ff ................ 8037508: 6465 ff5b ffff 01ff ffff 01ff ffff 01ff ed[............. 8037518: 9898 ff98 b0b0 ffb0 d5d5 ffd5 8484 ff84 ................ 8037528: dada ffda 9595 ff95 8484 ff84 9d9d ff9d ................ 8037538: d7d7 ffd7 ffff 01ff 9898 ff97 7a7b ff73 ............{zs. 8037548: cedb ff79 c0d2 ff55 ffff 01ff ffff 01ff ..y...U......... 8037558: 9393 ff93 ffff 01ff a4a4 ffa4 bebe ffbe ................ 8037568: bdbd ffbd d1d1 ffd1 ffff 01ff ffff 01ff ................ 8037578: b4b5 ffae 5f5f ff5d 979d ff6b c0d2 ff55 ....__]...k...U. 8037588: ffff 01ff b5c9 ff35 ffff 01ff ffff 01ff ......5......... 8037598: f0f0 fff0 ffff 01ff f1f1 fff1 ffff 01ff ................ 80375a8: d5d5 ffd5 cfd0 ffce 8585 ff85 6060 ff60 ............```. 80375b8: 9194 ff85 b5ca ff37 ffff 01ff b9cc ff41 ......7.......A. 80375c8: ffff 01ff b4c9 ff33 ffff 01ff 6262 ff62 ......3.....bbb. 80375d8: 5d5e ff5c 5c5c ff5c 5d5e ff5c 6161 ff60 ^]\.\\\.^]\.aa`. 80375e8: 6567 ff5b 8486 ff7b ffff 01ff ffff 01ff ge[...{......... 80375f8: ffff 01ff b5ca ff37 ffff 01ff b9cc ff41 ......7.......A. 8037608: ffff 01ff b4c9 ff33 ffff 01ff ffff 01ff ......3......... 8037618: b5c9 ff35 ffff 01ff c0d2 ff55 ffff 01ff ..5.......U..... 8037628: c4d4 ff5e c3d4 ff5c ffff 01ff ffff 01ff ..^...\......... 8037638: c3d4 ff5c c4d4 ff5e cedb ff79 c0d2 ff55 ..\...^...y...U. 8037648: ffff 01ff b5c9 ff35 ffff 01ff ffff 01ff ......5......... 8037658: c0d1 ff54 cfdc ff7d ffff 01ff b4c9 ff33 ..T...}.......3. 8037668: ffff 01ff bed0 ff50 b4c9 ff33 b4c9 ff33 ......P...3...3. 8037678: c0d2 ff55 ffff 01ff b4c9 ff33 ffff 01ff ..U.......3..... 8037688: cedb ff79 c0d2 ff55 ffff 01ff ffff 01ff ..y...U......... 8037698: ffff 01ff b4c9 ff33 ffff 01ff cad9 ff6f ......3.......o. 80376a8: b9cc ff41 d6e1 ff8f ffff 01ff ffff 01ff ..A............. 80376b8: d5e0 ff8c b9cc ff40 cedb ff79 ffff 01ff ......@...y..... 80376c8: b4c9 ff33 ffff 01ff ffff 01ff ffff 01ff ..3............. 80376d8: ffff 01ff c5d5 ff62 c1d2 ff58 ffff 01ff ......b...X..... 80376e8: ffff 01ff bbce ff46 b5c9 ff35 b5c9 ff35 ......F...5...5. 80376f8: bbce ff46 ffff 01ff ffff 01ff c0d2 ff55 ..F...........U. 8037708: c5d5 ff62 ffff 01ff ffff 01ff ffff 01ff ..b............. 8037718: ffff 01ff ffff 01ff c8d7 ff69 b4c9 ff33 ..........i...3. 8037728: cedb ff79 ffff 01ff ffff 01ff ffff 01ff ..y............. 8037738: ffff 01ff cedb ff79 b4c9 ff33 c8d7 ff69 ......y...3...i. 8037748: ffff 01ff ffff 01ff ffff 01ff ffff 0dff ................ 8037758: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 8037768: b9cd ff42 b4c9 ff33 b7cb ff3b b7cb ff3b ..B...3...;...;. 8037778: b4c9 ff33 b9cd ff42 ffff 01ff ffff 01ff ..3...B......... 8037788: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 8037798: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 80377a8: ffff 01ff ffff 01ff e4eb ffb5 e4eb ffb5 ................ 80377b8: ffff 01ff ffff 01ff ffff 01ff ffff 01ff ................ 80377c8: ffff 01ff ffff 01ff ffff 01ff 0000 ffff ................ 80377d8: 0000 ffff 0000 ffff 0000 ffff 0000 ffff ................ 80377e8: 0000 ffff 0000 ffff 0000 ffff 0000 ffff ................ 80377f8: 0000 ffff 0000 ffff 0000 ffff 0000 ffff ................ 8037808: 0000 ffff 0000 ffff 0000 ffff ............ 08037814 : 8037814: 7828 0803 5aa5 0803 5ab1 0803 1802 0000 (x...Z...Z...... 8037824: 0001 0000 .... 08037828 : 8037828: 4158 0803 1bbf 0803 1bcb 0803 1f52 0000 XA..........R... 8037838: 0001 0000 5448 5054 312f 302e 3220 3030 ....HTTP/1.0 200 8037848: 4f20 0d4b 430a 6e6f 6574 746e 542d 7079 OK..Content-Typ 8037858: 3a65 6574 7478 682f 6d74 0d6c 0d0a 000a e:text/html..... 8037868: 227b 4341 3a22 0022 2c22 4422 2243 223a {"AC":".","DC":" 8037878: 2200 222c 6e69 665f 6572 2271 223a 2200 .","in_freq":"." 8037888: 222c 756f 5f74 7266 7165 3a22 0022 2c22 ,"out_freq":".", 8037898: 7022 7277 3a22 0022 2c22 6c22 6e69 5f65 "pwr":".","line_ 80378a8: 6166 6c69 3a22 2c00 6c22 776f 625f 7461 fail":.,"low_bat 80378b8: 6574 7972 3a22 2c00 6222 7461 635f 7061 tery":.,"bat_cap 80378c8: 3a22 0022 2c22 6922 6e6e 7265 745f 6d65 ":".","inner_tem 80378d8: 2270 223a 2200 222c 6162 5f74 6974 656d p":".","bat_time 80378e8: 6c5f 6665 2274 223a 2200 222c 6f6c 6461 _left":".","load 80378f8: 6d5f 6e6f 7469 726f 3a22 2c00 7422 6d65 _monitor":.,"tem 8037908: 5f70 6f6d 696e 6f74 2272 003a 222c 6f63 p_monitor":.,"co 8037918: 6e6e 6365 5f74 6f6d 696e 6f74 2272 003a nnect_monitor":. 8037928: 7d22 7b00 7222 6165 5f64 6f63 6d6d 6e75 "}.{"read_commun 8037938: 7469 2279 223a 2200 222c 7277 7469 5f65 ity":".","write_ 8037948: 6f63 6d6d 6e75 7469 2279 223a 2200 222c community":"."," 8037958: 616d 616e 6567 4972 2250 223a 2200 222c managerIP":"."," 8037968: 616d 616e 6567 4972 3250 3a22 0022 2c22 managerIP2":".", 8037978: 6d22 6e61 6761 7265 5049 2233 223a 2200 "managerIP3":"." 8037988: 222c 7069 6461 7264 3a22 0022 2c22 6722 ,"ipaddr":".","g 8037998: 2277 223a 2200 222c 616d 6b73 3a22 0022 w":".","mask":". 80379a8: 2c22 6422 6368 2270 003a 227b 7075 6974 ","dhcp":.{"upti 80379b8: 656d 3a22 0022 2c22 6d22 646f 6c65 3a22 me":".","model": 80379c8: 0022 2c22 7022 6f72 6164 6574 3a22 0022 ".","prodate":". 80379d8: 2c22 6622 7677 7265 6973 6e6f 3a22 0022 ","fwversion":". 80379e8: 2c22 6d22 6361 6461 7264 3a22 0022 2c22 ","macaddr":".", 80379f8: 7322 7265 6f6e 3a22 0022 2c22 6f22 6e77 "serno":".","own 8037a08: 7265 3a22 0022 2c22 7322 7379 6f4c 6163 er":".","sysLoca 8037a18: 6974 6e6f 3a22 0022 2c22 6322 6d6f 656d tion":".","comme 8037a28: 746e 3a22 0022 2c22 6e22 7465 6573 7474 nt":".","netsett 8037a38: 6e69 7367 635f 6168 676e 6465 3a22 0022 ings_changed":". 8037a48: 6425 5200 6265 6f6f 5474 7361 006b 6374 %d.RebootTask.tc 8037a58: 6970 5f70 6874 6572 6461 0000 pip_thread.. 08037a64 : 8037a64: 0004 0006 000c 0005 0019 0010 0006 0008 ................ 8037a74: 0014 000a 001e 0032 0005 0009 0032 0019 ......2.....2... 08037a84 : 8037a84: 001c 0020 0094 001c 0010 0010 002c 0014 .. .........,... 8037a94: 0014 0010 0020 0010 0024 0080 0010 0614 .... ...$....... 08037aa4 : 8037aa4: 04cc 2001 04d4 2001 04c4 2001 04d8 2001 ... ... ... ... 08037ab4 : 8037ab4: 0201 0403 0605 0707 0707 0707 0307 ............. 08037ac1 : 8037ac1: 0603 180c 6030 ff78 ....0`x 08037ac8 : 8037ac8: ffff ffff .... 08037acc : 8037acc: 0000 0000 .... 08037ad0 : 8037ad0: 0000 0000 .... 08037ad4 : 8037ad4: c61d 0802 c0d1 0802 c661 0802 c1e5 0802 ........a....... 8037ae4: 0001 0000 .... 08037ae8 : 8037ae8: 1160 2000 1160 2000 `.. `.. 08037af0 : 8037af0: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 8037b00: 0002 0001 7c20 0803 7d48 0803 .... |..H}.. 08037b0c : 8037b0c: 8318 0803 7ee0 0803 1128 2000 83bc 0803 .....~..(.. .... 8037b1c: 7ce0 0803 7eb0 0803 810c 0803 7c7c 0803 .|...~......||.. 08037b2c : 8037b2c: 1190 2000 1190 2000 1190 2000 1190 2000 ... ... ... ... 8037b3c: 1190 2000 1190 2000 1190 2000 1190 2000 ... ... ... ... 8037b4c: 1190 2000 1190 2000 1190 2000 1190 2000 ... ... ... ... 8037b5c: 1190 2000 ... 08037b60 : 8037b60: 0002 0000 0000 0000 0000 0000 0000 0000 ................ 8037b70: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8037b80: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8037b90: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8037ba0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8037bb0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8037bc0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8037bd0: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8037be0: 0000 0000 .... 08037be4 : 8037be4: 5146 4e44 752d 6b6e 0000 0000 FQDN-unk.... 08037bf0 : 8037bf0: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 08037c00 : 8037c00: bd25 0802 bd45 0802 bc73 0802 bc77 0802 %...E...s...w... 8037c10: 0001 0000 .... 08037c14 : 8037c14: 0000 0000 .... 08037c18 : 8037c18: 0001 0000 0002 0000 ........ 08037c20 : 8037c20: 0001 0000 .... 08037c24 : 8037c24: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 8037c34: 0002 0001 8314 0803 8108 0803 ............ 08037c40 : 8037c40: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8037c50: 0005 0000 0006 0000 0007 0000 000b 0000 ................ 08037c60 : 8037c60: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 8037c70: 0002 0008 7c40 0803 7b0c 0803 ....@|...{.. 08037c7c : 8037c7c: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 8037c8c: 0002 001c 8200 0803 8098 0803 ............ 08037c98 : 8037c98: c591 0802 bfc9 0802 bc73 0802 bc77 0802 ........s...w... 8037ca8: 0001 0000 .... 08037cac : 8037cac: 7dec 0803 7dec 0803 7dec 0803 7dec 0803 .}...}...}...}.. 8037cbc: 7dec 0803 7dec 0803 7dec 0803 .}...}...}.. 08037cc8 : 8037cc8: 0002 0000 .... 08037ccc : 8037ccc: 7d34 0803 7d34 0803 7d34 0803 7d34 0803 4}..4}..4}..4}.. 8037cdc: 1144 2000 D.. 08037ce0 : 8037ce0: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 8037cf0: 0002 001a 7fac 0803 7e3c 0803 ........<~.. 08037cfc : 8037cfc: c4a5 0802 bd59 0802 be19 0802 bc77 0802 ....Y.......w... 8037d0c: 0001 0000 .... 08037d10 : 8037d10: 0001 0000 0002 0000 ........ 08037d18 : 8037d18: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 8037d28: 0002 0004 7bf0 0803 7ed0 0803 .....{...~.. 08037d34 : 8037d34: c06d 0802 c099 0802 bc73 0802 bc77 0802 m.......s...w... 8037d44: 0001 0000 .... 08037d48 : 8037d48: 7dd0 0803 .}.. 08037d4c : 8037d4c: 0002 0000 0000 0000 0000 0000 0000 0000 ................ 8037d5c: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8037d6c: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8037d7c: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8037d8c: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8037d9c: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8037dac: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8037dbc: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8037dcc: 0000 0000 .... 08037dd0 : 8037dd0: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 8037de0: 0002 0003 7f30 0803 8028 0803 ....0...(... 08037dec : 8037dec: bc79 0802 c8d9 0802 c409 0802 c6a9 0802 y............... 8037dfc: 0001 0000 .... 08037e00 : 8037e00: 7c98 0803 7c98 0803 7c98 0803 7c98 0803 .|...|...|...|.. 8037e10: 7c98 0803 7c98 0803 7c98 0803 7c98 0803 .|...|...|...|.. 8037e20: 7c98 0803 7c98 0803 7c98 0803 7c98 0803 .|...|...|...|.. 8037e30: 1290 2000 7c98 0803 7c98 0803 ... .|...|.. 08037e3c : 8037e3c: 82e4 0803 82e4 0803 82e4 0803 82e4 0803 ................ 8037e4c: 82e4 0803 82e4 0803 82e4 0803 82e4 0803 ................ 8037e5c: 82e4 0803 82e4 0803 82e4 0803 82e4 0803 ................ 8037e6c: 82e4 0803 82e4 0803 82e4 0803 82e4 0803 ................ 8037e7c: 82e4 0803 82e4 0803 82e4 0803 82e4 0803 ................ 8037e8c: 82e4 0803 82e4 0803 82e4 0803 82e4 0803 ................ 8037e9c: 82e4 0803 82e4 0803 ........ 08037ea4 : 8037ea4: 0004 0000 .... 08037ea8 : 8037ea8: 7c00 0803 1330 2000 .|..0.. 08037eb0 : 8037eb0: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 8037ec0: 0002 000f 805c 0803 7e00 0803 ....\....~.. 08037ecc : 8037ecc: 0000 0000 .... 08037ed0 : 8037ed0: 13f4 2000 13f4 2000 13f4 2000 13f4 2000 ... ... ... ... 08037ee0 : 8037ee0: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 8037ef0: 0002 0002 7c18 0803 7ea8 0803 .....|...~.. 08037efc : 8037efc: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8037f0c: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8037f1c: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8037f2c: 000d 0000 .... 08037f30 : 8037f30: 0001 0000 0002 0000 0003 0000 ............ 08037f3c : 8037f3c: 12b8 2000 12b8 2000 12b8 2000 12b8 2000 ... ... ... ... 8037f4c: 12b8 2000 ... 08037f50 : 8037f50: 7cfc 0803 7cfc 0803 7cfc 0803 7cfc 0803 .|...|...|...|.. 8037f60: 7cfc 0803 7cfc 0803 7cfc 0803 7cfc 0803 .|...|...|...|.. 8037f70: 7cfc 0803 7cfc 0803 7cfc 0803 7cfc 0803 .|...|...|...|.. 8037f80: 7cfc 0803 7cfc 0803 7cfc 0803 7cfc 0803 .|...|...|...|.. 8037f90: 7cfc 0803 7cfc 0803 7cfc 0803 12e4 2000 .|...|...|..... 8037fa0: 134c 2000 110c 2000 7cfc 0803 L.. ... .|.. 08037fac : 8037fac: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8037fbc: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 8037fcc: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8037fdc: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 8037fec: 0011 0000 0012 0000 0013 0000 0014 0000 ................ 8037ffc: 0015 0000 0016 0000 0017 0000 0018 0000 ................ 803800c: 0019 0000 001a 0000 ........ 08038014 : 8038014: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8038024: 0005 0000 .... 08038028 : 8038028: 1304 2000 1304 2000 1304 2000 ... ... ... 08038034 : 8038034: 1260 2000 1260 2000 1260 2000 1260 2000 `.. `.. `.. `.. 8038044: 1260 2000 `.. 08038048 : 8038048: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8038058: 0005 0000 .... 0803805c : 803805c: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 803806c: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 803807c: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 803808c: 000d 0000 000e 0000 000f 0000 ............ 08038098 : 8038098: 7ad4 0803 7ad4 0803 7ad4 0803 7ad4 0803 .z...z...z...z.. 80380a8: 7ad4 0803 7ad4 0803 7ad4 0803 7ad4 0803 .z...z...z...z.. 80380b8: 7ad4 0803 7ad4 0803 7ad4 0803 7ad4 0803 .z...z...z...z.. 80380c8: 7ad4 0803 7ad4 0803 7ad4 0803 7ad4 0803 .z...z...z...z.. 80380d8: 7ad4 0803 7ad4 0803 7ad4 0803 7ad4 0803 .z...z...z...z.. 80380e8: 7ad4 0803 7ad4 0803 7ad4 0803 7ad4 0803 .z...z...z...z.. 80380f8: 7ad4 0803 7ad4 0803 7ad4 0803 7ad4 0803 .z...z...z...z.. 08038108 : 8038108: 7c60 0803 `|.. 0803810c : 803810c: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 803811c: 0002 0005 8014 0803 7ccc 0803 .........|.. 08038128 : 8038128: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 8038138: 0002 000d 7efc 0803 7b2c 0803 .....~..,{.. 08038144 : 8038144: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 8038154: 0002 0016 828c 0803 8364 0803 ........d... 08038160 : 8038160: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 8038170: 0002 0002 7d10 0803 7ae8 0803 .....}...z.. 0803817c : 803817c: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 803818c: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 803819c: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 80381ac: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 80381bc: 0011 0000 0012 0000 0013 0000 0014 0000 ................ 80381cc: 0015 0000 0016 0000 0017 0000 ............ 080381d8 : 80381d8: 776c 5049 0800 lwIP. 080381dd : 80381dd: 0008 6b00 ... 080381e0 : 80381e0: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 80381f0: 0002 0005 8350 0803 7f3c 0803 ....P...<... 080381fc : 80381fc: 0000 0000 .... 08038200 : 8038200: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8038210: 0005 0000 0006 0000 0008 0000 0009 0000 ................ 8038220: 000a 0000 000b 0000 000c 0000 000d 0000 ................ 8038230: 000e 0000 000f 0000 0010 0000 0011 0000 ................ 8038240: 0012 0000 0013 0000 0014 0000 0015 0000 ................ 8038250: 0016 0000 0018 0000 0019 0000 001a 0000 ................ 8038260: 001b 0000 001c 0000 001d 0000 001e 0000 ................ 08038270 : 8038270: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8038280: 0005 0000 0006 0000 0007 0000 ............ 0803828c : 803828c: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 803829c: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 80382ac: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 80382bc: 000d 0000 000e 0000 000f 0000 0010 0000 ................ 80382cc: 0011 0000 0012 0000 0013 0000 0014 0000 ................ 80382dc: 0015 0000 0016 0000 ........ 080382e4 : 80382e4: bea1 0802 becd 0802 bc73 0802 bc77 0802 ........s...w... 80382f4: 0001 0000 .... 080382f8 : 80382f8: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 8038308: 0002 0002 12d8 2000 83d8 0803 ....... .... 08038314 : 8038314: 0001 0000 .... 08038318 : 8038318: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 8038328: 0002 0007 8270 0803 7cac 0803 ....p....|.. 08038334 : 8038334: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 8038344: 0002 0005 8048 0803 8034 0803 ....H...4... 08038350 : 8038350: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 8038360: 0005 0000 .... 08038364 : 8038364: 11b8 2000 11b8 2000 11b8 2000 11b8 2000 ... ... ... ... 8038374: 11b8 2000 11b8 2000 11b8 2000 11b8 2000 ... ... ... ... 8038384: 11b8 2000 11b8 2000 11b8 2000 11b8 2000 ... ... ... ... 8038394: 11b8 2000 11b8 2000 11b8 2000 11b8 2000 ... ... ... ... 80383a4: 11b8 2000 11b8 2000 11b8 2000 11b8 2000 ... ... ... ... 80383b4: 11b8 2000 11b8 2000 ... ... 080383bc : 80383bc: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 80383cc: 0002 0017 817c 0803 7f50 0803 ....|...P... 080383d8 : 80383d8: 7c24 0803 8474 0803 $|..t... 080383e0 : 80383e0: 0001 0000 0003 0000 0006 0000 0001 0000 ................ 080383f0 : 80383f0: 0000 0000 .... 080383f4 : 80383f4: 7570 6c62 6369 ff00 public. 080383fb : 80383fb: ffff ffff ffff ...... 08038401 : 8038401: 0000 0000 0000 7445 5f68 6669 2000 7325 ......Eth_if. %s 8038411: 0d0a 4400 4348 4350 696c 6e65 0074 6577 ...DHCPClient.we 8038421: 5262 6965 696e 0074 6552 6e69 7469 6557 bReinit.ReinitWe 8038431: 0062 4c00 b.. 08038434 : 8038434: 854c 0803 L... 08038438 : 8038438: 84ac 0803 .... 0803843c : 803843c: 8568 0803 8568 0803 8568 0803 8568 0803 h...h...h...h... 803844c: 8568 0803 8568 0803 8568 0803 8568 0803 h...h...h...h... 803845c: 8568 0803 8568 0803 8568 0803 8568 0803 h...h...h...h... 803846c: 8568 0803 h... 08038470 : 8038470: 038f 0000 .... 08038474 : 8038474: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 8038484: 0002 0001 8540 0803 8434 0803 ....@...4... 08038490 : 8038490: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 80384a0: 0002 0001 853c 0803 8438 0803 ....<...8... 080384ac : 80384ac: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 80384bc: 0002 000d 84d0 0803 843c 0803 ........<... 080384c8 : 80384c8: 0001 0000 .... 080384cc : 80384cc: a318 0000 .... 080384d0 : 80384d0: 0001 0000 0002 0000 0003 0000 0004 0000 ................ 80384e0: 0005 0000 0006 0000 0007 0000 0008 0000 ................ 80384f0: 0009 0000 000a 0000 000b 0000 000c 0000 ................ 8038500: 000d 0000 0000 0000 0000 0000 0000 0000 ................ 8038510: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8038520: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 8038530: 0000 0000 0000 0000 0000 0000 ............ 0803853c : 803853c: 0001 0000 .... 08038540 : 8038540: 0001 0000 .... 08038544 : 8038544: 8580 0803 .... 08038548 : 8038548: 859c 0803 .... 0803854c : 803854c: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 803855c: 0002 0001 84cc 0803 8548 0803 ........H... 08038568 : 8038568: ffad 0802 ff71 0802 ff59 0802 009d 0803 ....q...Y....... 8038578: 0001 0000 .... 0803857c : 803857c: 8490 0803 .... 08038580 : 8038580: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 8038590: 0002 0001 84c8 0803 857c 0803 ........|... 0803859c : 803859c: bc6b 0802 bc71 0802 bc73 0802 bc77 0802 k...q...s...w... 80385ac: 0002 0001 8470 0803 8544 0803 0043 0000 ....p...D...C... 080385bc <_init>: 80385bc: b5f8 push {r3, r4, r5, r6, r7, lr} 80385be: bf00 nop 80385c0: bcf8 pop {r3, r4, r5, r6, r7} 80385c2: bc08 pop {r3} 80385c4: 469e mov lr, r3 80385c6: 4770 bx lr 080385c8 <_fini>: 80385c8: b5f8 push {r3, r4, r5, r6, r7, lr} 80385ca: bf00 nop 80385cc: bcf8 pop {r3, r4, r5, r6, r7} 80385ce: bc08 pop {r3} 80385d0: 469e mov lr, r3 80385d2: 4770 bx lr