summaryrefslogtreecommitdiffstats
path: root/src/fastd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fastd.h')
-rw-r--r--src/fastd.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/fastd.h b/src/fastd.h
index 90df868..acc5a19 100644
--- a/src/fastd.h
+++ b/src/fastd.h
@@ -73,6 +73,10 @@ typedef enum _fastd_peer_state {
STATE_ESTABLISHED,
} fastd_peer_state;
+typedef struct _fastd_eth_addr {
+ uint8_t data[ETH_ALEN];
+} fastd_eth_addr;
+
typedef struct _fastd_peer {
struct _fastd_peer *next;
@@ -83,10 +87,13 @@ typedef struct _fastd_peer {
fastd_peer_state state;
uint8_t last_req_id;
-
- void **addresses;
} fastd_peer;
+typedef struct _fastd_peer_eth_addr {
+ fastd_eth_addr addr;
+ fastd_peer *peer;
+} fastd_peer_eth_addr;
+
typedef struct _fastd_context fastd_context;
typedef struct _fastd_method {
@@ -124,6 +131,10 @@ struct _fastd_context {
int tunfd;
int sockfd;
+
+ size_t eth_addr_size;
+ size_t n_eth_addr;
+ fastd_peer_eth_addr *eth_addr;
};
@@ -152,7 +163,6 @@ static inline void fastd_buffer_free(fastd_buffer buffer) {
free(buffer.base);
}
-
static inline size_t fastd_max_packet_size(const fastd_context *ctx) {
switch (ctx->conf->protocol) {
case PROTOCOL_ETHERNET: