1 /* @(#) $Id: ./src/client-agent/sendmsg.c, 2011/09/08 dcid Exp $
4 /* Copyright (C) 2009 Trend Micro Inc.
7 * This program is a free software; you can redistribute it
8 * and/or modify it under the terms of the GNU General Public
9 * License (version 2) as published by the FSF - Free Software
17 #include "os_net/os_net.h"
20 /* Sends a message to the server */
21 int send_msg(int agentid, char *msg)
24 char crypt_msg[OS_MAXSTR +1];
26 msg_size = CreateSecMSG(&keys, msg, crypt_msg, agentid);
29 merror(SEC_ERROR,ARGV0);
33 /* Send msg_size of crypt_msg */
34 if(OS_SendUDPbySize(agt->sock, msg_size, crypt_msg) < 0)
36 merror(SEND_ERROR,ARGV0, "server");