def main():
<EOL>sk = nl_socket_alloc()  <EOL>ret = nl_connect(sk, NETLINK_ROUTE)  <EOL>if ret < <NUM_LIT:0>:<EOL><INDENT>reason = errmsg[abs(ret)]<EOL>return error('<STR_LIT>'.format(ret, reason))<EOL><DEDENT>rt_hdr = rtgenmsg(rtgen_family=socket.AF_PACKET)<EOL>ret = nl_send_simple(sk, RTM_GETLINK, NLM_F_REQUEST | NLM_F_DUMP, rt_hdr, rt_hdr.SIZEOF)<EOL>if ret < <NUM_LIT:0>:<EOL><INDENT>reason = errmsg[abs(ret)]<EOL>return error('<STR_LIT>'.format(ret, reason))<EOL><DEDENT>print('<STR_LIT>'.format(ret))<EOL>nl_socket_modify_cb(sk, NL_CB_VALID, NL_CB_CUSTOM, callback, None)  <EOL>ret = nl_recvmsgs_default(sk)  <EOL>if ret < <NUM_LIT:0>:<EOL><INDENT>reason = errmsg[abs(ret)]<EOL>return error('<STR_LIT>'.format(ret, reason))<EOL><DEDENT>
Main function called upon script execution.