Skip to content

Commit

Permalink
feat(avahi): Initial avahi port
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cermak committed Jan 22, 2025
1 parent 6d19aab commit aa75a37
Show file tree
Hide file tree
Showing 16 changed files with 1,107 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "components/mosquitto/mosquitto"]
path = components/mosquitto/mosquitto
url = https://github.com/eclipse/mosquitto
[submodule "components/avahi/avahi"]
path = components/avahi/avahi
url = https://github.com/avahi/avahi.git
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ repos:
- repo: local
hooks:
- id: commit message scopes
name: "commit message must be scoped with: mdns, modem, websocket, asio, mqtt_cxx, console, common, eppp, tls_cxx, mosq, sockutls"
entry: '\A(?!(feat|fix|ci|bump|test|docs|chore)\((mdns|modem|common|console|websocket|asio|mqtt_cxx|examples|eppp|tls_cxx|mosq|sockutls)\)\:)'
name: "commit message must be scoped with: mdns, modem, websocket, asio, mqtt_cxx, console, common, eppp, tls_cxx, mosq, sockutls, avahi"
entry: '\A(?!(feat|fix|ci|bump|test|docs|chore)\((mdns|modem|common|console|websocket|asio|mqtt_cxx|examples|eppp|tls_cxx|mosq|sockutls|avahi)\)\:)'
language: pygrep
args: [--multiline]
stages: [commit-msg]
66 changes: 66 additions & 0 deletions components/avahi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
set(avahi_path "avahi")
set(avahi_core "${avahi_path}/avahi-core")
set(avahi_common "${avahi_path}/avahi-common")
set(avahi_core_SRCS "${avahi_core}/server.c"
"${avahi_common}/error.c"
"${avahi_common}/malloc.c"
"${avahi_common}/simple-watch.c"
"${avahi_common}/domain.c"
"${avahi_common}/timeval.c"
"${avahi_common}/strlst.c"
"${avahi_common}/address.c"
"${avahi_common}/rlist.c"
"${avahi_common}/utf8.c"
"${avahi_core}/log.c"
"${avahi_core}/rr.c"
# "${avahi_core}/iface-none.c"
"${avahi_core}/response-sched.c"
"${avahi_core}/probe-sched.c"
"${avahi_core}/query-sched.c"
"${avahi_core}/rrlist.c"
"${avahi_core}/hashmap.c"
"${avahi_core}/announce.c"
"${avahi_core}/domain-util.c"
"${avahi_core}/multicast-lookup.c"
"${avahi_core}/iface.c"
"${avahi_core}/entry.c"
"${avahi_core}/cache.c"
"${avahi_core}/util.c"
"${avahi_core}/addr-util.c"
# "${avahi_core}/socket.c"
"${avahi_core}/timeeventq.c"
"${avahi_core}/querier.c"
"${avahi_core}/browse.c"
"${avahi_core}/dns.c"
"${avahi_core}/wide-area.c"
"${avahi_core}/prioq.c"
"${avahi_core}/fdutil.c"
"${avahi_core}/browse-domain.c"
"${avahi_core}/browse-dns-server.c"
"${avahi_core}/browse-service.c"
# "${avahi_core}/browse-record.c"
"${avahi_core}/resolve-host-name.c"
"${avahi_core}/resolve-address.c"
"${avahi_core}/resolve-service.c"
"${avahi_core}/browse-service-type.c"
# "${avahi_core}/resolve-service-group.c"
# "${avahi_core}/resolve-record.c"
)

idf_component_register(SRCS "avahi-port/iface-esp32.c"
"avahi-port/socket.c"
${avahi_core_SRCS}
INCLUDE_DIRS "avahi-port" "${avahi_core}" "${avahi_path}"
REQUIRES "esp_netif")

#target_compile_options(${COMPONENT_LIB} PUBLIC "HAVE_CONFIG_H")
target_compile_definitions(${COMPONENT_LIB} PRIVATE "HAVE_CONFIG_H")
set_source_files_properties(${avahi_common}/domain.c PROPERTIES COMPILE_FLAGS -Wno-char-subscripts)
set_source_files_properties(${avahi_core}/rr.c PROPERTIES COMPILE_FLAGS -Wno-format)
set_source_files_properties(${avahi_core}/iface.c PROPERTIES COMPILE_FLAGS -Wno-format)
set_source_files_properties(${avahi_core}/entry.c PROPERTIES COMPILE_FLAGS -Wno-format)
set_source_files_properties(${avahi_common}/address.c PROPERTIES COMPILE_FLAGS -Wno-format)

target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")

#add_compile_definitions(${COMPONET_LIB} HAVE_CONFIG_H)
1 change: 1 addition & 0 deletions components/avahi/avahi
Submodule avahi added at 1dade8
Loading

0 comments on commit aa75a37

Please sign in to comment.