/*
 * API message handling module for OSPF daemon and client.
 * Copyright (C) 2001, 2002 Ralph Keller
 *
 * This file is part of GNU Zebra.
 * 
 * GNU Zebra is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published
 * by the Free Software Foundation; either version 2, or (at your
 * option) any later version.
 *
 * GNU Zebra is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * 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.
 */


/* This file is used both by the OSPFd and client applications to
   define message formats used for communication. */

#ifndef _OSPF_API_H
#define _OSPF_API_H

#define OSPF_API_VERSION           1

/* MTYPE definition is not reflected to "memory.h". */
#define MTYPE_OSPF_API_MSG      MTYPE_TMP
#define MTYPE_OSPF_API_FIFO     MTYPE_TMP

/* Default API server port to accept connection request from client-side. */
/* This value could be overridden by "ospfapi" entry in "/etc/services". */
#define OSPF_API_SYNC_PORT      2607

/* -----------------------------------------------------------
 * Generic messages 
 * -----------------------------------------------------------
 */

/* Message header structure, fields are in network byte order and
   aligned to four octets. */
struct apimsghdr
{
  u_char version;		/* OSPF API protocol version */
  u_char msgtype;		/* Type of message */
  u_int16_t msglen;		/* Length of message w/o header */
  u_int32_t msgseq;		/* Sequence number */
};

/* Message representation with header and body */
struct msg
{
  struct msg *next;		/* to link into fifo */

  /* Message header */
  struct apimsghdr hdr;

  /* Message body */
  struct stream *s;
};

/* Prototypes for generic messages. */
struct msg *msg_new (u_char msgtype, void *msgbody,
		     u_int32_t seqnum, u_int16_t msglen);
struct msg *msg_dup (struct msg *msg);
void msg_print (struct msg *msg);	/* XXX debug only */
void msg_free (struct msg *msg);
struct msg *msg_read (int fd);
int msg_write (int fd, struct msg *msg);

/* For requests, the message sequence number is between MIN_SEQ and
   MAX_SEQ. For notifications, the sequence number is 0. */

#define MIN_SEQ          1
#define MAX_SEQ 2147483647

void msg_set_seq (struct msg *msg, u_int32_t seqnr);
u_int32_t msg_get_seq (struct msg *msg);

/* -----------------------------------------------------------
 * Message fifo queues
 * -----------------------------------------------------------
 */

/* Message queue structure. */
struct msg_fifo
{
  unsigned long count;

  struct msg *head;
  struct msg *tail;
};

/* Prototype for message fifo queues. */
struct msg_fifo *msg_fifo_new ();
void msg_fifo_push (struct msg_fifo *, struct msg *msg);
struct msg *msg_fifo_pop (struct msg_fifo *fifo);
struct msg *msg_fifo_head (struct msg_fifo *fifo);
void msg_fifo_flush (struct msg_fifo *fifo);
void msg_fifo_free (struct msg_fifo *fifo);

/* -----------------------------------------------------------
 * Specific message type and format definitions
 * -----------------------------------------------------------
 */

/* Messages to OSPF daemon. */
#define MSG_REGISTER_OPAQUETYPE   1
#define MSG_UNREGISTER_OPAQUETYPE 2
#define MSG_REGISTER_EVENT        3
#define MSG_SYNC_LSDB             4
#define MSG_ORIGINATE_REQUEST     5
#define MSG_DELETE_REQUEST        6

/* Messages from OSPF daemon. */
#define MSG_REPLY                10
#define MSG_READY_NOTIFY         11
#define MSG_LSA_UPDATE_NOTIFY    12
#define MSG_LSA_DELETE_NOTIFY    13
#define MSG_NEW_IF               14
#define MSG_DEL_IF               15
#define MSG_ISM_CHANGE           16
#define MSG_NSM_CHANGE           17

struct msg_register_opaque_type
{
  u_char lsatype;
  u_char opaquetype;
  u_char pad[2];		/* padding */
};

struct msg_unregister_opaque_type
{
  u_char lsatype;
  u_char opaquetype;
  u_char pad[2];		/* padding */
};

/* Power2 is needed to convert LSA types into bit positions,
 * see typemask below. Type definition starts at 1, so
 * Power2[0] is not used. */


#ifdef ORIGINAL_CODING
static const u_int16_t
  Power2[] = { 0x0, 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80,
  0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x8000
};
#else
static const u_int16_t
  Power2[] = { 0, (1 << 0), (1 << 1), (1 << 2), (1 << 3), (1 << 4),
  (1 << 5), (1 << 6), (1 << 7), (1 << 8), (1 << 9),
  (1 << 10), (1 << 11), (1 << 12), (1 << 13), (1 << 14),
  (1 << 15)
};
#endif /* ORIGINAL_CODING */

struct lsa_filter_type
{
  u_int16_t typemask;		/* bitmask for selecting LSA types (1..16) */
  u_char origin;		/* selects according to origin. */
#define NON_SELF_ORIGINATED	0
#define	SELF_ORIGINATED  (OSPF_LSA_SELF)
#define	ANY_ORIGIN 2

  u_char num_areas;		/* number of areas in the filter. */
  /* areas, if any, go here. */
};

struct msg_register_event
{
  struct lsa_filter_type filter;
};

struct msg_sync_lsdb
{
  struct lsa_filter_type filter;
};

struct msg_originate_request
{
  /* Used for LSA type 9 otherwise ignored */
  struct in_addr ifaddr;

  /* Used for LSA type 10 otherwise ignored */
  struct in_addr area_id;

  /* LSA header and LSA-specific part */
  struct lsa_header data;
};

struct msg_delete_request
{
  struct in_addr area_id;	/* "0.0.0.0" for AS-external opaque LSAs */
  u_char lsa_type;
  u_char opaque_type;
  u_char pad[2];		/* padding */
  u_int32_t opaque_id;
};

struct msg_reply
{
  char errcode;
#define OSPF_API_OK                         0
#define OSPF_API_NOSUCHINTERFACE          (-1)
#define OSPF_API_NOSUCHAREA               (-2)
#define OSPF_API_NOSUCHLSA                (-3)
#define OSPF_API_ILLEGALLSATYPE           (-4)
#define OSPF_API_OPAQUETYPEINUSE          (-5)
#define OSPF_API_OPAQUETYPENOTREGISTERED  (-6)
#define OSPF_API_NOTREADY                 (-7)
#define OSPF_API_NOMEMORY                 (-8)
#define OSPF_API_ERROR                    (-9)
#define OSPF_API_UNDEF                   (-10)
  u_char pad[3];		/* padding to four byte alignment */
};

/* Message to tell client application that it ospf daemon is 
 * ready to accept opaque LSAs for a given interface or area. */

struct msg_ready_notify
{
  u_char lsa_type;
  u_char opaque_type;
  u_char pad[2];		/* padding */
  struct in_addr addr;		/* interface address or area address */
};

/* These messages have a dynamic length depending on the embodied LSA.
   They are aligned to four octets. msg_lsa_change_notify is used for
   both LSA update and LSAs delete. */

struct msg_lsa_change_notify
{
  /* Used for LSA type 9 otherwise ignored */
  struct in_addr ifaddr;
  /* Area ID. Not valid for AS-External and Opaque11 LSAs. */
  struct in_addr area_id;
  u_char is_self_originated;	/* 1 if self originated. */
  u_char pad[3];
  struct lsa_header data;
};

struct msg_new_if
{
  struct in_addr ifaddr;	/* interface IP address */
  struct in_addr area_id;	/* area this interface belongs to */
};

struct msg_del_if
{
  struct in_addr ifaddr;	/* interface IP address */
};

struct msg_ism_change
{
  struct in_addr ifaddr;	/* interface IP address */
  struct in_addr area_id;	/* area this interface belongs to */
  u_char status;		/* interface status (up/down) */
  u_char pad[3];		/* not used */
};

struct msg_nsm_change
{
  struct in_addr ifaddr;	/* attached interface */
  struct in_addr nbraddr;	/* Neighbor interface address */
  struct in_addr router_id;	/* Router ID of neighbor */
  u_char status;		/* NSM status */
  u_char pad[3];
};

/* We make use of a union to define a structure that covers all
   possible API messages. This allows us to find out how much memory
   needs to be reserved for the largest API message. */
struct apimsg
{
  struct apimsghdr hdr;
  union
  {
    struct msg_register_opaque_type register_opaque_type;
    struct msg_register_event register_event;
    struct msg_sync_lsdb sync_lsdb;
    struct msg_originate_request originate_request;
    struct msg_delete_request delete_request;
    struct msg_reply reply;
    struct msg_ready_notify ready_notify;
    struct msg_new_if new_if;
    struct msg_del_if del_if;
    struct msg_ism_change ism_change;
    struct msg_nsm_change nsm_change;
    struct msg_lsa_change_notify lsa_change_notify;
  }
  u;
};

#define OSPF_API_MAX_MSG_SIZE (sizeof(struct apimsg) + OSPF_MAX_LSA_SIZE)

/* -----------------------------------------------------------
 * Prototypes for specific messages
 * -----------------------------------------------------------
 */

/* For debugging only. */
void api_opaque_lsa_print (struct lsa_header *data);

/* Messages sent by client */
struct msg *new_msg_register_opaque_type (u_int32_t seqnum, u_char ltype,
					  u_char otype);
struct msg *new_msg_register_event (u_int32_t seqnum,
				    struct lsa_filter_type *filter);
struct msg *new_msg_sync_lsdb (u_int32_t seqnum,
			       struct lsa_filter_type *filter);
struct msg *new_msg_originate_request (u_int32_t seqnum,
				       struct in_addr ifaddr,
				       struct in_addr area_id,
				       struct lsa_header *data);
struct msg *new_msg_delete_request (u_int32_t seqnum,
				    struct in_addr area_id,
				    u_char lsa_type,
				    u_char opaque_type, u_int32_t opaque_id);

/* Messages sent by OSPF daemon */
struct msg *new_msg_reply (u_int32_t seqnum, u_char rc);

struct msg *new_msg_ready_notify (u_int32_t seqnr, u_char lsa_type,
				  u_char opaque_type, struct in_addr addr);

struct msg *new_msg_new_if (u_int32_t seqnr,
			    struct in_addr ifaddr, struct in_addr area);

struct msg *new_msg_del_if (u_int32_t seqnr, struct in_addr ifaddr);

struct msg *new_msg_ism_change (u_int32_t seqnr, struct in_addr ifaddr,
				struct in_addr area, u_char status);

struct msg *new_msg_nsm_change (u_int32_t seqnr, struct in_addr ifaddr,
				struct in_addr nbraddr,
				struct in_addr router_id, u_char status);

/* msgtype is MSG_LSA_UPDATE_NOTIFY or MSG_LSA_DELETE_NOTIFY */
struct msg *new_msg_lsa_change_notify (u_char msgtype,
				       u_int32_t seqnum,
				       struct in_addr ifaddr,
				       struct in_addr area_id,
				       u_char is_self_originated,
				       struct lsa_header *data);

/* string printing functions */
const char *ospf_api_errname (int errcode);
const char *ospf_api_typename (int msgtype);

#endif /* _OSPF_API_H */
