Blame msgsend.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 _MSGSEND_H_
Packit Service 34e2f8
#define _MSGSEND_H_
Packit Service 34e2f8
Packit Service 34e2f8
#include <sys/types.h>
Packit Service 34e2f8
Packit Service 34e2f8
#include <sys/socket.h>
Packit Service 34e2f8
Packit Service 34e2f8
#include <net/if.h>
Packit Service 34e2f8
#include <netinet/in.h>
Packit Service 34e2f8
#include <arpa/inet.h>
Packit Service 34e2f8
Packit Service 34e2f8
#ifdef __cplusplus
Packit Service 34e2f8
extern "C" {
Packit Service 34e2f8
#endif
Packit Service 34e2f8
Packit Service 34e2f8
enum ms_answer_type {
Packit Service 34e2f8
	MS_ANSWER_UCAST = 1,
Packit Service 34e2f8
	MS_ANSWER_MCAST = 2,
Packit Service 34e2f8
	MS_ANSWER_BOTH  = 3,
Packit Service 34e2f8
};
Packit Service 34e2f8
Packit Service 34e2f8
extern int	ms_answer(int ucast_socket, const struct sockaddr_storage *mcast_addr,
Packit Service 34e2f8
    const char *orig_msg, size_t orig_msg_len, const struct msg_decoded *decoded,
Packit Service 34e2f8
    const struct sockaddr_storage *to, uint8_t ttl, enum ms_answer_type answer_type);
Packit Service 34e2f8
Packit Service 34e2f8
extern int	ms_init(int ucast_socket, const struct sockaddr_storage *remote_addr,
Packit Service 34e2f8
    const struct sockaddr_storage *mcast_addr, const char *client_id, int req_si);
Packit Service 34e2f8
Packit Service 34e2f8
extern int	ms_query(int ucast_socket, const struct sockaddr_storage *remote_addr,
Packit Service 34e2f8
    const struct sockaddr_storage *mcast_addr, uint32_t seq_num, const char *client_id,
Packit Service 34e2f8
    const char *ses_id, size_t ses_id_len);
Packit Service 34e2f8
Packit Service 34e2f8
extern int	ms_response(int ucast_socket, const struct sockaddr_storage *mcast_addr,
Packit Service 34e2f8
    const struct msg_decoded *decoded, const struct sockaddr_storage *to, int mcast_grp,
Packit Service 34e2f8
    int mcast_prefix, const char *session_id, size_t session_id_len);
Packit Service 34e2f8
Packit Service 34e2f8
extern int	ms_stop(int ucast_socket, const struct sockaddr_storage *mcast_addr,
Packit Service 34e2f8
    const struct msg_decoded *decoded, const struct sockaddr_storage *to);
Packit Service 34e2f8
Packit Service 34e2f8
#ifdef __cplusplus
Packit Service 34e2f8
}
Packit Service 34e2f8
#endif
Packit Service 34e2f8
Packit Service 34e2f8
#endif /* _MSGSEND_H_ */