diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-03-26 04:00:47 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-03-26 04:06:55 +0100 |
commit | 79c6fd3f14b51d37c45b78d2a4f511927b9eac94 (patch) | |
tree | ee1b8fde2618541c09bc99227c78532e7c54b0d1 /src/babel.h | |
parent | 3dbdeacfdb3adbcaecb63a9805c5c45ec93cb8c7 (diff) | |
download | babel-79c6fd3f14b51d37c45b78d2a4f511927b9eac94.tar babel-79c6fd3f14b51d37c45b78d2a4f511927b9eac94.zip |
Fix handling of announces without payload
Diffstat (limited to 'src/babel.h')
-rw-r--r-- | src/babel.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/babel.h b/src/babel.h index 52abfd5..cf8b435 100644 --- a/src/babel.h +++ b/src/babel.h @@ -47,6 +47,9 @@ #define GP_BABEL_MAINTENANCE_INTERVAL GP_BABEL_HELLO_INTERVAL +#define GP_BABEL_UPDATE_FLAG_HAS_PAYLOAD 0x01 + + struct gmrf_context { gp_babel_node_id_t self; @@ -99,9 +102,9 @@ struct gp_babel_announce { gp_babel_nexthop_t *selected; gp_babel_nexthop_t *nexthops; - /* an incomplete announcement is specified by a len value of 0xff with NULL data */ + /* an incomplete announcement is specified by a len value of 0xff with NULL payload */ uint8_t len; - uint8_t *data; + uint8_t *payload; }; struct gp_babel_nexthop { @@ -165,7 +168,7 @@ void gp_babel_handle_packet(gmrf_t *gmrf, gmrf_context_t *ctx, gp_babel_iface_t void gp_babel_send_ack(gmrf_t *gmrf, gmrf_context_t *ctx, gp_babel_neigh_t *neigh, uint16_t nonce); void gp_babel_send_hellos(gmrf_t *gmrf, gmrf_context_t *ctx); -void gp_babel_send_update(gmrf_t *gmrf, gmrf_context_t *ctx, gp_babel_iface_t *iface, gp_babel_neigh_t *neigh, gp_babel_announce_t *announce, bool with_data); +void gp_babel_send_update(gmrf_t *gmrf, gmrf_context_t *ctx, gp_babel_iface_t *iface, gp_babel_neigh_t *neigh, gp_babel_announce_t *announce, bool with_payload); gp_babel_announce_t* gp_babel_announce_new(gmrf_t *gmrf, gmrf_context_t *ctx); |