ID the MBED processor on the network if you have more than one. View MBED name on DHCP of your Router - Example \"MBED PE\" Change your ID in Core / host.h

Committer:
JeffM
Date:
Sat Nov 06 14:11:02 2010 +0000
Revision:
0:fd3b85615428
MBED ID 1A

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JeffM 0:fd3b85615428 1 /*
JeffM 0:fd3b85615428 2 * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
JeffM 0:fd3b85615428 3 * All rights reserved.
JeffM 0:fd3b85615428 4 *
JeffM 0:fd3b85615428 5 * Redistribution and use in source and binary forms, with or without modification,
JeffM 0:fd3b85615428 6 * are permitted provided that the following conditions are met:
JeffM 0:fd3b85615428 7 *
JeffM 0:fd3b85615428 8 * 1. Redistributions of source code must retain the above copyright notice,
JeffM 0:fd3b85615428 9 * this list of conditions and the following disclaimer.
JeffM 0:fd3b85615428 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
JeffM 0:fd3b85615428 11 * this list of conditions and the following disclaimer in the documentation
JeffM 0:fd3b85615428 12 * and/or other materials provided with the distribution.
JeffM 0:fd3b85615428 13 * 3. The name of the author may not be used to endorse or promote products
JeffM 0:fd3b85615428 14 * derived from this software without specific prior written permission.
JeffM 0:fd3b85615428 15 *
JeffM 0:fd3b85615428 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
JeffM 0:fd3b85615428 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
JeffM 0:fd3b85615428 18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
JeffM 0:fd3b85615428 19 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
JeffM 0:fd3b85615428 20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
JeffM 0:fd3b85615428 21 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
JeffM 0:fd3b85615428 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
JeffM 0:fd3b85615428 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
JeffM 0:fd3b85615428 24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
JeffM 0:fd3b85615428 25 * OF SUCH DAMAGE.
JeffM 0:fd3b85615428 26 *
JeffM 0:fd3b85615428 27 * This file is part of the lwIP TCP/IP stack.
JeffM 0:fd3b85615428 28 *
JeffM 0:fd3b85615428 29 * Author: Adam Dunkels <adam@sics.se>
JeffM 0:fd3b85615428 30 *
JeffM 0:fd3b85615428 31 */
JeffM 0:fd3b85615428 32 #ifndef __LWIP_RAW_H__
JeffM 0:fd3b85615428 33 #define __LWIP_RAW_H__
JeffM 0:fd3b85615428 34
JeffM 0:fd3b85615428 35 #include "lwip/opt.h"
JeffM 0:fd3b85615428 36
JeffM 0:fd3b85615428 37 #if LWIP_RAW /* don't build if not configured for use in lwipopts.h */
JeffM 0:fd3b85615428 38
JeffM 0:fd3b85615428 39 #include "lwip/pbuf.h"
JeffM 0:fd3b85615428 40 #include "lwip/def.h"
JeffM 0:fd3b85615428 41 #include "lwip/ip.h"
JeffM 0:fd3b85615428 42 #include "lwip/ip_addr.h"
JeffM 0:fd3b85615428 43
JeffM 0:fd3b85615428 44 #ifdef __cplusplus
JeffM 0:fd3b85615428 45 extern "C" {
JeffM 0:fd3b85615428 46 #endif
JeffM 0:fd3b85615428 47
JeffM 0:fd3b85615428 48 struct raw_pcb;
JeffM 0:fd3b85615428 49
JeffM 0:fd3b85615428 50 /** Function prototype for raw pcb receive callback functions.
JeffM 0:fd3b85615428 51 * @param arg user supplied argument (raw_pcb.recv_arg)
JeffM 0:fd3b85615428 52 * @param pcb the raw_pcb which received data
JeffM 0:fd3b85615428 53 * @param p the packet buffer that was received
JeffM 0:fd3b85615428 54 * @param addr the remote IP address from which the packet was received
JeffM 0:fd3b85615428 55 * @return 1 if the packet was 'eaten' (aka. deleted),
JeffM 0:fd3b85615428 56 * 0 if the packet lives on
JeffM 0:fd3b85615428 57 * If returning 1, the callback is responsible for freeing the pbuf
JeffM 0:fd3b85615428 58 * if it's not used any more.
JeffM 0:fd3b85615428 59 */
JeffM 0:fd3b85615428 60 typedef u8_t (*raw_recv_fn)(void *arg, struct raw_pcb *pcb, struct pbuf *p,
JeffM 0:fd3b85615428 61 ip_addr_t *addr);
JeffM 0:fd3b85615428 62
JeffM 0:fd3b85615428 63 struct raw_pcb {
JeffM 0:fd3b85615428 64 /* Common members of all PCB types */
JeffM 0:fd3b85615428 65 IP_PCB;
JeffM 0:fd3b85615428 66
JeffM 0:fd3b85615428 67 struct raw_pcb *next;
JeffM 0:fd3b85615428 68
JeffM 0:fd3b85615428 69 u8_t protocol;
JeffM 0:fd3b85615428 70
JeffM 0:fd3b85615428 71 /** receive callback function */
JeffM 0:fd3b85615428 72 raw_recv_fn recv;
JeffM 0:fd3b85615428 73 /* user-supplied argument for the recv callback */
JeffM 0:fd3b85615428 74 void *recv_arg;
JeffM 0:fd3b85615428 75 };
JeffM 0:fd3b85615428 76
JeffM 0:fd3b85615428 77 /* The following functions is the application layer interface to the
JeffM 0:fd3b85615428 78 RAW code. */
JeffM 0:fd3b85615428 79 struct raw_pcb * raw_new (u8_t proto);
JeffM 0:fd3b85615428 80 void raw_remove (struct raw_pcb *pcb);
JeffM 0:fd3b85615428 81 err_t raw_bind (struct raw_pcb *pcb, ip_addr_t *ipaddr);
JeffM 0:fd3b85615428 82 err_t raw_connect (struct raw_pcb *pcb, ip_addr_t *ipaddr);
JeffM 0:fd3b85615428 83
JeffM 0:fd3b85615428 84 void raw_recv (struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg);
JeffM 0:fd3b85615428 85 err_t raw_sendto (struct raw_pcb *pcb, struct pbuf *p, ip_addr_t *ipaddr);
JeffM 0:fd3b85615428 86 err_t raw_send (struct raw_pcb *pcb, struct pbuf *p);
JeffM 0:fd3b85615428 87
JeffM 0:fd3b85615428 88 /* The following functions are the lower layer interface to RAW. */
JeffM 0:fd3b85615428 89 u8_t raw_input (struct pbuf *p, struct netif *inp);
JeffM 0:fd3b85615428 90 #define raw_init() /* Compatibility define, not init needed. */
JeffM 0:fd3b85615428 91
JeffM 0:fd3b85615428 92 #ifdef __cplusplus
JeffM 0:fd3b85615428 93 }
JeffM 0:fd3b85615428 94 #endif
JeffM 0:fd3b85615428 95
JeffM 0:fd3b85615428 96 #endif /* LWIP_RAW */
JeffM 0:fd3b85615428 97
JeffM 0:fd3b85615428 98 #endif /* __LWIP_RAW_H__ */