1 /* Copyright (C) 2009 Trend Micro Inc.
4 * This program is a free software; you can redistribute it
5 * and/or modify it under the terms of the GNU General Public
6 * License (version 2) as published by the FSF - Free Software
12 #include "os_net/os_net.h"
15 /* Send a message to the server */
16 int send_msg(int agentid, const char *msg)
19 char crypt_msg[OS_MAXSTR + 1];
21 msg_size = CreateSecMSG(&keys, msg, crypt_msg, agentid);
23 merror(SEC_ERROR, ARGV0);
27 /* Send msg_size of crypt_msg */
28 if (OS_SendUDPbySize(agt->sock, msg_size, crypt_msg) < 0) {
29 merror(SEND_ERROR, ARGV0, "server");