37 #if LWIP_SNMP && SNMP_USE_NETCONN 47 snmp_netconn_thread(
void *arg)
54 conn = netconn_new(NETCONN_UDP);
57 snmp_traps_handle = conn;
60 netconn_bind(conn, IP_ADDR_ANY, SNMP_IN_PORT);
63 err = netconn_recv(conn, &buf);
66 snmp_receive(conn, buf->p, &buf->addr, buf->port);
81 memset(&buf, 0,
sizeof(buf));
83 result = netconn_sendto((
struct netconn*)handle, &buf, dst, port);
91 struct netconn* conn = (
struct netconn*)handle;
99 if((dst_if !=
NULL) && (dst_ip !=
NULL)) {
113 sys_thread_new(
"snmp_netconn", snmp_netconn_thread,
NULL, SNMP_STACK_SIZE, SNMP_THREAD_PRIO);
sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int stacksize, int prio)
#define ip_route_get_local_ip(isipv6, src, dest, netif, ipaddr)
#define ip_addr_copy(dest, src)
#define IP_IS_V6_VAL(ipaddr)
#define LWIP_ERROR(message, expression, handler)
#define LWIP_UNUSED_ARG(x)