summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-08-16 10:28:45 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-08-16 10:28:45 -0600
commit1681f0b71b75e25c5e9db0a329a1a7b878d0f5eb (patch)
tree6fe26454ea91bed12935926640072fef33fac05d
parent1b9423b93cb55343bdadd9a59acd7f65dfbcd81d (diff)
downloadnuttx-1681f0b71b75e25c5e9db0a329a1a7b878d0f5eb.tar.gz
nuttx-1681f0b71b75e25c5e9db0a329a1a7b878d0f5eb.tar.bz2
nuttx-1681f0b71b75e25c5e9db0a329a1a7b878d0f5eb.zip
Move SLIP prototypes from net.h to new slip.h
-rw-r--r--nuttx/include/nuttx/net/slip.h52
1 files changed, 39 insertions, 13 deletions
diff --git a/nuttx/include/nuttx/net/slip.h b/nuttx/include/nuttx/net/slip.h
index 2c3515eb0..020f8e302 100644
--- a/nuttx/include/nuttx/net/slip.h
+++ b/nuttx/include/nuttx/net/slip.h
@@ -1,9 +1,8 @@
/****************************************************************************
- * include/nuttx/net/pkt.h
- * Definitions for use with AF_PACKET sockets
+ * include/nuttx/net/slip.h
*
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
- * Author: Daniel Laszlo Sitzer <dlsitzer@gmail.com>
+ * Author : Gregory Nutt <gnutt@nuttx.org>
*
* Includes some definitions that a compatible with the LGPL GNU C Library
* header file of the same name.
@@ -37,8 +36,8 @@
*
****************************************************************************/
-#ifndef __INCLUDE_NUTTX_NET_PKT_H
-#define __INCLUDE_NUTTX_NET_PKT_H
+#ifndef __INCLUDE_NUTTX_NET_SLIP_H
+#define __INCLUDE_NUTTX_NET_SLIP_H
/****************************************************************************
* Included Files
@@ -46,7 +45,7 @@
#include <nuttx/config.h>
-#include <nuttx/net/netconfig.h>
+#ifdef CONFIG_NET_SLIP
/****************************************************************************
* Public Type Definitions
@@ -56,15 +55,42 @@
* Public Data
****************************************************************************/
+#ifdef __cplusplus
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
-/* This function provides the interface between Ethernet device drivers and
- * packet socket logic. All frames that are received should be provided to
- * pkt_input() prior to other routing.
- */
-struct net_driver_s; /* Forward reference */
-int pkt_input(FAR struct net_driver_s *dev);
+/****************************************************************************
+ * Function: slip_initialize
+ *
+ * Description:
+ * Instantiate a SLIP network interface.
+ *
+ * Parameters:
+ * intf - In the case where there are multiple SLIP interfaces, this value
+ * identifies which is to be initialized. The network name will be,
+ * for example, "/dev/slip5" for intf == 5
+ *
+ * Returned Value:
+ * OK on success; Negated errno on failure.
+ *
+ * Assumptions:
+ *
+ ****************************************************************************/
+
+int slip_initialize(int intf, FAR const char *devname);
+
+#undef EXTERN
+#ifdef __cplusplus
+}
+#endif
-#endif /* __INCLUDE_NUTTX_NET_PKT_H */
+#endif /* CONFIG_NET_SLIP */
+#endif /* __INCLUDE_NUTTX_NET_SLIP_H */