def nla_put_u16(msg, attrtype, value):
data = bytearray(value if isinstance(value, c_uint16) else c_uint16(value))<EOL>return nla_put(msg, attrtype, SIZEOF_U16, data)<EOL>
Add 16 bit integer attribute to Netlink message.

    https://github.com/thom311/libnl/blob/libnl3_2_25/lib/attr.c#L588

    Positional arguments:
    msg -- Netlink message (nl_msg class instance).
    attrtype -- attribute type (integer).
    value -- numeric value to store as payload (int() or c_uint16()).

    Returns:
    0 on success or a negative error code.