mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-03 11:30:53 +00:00
support udp_broadcast_new also when using IPv6. Suggested by Wolf-Bastian Pttner.
This commit is contained in:
parent
d86ee2c665
commit
9765df97e5
@ -29,7 +29,7 @@
|
|||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* $Id: tcpip.c,v 1.20 2009/04/06 13:18:12 nvt-se Exp $
|
* $Id: tcpip.c,v 1.21 2009/04/13 19:54:07 nvt-se Exp $
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* \file
|
* \file
|
||||||
@ -308,7 +308,11 @@ udp_broadcast_new(u16_t port, void *appstate)
|
|||||||
uip_ipaddr_t addr;
|
uip_ipaddr_t addr;
|
||||||
struct uip_udp_conn *conn;
|
struct uip_udp_conn *conn;
|
||||||
|
|
||||||
|
#if UIP_CONF_IPV6
|
||||||
|
uip_create_linklocal_allnodes_mcast(&addr);
|
||||||
|
#else
|
||||||
uip_ipaddr(&addr, 255,255,255,255);
|
uip_ipaddr(&addr, 255,255,255,255);
|
||||||
|
#endif /* UIP_CONF_IPV6 */
|
||||||
conn = udp_new(&addr, port, appstate);
|
conn = udp_new(&addr, port, appstate);
|
||||||
if(conn != NULL) {
|
if(conn != NULL) {
|
||||||
udp_bind(conn, port);
|
udp_bind(conn, port);
|
||||||
|
Loading…
Reference in New Issue
Block a user