summaryrefslogtreecommitdiffstats
path: root/avahi-core/domain-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'avahi-core/domain-util.c')
-rw-r--r--avahi-core/domain-util.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/avahi-core/domain-util.c b/avahi-core/domain-util.c
index 2bbf127..fc2877b 100644
--- a/avahi-core/domain-util.c
+++ b/avahi-core/domain-util.c
@@ -230,4 +230,16 @@ char * uint16_to_canonical_string(uint16_t v) {
c[0] = (uint8_t) (v >> 8);
c[1] = (uint8_t) v;
return c;
-} \ No newline at end of file
+}
+
+char * uint32_to_canonical_string(uint32_t v) {
+ uint8_t *c = avahi_malloc(4);
+
+ c[0] = (uint8_t) (v >> 24);
+ c[1] = (uint8_t) (v >> 16);
+ c[2] = (uint8_t) (v >> 8);
+ c[3] = (uint8_t) v;
+
+ return c;
+}
+