lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 10 Jul 2008 23:16:30 +0200
From:	Thomas Graf <tgraf@...g.ch>
To:	Julius Volz <juliusv@...gle.com>
Cc:	Patrick McHardy <kaber@...sh.net>, netdev@...r.kernel.org,
	lvs-devel@...r.kernel.org, vbusam@...gle.com, horms@...ge.net.au,
	davem@...emloft.net
Subject: Re: [PATCH 2/2] IPVS: Add genetlink interface implementation

* Julius Volz <juliusv@...gle.com> 2008-07-10 17:13
> So, just to be sure: when I'm not returning an object (like in
> IPVS_CMD_GET_INFO), I still use IPVS_CMD_GET_INFO as the command ID in
> the response? This is also how net/irda/irnetlink.c does it, but maybe
> I'm copying bad examples again.
> 
> But whenever a response message is about objects, be it one or
> multiple entries, I use the IPVS_CMD_NEW_* response IDs.

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.

The common netlink semantics are

 CMD_OBJ_NEW - create or update objects as described in the message
               content.
 CMD_OBJ_SET - rarely used, update a static object which doesn't have
               to be created or added. asme as OBJ_NEW otherwise.
 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.

It's pretty simple but covers almost every possible protocol for use
in configuration interfaces. In the case of IPVS_CMD_GET_INFO the
actual data being sent back can be regarded as a info object. Basically
netlink is mainly used as a very basic form of rpc.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ