summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-03-11 08:33:57 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-03-11 08:33:57 -0600
commit5fc714c4968c0db423ae358007cca8aadf3786ad (patch)
tree90ad9ff18dc92d053b25ac759daa8b5c6834fdce /apps
parent678358057d08cee1d1e9c417d820da966a019ed7 (diff)
downloadpx4-nuttx-5fc714c4968c0db423ae358007cca8aadf3786ad.tar.gz
px4-nuttx-5fc714c4968c0db423ae358007cca8aadf3786ad.tar.bz2
px4-nuttx-5fc714c4968c0db423ae358007cca8aadf3786ad.zip
Add file headers to all PPPD files (still lots of style incompatibilies)
Diffstat (limited to 'apps')
-rw-r--r--apps/netutils/pppd/ahdlc.c44
-rw-r--r--apps/netutils/pppd/ahdlc.h24
-rw-r--r--apps/netutils/pppd/chat.c47
-rw-r--r--apps/netutils/pppd/chat.h35
-rw-r--r--apps/netutils/pppd/ipcp.c52
-rw-r--r--apps/netutils/pppd/ipcp.h27
-rw-r--r--apps/netutils/pppd/lcp.c42
-rw-r--r--apps/netutils/pppd/lcp.h27
-rw-r--r--apps/netutils/pppd/pap.c41
-rw-r--r--apps/netutils/pppd/pap.h36
-rw-r--r--apps/netutils/pppd/ppp.c40
-rw-r--r--apps/netutils/pppd/ppp.h30
-rw-r--r--apps/netutils/pppd/ppp_arch.h35
-rw-r--r--apps/netutils/pppd/ppp_conf.h39
14 files changed, 322 insertions, 197 deletions
diff --git a/apps/netutils/pppd/ahdlc.c b/apps/netutils/pppd/ahdlc.c
index 43c911893..29287f89d 100644
--- a/apps/netutils/pppd/ahdlc.c
+++ b/apps/netutils/pppd/ahdlc.c
@@ -1,24 +1,16 @@
-/* www.mycal.com
- *---------------------------------------------------------------------------
- * ahdlc.c - Ahdlc receive and transmit processor for PPP engine.
+/****************************************************************************
+ * apps/netutils/pppd/ahdlc.c
+ * Ahdlc receive and transmit processor for PPP engine.
*
- *---------------------------------------------------------------------------
- * Version
- * 0.1 Original Version Jan 11, 1998
- *
- *---------------------------------------------------------------------------
- *
- * Copyright (C) 1998, Mycal Labs www.mycal.com
- *
- *---------------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
- * All rights reserved.
+ * Version: 0.1 Original Version Jan 11, 1998
+ * Copyright (C) 1998, Mycal Labs www.mycal.com
+ * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -44,19 +36,19 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This file is part of the Mycal Modified uIP TCP/IP stack.
- *
- * $Id: ahdlc.c,v 1.1 2007/05/26 07:14:39 oliverschmidt Exp $
- *
- */
+ ****************************************************************************/
-/* */
-/* include files */
-/* */
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
#include "ppp_conf.h"
#include "ppp.h"
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
#if PPP_DEBUG
# define DEBUG1(x) debug_printf x
# define PACKET_TX_DEBUG 1
@@ -81,6 +73,10 @@
#define AHDLC_PFC 0x10
#define AHDLC_ACFC 0x20
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
/*---------------------------------------------------------------------------*/
/* Simple and fast CRC16 routine for embedded processors.
* Just slightly slower than the table lookup method but consumes
diff --git a/apps/netutils/pppd/ahdlc.h b/apps/netutils/pppd/ahdlc.h
index 84fbc442c..c6cddcd84 100644
--- a/apps/netutils/pppd/ahdlc.h
+++ b/apps/netutils/pppd/ahdlc.h
@@ -1,13 +1,11 @@
-/*---------------------------------------------------------------------------
- ahdlc.h - ahdlc header file
----------------------------------------------------------------------------
- Version
- 0.1 Original Version Jan 11, 1998
- (c)1998 Mycal Labs, All Rights Reserved
- ---------------------------------------------------------------------------*/
-/*
- * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
- * All rights reserved.
+/****************************************************************************
+ * apps/netutils/pppd/ahdlc.h
+ * ahdlc header file
+ *
+ * Version
+ * 0.1 Original Version Jan 11, 1998
+ * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -37,11 +35,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This file is part of the Mycal Modified uIP TCP/IP stack.
- *
- * $Id: ahdlc.h,v 1.1 2007/05/26 07:14:39 oliverschmidt Exp $
- *
- */
+ ****************************************************************************/
#ifndef __APPS_NETUTILS_PPPD_AHDLC_H
#define __APPS_NETUTILS_PPPD_AHDLC_H
diff --git a/apps/netutils/pppd/chat.c b/apps/netutils/pppd/chat.c
index 9042437dc..ce900f478 100644
--- a/apps/netutils/pppd/chat.c
+++ b/apps/netutils/pppd/chat.c
@@ -1,12 +1,59 @@
+/****************************************************************************
+ * netutils/pppd/chat.c
+ *
+ * Copyright (C) 2015 Max Nekludov. All rights reserved.
+ * Author: Max Nekludov <macscomp@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
#include "ppp_conf.h"
#include "ppp_arch.h"
#include "chat.h"
#include <poll.h>
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
#define CHAT_MAX_SKIP 8
#define CHAT_ECHO_TIMEOUT 500
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
static int chat_read_byte(int fd, char* c, int timeout)
{
int ret;
diff --git a/apps/netutils/pppd/chat.h b/apps/netutils/pppd/chat.h
index 7d1cb8df8..7246b6812 100644
--- a/apps/netutils/pppd/chat.h
+++ b/apps/netutils/pppd/chat.h
@@ -1,3 +1,38 @@
+/****************************************************************************
+ * netutils/pppd/chat.h
+ *
+ * Copyright (C) 2015 Max Nekludov. All rights reserved.
+ * Author: Max Nekludov <macscomp@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
#ifndef __APPS_NETUTILS_PPPD_CHAT_H
#define __APPS_NETUTILS_PPPD_CHAT_H
diff --git a/apps/netutils/pppd/ipcp.c b/apps/netutils/pppd/ipcp.c
index b1aa6a691..4dd695f4a 100644
--- a/apps/netutils/pppd/ipcp.c
+++ b/apps/netutils/pppd/ipcp.c
@@ -1,25 +1,16 @@
-/*
- *---------------------------------------------------------------------------
- * ipcp.c - PPP IPCP (intrnet protocol) Processor/Handler
+/****************************************************************************
+ * netutils/pppd/ipcp.c
+ * PPP IPCP (intrnet protocol) Processor/Handler
*
- *---------------------------------------------------------------------------
- *
- * Version
- * 0.1 Original Version Jun 3, 2000
- *
- *---------------------------------------------------------------------------
- *
- * Copyright (C) 2000, Mycal Labs www.mycal.com
- *
- *---------------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
- * All rights reserved.
+ * Version: 0.1 Original Version Jun 3, 2000
+ * Copyright (C) 2000, Mycal Labs www.mycal.com
+ * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -45,15 +36,11 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This file is part of the Mycal Modified uIP TCP/IP stack.
- *
- * $Id: ipcp.c,v 1.2 2010/10/19 18:29:03 adamdunkels Exp $
- *
- */
+ ****************************************************************************/
-/* */
-/* include files */
-/* */
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
#include "ppp_conf.h"
#include "ppp_arch.h"
@@ -61,12 +48,20 @@
#include "ppp.h"
#include "ahdlc.h"
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
#if PPP_DEBUG
# define DEBUG1(x) debug_printf x
#else
# define DEBUG1(x)
#endif
+/****************************************************************************
+ * Private Types
+ ****************************************************************************/
+
/* In the future add compression protocol and name servers (possibly for servers
* only)
*/
@@ -77,11 +72,14 @@ static const u8_t ipcplist[] =
0
};
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
/*---------------------------------------------------------------------------*/
#if 0
-void
-printip(uip_ipaddr_t ip2)
+void printip(uip_ipaddr_t ip2)
{
char *ip = (u8_t*)ip2;
DEBUG1((" %d.%d.%d.%d ",ip[0],ip[1],ip[2],ip[3]));
diff --git a/apps/netutils/pppd/ipcp.h b/apps/netutils/pppd/ipcp.h
index ee58f1cf7..8f2772bbf 100644
--- a/apps/netutils/pppd/ipcp.h
+++ b/apps/netutils/pppd/ipcp.h
@@ -1,19 +1,16 @@
-/* www.mycal.com
- ---------------------------------------------------------------------------
- IPCP.h - Internet Protocol Control Protocol header file
- ---------------------------------------------------------------------------
- Version
- 0.1 Original Version June 3, 2000
- (c)2000 Mycal Labs, All Rights Reserved
- ---------------------------------------------------------------------------
-*/
-/*
- * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
- * All rights reserved.
+/****************************************************************************
+ * netutils/pppd/ipcp.c
+ * Internet Protocol Control Protocol header file
+ *
+ * Version: 0.1 Original Version June 3, 2000
+ * (c)2000 Mycal Labs, All Rights Reserved
+ * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -39,11 +36,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This file is part of the Mycal Modified uIP TCP/IP stack.
- *
- * $Id: ipcp.h,v 1.1 2007/05/26 07:14:39 oliverschmidt Exp $
- *
- */
+ ****************************************************************************/
#ifndef __APPS_NETUTILS_PPPD_IPCP_H
#define __APPS_NETUTILS_PPPD_IPCP_H
diff --git a/apps/netutils/pppd/lcp.c b/apps/netutils/pppd/lcp.c
index 2a58c0218..e267abc14 100644
--- a/apps/netutils/pppd/lcp.c
+++ b/apps/netutils/pppd/lcp.c
@@ -1,20 +1,16 @@
-/* www.mycal.com
- *---------------------------------------------------------------------------
- *lcp.c - Link Configuration Protocol Handler. - -
- *---------------------------------------------------------------------------
- *Version - 0.1 Original Version June 3, 2000 -
+/****************************************************************************
+ * netutils/pppd/lcp.c
+ * Link Configuration Protocol Handler
*
- *---------------------------------------------------------------------------
- *- Copyright (C) 2000, Mycal Labs www.mycal.com - -
- *---------------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
- * All rights reserved.
+ * Version - 0.1 Original Version June 3, 2000 -
+ * Copyright (C) 2000, Mycal Labs www.mycal.com - -
+ * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -40,13 +36,11 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This file is part of the Mycal Modified uIP TCP/IP stack.
- *
- * $Id: lcp.c,v 1.2 2010/10/19 18:29:03 adamdunkels Exp $
- *
- */
+ ****************************************************************************/
-/* include files */
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
#include "ppp_conf.h"
#include "ppp_arch.h"
@@ -54,6 +48,10 @@
#include "ahdlc.h"
#include "lcp.h"
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
#if PPP_DEBUG
# define DEBUG1(x) debug_printf x
# define DEBUG2(x) debug_printf x
@@ -62,6 +60,10 @@
# define DEBUG2(x)
#endif
+/****************************************************************************
+ * Private Types
+ ****************************************************************************/
+
/* We need this when we neg our direction.
u8_t lcp_tx_options; */
@@ -78,6 +80,10 @@ static const u8_t lcplist[] =
0
};
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
/*---------------------------------------------------------------------------*/
/* lcp_init() - Initialize the LCP engine to startup values */
/*---------------------------------------------------------------------------*/
diff --git a/apps/netutils/pppd/lcp.h b/apps/netutils/pppd/lcp.h
index 2565e43a7..8344c4363 100644
--- a/apps/netutils/pppd/lcp.h
+++ b/apps/netutils/pppd/lcp.h
@@ -1,19 +1,16 @@
-/* www.mycal.com
- ---------------------------------------------------------------------------
- LCP.h - LCP header file
- ---------------------------------------------------------------------------
- Version -
- 0.1 Original Version June 3, 2000
- (c)2000 Mycal Labs, All Rights Reserved
- ---------------------------------------------------------------------------
-*/
-/*
- * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
- * All rights reserved.
+/****************************************************************************
+ * netutils/pppd/lpc.h
+ * Link Configuration Protocol header file
+ *
+ * Version: .1 Original Version June 3, 2000
+ * (c)2000 Mycal Labs, All Rights Reserved
+ * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -39,11 +36,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This file is part of the Mycal Modified uIP TCP/IP stack.
- *
- * $Id: lcp.h,v 1.1 2007/05/26 07:14:39 oliverschmidt Exp $
- *
- */
+ ****************************************************************************/
#ifndef __APPS_NETUTILS_PPPD_LCP_H
#define __APPS_NETUTILS_PPPD_LCP_H
diff --git a/apps/netutils/pppd/pap.c b/apps/netutils/pppd/pap.c
index 982fe83c0..7e732f2b1 100644
--- a/apps/netutils/pppd/pap.c
+++ b/apps/netutils/pppd/pap.c
@@ -1,19 +1,16 @@
-/* www.mycal.net
- *---------------------------------------------------------------------------
- *pap.c - PAP processor for the PPP module - -
- *---------------------------------------------------------------------------
- *Version - 0.1 Original Version Jun 3, 2000 - -
- *---------------------------------------------------------------------------
- *- Copyright (C) 2000, Mycal Labs www.mycal.com - -
- *---------------------------------------------------------------------------
-*/
-/*
- * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
- * All rights reserved.
+/****************************************************************************
+ * netutils/pppd/pap.c
+ * PAP processor for the PPP module
+ *
+ * Version: 0.1 Original Version Jun 3, 2000
+ * Copyright (C) 2000, Mycal Labs www.mycal.com - -
+ * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -39,15 +36,11 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This file is part of the Mycal Modified uIP TCP/IP stack.
- *
- * $Id: pap.c,v 1.2 2010/10/19 18:29:03 adamdunkels Exp $
- *
- */
+ ****************************************************************************/
-/* */
-/* include files */
-/* */
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
#include "ppp_conf.h"
#include "ppp_arch.h"
@@ -55,12 +48,20 @@
#include "pap.h"
#include "lcp.h"
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
#if PPP_DEBUG
# define DEBUG1(x) debug_printf x
#else
# define DEBUG1(x)
#endif
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
/*---------------------------------------------------------------------------*/
void pap_init(struct ppp_context_s *ctx)
diff --git a/apps/netutils/pppd/pap.h b/apps/netutils/pppd/pap.h
index 915bc0f27..918d1b86d 100644
--- a/apps/netutils/pppd/pap.h
+++ b/apps/netutils/pppd/pap.h
@@ -1,20 +1,16 @@
-/*
- www.mycal.com
- ---------------------------------------------------------------------------
- pap.h - pap header file
- ---------------------------------------------------------------------------
- Version
- 0.1 Original Version June 3, 2000
- (c)2000 Mycal Labs, All Rights Reserved
- ---------------------------------------------------------------------------
-*/
-/*
- * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
- * All rights reserved.
+/****************************************************************************
+ * netutils/pppd/pap.h
+ * PAP header file
+ *
+ * Version: 0.1 Original Version June 3, 2000
+ * (c)2000 Mycal Labs, All Rights Reserved
+ * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -22,8 +18,8 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Mike Johnson/Mycal Labs
- * www.mycal.net.
+ * This product includes software developed by Mike Johnson/Mycal Labs
+ * www.mycal.net.
* 4. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
@@ -40,11 +36,11 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This file is part of the Mycal Modified uIP TCP/IP stack.
- *
- * $Id: pap.h,v 1.1 2007/05/26 07:14:40 oliverschmidt Exp $
- *
- */
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
#ifndef __APPS_NETUTILS_PPPD_PAP_H
#define __APPS_NETUTILS_PPPD_PAP_H
diff --git a/apps/netutils/pppd/ppp.c b/apps/netutils/pppd/ppp.c
index b1b19a286..961d72151 100644
--- a/apps/netutils/pppd/ppp.c
+++ b/apps/netutils/pppd/ppp.c
@@ -1,21 +1,15 @@
-/*
- *---------------------------------------------------------------------------
- * ppp.c - PPP Processor/Handler
+/****************************************************************************
+ * netutils/pppd/ppp.c
+ * PPP Processor/Handler
*
- *---------------------------------------------------------------------------
- *
- * Version
- * 0.1 Original Version Jun 3, 2000
- *
- *---------------------------------------------------------------------------
- */
-/*
- * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
- * All rights reserved.
+ * Version: 0.1 Original Version Jun 3, 2000
+ * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -41,15 +35,11 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This file is part of the Mycal Modified uIP TCP/IP stack.
- *
- * $Id: ppp.c,v 1.2 2010/10/19 18:29:03 adamdunkels Exp $
- *
- */
+ ****************************************************************************/
-/* */
-/* include files */
-/* */
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
#include "ppp_conf.h"
#include "ppp_arch.h"
@@ -59,6 +49,10 @@
#include "lcp.h"
#include "pap.h"
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
#if PPP_DEBUG
# define DEBUG1(x) debug_printf x
#else
@@ -69,6 +63,10 @@
#define PACKET_RX_DEBUG 1
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
/*---------------------------------------------------------------------------*/
/* Unknown Protocol Handler, sends reject */
diff --git a/apps/netutils/pppd/ppp.h b/apps/netutils/pppd/ppp.h
index f70b63c60..03a800146 100644
--- a/apps/netutils/pppd/ppp.h
+++ b/apps/netutils/pppd/ppp.h
@@ -1,18 +1,16 @@
-/* www.mycal.net
----------------------------------------------------------------------------
- ppp.h - ppp header file
----------------------------------------------------------------------------
- Version
- 0.1 Original Version June 3, 2000
- (c)2000 Mycal Labs, All Rights Reserved
- --------------------------------------------------------------------------- */
-/*
- * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
- * All rights reserved.
+/****************************************************************************
+ * netutils/pppd/ppp.h
+ * PPP header file
+ *
+ * Version: 0.1 Original Version June 3, 2000
+ * (c)2000 Mycal Labs, All Rights Reserved
+ * Copyright (c) 2003, Mike Johnson, Mycal Labs, www.mycal.net
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
+ *
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
@@ -20,8 +18,8 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Mike Johnson/Mycal Labs
- * www.mycal.net.
+ * This product includes software developed by Mike Johnson/Mycal Labs
+ * www.mycal.net.
* 4. The name of the author may not be used to endorse or promote
* products derived from this software without specific prior
* written permission.
@@ -38,11 +36,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This file is part of the Mycal Modified uIP TCP/IP stack.
- *
- * $Id: ppp.h,v 1.1 2007/05/26 07:14:40 oliverschmidt Exp $
- *
- */
+ ****************************************************************************/
#ifndef __APPS_NETUTILS_PPPD_PPP_H
#define __APPS_NETUTILS_PPPD_PPP_H
diff --git a/apps/netutils/pppd/ppp_arch.h b/apps/netutils/pppd/ppp_arch.h
index 5226df48f..b1c6be83b 100644
--- a/apps/netutils/pppd/ppp_arch.h
+++ b/apps/netutils/pppd/ppp_arch.h
@@ -1,3 +1,38 @@
+/****************************************************************************
+ * netutils/pppd/pppd.c
+ *
+ * Copyright (C) 2015 Max Nekludov. All rights reserved.
+ * Author: Max Nekludov <macscomp@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
#ifndef __APPS_NETUTILS_PPPD_PPP_ARCH_H
#define __APPS_NETUTILS_PPPD_PPP_ARCH_H
diff --git a/apps/netutils/pppd/ppp_conf.h b/apps/netutils/pppd/ppp_conf.h
index dfbfbfd22..d092f2b81 100644
--- a/apps/netutils/pppd/ppp_conf.h
+++ b/apps/netutils/pppd/ppp_conf.h
@@ -1,6 +1,45 @@
+/****************************************************************************
+ * netutils/pppd/ppp-conf.c
+ *
+ * Copyright (C) 2015 Max Nekludov. All rights reserved.
+ * Author: Max Nekludov <macscomp@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
#ifndef __APPS_NETUTILS_PPPD_PPP_CONF_H
#define __APPS_NETUTILS_PPPD_PPP_CONF_H
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
#define IPCP_RETRY_COUNT 5
#define IPCP_TIMEOUT 5
#define IPV6CP_RETRY_COUNT 5