Logo Search packages:      
Sourcecode: avahi version File versions

size_t avahi_rdata_serialize ( AvahiRecord record,
void *  rdata,
size_t  max_size 
)

Serialize an AvahiRecord object into binary rdata. This function is actually implemented in dns.c

Definition at line 857 of file dns.c.

                                                                                {
    int ret;
    AvahiDnsPacket p;
    
    assert(record);
    assert(rdata);
    assert(max_size > 0);

    p.data = (void*) rdata;
    p.max_size = max_size;
    p.size = p.rindex = 0;
    p.name_table = NULL;

    ret = append_rdata(&p, record);

    if (p.name_table)
         avahi_hashmap_free(p.name_table);

    if (ret < 0)
        return (size_t) -1;
    
    return p.size;
}


Generated by  Doxygen 1.6.0   Back to index