2023-05-07 11:50:35 +00:00
|
|
|
//include <stdio.h>
|
|
|
|
//#include <stdlib.h>
|
|
|
|
//#include <string.h>
|
|
|
|
//#include <errno.h>
|
|
|
|
//#include <unistd.h>
|
|
|
|
#include <hamlib/rig.h>
|
|
|
|
//#include <sys/socket.h>
|
2023-05-07 12:34:21 +00:00
|
|
|
#ifdef HAVE_NETINET_IN_H
|
2023-05-07 12:27:44 +00:00
|
|
|
#include <netinet/in.h>
|
2023-05-07 12:34:21 +00:00
|
|
|
#endif
|
2023-05-07 22:17:50 +00:00
|
|
|
#ifdef _WIN32
|
|
|
|
#include <winsock2.h>
|
|
|
|
#include <ws2tcpip.h>
|
|
|
|
#endif
|
2023-05-07 12:27:44 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_ARPA_INET_H
|
|
|
|
#include <arpa/inet.h>
|
|
|
|
#endif
|
2023-05-07 11:50:35 +00:00
|
|
|
|
|
|
|
#ifndef MULTICAST_H
|
|
|
|
#define MULTICAST_H
|
|
|
|
|
|
|
|
struct multicast_vfo
|
|
|
|
{
|
|
|
|
char *name;
|
|
|
|
double freq;
|
|
|
|
char *mode;
|
|
|
|
int width;
|
|
|
|
int widthLower;
|
|
|
|
int widthUpper;
|
|
|
|
unsigned char rx; // true if in rx mode
|
|
|
|
unsigned char tx; // true in in tx mode
|
|
|
|
};
|
|
|
|
|
|
|
|
struct multicast_broadcast
|
|
|
|
{
|
|
|
|
char *ID;
|
|
|
|
struct multicast_vfo **vfo;
|
|
|
|
};
|
|
|
|
|
|
|
|
// returns # of bytes sent
|
2023-05-07 22:32:36 +00:00
|
|
|
extern HAMLIB_EXPORT (int) multicast_init(RIG *rig, char *addr, int port);
|
|
|
|
extern HAMLIB_EXPORT (int) multicast_send(RIG *rig, const char *msg, int msglen);
|
2023-09-14 15:01:06 +00:00
|
|
|
extern HAMLIB_EXPORT (int) multicast_stop(RIG *rig);
|
2023-05-07 11:50:35 +00:00
|
|
|
#endif //MULTICAST_H
|