diff options
| author | Perry Hung <iperry@alum.mit.edu> | 2010-06-04 18:01:16 -0400 |
|---|---|---|
| committer | Perry Hung <iperry@alum.mit.edu> | 2010-06-11 15:12:01 -0400 |
| commit | 32d4a18a16afc5d3416ff602b008308ab373a89e (patch) | |
| tree | 55cd4aab7388bfc270c50819b35bd9408a5f51d9 /libraries/ethernet/socket.h | |
| parent | 59728136a7374b358fb599d69b09497a21119133 (diff) | |
basic socket interfaceethernet-shield
Diffstat (limited to 'libraries/ethernet/socket.h')
| -rw-r--r-- | libraries/ethernet/socket.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libraries/ethernet/socket.h b/libraries/ethernet/socket.h new file mode 100644 index 0000000..c6efa90 --- /dev/null +++ b/libraries/ethernet/socket.h @@ -0,0 +1,27 @@ +#ifndef _SOCKET_H_ +#define _SOCKET_H_ + +/** + * @brief socket operations + */ + +#ifdef __cplusplus +extern "C"{ +#endif + + +enum sock_type { + SOCK_STREAM = 0x1, + SOCK_DGRAM = 0x2 +}; + +int32 socket(int32 type); +int32 bind(int32 sockfd, uint16 port); +int32 listen(int32 sockfd); + +#ifdef __cplusplus +} +#endif + +#endif + |
