print out SRV record type as well
parent
fc166b9ee9
commit
ff7e3c70bf
|
@ -169,6 +169,11 @@ const JoinMultiplayerGame = struct {
|
||||||
const namestr = c.mdns_record_parse_ptr(data_ptr_opaque, data_len, record_offset, record_length, &namebuffer, namebuffer.len);
|
const namestr = c.mdns_record_parse_ptr(data_ptr_opaque, data_len, record_offset, record_length, &namebuffer, namebuffer.len);
|
||||||
log.info("{?} : {s} {s} \"{}\"", .{ std_from, entrytype_str, recordtype_str, std.zig.fmtEscapes(namestr.str[0..namestr.length]) });
|
log.info("{?} : {s} {s} \"{}\"", .{ std_from, entrytype_str, recordtype_str, std.zig.fmtEscapes(namestr.str[0..namestr.length]) });
|
||||||
},
|
},
|
||||||
|
c.MDNS_RECORDTYPE_SRV => {
|
||||||
|
var strbuffer: [128]u8 = undefined;
|
||||||
|
const record = c.mdns_record_parse_srv(data_ptr_opaque, data_len, record_offset, record_length, &strbuffer, strbuffer.len);
|
||||||
|
log.info("{?} : {s} {s} \"{}\":{}", .{ std_from, entrytype_str, recordtype_str, std.zig.fmtEscapes(record.name.str[0..record.name.length]), record.port });
|
||||||
|
},
|
||||||
c.MDNS_RECORDTYPE_A => {
|
c.MDNS_RECORDTYPE_A => {
|
||||||
var std_address: std.net.Ip4Address = undefined;
|
var std_address: std.net.Ip4Address = undefined;
|
||||||
_ = c.mdns_record_parse_a(data_ptr_opaque, data_len, record_offset, record_length, @ptrCast(&std_address.sa));
|
_ = c.mdns_record_parse_a(data_ptr_opaque, data_len, record_offset, record_length, @ptrCast(&std_address.sa));
|
||||||
|
|
Loading…
Reference in New Issue