Ethernet test for ECE 4180 and others to find your IP address and do a simple HTTP GET request over port 80.

Dependencies:   mbed Socket lwip-eth lwip-sys lwip

Committer:
mkersh3
Date:
Thu Apr 04 05:26:09 2013 +0000
Revision:
0:e7ca326e76ee
Ethernet Test for ECE4180 and others to find their IP Address and do a simple HTTP GET request over port 80.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mkersh3 0:e7ca326e76ee 1 /*****************************************************************************
mkersh3 0:e7ca326e76ee 2 * auth.h - PPP Authentication and phase control header file.
mkersh3 0:e7ca326e76ee 3 *
mkersh3 0:e7ca326e76ee 4 * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc.
mkersh3 0:e7ca326e76ee 5 * portions Copyright (c) 1998 Global Election Systems Inc.
mkersh3 0:e7ca326e76ee 6 *
mkersh3 0:e7ca326e76ee 7 * The authors hereby grant permission to use, copy, modify, distribute,
mkersh3 0:e7ca326e76ee 8 * and license this software and its documentation for any purpose, provided
mkersh3 0:e7ca326e76ee 9 * that existing copyright notices are retained in all copies and that this
mkersh3 0:e7ca326e76ee 10 * notice and the following disclaimer are included verbatim in any
mkersh3 0:e7ca326e76ee 11 * distributions. No written agreement, license, or royalty fee is required
mkersh3 0:e7ca326e76ee 12 * for any of the authorized uses.
mkersh3 0:e7ca326e76ee 13 *
mkersh3 0:e7ca326e76ee 14 * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR
mkersh3 0:e7ca326e76ee 15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
mkersh3 0:e7ca326e76ee 16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
mkersh3 0:e7ca326e76ee 17 * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
mkersh3 0:e7ca326e76ee 18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
mkersh3 0:e7ca326e76ee 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
mkersh3 0:e7ca326e76ee 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
mkersh3 0:e7ca326e76ee 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
mkersh3 0:e7ca326e76ee 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
mkersh3 0:e7ca326e76ee 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mkersh3 0:e7ca326e76ee 24 *
mkersh3 0:e7ca326e76ee 25 ******************************************************************************
mkersh3 0:e7ca326e76ee 26 * REVISION HISTORY
mkersh3 0:e7ca326e76ee 27 *
mkersh3 0:e7ca326e76ee 28 * 03-01-01 Marc Boucher <marc@mbsi.ca>
mkersh3 0:e7ca326e76ee 29 * Ported to lwIP.
mkersh3 0:e7ca326e76ee 30 * 97-12-04 Guy Lancaster <lancasterg@acm.org>, Global Election Systems Inc.
mkersh3 0:e7ca326e76ee 31 * Original derived from BSD pppd.h.
mkersh3 0:e7ca326e76ee 32 *****************************************************************************/
mkersh3 0:e7ca326e76ee 33 /*
mkersh3 0:e7ca326e76ee 34 * pppd.h - PPP daemon global declarations.
mkersh3 0:e7ca326e76ee 35 *
mkersh3 0:e7ca326e76ee 36 * Copyright (c) 1989 Carnegie Mellon University.
mkersh3 0:e7ca326e76ee 37 * All rights reserved.
mkersh3 0:e7ca326e76ee 38 *
mkersh3 0:e7ca326e76ee 39 * Redistribution and use in source and binary forms are permitted
mkersh3 0:e7ca326e76ee 40 * provided that the above copyright notice and this paragraph are
mkersh3 0:e7ca326e76ee 41 * duplicated in all such forms and that any documentation,
mkersh3 0:e7ca326e76ee 42 * advertising materials, and other materials related to such
mkersh3 0:e7ca326e76ee 43 * distribution and use acknowledge that the software was developed
mkersh3 0:e7ca326e76ee 44 * by Carnegie Mellon University. The name of the
mkersh3 0:e7ca326e76ee 45 * University may not be used to endorse or promote products derived
mkersh3 0:e7ca326e76ee 46 * from this software without specific prior written permission.
mkersh3 0:e7ca326e76ee 47 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
mkersh3 0:e7ca326e76ee 48 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
mkersh3 0:e7ca326e76ee 49 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
mkersh3 0:e7ca326e76ee 50 *
mkersh3 0:e7ca326e76ee 51 */
mkersh3 0:e7ca326e76ee 52
mkersh3 0:e7ca326e76ee 53 #ifndef AUTH_H
mkersh3 0:e7ca326e76ee 54 #define AUTH_H
mkersh3 0:e7ca326e76ee 55
mkersh3 0:e7ca326e76ee 56 /***********************
mkersh3 0:e7ca326e76ee 57 *** PUBLIC FUNCTIONS ***
mkersh3 0:e7ca326e76ee 58 ***********************/
mkersh3 0:e7ca326e76ee 59
mkersh3 0:e7ca326e76ee 60 /* we are starting to use the link */
mkersh3 0:e7ca326e76ee 61 void link_required (int);
mkersh3 0:e7ca326e76ee 62
mkersh3 0:e7ca326e76ee 63 /* we are finished with the link */
mkersh3 0:e7ca326e76ee 64 void link_terminated (int);
mkersh3 0:e7ca326e76ee 65
mkersh3 0:e7ca326e76ee 66 /* the LCP layer has left the Opened state */
mkersh3 0:e7ca326e76ee 67 void link_down (int);
mkersh3 0:e7ca326e76ee 68
mkersh3 0:e7ca326e76ee 69 /* the link is up; authenticate now */
mkersh3 0:e7ca326e76ee 70 void link_established (int);
mkersh3 0:e7ca326e76ee 71
mkersh3 0:e7ca326e76ee 72 /* a network protocol has come up */
mkersh3 0:e7ca326e76ee 73 void np_up (int, u16_t);
mkersh3 0:e7ca326e76ee 74
mkersh3 0:e7ca326e76ee 75 /* a network protocol has gone down */
mkersh3 0:e7ca326e76ee 76 void np_down (int, u16_t);
mkersh3 0:e7ca326e76ee 77
mkersh3 0:e7ca326e76ee 78 /* a network protocol no longer needs link */
mkersh3 0:e7ca326e76ee 79 void np_finished (int, u16_t);
mkersh3 0:e7ca326e76ee 80
mkersh3 0:e7ca326e76ee 81 /* peer failed to authenticate itself */
mkersh3 0:e7ca326e76ee 82 void auth_peer_fail (int, u16_t);
mkersh3 0:e7ca326e76ee 83
mkersh3 0:e7ca326e76ee 84 /* peer successfully authenticated itself */
mkersh3 0:e7ca326e76ee 85 void auth_peer_success (int, u16_t, char *, int);
mkersh3 0:e7ca326e76ee 86
mkersh3 0:e7ca326e76ee 87 /* we failed to authenticate ourselves */
mkersh3 0:e7ca326e76ee 88 void auth_withpeer_fail (int, u16_t);
mkersh3 0:e7ca326e76ee 89
mkersh3 0:e7ca326e76ee 90 /* we successfully authenticated ourselves */
mkersh3 0:e7ca326e76ee 91 void auth_withpeer_success (int, u16_t);
mkersh3 0:e7ca326e76ee 92
mkersh3 0:e7ca326e76ee 93 /* check authentication options supplied */
mkersh3 0:e7ca326e76ee 94 void auth_check_options (void);
mkersh3 0:e7ca326e76ee 95
mkersh3 0:e7ca326e76ee 96 /* check what secrets we have */
mkersh3 0:e7ca326e76ee 97 void auth_reset (int);
mkersh3 0:e7ca326e76ee 98
mkersh3 0:e7ca326e76ee 99 /* Check peer-supplied username/password */
mkersh3 0:e7ca326e76ee 100 u_char check_passwd (int, char *, int, char *, int, char **, int *);
mkersh3 0:e7ca326e76ee 101
mkersh3 0:e7ca326e76ee 102 /* get "secret" for chap */
mkersh3 0:e7ca326e76ee 103 int get_secret (int, char *, char *, char *, int *, int);
mkersh3 0:e7ca326e76ee 104
mkersh3 0:e7ca326e76ee 105 /* check if IP address is authorized */
mkersh3 0:e7ca326e76ee 106 int auth_ip_addr (int, u32_t);
mkersh3 0:e7ca326e76ee 107
mkersh3 0:e7ca326e76ee 108 /* check if IP address is unreasonable */
mkersh3 0:e7ca326e76ee 109 int bad_ip_adrs (u32_t);
mkersh3 0:e7ca326e76ee 110
mkersh3 0:e7ca326e76ee 111 #endif /* AUTH_H */