#include <stdio.h>
#include <stdlib.h>
 
#define LARGE_INFO_LENGTH 1024
 
enum tt__IPType { tt__IPv4, tt__IPv6 };
 
struct tt__IPAddress
{
  enum tt__IPType Type;   /* required element of type tt:IPType */
  char *IPv4Address;  /* optional element of type tt:IPv4Address */
  char *IPv6Address;  /* optional element of type tt:IPv6Address */
};
 
struct tt__DNSInformation
{
  struct tt__IPAddress* DNSManual;
};
 
int main()
{
  struct tt__DNSInformation* DNSInformation;
  char dns_string[] = "192.168.2.254";
  
  DNSInformation = malloc(sizeof(struct tt__DNSInformation));
  DNSInformation->DNSManual = malloc(sizeof(struct tt__IPAddress));
  DNSInformation->DNSManual->IPv4Address = malloc(sizeof(char) * LARGE_INFO_LENGTH);
  strncpy(DNSInformation->DNSManual->IPv4Address, dns_string, LARGE_INFO_LENGTH - 1);
  
  printf("%s\n", DNSInformation->DNSManual->IPv4Address);
  return 0;
}