def nl_list_entry(ptr, type_, member):
if ptr.container_of:<EOL><INDENT>return ptr.container_of<EOL><DEDENT>null_data = type_()<EOL>setattr(null_data, member, ptr)<EOL>return null_data<EOL>
https://github.com/thom311/libnl/blob/libnl3_2_25/include/netlink/list.h#L64.