]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/systemd/sd-lldp.h
tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easy
[thirdparty/systemd.git] / src / systemd / sd-lldp.h
index 16d297a52deafb5f329fd43856b17a3eca281007..d912b08a6a6a771e2a6a95e1fc72088c4c96d7be 100644 (file)
@@ -48,7 +48,7 @@ typedef struct sd_lldp_packet sd_lldp_packet;
 typedef void (*sd_lldp_cb_t)(sd_lldp *lldp, int event, void *userdata);
 
 int sd_lldp_new(int ifindex, const char *ifname, const struct ether_addr *mac, sd_lldp **ret);
-void sd_lldp_free(sd_lldp *lldp);
+sd_lldp* sd_lldp_unref(sd_lldp *lldp);
 
 int sd_lldp_start(sd_lldp *lldp);
 int sd_lldp_stop(sd_lldp *lldp);
@@ -81,6 +81,9 @@ int sd_lldp_packet_get_destination_type(sd_lldp_packet *tlv, int *dest);
 
 int sd_lldp_get_packets(sd_lldp *lldp, sd_lldp_packet ***tlvs);
 
+_SD_DEFINE_POINTER_CLEANUP_FUNC(sd_lldp, sd_lldp_unref);
+_SD_DEFINE_POINTER_CLEANUP_FUNC(sd_lldp_packet, sd_lldp_packet_unref);
+
 _SD_END_DECLARATIONS;
 
 #endif