diff options
author | Jordan Augé <jordan.auge+fdio@cisco.com> | 2019-04-16 14:39:50 +0200 |
---|---|---|
committer | Jordan Augé <jordan.auge+fdio@cisco.com> | 2019-04-16 15:37:53 +0200 |
commit | 3ed2badca49b8c7e636d8f8c40f532a7d3a7ba29 (patch) | |
tree | f865fe39515b3a496bfeee7ad8ef73916104caf4 /hicn-light/src/hicn/io/hicnListener.c | |
parent | c365689250216861fd7727203ee6ba1049ad5778 (diff) |
[HICN-177] Provide helpers to send, receive and process control messages
Change-Id: I5f7270568eaf24858346edebc638cf51e28cc5ad
Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'hicn-light/src/hicn/io/hicnListener.c')
-rw-r--r-- | hicn-light/src/hicn/io/hicnListener.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/hicn-light/src/hicn/io/hicnListener.c b/hicn-light/src/hicn/io/hicnListener.c index 3f6cab94e..525cae31c 100644 --- a/hicn-light/src/hicn/io/hicnListener.c +++ b/hicn-light/src/hicn/io/hicnListener.c @@ -500,6 +500,7 @@ const Connection *_findConnectionFromPacket(HicnListener *hicn, return conn; } +#if 0 static Address *_createAddressFromPacket(uint8_t *msgBuffer) { Address *packetAddr = NULL; if (messageHandler_GetIPPacketType(msgBuffer) == IPv6_TYPE) { @@ -521,6 +522,7 @@ static Address *_createAddressFromPacket(uint8_t *msgBuffer) { } return packetAddr; } +#endif static void _handleProbeMessage(HicnListener *hicn, uint8_t *msgBuffer) { Address *packetAddr = _createAddressFromPacket(msgBuffer); @@ -691,16 +693,20 @@ static Message *_readMessage(HicnListener *hicn, int fd, uint8_t *msgBuffer) { _handleWldrNotification(hicn, msgBuffer); } else if (messageHandler_IsLoadBalancerProbe(msgBuffer)) { _handleProbeMessage(hicn, msgBuffer); - } #ifdef WITH_MAPME - else if (mapMe_isMapMe(msgBuffer)) { + } else if (mapMe_isMapMe(msgBuffer)) { /* This function triggers the handling of the MAP-Me message, and we * will return NULL so as to terminate the processing of this * msgBuffer. */ _handleMapMe(hicn, fd, msgBuffer); - } #endif /* WITH_MAPME */ + } + + if (messageHandler_handleHooks(hicn->forwarder, hicn->connection_id, + hicn->localAddress, msgBuffer)) + goto END; +END: return message; } |