Parentheses and pointer symbol have same priority, and they are dealed from left to right. Why does the following code try to get the member nfct
from skb
, then do the type conversion? It's seems that the associativity is from right to left.
(struct nf_conn *) skb->nfct
I believe the point you're missing here is the Operator Precedence.
The pointer member access operator (->
) has higher precedence than the cast.
To elaborate, (borrowed wordings)