import struct


def htons(cpu_context, func_name, func_args):
    """
    Convert the provided 16-bit number in host byte order (little-endian) to network byte order (big-endian)
    """
    le_port = func_args[0]
    port_data = struct.pack("<H", le_port)
    return struct.unpack(">H", port_data)[0]