Hello,
I have one question.
I want use sockaddr_in structure to create UDP client mode.
This structure looks like this:
typedef struct _sockaddr_in_t
{
short sin_family; // e.g. AF_INET
unsigned short sin_port; // e.g. htons(3490)
in_addr sin_addr; // see struct in_addr, below
char sin_zero[8]; // zero this if you want to
} sockaddr_in;
if i want define this parametars, i can do that this:
sockaddr_in adress;
adress.sin_family=AF_INET;
adress.sin_port=htons(port);
sin_addr structure looks like this:
typedef struct _in_addr_t
{
unsigned long s_addr; // load with inet_aton()
} in_addr;
If i want set this tipe of code i must use inet_aton() to set Ip address. This function doesn't existc in Host Driver of CC3000.
is it possible to use this structure without hist inet_aton() function?
If it is possible, can someone type the example.