/* Callback to get the ServerIP from DNS lookup.  */
static void resolve_cb(uint8_t *pu8DomainName, uint32_t u32ServerIP)
/* Callback to get the ServerIP from DNS lookup.  */
static void resolve_cb(uint8_t *pu8DomainName, uint32_t u32ServerIP)
{
	struct sockaddr_in addr;
	int8_t cDataBuf[48];
	int16_t ret;
	memset(cDataBuf, 0, sizeof(cDataBuf));
	cDataBuf[0] = '\x1b';
	printf("resolve_cb: DomainName %s\r\n", pu8DomainName);
	if (udp_socket >= 0) {
		addr.sin_family = AF_INET;
		addr.sin_port = _htons(MAIN_SERVER_PORT_FOR_UDP);
		addr.sin_addr.s_addr = u32ServerIP;
		ret = sendto(udp_socket, (int8_t *)&cDataBuf, sizeof(cDataBuf), 0, (struct sockaddr *)&addr, sizeof(addr));
		if (ret != M2M_SUCCESS) {
			printf("resolve_cb: failed to send  error!\r\n");
			return;
		}
	}
}