aboutsummaryrefslogtreecommitdiff
path: root/libraries/WiFi/utility/socket.c
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2012-10-22 09:17:24 +0200
committerCristian Maglie <c.maglie@bug.st>2012-10-22 09:17:24 +0200
commite03133b1b43fd445d3ed79a83d12786ef351cd35 (patch)
treeb8c10307727d0cb1571b1eb139f2f98537e29995 /libraries/WiFi/utility/socket.c
parent46d658fac872f7aa8856c792b1744b74f2d9946d (diff)
Moved WiFi library in the proper place
Diffstat (limited to 'libraries/WiFi/utility/socket.c')
-rw-r--r--libraries/WiFi/utility/socket.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libraries/WiFi/utility/socket.c b/libraries/WiFi/utility/socket.c
new file mode 100644
index 0000000..665073b
--- /dev/null
+++ b/libraries/WiFi/utility/socket.c
@@ -0,0 +1,20 @@
+/*
+*
+@file socket.c
+@brief define function of socket API
+*
+*/
+#include <inttypes.h>
+#include "socket.h"
+
+SOCKET socket(uint8 protocol) {return 0;} // Opens a socket(TCP or UDP or IP_RAW mode)
+void close(SOCKET s) {} // Close socket
+uint8 connect(SOCKET s, uint8 * addr, uint16 port) {return 0;} // Establish TCP connection (Active connection)
+void disconnect(SOCKET s) {} // disconnect the connection
+uint8 listen(SOCKET s) { return 0;} // Establish TCP connection (Passive connection)
+uint16 send(SOCKET s, const uint8 * buf, uint16 len) { return 0;} // Send data (TCP)
+uint16 recv(SOCKET s, uint8 * buf, uint16 len) {return 0;} // Receive data (TCP)
+uint16 sendto(SOCKET s, const uint8 * buf, uint16 len, uint8 * addr, uint16 port) {return 0;} // Send data (UDP/IP RAW)
+uint16 recvfrom(SOCKET s, uint8 * buf, uint16 len, uint8 * addr, uint16 *port) {return 0;} // Receive data (UDP/IP RAW)
+
+uint16 igmpsend(SOCKET s, const uint8 * buf, uint16 len) {return 0;}