I have a problem getting this to work. Server only recieves half of the data being sent. Whats wrong

Dependencies:   mbed

Committer:
tax
Date:
Tue Mar 29 13:20:15 2011 +0000
Revision:
0:66300c77c6e9

        

Who changed what in which revision?

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