Can you please include the data structure of type ctx in your post. According to my interpretation "incomplete type" means compiler know that ctx is of type struct but does not know about the members of the type struct.
Please check whether the file profile.h has actual declaration of struct ctx.
For example struct { int x; } ctx; ---> This is the actual declaration of the struct.
What I suspect is that the file profile.h just has a stuct tag defined and thats why it does not know about the members of the actual struct ctx.
For example Profile.h just has the definition of tag such as stuct xxx ctx;
If a specifier with a tag but without a list (i.e the declaration) appears when the tag is not declared, an incomplete type is returned by the compiler.
I suggest you include the declaration of struct ctx in profile.h.
I hope this helps.
Thanks.
Ambrish Kinariwala
Thank U Ambrish for the suggestion. I had suspected the same thing but the structure elements do exist. You can have a look at the structure and pls advice.
"Profile.h" includes the following
struct dot1x_state
{
/* These variables are per the 802.1x documentation.*/
/* These are defined as constants, but don't have to be. We may want */
/* the option of changing them in the future. */
char authPeriod;
char heldPeriod;
char startPeriod;
char maxStart;
/* per 802.1x-REV-d11 section 8.2.2.1 */
char authWhile;
char aWhile;
char heldWhile;
char quietWhile;
char reAuthWhen;
char startWhen;
/* per 802.1x-REV-d11 section 8.2.2.2 */
char eapFail;
char eapolEap;
char eapSuccess;
char keyAvailable;
char keyDone;
char keyRun;
char keyTxEnabled;
char portControl;
char suppPortStatus;
char portValid;
char suppAbort;
char suppFail;
char suppStart;
char suppSuccess;
char suppTimeout;
char initialize;
char portEnabled;
/* per 802.1x-REV-d11 section 8.2.11.1.1 */
char eapRestart;
char logoffSent;
char sPortMode;
char startCount;
char userLogoff;
/* per 802.1X-REV-d11 section 8.2.12.1.1 */
char eapNoResp;
char eapReq;
char eapResp;
/* per 802.1x-REV-d11 section 8.2.3.1.1 port timers */
char tick;
/* per 802.1x-REV-d11 section 8.2.7.1.1 Key recieve */
char rxKey;
/* This isn't in the spec, but is useful.*/
char curState;
char beCurState;
char wpaCurState;
char wpaLastState;
/* This is to contain the last type of EAP packet we saw. It's only
functional purpose is to allow us to give the user some sort of error
message about what might be wrong with the connection. (i.e. If the
last EAP message we got was a Request ID, and we get a TIMEOUT, it means
we attempted to send a Response ID, and for some reason the AP ignored
us.*/
char lastEapType;
/* Keep track of the key length that is used in dynamic WEP. (Basically,
we want to know the shortest unicast and shortest broadcast keys the
AP sent.) This servers no functional purpose, but will allow us to warn
the user that some cards/drivers/APs are not happy using different length
WEP keys.*/
char unicastKeyLen;
char broadcastKeyLen;
/* This contains the number of MIC failures the driver has reported.
Once it reaches 2, we should enable countermeasures.*/
char MICfailures;
uint8_t replay_counter[8];
};
struct interface_data
{
char *intName; /* The name of this interface.*/
char source_mac[6]; /* Source MAC address.*/
char dest_mac[6]; /* Destination MAC address.*/
char *cur_essid; /* The current SSID we are using.*/
struct dot1x_state *statemachine; /* State machine info*/
uint8_t *keyingMaterial; /* Hold any keying material generated by
an EAP type. Should be NULL if there
isn't any!*/
char keyingLength; /* Normal EAP methods will return 32 bytes
of keying material. Goofy EAP methods
like LEAP use less material.*/
char *tempPassword; /* Temporary password.*/
uint8_t sendframe[1520], recvframe[1520];
int send_size, recv_size;
} ;