Skip to content
Extraits de code Groupes Projets
Valider 46c0382f rédigé par François De Keersmaeker's avatar François De Keersmaeker
Parcourir les fichiers

Merge branch 'main' of github.com:smart-home-network-security/protocol-parsers

parents 4d41ab98 0c242b07
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -26,11 +26,8 @@ add_compile_options(-Wall -Werror -Wno-unused-variable -O3) # Producti
#add_compile_options(-Wall -Werror -Wno-unused-variable -g) # Without debug logging
#add_compile_options(-Wall -Werror -Wno-unused-variable -DDEBUG -g) # With debug logging
# Custom parsers
set(PARSERS header dns dhcp http igmp ssdp coap)
# Subdirectories containing code
add_subdirectory(src)
IF( NOT OPENWRT_CROSSCOMPILING )
IF( NOT (NO_TEST OR OPENWRT_CROSSCOMPILING) )
add_subdirectory(test)
ENDIF()
......@@ -22,32 +22,36 @@ install(TARGETS packet_utils DESTINATION ${LIB_DIR})
add_library(header STATIC ${INCLUDE_DIR}/header.h header.c)
target_include_directories(header PRIVATE ${INCLUDE_DIR} ${INCLUDE_DIR})
target_link_libraries(header packet_utils)
install(TARGETS header DESTINATION ${LIB_DIR})
# DNS parser
add_library(dns STATIC ${INCLUDE_DIR}/dns.h dns.c)
target_include_directories(dns PRIVATE ${INCLUDE_DIR} ${INCLUDE_DIR})
target_link_libraries(dns packet_utils dns_map)
install(TARGETS dns DESTINATION ${LIB_DIR})
# DHCP parser
add_library(dhcp STATIC ${INCLUDE_DIR}/dhcp.h dhcp.c)
target_include_directories(dhcp PRIVATE ${INCLUDE_DIR} ${INCLUDE_DIR})
install(TARGETS dhcp DESTINATION ${LIB_DIR})
# HTTP parser
add_library(http STATIC ${INCLUDE_DIR}/http.h http.c)
target_include_directories(http PRIVATE ${INCLUDE_DIR} ${INCLUDE_DIR})
install(TARGETS http DESTINATION ${LIB_DIR})
# IGMP parser
add_library(igmp STATIC ${INCLUDE_DIR}/igmp.h igmp.c)
target_include_directories(igmp PRIVATE ${INCLUDE_DIR} ${INCLUDE_DIR})
install(TARGETS igmp DESTINATION ${LIB_DIR})
# SSDP parser
add_library(ssdp STATIC ${INCLUDE_DIR}/ssdp.h ssdp.c)
target_include_directories(ssdp PRIVATE ${INCLUDE_DIR} ${INCLUDE_DIR})
install(TARGETS ssdp DESTINATION ${LIB_DIR})
# CoAP parser
add_library(coap STATIC ${INCLUDE_DIR}/coap.h coap.c)
target_include_directories(coap PRIVATE ${INCLUDE_DIR} ${INCLUDE_DIR})
target_link_libraries(coap http)
install(TARGETS coap DESTINATION ${LIB_DIR})
# DNS map
add_library(dns_map STATIC ${INCLUDE_DIR}/dns_map.h dns_map.c)
target_link_libraries(dns_map hashmap)
target_include_directories(dns_map PRIVATE ${INCLUDE_DIR})
install(TARGETS dns_map DESTINATION ${LIB_DIR})
# Installation
install(TARGETS ${PARSERS} DESTINATION ${LIB_DIR})
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter