50 |
static int tcpip_tcp_timer_active = 0; |
static int tcpip_tcp_timer_active = 0; |
51 |
|
|
52 |
|
|
53 |
/*-----------------------------------------------------------------------------------*/ |
|
54 |
static void |
static void |
55 |
tcpip_tcp_timer(void *arg) |
tcpip_tcp_timer(void *arg) |
56 |
{ |
{ |
73 |
} |
} |
74 |
} |
} |
75 |
#endif /* LWIP_TCP */ |
#endif /* LWIP_TCP */ |
76 |
/*-----------------------------------------------------------------------------------*/ |
|
77 |
static void |
static void |
78 |
tcpip_thread(void *arg) |
tcpip_thread(void *arg) |
79 |
{ |
{ |
113 |
memp_free(MEMP_TCPIP_MSG, msg); |
memp_free(MEMP_TCPIP_MSG, msg); |
114 |
} |
} |
115 |
} |
} |
116 |
/*-----------------------------------------------------------------------------------*/ |
|
117 |
err_t |
err_t |
118 |
tcpip_input(struct pbuf *p, struct netif *inp) |
tcpip_input(struct pbuf *p, struct netif *inp) |
119 |
{ |
{ |
131 |
sys_mbox_post(mbox, msg); |
sys_mbox_post(mbox, msg); |
132 |
return ERR_OK; |
return ERR_OK; |
133 |
} |
} |
134 |
/*-----------------------------------------------------------------------------------*/ |
|
135 |
err_t |
err_t |
136 |
tcpip_callback(void (*f)(void *ctx), void *ctx) |
tcpip_callback(void (*f)(void *ctx), void *ctx) |
137 |
{ |
{ |
148 |
sys_mbox_post(mbox, msg); |
sys_mbox_post(mbox, msg); |
149 |
return ERR_OK; |
return ERR_OK; |
150 |
} |
} |
151 |
/*-----------------------------------------------------------------------------------*/ |
|
152 |
void |
void |
153 |
tcpip_apimsg(struct api_msg *apimsg) |
tcpip_apimsg(struct api_msg *apimsg) |
154 |
{ |
{ |
162 |
msg->msg.apimsg = apimsg; |
msg->msg.apimsg = apimsg; |
163 |
sys_mbox_post(mbox, msg); |
sys_mbox_post(mbox, msg); |
164 |
} |
} |
165 |
/*-----------------------------------------------------------------------------------*/ |
|
166 |
void |
void |
167 |
tcpip_init(void (* initfunc)(void *), void *arg) |
tcpip_init(void (* initfunc)(void *), void *arg) |
168 |
{ |
{ |
171 |
mbox = sys_mbox_new(); |
mbox = sys_mbox_new(); |
172 |
sys_thread_new(tcpip_thread, NULL, TCPIP_THREAD_PRIO); |
sys_thread_new(tcpip_thread, NULL, TCPIP_THREAD_PRIO); |
173 |
} |
} |
174 |
/*-----------------------------------------------------------------------------------*/ |
|
175 |
|
|
176 |
|
|
177 |
|
|