summaryrefslogtreecommitdiff
path: root/third_party/uip-1.0/apps/hello-world/hello-world.h
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2014-08-08 14:42:07 +0300
committerYuval Adam <yuv.adm@gmail.com>2014-08-08 14:42:07 +0300
commita6163888f3c56123b1db313743c6147ba498732c (patch)
treeff7d15d991d1d09ba6cbc0cec80924f57445bfdd /third_party/uip-1.0/apps/hello-world/hello-world.h
parentc3e4c9a25c2910d2d66d52215b3406b13d5b23d5 (diff)
Add third_party libs
Diffstat (limited to 'third_party/uip-1.0/apps/hello-world/hello-world.h')
-rw-r--r--third_party/uip-1.0/apps/hello-world/hello-world.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/third_party/uip-1.0/apps/hello-world/hello-world.h b/third_party/uip-1.0/apps/hello-world/hello-world.h
new file mode 100644
index 0000000..35a85ea
--- /dev/null
+++ b/third_party/uip-1.0/apps/hello-world/hello-world.h
@@ -0,0 +1,52 @@
+/**
+ * \addtogroup apps
+ * @{
+ */
+
+/**
+ * \defgroup helloworld Hello, world
+ * @{
+ *
+ * A small example showing how to write applications with
+ * \ref psock "protosockets".
+ */
+
+/**
+ * \file
+ * Header file for an example of how to write uIP applications
+ * with protosockets.
+ * \author
+ * Adam Dunkels <adam@sics.se>
+ */
+
+#ifndef __HELLO_WORLD_H__
+#define __HELLO_WORLD_H__
+
+/* Since this file will be included by uip.h, we cannot include uip.h
+ here. But we might need to include uipopt.h if we need the u8_t and
+ u16_t datatypes. */
+#include "uipopt.h"
+
+#include "psock.h"
+
+/* Next, we define the uip_tcp_appstate_t datatype. This is the state
+ of our application, and the memory required for this state is
+ allocated together with each TCP connection. One application state
+ for each TCP connection. */
+typedef struct hello_world_state {
+ struct psock p;
+ char inputbuffer[10];
+ char name[40];
+} uip_tcp_appstate_t;
+
+/* Finally we define the application function to be called by uIP. */
+void hello_world_appcall(void);
+#ifndef UIP_APPCALL
+#define UIP_APPCALL hello_world_appcall
+#endif /* UIP_APPCALL */
+
+void hello_world_init(void);
+
+#endif /* __HELLO_WORLD_H__ */
+/** @} */
+/** @} */