linux/include/linux/ceph/msgr.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef CEPH_MSGR_H
#define CEPH_MSGR_H

/*
 * Data types for message passing layer used by Ceph.
 */

#define CEPH_MON_PORT

/*
 * tcp connection banner.  include a protocol version. and adjust
 * whenever the wire protocol changes.  try to keep this string length
 * constant.
 */
#define CEPH_BANNER
#define CEPH_BANNER_LEN
#define CEPH_BANNER_MAX_LEN


/*
 * messenger V2 connection banner prefix.
 * The full banner string should have the form: "ceph v2\n<le16>"
 * the 2 bytes are the length of the remaining banner.
 */
#define CEPH_BANNER_V2
#define CEPH_BANNER_V2_LEN
#define CEPH_BANNER_V2_PREFIX_LEN

/*
 * messenger V2 features
 */
#define CEPH_MSGR2_INCARNATION_1

#define DEFINE_MSGR2_FEATURE(bit, incarnation, name)

#define HAVE_MSGR2_FEATURE(x, name)

DEFINE_MSGR2_FEATURE( 0, 1, REVISION_1)   // msgr2.1

#define CEPH_MSGR2_SUPPORTED_FEATURES

#define CEPH_MSGR2_REQUIRED_FEATURES


/*
 * Rollover-safe type and comparator for 32-bit sequence numbers.
 * Comparator returns -1, 0, or 1.
 */
ceph_seq_t;

static inline __s32 ceph_seq_cmp(__u32 a, __u32 b)
{}


/*
 * entity_name -- logical name for a process participating in the
 * network, e.g. 'mds0' or 'osd3'.
 */
struct ceph_entity_name {} __attribute__ ((packed));

#define CEPH_ENTITY_TYPE_MON
#define CEPH_ENTITY_TYPE_MDS
#define CEPH_ENTITY_TYPE_OSD
#define CEPH_ENTITY_TYPE_CLIENT
#define CEPH_ENTITY_TYPE_AUTH

#define CEPH_ENTITY_TYPE_ANY

extern const char *ceph_entity_type_name(int type);

/*
 * entity_addr -- network address
 */
struct ceph_entity_addr {} __attribute__ ((packed));

static inline bool ceph_addr_equal_no_type(const struct ceph_entity_addr *lhs,
					   const struct ceph_entity_addr *rhs)
{}

struct ceph_entity_inst {} __attribute__ ((packed));


/* used by message exchange protocol */
#define CEPH_MSGR_TAG_READY
#define CEPH_MSGR_TAG_RESETSESSION
#define CEPH_MSGR_TAG_WAIT
#define CEPH_MSGR_TAG_RETRY_SESSION
#define CEPH_MSGR_TAG_RETRY_GLOBAL
#define CEPH_MSGR_TAG_CLOSE
#define CEPH_MSGR_TAG_MSG
#define CEPH_MSGR_TAG_ACK
#define CEPH_MSGR_TAG_KEEPALIVE
#define CEPH_MSGR_TAG_BADPROTOVER
#define CEPH_MSGR_TAG_BADAUTHORIZER
#define CEPH_MSGR_TAG_FEATURES
#define CEPH_MSGR_TAG_SEQ
#define CEPH_MSGR_TAG_KEEPALIVE2
#define CEPH_MSGR_TAG_KEEPALIVE2_ACK
#define CEPH_MSGR_TAG_CHALLENGE_AUTHORIZER

/*
 * connection negotiation
 */
struct ceph_msg_connect {} __attribute__ ((packed));

struct ceph_msg_connect_reply {} __attribute__ ((packed));

#define CEPH_MSG_CONNECT_LOSSY


/*
 * message header
 */
struct ceph_msg_header_old {} __attribute__ ((packed));

struct ceph_msg_header {} __attribute__ ((packed));

struct ceph_msg_header2 {} __attribute__ ((packed));

#define CEPH_MSG_PRIO_LOW
#define CEPH_MSG_PRIO_DEFAULT
#define CEPH_MSG_PRIO_HIGH
#define CEPH_MSG_PRIO_HIGHEST

/*
 * follows data payload
 */
struct ceph_msg_footer_old {} __attribute__ ((packed));

struct ceph_msg_footer {} __attribute__ ((packed));

#define CEPH_MSG_FOOTER_COMPLETE
#define CEPH_MSG_FOOTER_NOCRC
#define CEPH_MSG_FOOTER_SIGNED


#endif