ok I have a structure:
struct dhcp_ippacket_t {
struct dhcp_ethhdr_t ethh;
struct dhcp_iphdr_t iph;
uint8_t payload[DHCP_IP_PLEN];
} __attribute__((packed));
this struct is fed to a call to recv as the buffer to fill (or rather a pointer to it is).
What I don't get is what does this...
ok I am a total newbie to this so don't laugh too hard. :)
That said:
I have a uint32 called daddr. it holds the uint32 representation of an ip address. I need to pass it to a function that takes:
Function_One(struct in_addr *ipaddr)
How would I convert that so that I can pass it in?
Thanks...
ahh ok that makes all the warnings go away.
I still have a problem where when i run the code, I get a segmentation fault or a bus error (seems to be random which one appears) on the call to the third function.
Would you be able to take a look at my code if I sent it to you? I know I am asking...
ahh ok - I do understand, but I think I am missing something.
When I use the pointer to pointer code method below, I receive "warning: passing argument 1 of Second_Function from incompatible pointer type"
struct dpool_t *dpa;
First_Function(&dpa);
First_Function(struct dpool_t **dpaOne)
{...
hmm ok that makes sense - but why would one use the more complicated double pointer method over the easier single pointer method?
I am doing all of this because, using the code above that I gave you, I need to pass struct dpool_t *dpa down two functions, andthen pass a single pointer to a...
My functions don't return anything because this is just example code not real code.
I am trying to emulate someone else's code. Let me show you the real code that they are using:
/* in the test.h area they have: */
struct dpoolm_t; /* Forward declaration */
/* create the...
Hi guys, I must admit I am sort of a newbie to C, so bear with me.
I have this pointer to a structure:
struct pool *dpa;
declared outside of main (making it global, I believe).
now I need to pass this pointer down 3 functions where the third function will need to mess with the data in the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.