code that uses Watchdog to reset Mbed every 30seconds. After 30-60mins, the ethernet interface fails to setup() after WatchDog reset.

Dependencies:   mbed

Committer:
eqon
Date:
Thu Jun 07 05:44:29 2012 +0000
Revision:
0:0ce833f21e63

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
eqon 0:0ce833f21e63 1 /*****************************************************************************
eqon 0:0ce833f21e63 2 * ipcp.h - PPP IP NCP: Internet Protocol Network Control Protocol header file.
eqon 0:0ce833f21e63 3 *
eqon 0:0ce833f21e63 4 * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc.
eqon 0:0ce833f21e63 5 * portions Copyright (c) 1997 Global Election Systems Inc.
eqon 0:0ce833f21e63 6 *
eqon 0:0ce833f21e63 7 * The authors hereby grant permission to use, copy, modify, distribute,
eqon 0:0ce833f21e63 8 * and license this software and its documentation for any purpose, provided
eqon 0:0ce833f21e63 9 * that existing copyright notices are retained in all copies and that this
eqon 0:0ce833f21e63 10 * notice and the following disclaimer are included verbatim in any
eqon 0:0ce833f21e63 11 * distributions. No written agreement, license, or royalty fee is required
eqon 0:0ce833f21e63 12 * for any of the authorized uses.
eqon 0:0ce833f21e63 13 *
eqon 0:0ce833f21e63 14 * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR
eqon 0:0ce833f21e63 15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
eqon 0:0ce833f21e63 16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
eqon 0:0ce833f21e63 17 * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
eqon 0:0ce833f21e63 18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
eqon 0:0ce833f21e63 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
eqon 0:0ce833f21e63 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
eqon 0:0ce833f21e63 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
eqon 0:0ce833f21e63 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
eqon 0:0ce833f21e63 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
eqon 0:0ce833f21e63 24 *
eqon 0:0ce833f21e63 25 ******************************************************************************
eqon 0:0ce833f21e63 26 * REVISION HISTORY
eqon 0:0ce833f21e63 27 *
eqon 0:0ce833f21e63 28 * 03-01-01 Marc Boucher <marc@mbsi.ca>
eqon 0:0ce833f21e63 29 * Ported to lwIP.
eqon 0:0ce833f21e63 30 * 97-12-04 Guy Lancaster <glanca@gesn.com>, Global Election Systems Inc.
eqon 0:0ce833f21e63 31 * Original derived from BSD codes.
eqon 0:0ce833f21e63 32 *****************************************************************************/
eqon 0:0ce833f21e63 33 /*
eqon 0:0ce833f21e63 34 * ipcp.h - IP Control Protocol definitions.
eqon 0:0ce833f21e63 35 *
eqon 0:0ce833f21e63 36 * Copyright (c) 1989 Carnegie Mellon University.
eqon 0:0ce833f21e63 37 * All rights reserved.
eqon 0:0ce833f21e63 38 *
eqon 0:0ce833f21e63 39 * Redistribution and use in source and binary forms are permitted
eqon 0:0ce833f21e63 40 * provided that the above copyright notice and this paragraph are
eqon 0:0ce833f21e63 41 * duplicated in all such forms and that any documentation,
eqon 0:0ce833f21e63 42 * advertising materials, and other materials related to such
eqon 0:0ce833f21e63 43 * distribution and use acknowledge that the software was developed
eqon 0:0ce833f21e63 44 * by Carnegie Mellon University. The name of the
eqon 0:0ce833f21e63 45 * University may not be used to endorse or promote products derived
eqon 0:0ce833f21e63 46 * from this software without specific prior written permission.
eqon 0:0ce833f21e63 47 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
eqon 0:0ce833f21e63 48 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
eqon 0:0ce833f21e63 49 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
eqon 0:0ce833f21e63 50 *
eqon 0:0ce833f21e63 51 * $Id: ipcp.h,v 1.4 2010/01/18 20:49:43 goldsimon Exp $
eqon 0:0ce833f21e63 52 */
eqon 0:0ce833f21e63 53
eqon 0:0ce833f21e63 54 #ifndef IPCP_H
eqon 0:0ce833f21e63 55 #define IPCP_H
eqon 0:0ce833f21e63 56
eqon 0:0ce833f21e63 57 /*
eqon 0:0ce833f21e63 58 * Options.
eqon 0:0ce833f21e63 59 */
eqon 0:0ce833f21e63 60 #define CI_ADDRS 1 /* IP Addresses */
eqon 0:0ce833f21e63 61 #define CI_COMPRESSTYPE 2 /* Compression Type */
eqon 0:0ce833f21e63 62 #define CI_ADDR 3
eqon 0:0ce833f21e63 63
eqon 0:0ce833f21e63 64 #define CI_MS_DNS1 129 /* Primary DNS value */
eqon 0:0ce833f21e63 65 #define CI_MS_WINS1 128 /* Primary WINS value */
eqon 0:0ce833f21e63 66 #define CI_MS_DNS2 131 /* Secondary DNS value */
eqon 0:0ce833f21e63 67 #define CI_MS_WINS2 130 /* Secondary WINS value */
eqon 0:0ce833f21e63 68
eqon 0:0ce833f21e63 69 #define IPCP_VJMODE_OLD 1 /* "old" mode (option # = 0x0037) */
eqon 0:0ce833f21e63 70 #define IPCP_VJMODE_RFC1172 2 /* "old-rfc"mode (option # = 0x002d) */
eqon 0:0ce833f21e63 71 #define IPCP_VJMODE_RFC1332 3 /* "new-rfc"mode (option # = 0x002d, */
eqon 0:0ce833f21e63 72 /* maxslot and slot number compression) */
eqon 0:0ce833f21e63 73
eqon 0:0ce833f21e63 74 #define IPCP_VJ_COMP 0x002d /* current value for VJ compression option */
eqon 0:0ce833f21e63 75 #define IPCP_VJ_COMP_OLD 0x0037 /* "old" (i.e, broken) value for VJ */
eqon 0:0ce833f21e63 76 /* compression option */
eqon 0:0ce833f21e63 77
eqon 0:0ce833f21e63 78 typedef struct ipcp_options {
eqon 0:0ce833f21e63 79 u_int neg_addr : 1; /* Negotiate IP Address? */
eqon 0:0ce833f21e63 80 u_int old_addrs : 1; /* Use old (IP-Addresses) option? */
eqon 0:0ce833f21e63 81 u_int req_addr : 1; /* Ask peer to send IP address? */
eqon 0:0ce833f21e63 82 u_int default_route : 1; /* Assign default route through interface? */
eqon 0:0ce833f21e63 83 u_int proxy_arp : 1; /* Make proxy ARP entry for peer? */
eqon 0:0ce833f21e63 84 u_int neg_vj : 1; /* Van Jacobson Compression? */
eqon 0:0ce833f21e63 85 u_int old_vj : 1; /* use old (short) form of VJ option? */
eqon 0:0ce833f21e63 86 u_int accept_local : 1; /* accept peer's value for ouraddr */
eqon 0:0ce833f21e63 87 u_int accept_remote : 1; /* accept peer's value for hisaddr */
eqon 0:0ce833f21e63 88 u_int req_dns1 : 1; /* Ask peer to send primary DNS address? */
eqon 0:0ce833f21e63 89 u_int req_dns2 : 1; /* Ask peer to send secondary DNS address? */
eqon 0:0ce833f21e63 90 u_short vj_protocol; /* protocol value to use in VJ option */
eqon 0:0ce833f21e63 91 u_char maxslotindex; /* VJ slots - 1. */
eqon 0:0ce833f21e63 92 u_char cflag; /* VJ slot compression flag. */
eqon 0:0ce833f21e63 93 u32_t ouraddr, hisaddr; /* Addresses in NETWORK BYTE ORDER */
eqon 0:0ce833f21e63 94 u32_t dnsaddr[2]; /* Primary and secondary MS DNS entries */
eqon 0:0ce833f21e63 95 u32_t winsaddr[2]; /* Primary and secondary MS WINS entries */
eqon 0:0ce833f21e63 96 } ipcp_options;
eqon 0:0ce833f21e63 97
eqon 0:0ce833f21e63 98 extern fsm ipcp_fsm[];
eqon 0:0ce833f21e63 99 extern ipcp_options ipcp_wantoptions[];
eqon 0:0ce833f21e63 100 extern ipcp_options ipcp_gotoptions[];
eqon 0:0ce833f21e63 101 extern ipcp_options ipcp_allowoptions[];
eqon 0:0ce833f21e63 102 extern ipcp_options ipcp_hisoptions[];
eqon 0:0ce833f21e63 103
eqon 0:0ce833f21e63 104 extern struct protent ipcp_protent;
eqon 0:0ce833f21e63 105
eqon 0:0ce833f21e63 106 #endif /* IPCP_H */