def nla_put_string(msg, attrtype, value):
data = bytearray(value) + bytearray(b'<STR_LIT>')<EOL>return nla_put(msg, attrtype, len(data), data)<EOL>
Add string attribute to Netlink message.

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

    Positional arguments:
    msg -- Netlink message (nl_msg class instance).
    attrtype -- attribute type (integer).
    value -- bytes() or bytearray() value (e.g. 'Test'.encode('ascii')).

    Returns:
    0 on success or a negative error code.