diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-06 21:29:34 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-03-06 21:29:34 +0100 |
commit | 1d18f972554c8bad0f08b3ff6727c87586e97094 (patch) | |
tree | ae3fc39553ecd87ed85b22860640d2859e9aa092 /src/peer.h | |
parent | d4686dd79799c09faee49e1645f9b3c39ce1e993 (diff) | |
download | fastd-1d18f972554c8bad0f08b3ff6727c87586e97094.tar fastd-1d18f972554c8bad0f08b3ff6727c87586e97094.zip |
Reorganized type definitions
Diffstat (limited to 'src/peer.h')
-rw-r--r-- | src/peer.h | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -31,6 +31,39 @@ #include "fastd.h" +union _fastd_peer_address { + struct sockaddr sa; + struct sockaddr_in in; + struct sockaddr_in6 in6; +}; + +struct _fastd_peer { + fastd_peer *next; + + const fastd_peer_config *config; + + fastd_peer_address address; + + fastd_peer_state state; + uint8_t last_req_id; +}; + +struct _fastd_peer_config { + fastd_peer_config *next; + + fastd_peer_address address; +}; + +struct _fastd_eth_addr { + uint8_t data[ETH_ALEN]; +}; + +struct _fastd_peer_eth_addr { + fastd_eth_addr addr; + fastd_peer *peer; +}; + + const fastd_eth_addr* fastd_get_source_address(const fastd_context *ctx, fastd_buffer buffer); const fastd_eth_addr* fastd_get_dest_address(const fastd_context *ctx, fastd_buffer buffer); |