On Thu, Jul 10, 2008, Thomas Graf wrote:
> Personally I would never use a GET id to send any data at all. My main
> focus is on trying to make message protocols self documenting. If a
> certain message type has multiple meanings depending on the direction
> it will make it harder to understand and harder to debug from a protocol
> standpoint.
Makes sense so far, but:
> The common netlink semantics are
>
> CMD_OBJ_NEW - create or update objects as described in the message
> content.
If a single operation just means create _or_ update (NLM_F_EXCL, etc.
flags don't work with genetlink), then ipvsadm would have to query for
an entry first, which is racy and ugly. So I'd like to keep ADD/EDIT
in separate commands. But then I need a different response id (or just
use the ADD id?) for a GET.
> CMD_OBJ_SET - rarely used, update a static object which doesn't have
> to be created or added. asme as OBJ_NEW otherwise.
Like in the case of sending the GET_INFO or GET_TIMEOUT replies.
> CMD_OBJ_DEL - delete object described in the message
> CMD_OBJ_GET - search for a object as described in the message and
> send a CMD_OBJ_NEW as reply including the full object.
>
> with NLM_F_DUMP: iterate over all objects and send a
> CMD_OBJ_NEW for each object. This request often carries
> no additional data.
Ok, that makes sense too and is pretty much what I have.
Julius
--
Google Switzerland GmbH
--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
|