Fork of Smoothie to port to mbed non-LPC targets.

Dependencies:   mbed

Fork of Smoothie by Stéphane Cachat

Committer:
Michael J. Spencer
Date:
Fri Feb 28 18:52:52 2014 -0800
Revision:
2:1df0b61d3b5a
Update to latest Smoothie.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Michael J. Spencer 2:1df0b61d3b5a 1 /*
Michael J. Spencer 2:1df0b61d3b5a 2 * Copyright (c) 2005, Swedish Institute of Computer Science
Michael J. Spencer 2:1df0b61d3b5a 3 * All rights reserved.
Michael J. Spencer 2:1df0b61d3b5a 4 *
Michael J. Spencer 2:1df0b61d3b5a 5 * Redistribution and use in source and binary forms, with or without
Michael J. Spencer 2:1df0b61d3b5a 6 * modification, are permitted provided that the following conditions
Michael J. Spencer 2:1df0b61d3b5a 7 * are met:
Michael J. Spencer 2:1df0b61d3b5a 8 * 1. Redistributions of source code must retain the above copyright
Michael J. Spencer 2:1df0b61d3b5a 9 * notice, this list of conditions and the following disclaimer.
Michael J. Spencer 2:1df0b61d3b5a 10 * 2. Redistributions in binary form must reproduce the above copyright
Michael J. Spencer 2:1df0b61d3b5a 11 * notice, this list of conditions and the following disclaimer in the
Michael J. Spencer 2:1df0b61d3b5a 12 * documentation and/or other materials provided with the distribution.
Michael J. Spencer 2:1df0b61d3b5a 13 * 3. Neither the name of the Institute nor the names of its contributors
Michael J. Spencer 2:1df0b61d3b5a 14 * may be used to endorse or promote products derived from this software
Michael J. Spencer 2:1df0b61d3b5a 15 * without specific prior written permission.
Michael J. Spencer 2:1df0b61d3b5a 16 *
Michael J. Spencer 2:1df0b61d3b5a 17 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
Michael J. Spencer 2:1df0b61d3b5a 18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Michael J. Spencer 2:1df0b61d3b5a 19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Michael J. Spencer 2:1df0b61d3b5a 20 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
Michael J. Spencer 2:1df0b61d3b5a 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Michael J. Spencer 2:1df0b61d3b5a 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
Michael J. Spencer 2:1df0b61d3b5a 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
Michael J. Spencer 2:1df0b61d3b5a 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
Michael J. Spencer 2:1df0b61d3b5a 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
Michael J. Spencer 2:1df0b61d3b5a 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
Michael J. Spencer 2:1df0b61d3b5a 27 * SUCH DAMAGE.
Michael J. Spencer 2:1df0b61d3b5a 28 *
Michael J. Spencer 2:1df0b61d3b5a 29 * This file is part of the uIP TCP/IP stack
Michael J. Spencer 2:1df0b61d3b5a 30 *
Michael J. Spencer 2:1df0b61d3b5a 31 * @(#)$Id: dhcpc.h,v 1.3 2006/06/11 21:46:37 adam Exp $
Michael J. Spencer 2:1df0b61d3b5a 32 */
Michael J. Spencer 2:1df0b61d3b5a 33 #ifndef __DHCPC_H__
Michael J. Spencer 2:1df0b61d3b5a 34 #define __DHCPC_H__
Michael J. Spencer 2:1df0b61d3b5a 35
Michael J. Spencer 2:1df0b61d3b5a 36 #include "timer.h"
Michael J. Spencer 2:1df0b61d3b5a 37 #include "pt.h"
Michael J. Spencer 2:1df0b61d3b5a 38
Michael J. Spencer 2:1df0b61d3b5a 39 struct dhcpc_state {
Michael J. Spencer 2:1df0b61d3b5a 40 struct pt pt;
Michael J. Spencer 2:1df0b61d3b5a 41 char state;
Michael J. Spencer 2:1df0b61d3b5a 42 struct uip_udp_conn *conn;
Michael J. Spencer 2:1df0b61d3b5a 43 struct timer timer;
Michael J. Spencer 2:1df0b61d3b5a 44 u16_t ticks;
Michael J. Spencer 2:1df0b61d3b5a 45 const void *mac_addr;
Michael J. Spencer 2:1df0b61d3b5a 46 int mac_len;
Michael J. Spencer 2:1df0b61d3b5a 47
Michael J. Spencer 2:1df0b61d3b5a 48 u8_t serverid[4];
Michael J. Spencer 2:1df0b61d3b5a 49
Michael J. Spencer 2:1df0b61d3b5a 50 uint32_t lease_time;
Michael J. Spencer 2:1df0b61d3b5a 51 uint32_t ipaddr;
Michael J. Spencer 2:1df0b61d3b5a 52 uint32_t netmask;
Michael J. Spencer 2:1df0b61d3b5a 53 uint32_t dnsaddr;
Michael J. Spencer 2:1df0b61d3b5a 54 uint32_t default_router;
Michael J. Spencer 2:1df0b61d3b5a 55 };
Michael J. Spencer 2:1df0b61d3b5a 56
Michael J. Spencer 2:1df0b61d3b5a 57 #ifdef __cplusplus
Michael J. Spencer 2:1df0b61d3b5a 58 extern "C" {
Michael J. Spencer 2:1df0b61d3b5a 59 #endif
Michael J. Spencer 2:1df0b61d3b5a 60
Michael J. Spencer 2:1df0b61d3b5a 61 void dhcpc_init(const void *mac_addr, int mac_len);
Michael J. Spencer 2:1df0b61d3b5a 62 void dhcpc_request(void);
Michael J. Spencer 2:1df0b61d3b5a 63
Michael J. Spencer 2:1df0b61d3b5a 64 void dhcpc_appcall(void);
Michael J. Spencer 2:1df0b61d3b5a 65
Michael J. Spencer 2:1df0b61d3b5a 66 void dhcpc_configured(const struct dhcpc_state *s);
Michael J. Spencer 2:1df0b61d3b5a 67
Michael J. Spencer 2:1df0b61d3b5a 68 #ifdef __cplusplus
Michael J. Spencer 2:1df0b61d3b5a 69 }
Michael J. Spencer 2:1df0b61d3b5a 70 #endif
Michael J. Spencer 2:1df0b61d3b5a 71
Michael J. Spencer 2:1df0b61d3b5a 72 typedef struct dhcpc_state uip_udp_appstate_t;
Michael J. Spencer 2:1df0b61d3b5a 73 #define UIP_UDP_APPCALL dhcpc_appcall
Michael J. Spencer 2:1df0b61d3b5a 74
Michael J. Spencer 2:1df0b61d3b5a 75
Michael J. Spencer 2:1df0b61d3b5a 76 #endif /* __DHCPC_H__ */