Skip to content

Commit aa75a37

Browse files
committed
feat(avahi): Initial avahi port
1 parent 6d19aab commit aa75a37

16 files changed

+1107
-2
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule "components/mosquitto/mosquitto"]
55
path = components/mosquitto/mosquitto
66
url = https://github.com/eclipse/mosquitto
7+
[submodule "components/avahi/avahi"]
8+
path = components/avahi/avahi
9+
url = https://github.com/avahi/avahi.git

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ repos:
6161
- repo: local
6262
hooks:
6363
- id: commit message scopes
64-
name: "commit message must be scoped with: mdns, modem, websocket, asio, mqtt_cxx, console, common, eppp, tls_cxx, mosq, sockutls"
65-
entry: '\A(?!(feat|fix|ci|bump|test|docs|chore)\((mdns|modem|common|console|websocket|asio|mqtt_cxx|examples|eppp|tls_cxx|mosq|sockutls)\)\:)'
64+
name: "commit message must be scoped with: mdns, modem, websocket, asio, mqtt_cxx, console, common, eppp, tls_cxx, mosq, sockutls, avahi"
65+
entry: '\A(?!(feat|fix|ci|bump|test|docs|chore)\((mdns|modem|common|console|websocket|asio|mqtt_cxx|examples|eppp|tls_cxx|mosq|sockutls|avahi)\)\:)'
6666
language: pygrep
6767
args: [--multiline]
6868
stages: [commit-msg]

components/avahi/CMakeLists.txt

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
set(avahi_path "avahi")
2+
set(avahi_core "${avahi_path}/avahi-core")
3+
set(avahi_common "${avahi_path}/avahi-common")
4+
set(avahi_core_SRCS "${avahi_core}/server.c"
5+
"${avahi_common}/error.c"
6+
"${avahi_common}/malloc.c"
7+
"${avahi_common}/simple-watch.c"
8+
"${avahi_common}/domain.c"
9+
"${avahi_common}/timeval.c"
10+
"${avahi_common}/strlst.c"
11+
"${avahi_common}/address.c"
12+
"${avahi_common}/rlist.c"
13+
"${avahi_common}/utf8.c"
14+
"${avahi_core}/log.c"
15+
"${avahi_core}/rr.c"
16+
# "${avahi_core}/iface-none.c"
17+
"${avahi_core}/response-sched.c"
18+
"${avahi_core}/probe-sched.c"
19+
"${avahi_core}/query-sched.c"
20+
"${avahi_core}/rrlist.c"
21+
"${avahi_core}/hashmap.c"
22+
"${avahi_core}/announce.c"
23+
"${avahi_core}/domain-util.c"
24+
"${avahi_core}/multicast-lookup.c"
25+
"${avahi_core}/iface.c"
26+
"${avahi_core}/entry.c"
27+
"${avahi_core}/cache.c"
28+
"${avahi_core}/util.c"
29+
"${avahi_core}/addr-util.c"
30+
# "${avahi_core}/socket.c"
31+
"${avahi_core}/timeeventq.c"
32+
"${avahi_core}/querier.c"
33+
"${avahi_core}/browse.c"
34+
"${avahi_core}/dns.c"
35+
"${avahi_core}/wide-area.c"
36+
"${avahi_core}/prioq.c"
37+
"${avahi_core}/fdutil.c"
38+
"${avahi_core}/browse-domain.c"
39+
"${avahi_core}/browse-dns-server.c"
40+
"${avahi_core}/browse-service.c"
41+
# "${avahi_core}/browse-record.c"
42+
"${avahi_core}/resolve-host-name.c"
43+
"${avahi_core}/resolve-address.c"
44+
"${avahi_core}/resolve-service.c"
45+
"${avahi_core}/browse-service-type.c"
46+
# "${avahi_core}/resolve-service-group.c"
47+
# "${avahi_core}/resolve-record.c"
48+
)
49+
50+
idf_component_register(SRCS "avahi-port/iface-esp32.c"
51+
"avahi-port/socket.c"
52+
${avahi_core_SRCS}
53+
INCLUDE_DIRS "avahi-port" "${avahi_core}" "${avahi_path}"
54+
REQUIRES "esp_netif")
55+
56+
#target_compile_options(${COMPONENT_LIB} PUBLIC "HAVE_CONFIG_H")
57+
target_compile_definitions(${COMPONENT_LIB} PRIVATE "HAVE_CONFIG_H")
58+
set_source_files_properties(${avahi_common}/domain.c PROPERTIES COMPILE_FLAGS -Wno-char-subscripts)
59+
set_source_files_properties(${avahi_core}/rr.c PROPERTIES COMPILE_FLAGS -Wno-format)
60+
set_source_files_properties(${avahi_core}/iface.c PROPERTIES COMPILE_FLAGS -Wno-format)
61+
set_source_files_properties(${avahi_core}/entry.c PROPERTIES COMPILE_FLAGS -Wno-format)
62+
set_source_files_properties(${avahi_common}/address.c PROPERTIES COMPILE_FLAGS -Wno-format)
63+
64+
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
65+
66+
#add_compile_definitions(${COMPONET_LIB} HAVE_CONFIG_H)

components/avahi/avahi

Submodule avahi added at 1dade81

0 commit comments

Comments
 (0)