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