Hey,
I am trying to fix an incompatible types in assignment error, and I can't quite figure it out.
Here is where the error comes from:
Code:
curr_cap_header->markings[curr_marking] = (u8) 0;
Here is the related code
Code:
void create_capability_header(char *buffer, unsigned short buffer_size);
struct iphdr *ip_header;
pubkey_token *token_key;
bcap_token_hdr *token_header;
secflow_capability *curr_cap_header;
struct udphdr *udp_header;
char *currpos;
void create_capability_header(char *buffer, unsigned short buffer_size) {
int curr_marking;
curr_cap_header = (secflow_capability *) currpos;
curr_cap_header->id = 1;
curr_cap_header->prioclass = 0;
curr_cap_header->cur_router = 1;
for(curr_marking=0; curr_marking < MAXPATHLEN; curr_marking++) {
curr_cap_header->markings[curr_marking] = (u8) 0;
}
currpos = (char *)curr_cap_header + sizeof(secflow_capability);
}
Code:
typedef struct t_secflow_marking{
u8 marking;
} secflow_marking;
typedef struct t_secflow_capability{
u32 id;
u16 prioclass;
u16 cur_router;
secflow_marking markings[MAXPATHLEN];
}secflow_capability;
I'd appreciate any help... thanks!
- George