Commit f1ce3f9b authored by Lucas Russo's avatar Lucas Russo

hal/ll_io/ops/ll_io_eth.*: add ETH LLIO operations

Added new LLIO operations for ethernet devices
parent 85a7a3da
This diff is collapsed.
......@@ -10,6 +10,40 @@
#include "ll_io.h"
#define LLIO_ETH_HANDLER(self) ((llio_dev_eth_t *) self->dev_handler)
enum _llio_eth_type_e {
TCP_ETH_SOCK = 0,
UDP_ETH_SOCK = 1,
INVALID_ETH_SOCK
};
#define TCP_ETH_SOCK_STR "tcp"
#define UDP_ETH_SOCK_STR "udp"
#define INVALID_ETH_SOCK_STR "invalid"
typedef enum _llio_eth_type_e llio_eth_type_e;
/* For use by llio_t general structure */
extern const llio_ops_t llio_ops_eth;
/* Device endpoint */
struct _llio_dev_eth_t {
llio_eth_type_e type;
int fd;
char *hostname;
char *port;
};
/* Opaque llio_dev_eth structure */
typedef struct _llio_dev_eth_t llio_dev_eth_t;
/***************** Our methods *****************/
/* Creates a new instance of the Ethernet endpoint*/
llio_dev_eth_t * llio_dev_eth_new (const char *sock_type, const char *hostname,
const char *port);
/* Destroy an instance of the Ethernet Endpoint */
llio_err_e llio_dev_eth_destroy (llio_dev_eth_t **self_p);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment