2 * Copyright (C) 2012 Martin Willi
3 * Copyright (C) 2012 revosec AG
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 * @defgroup lookip_msg lookip_msg
24 #define LOOKIP_SOCKET IPSEC_PIDDIR "/charon.lkp"
26 typedef struct lookip_request_t lookip_request_t
;
27 typedef struct lookip_response_t lookip_response_t
;
32 * The client can send a batch of request messages, containing DUMP, LOOKUP or
33 * REGISTER_* messages. The server immediately starts sending responses for
34 * these messages, using ENTRY or NOTIFY_* messages.
35 * A client MUST send an END message to complete a batch. The server will
36 * send any remaining responses, but will not accept new requests and closes
37 * the connection when complete.
40 /** request a dump of all entries */
42 /** lookup a specific virtual IP */
44 /** reply message for DUMP and LOOKUP */
46 /** register for notifications about new virtual IPs */
47 LOOKIP_REGISTER_UP
= 4,
48 /** register for notifications about virtual IPs released */
49 LOOKIP_REGISTER_DOWN
= 5,
50 /** notify reply message for REGISTER_UP */
52 /** notify reply message for REGISTER_DOWN */
53 LOOKIP_NOTIFY_DOWN
= 7,
54 /** end of request batch */
59 * Request message sent from client.
61 * Valid request message types are DUMP, LOOKUP, REGISTER_UP/DOWN and END.
63 * The vip field is used only in LOOKUP requests, but ignored otherwise.
65 struct lookip_request_t
{
66 /** request message type */
68 /** null terminated string representation of virtual IP */
73 * Response message sent to client.
75 * Valid response message types are ENTRY and NOTIFY_UP/DOWN.
77 struct lookip_response_t
{
78 /** response message type */
80 /** null terminated string representation of virtual IP */
82 /** null terminated string representation of outer IP */
84 /** null terminated peer identity */
86 /** null connection name */
90 #endif /** LOOKIP_MSG_H_ @}*/