Blame omping.h

Packit Service 34e2f8
/*
Packit Service 34e2f8
 * Copyright (c) 2010-2011, Red Hat, Inc.
Packit Service 34e2f8
 *
Packit Service 34e2f8
 * Permission to use, copy, modify, and/or distribute this software for any
Packit Service 34e2f8
 * purpose with or without fee is hereby granted, provided that the above
Packit Service 34e2f8
 * copyright notice and this permission notice appear in all copies.
Packit Service 34e2f8
 *
Packit Service 34e2f8
 * THE SOFTWARE IS PROVIDED "AS IS" AND RED HAT, INC. DISCLAIMS ALL WARRANTIES
Packit Service 34e2f8
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
Packit Service 34e2f8
 * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL RED HAT, INC. BE LIABLE
Packit Service 34e2f8
 * FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
Packit Service 34e2f8
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
Packit Service 34e2f8
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
Packit Service 34e2f8
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Packit Service 34e2f8
 */
Packit Service 34e2f8
Packit Service 34e2f8
/*
Packit Service 34e2f8
 * Author: Jan Friesse <jfriesse@redhat.com>
Packit Service 34e2f8
 */
Packit Service 34e2f8
Packit Service 34e2f8
#ifndef _OMPING_H_
Packit Service 34e2f8
#define _OMPING_H_
Packit Service 34e2f8
Packit Service 34e2f8
#ifdef __cplusplus
Packit Service 34e2f8
extern "C" {
Packit Service 34e2f8
#endif
Packit Service 34e2f8
Packit Service 34e2f8
#define PROGRAM_NAME		"omping"
Packit Service 34e2f8
#define PROGRAM_VERSION		"0.0.4"
Packit Service 34e2f8
#define PROGRAM_SERVER_INFO	PROGRAM_NAME" "PROGRAM_VERSION
Packit Service 34e2f8
Packit Service 34e2f8
#define DEFAULT_PORT_S		"4321"
Packit Service 34e2f8
#define DEFAULT_MCAST4_ADDR	"232.43.211.234"
Packit Service 34e2f8
#define DEFAULT_MCAST6_ADDR	"ff3e::4321:1234"
Packit Service 34e2f8
Packit Service 34e2f8
#define DEFAULT_WAIT_TIME	1000
Packit Service 34e2f8
#define DEFAULT_TTL		64
Packit Service 34e2f8
Packit Service 34e2f8
/*
Packit Service 34e2f8
 * Default Wait For Finish multiply constant. wait_time is multiplied with following
Packit Service 34e2f8
 * value.
Packit Service 34e2f8
 */
Packit Service 34e2f8
#define DEFAULT_WFF_TIME_MUL	3
Packit Service 34e2f8
Packit Service 34e2f8
/*
Packit Service 34e2f8
 * Minimum number of elements in duplicate buffer
Packit Service 34e2f8
 */
Packit Service 34e2f8
#define MIN_DUP_BUF_ITEMS	1024
Packit Service 34e2f8
/*
Packit Service 34e2f8
 * Default seconds which must be stored in duplicate buffer.
Packit Service 34e2f8
 * This value is divided by ping interval in seconds. If value is smaller
Packit Service 34e2f8
 * then MIN_DUP_BUF_ITEMS, then MIN_DUP_BUF_ITEMS is used.
Packit Service 34e2f8
 */
Packit Service 34e2f8
#define DUP_BUF_SECS		(2 * 60)
Packit Service 34e2f8
Packit Service 34e2f8
/*
Packit Service 34e2f8
 * Default burst value for rate limit GCRA
Packit Service 34e2f8
 */
Packit Service 34e2f8
#define GCRA_BURST		5
Packit Service 34e2f8
Packit Service 34e2f8
/*
Packit Service 34e2f8
 * Minimum send and receive socket buffer size
Packit Service 34e2f8
 */
Packit Service 34e2f8
#define MIN_SNDBUF_SIZE		2048
Packit Service 34e2f8
#define MIN_RCVBUF_SIZE		2048
Packit Service 34e2f8
Packit Service 34e2f8
/*
Packit Service 34e2f8
 * Protocol version used in messages
Packit Service 34e2f8
 */
Packit Service 34e2f8
#define PROTOCOL_VERSION	2
Packit Service 34e2f8
Packit Service 34e2f8
#define MAX_MSG_SIZE		65535
Packit Service 34e2f8
Packit Service 34e2f8
enum omping_op_mode {
Packit Service 34e2f8
	OMPING_OP_MODE_NORMAL,
Packit Service 34e2f8
	OMPING_OP_MODE_CLIENT,
Packit Service 34e2f8
	OMPING_OP_MODE_SERVER,
Packit Service 34e2f8
	OMPING_OP_MODE_SHOW_VERSION,
Packit Service 34e2f8
};
Packit Service 34e2f8
Packit Service 34e2f8
#ifdef __cplusplus
Packit Service 34e2f8
}
Packit Service 34e2f8
#endif
Packit Service 34e2f8
Packit Service 34e2f8
#endif /* _OMPING_H_ */