i guess its the fromer one.

Code:
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>

int main ()
{
    struct iphdr *ip;
    
    ip = (struct iphdr *) malloc(sizeof(struct iphdr));
    
    ip->ihl = 5;
    ip->version = 4;
    ip->tos = 0;
    ip->tot_len = sizeof(struct iphdr) + 452;
    ip->id = htons(getuid());
    ip->ttl = 255;
    ip->protocol = IPPROTO_TCP;
    ip->saddr = inet_addr("127.0.0.1");
    ip->daddr = inet_addr("127.0.0.1");
    ip->check = in_cksum((unsigned short *)ip; sizeof(struct iphdr));
    
    return 0;
}
i am getting a strange error:
"dereferencing pointer to an incomplete type."

is there something wrong with my pointer?
or what else?

thank you

cya