EasyManua.ls Logo

ChamSys MagicQ - Page 272

ChamSys MagicQ
328 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
ChamSys Ltd www.chamsys.co.uk
MagicQ User Manual 272 Version 1.4.9.0
byte message[MAX_CREP_MSG];
remote_ether_message_t *rem = (remote_ether_message_t *) message;
int nbytes;
struct sockaddr_in name;
if (!remote_ether_sock) return (FALSE);
if (size>(MAX_CREP_MSG-sizeof(remote_ether_message_t)+1))
{
size = MAX_CREP_MSG-sizeof(remote_ether_message_t)+1;
}
rem->chamsys = (('C'<<24)|('R'<<16)|('E'<<8)|('P'));
rem->version = wswap(0);
rem->seq_fwd = remote_ether_fwd;
rem->seq_bkwd = remote_ether_bkwd;
rem->length = wswap(size);
memcpy(&(rem->data),data,size);
my_broadcast_address.s_addr = ip_address | ~subnet_address;
name.sin_family = AF_INET;
name.sin_port = htons (REMOTE_ETHER_PORT);
name.sin_addr.s_addr = dwswap (my_broadcast_address.s_addr);
nbytes = sendto (remote_ether_sock, message, size +
(sizeof(remote_ether_message_t)-1), 0,
(struct sockaddr *) & name, sizeof(name));
if (nbytes>0) remote_ether_fwd++;
return (TRUE);
}

Table of Contents

Other manuals for ChamSys MagicQ

Related product manuals