]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/keychain.h
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message
[mirror_frr.git] / lib / keychain.h
index 0cfa3d522d30d43e721879c4946f3bd9952ad701..49da9ba459b7c8609aaf008c3830fde368fe20be 100644 (file)
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with GNU Zebra; see the file COPYING.  If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #ifndef _ZEBRA_KEYCHAIN_H
 #define _ZEBRA_KEYCHAIN_H
 
-struct keychain
-{
-  char *name;
+#include "qobj.h"
 
-  struct list *key;
+struct keychain {
+       char *name;
+
+       struct list *key;
+
+       QOBJ_FIELDS
 };
+DECLARE_QOBJ_TYPE(keychain)
 
-struct key_range
-{
-  time_t start;
-  time_t end;
+struct key_range {
+       time_t start;
+       time_t end;
 
-  u_char duration;
+       uint8_t duration;
 };
 
-struct key
-{
-  u_int32_t index;
+struct key {
+       uint32_t index;
+
+       char *string;
 
-  char *string;
+       struct key_range send;
+       struct key_range accept;
 
-  struct key_range send;
-  struct key_range accept;
+       QOBJ_FIELDS
 };
+DECLARE_QOBJ_TYPE(key)
 
-void keychain_init ();
-struct keychain *keychain_lookup (char *);
-struct key *key_lookup_for_accept (struct keychain *, u_int32_t);
-struct key *key_match_for_accept (struct keychain *, char *);
-struct key *key_lookup_for_send (struct keychain *);
+extern void keychain_init(void);
+extern struct keychain *keychain_lookup(const char *);
+extern struct key *key_lookup_for_accept(const struct keychain *, uint32_t);
+extern struct key *key_match_for_accept(const struct keychain *, const char *);
+extern struct key *key_lookup_for_send(const struct keychain *);
 
 #endif /* _ZEBRA_KEYCHAIN_H */