fixed some compilation issues cause by removing tcpip-output callback

This commit is contained in:
Joakim Eriksson 2017-09-23 19:10:07 +02:00
parent f73454071f
commit 4aaf680c5b
4 changed files with 3 additions and 70 deletions

View File

@ -62,11 +62,6 @@ uip_driver_send(void)
static void
init(void)
{
/*
* Set out output function as the function to be called from uIP to
* send a packet.
*/
tcpip_set_outputfunc(uip_driver_send);
}
/*--------------------------------------------------------------------*/
static void
@ -83,6 +78,7 @@ input(void)
const struct network_driver uip_driver = {
"uip",
init,
input
input,
uip_driver_send
};
/*--------------------------------------------------------------------*/

View File

@ -39,6 +39,7 @@
#include "dev/serial-line.h"
#include "net/ipv6/uip-ds6-route.h"
#include "rpl-dag-root.h"
#define UDP_CLIENT_PORT 8765
#define UDP_SERVER_PORT 5678

View File

@ -110,34 +110,8 @@ PROCESS_THREAD(udp_server_process, ev, data)
PRINTF("UDP server started. nbr:%d routes:%d\n",
NBR_TABLE_CONF_MAX_NEIGHBORS, NETSTACK_MAX_ROUTE_ENTRIES);
#if UIP_CONF_ROUTER
/* The choice of server address determines its 6LoWPAN header compression.
* Obviously the choice made here must also be selected in udp-client.c.
*
* For correct Wireshark decoding using a sniffer, add the /64 prefix to the
* 6LowPAN protocol preferences,
* e.g. set Context 0 to fd00::. At present Wireshark copies Context/128 and
* then overwrites it.
* (Setting Context 0 to fd00::1111:2222:3333:4444 will report a 16 bit
* compressed address of fd00::1111:22ff:fe33:xxxx)
* Note Wireshark's IPCMV6 checksum verification depends on the correct
* uncompressed addresses.
*/
#if 0
/* Mode 1 - 64 bits inline */
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 1);
#elif 1
/* Mode 2 - 16 bits inline */
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0x00ff, 0xfe00, 1);
#else
/* Mode 3 - derived from link local (MAC) address */
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
#endif
rpl_dag_root_init(&ipaddr, &ipaddr);
rpl_dag_root_init_dag_immediately();
#endif /* UIP_CONF_ROUTER */
print_local_addresses();

View File

@ -1,38 +0,0 @@
/*
* Copyright (c) 2010, Loughborough University - Computer Science
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*---------------------------------------------------------------------------*/
#include "netstack.h"
/*---------------------------------------------------------------------------*/
void
netstack_init(void)
{
NETSTACK_RADIO.init();
NETSTACK_MAC.init();
}
/*---------------------------------------------------------------------------*/