def main():
<EOL>if OPTIONS['<STR_LIT>']:<EOL><INDENT>pack = struct.pack('<STR_LIT>', OPTIONS['<STR_LIT>'].encode('<STR_LIT:ascii>'), <NUM_LIT:0>)<EOL>sk = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)<EOL>try:<EOL><INDENT>info = struct.unpack('<STR_LIT>', fcntl.ioctl(sk.fileno(), <NUM_LIT>, pack))<EOL><DEDENT>except OSError:<EOL><INDENT>return error('<STR_LIT>'.format(OPTIONS['<STR_LIT>']))<EOL><DEDENT>finally:<EOL><INDENT>sk.close()<EOL><DEDENT>if_index = int(info[<NUM_LIT:1>])<EOL><DEDENT>else:<EOL><INDENT>if_index = -<NUM_LIT:1><EOL><DEDENT>sk = nl_socket_alloc()  <EOL>ret = genl_connect(sk)  <EOL>if ret < <NUM_LIT:0>:<EOL><INDENT>reason = errmsg[abs(ret)]<EOL>return error('<STR_LIT>'.format(ret, reason))<EOL><DEDENT>driver_id = genl_ctrl_resolve(sk, b'<STR_LIT>')  <EOL>if driver_id < <NUM_LIT:0>:<EOL><INDENT>reason = errmsg[abs(driver_id)]<EOL>return error('<STR_LIT>'.format(driver_id, reason))<EOL><DEDENT>msg = nlmsg_alloc()  <EOL>if OPTIONS['<STR_LIT>']:<EOL><INDENT>genlmsg_put(msg, <NUM_LIT:0>, <NUM_LIT:0>, driver_id, <NUM_LIT:0>, <NUM_LIT:0>, nl80211.NL80211_CMD_GET_INTERFACE, <NUM_LIT:0>)  <EOL>nla_put_u32(msg, nl80211.NL80211_ATTR_IFINDEX, if_index)  <EOL><DEDENT>else:<EOL><INDENT>genlmsg_put(msg, <NUM_LIT:0>, <NUM_LIT:0>, driver_id, <NUM_LIT:0>, NLM_F_DUMP, nl80211.NL80211_CMD_GET_INTERFACE, <NUM_LIT:0>)<EOL><DEDENT>has_printed = list()<EOL>nl_socket_modify_cb(sk, NL_CB_VALID, NL_CB_CUSTOM, callback, has_printed)<EOL>ret = nl_send_auto(sk, msg)<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>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.