HTTPClient using static IP

Dependencies:   mbed

Committer:
mr_q
Date:
Mon May 30 11:53:37 2011 +0000
Revision:
0:d8f2f7d5f31b
v0.01 Draft

Who changed what in which revision?

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