linux/include/linux/drbd.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
  drbd.h
  Kernel module for 2.6.x Kernels

  This file is part of DRBD by Philipp Reisner and Lars Ellenberg.

  Copyright (C) 2001-2008, LINBIT Information Technologies GmbH.
  Copyright (C) 2001-2008, Philipp Reisner <[email protected]>.
  Copyright (C) 2001-2008, Lars Ellenberg <[email protected]>.


*/
#ifndef DRBD_H
#define DRBD_H
#include <asm/types.h>

#ifdef __KERNEL__
#include <linux/types.h>
#include <asm/byteorder.h>
#else
#include <sys/types.h>
#include <sys/wait.h>
#include <limits.h>

/* Although the Linux source code makes a difference between
   generic endianness and the bitfields' endianness, there is no
   architecture as of Linux-2.6.24-rc4 where the bitfields' endianness
   does not match the generic endianness. */

#if __BYTE_ORDER == __LITTLE_ENDIAN
#define __LITTLE_ENDIAN_BITFIELD
#elif __BYTE_ORDER == __BIG_ENDIAN
#define __BIG_ENDIAN_BITFIELD
#else
# error "sorry, weird endianness on this box"
#endif

#endif

enum drbd_io_error_p {};

enum drbd_fencing_p {};

enum drbd_disconnect_p {};

enum drbd_after_sb_p {};

enum drbd_on_no_data {};

enum drbd_on_congestion {};

enum drbd_read_balancing {};

/* KEEP the order, do not delete or insert. Only append. */
enum drbd_ret_code {};

#define DRBD_PROT_A
#define DRBD_PROT_B
#define DRBD_PROT_C

enum drbd_role {};

/* The order of these constants is important.
 * The lower ones (<C_WF_REPORT_PARAMS) indicate
 * that there is no socket!
 * >=C_WF_REPORT_PARAMS ==> There is a socket
 */
enum drbd_conns {};

enum drbd_disk_state {};

drbd_state;

enum drbd_state_rv {};

#define SHARED_SECRET_MAX

#define MDF_CONSISTENT
#define MDF_PRIMARY_IND
#define MDF_CONNECTED_IND
#define MDF_FULL_SYNC
#define MDF_WAS_UP_TO_DATE
#define MDF_PEER_OUT_DATED
#define MDF_CRASHED_PRIMARY
#define MDF_AL_CLEAN
#define MDF_AL_DISABLED

#define MAX_PEERS

enum drbd_uuid_index {};

#define HISTORY_UUIDS

enum drbd_timeout_flag {};

enum drbd_notification_type {};

enum drbd_peer_state {};

#define UUID_JUST_CREATED

enum write_ordering_e {};

/* magic numbers used in meta data and network packets */
#define DRBD_MAGIC
#define DRBD_MAGIC_BIG
#define DRBD_MAGIC_100

#define DRBD_MD_MAGIC_07
#define DRBD_MD_MAGIC_08
#define DRBD_MD_MAGIC_84_UNCLEAN


/* how I came up with this magic?
 * base64 decode "actlog==" ;) */
#define DRBD_AL_MAGIC

/* these are of type "int" */
#define DRBD_MD_INDEX_INTERNAL
#define DRBD_MD_INDEX_FLEX_EXT
#define DRBD_MD_INDEX_FLEX_INT

#define DRBD_CPU_MASK_SIZE

#endif