示例#1
0
static void reset_sys()
{
	char *cmd;
	char p_tmp[64];
	int fd;

	cmd = malloc(MAX_CMD_LEN*sizeof(char));
	if(cmd==NULL){
		return;
	}

	sprintf(p_tmp, "$%d=%d", e_TYPE, T_Set);
	strcpy(cmd, p_tmp);
	sprintf(p_tmp, "&%d=%d", e_reset, 1);
	strcat(cmd, p_tmp);
	sprintf(cmd, "#");

	fd = connect_local(UN_AVSERVER_DOMAIN);
	if(fd<0){
		printf("reset_sys fail: connect av_server failed.\n");
		return;
	}

	send_local(fd, cmd, MAX_CMD_LEN);

	close_local(fd);
	return;	
}
示例#2
0
bool pim_interface::send_all_routers(pim_message *msg, uint16_t len) const {
	return send_local(&pim_all_routers_addr, msg, len);
}