?? myapp.lst
字號:
C51 COMPILER V7.06 MYAPP 04/05/2006 12:13:01 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE MYAPP
OBJECT MODULE PLACED IN .\DEBUG\myapp.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE uip\myapp\myapp.c LARGE OPTIMIZE(6,SPEED) BROWSE DEBUG OBJECTEXTEND PRINT(.
-\DEBUG\myapp.lst) OBJECT(.\DEBUG\myapp.obj)
stmt level source
1
2 #include "..\uip.h" //LEON.Z.
3 #include "myapp.h"
4
5
6 #define NULL (void *)0
7
8 #ifdef DEBUG
#include <stdio.h>
#define PRINT(x) printf("%s", x)
#define PRINTLN(x) printf("%s\n", x)
#else /* DEBUG */
13 #define PRINT(x)
14 #define PRINTLN(x)
15 #endif /* DEBUG */
16
17 struct myapp_state *hs;
18
19 #define APPport 1180
20
21 /*-----------------------------------------------------------------------------------*/
22 void
23 myapp_init(void)
24 {
25 1
26 1 /* Listen to port 1180. */
27 1 uip_listen(APPport);
28 1 }
29 /*-----------------------------------------------------------------------------------*/
30 void
31 myapp(void)
32 {
33 1 // u8_t i;
34 1
35 1 switch(uip_conn->lport) {
36 2 /* This is the web server: */
37 2 case htons(APPport):
38 2 /* Pick out the application state from the uip_conn structure. */
39 2 hs = (struct httpd_state *)(uip_conn->appstate);
*** WARNING C182 IN LINE 39 OF UIP\MYAPP\MYAPP.C: pointer to different objects
40 2
41 2 if(uip_connected()) {
42 3 /* first connect, the app do some initialize here */
43 3
44 3 //hs->state = HTTP_NOGET;
45 3 //hs->count = 0;
46 3 /* Don't send any data in return; we wait for the remote request
47 3 instead. */
48 3 uip_send(uip_appdata, 0);
49 3 return;
50 3
51 3 } else if(uip_poll()) {
52 3 /* If we are polled ten times, we abort the connection. This is
53 3 because we don't want connections lingering indefinately in
C51 COMPILER V7.06 MYAPP 04/05/2006 12:13:01 PAGE 2
54 3 the system. */
55 3 if(hs->count++ >= 10) {
56 4 uip_abort();
57 4 }
58 3 return;
59 3 } else if(uip_newdata()) {
60 3 /* we have recieved the request or data, apply the remote now*/
61 3
62 3 //--------leon, add the protocal here----, we receive the pc data or
63 3 //--retquest, in uip_appdata, length=uip_len;
64 3 //and we process it, place our data in uip_appdata. and set uip_len;
65 3
66 3 /* Check for GET. */
67 3 if(uip_appdata[0] != 't' ||
68 3 uip_appdata[1] != 'e' ||
69 3 uip_appdata[2] != 's' ||
70 3 uip_appdata[3] != 't') {
71 4 /* If it isn't a GET, we abort the connection. */
72 4 uip_abort();
73 4 return;
74 4 }
75 3
76 3
77 3 uip_appdata[0]='o';
78 3 uip_appdata[1]='k';
79 3
80 3 uip_len=2;
81 3 }
82 2
83 2 if(uip_acked()) {
84 3 uip_close();
85 3 }
86 2 /* Finally, return to uIP. Our outgoing packet will soon be on its
87 2 way... */
88 2 return;
89 2
90 2 default:
91 2 /* Should never happen. */
92 2 uip_abort();
93 2 break;
94 2 }
95 1 }
96 /*-----------------------------------------------------------------------------------*/
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 220 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = 3 ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 1 WARNING(S), 0 ERROR(S)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -