Padding issues

Hello,
Structure padding & structure size are different on Compaq & HP UNIX. When structures are transfered via netfork from Compaq to HP will this be a problem? If yes, what can be the solution?
Thanks,
shilpa

Shilpa,
What do you mean transfer structure. are you saying transfering the data structure or filesystem (kernel structure) please define your question.

If you are talking about stuff like this:

struct foo
{
int bar;
char c;
DEFIT honk;
long snafu;
};

...
struct foo *pfoo = malloc( ...);
...

send\_from\_1\_2_other\(pfoo, ....\);

...

This is a bad idea.
It will only work inside an absolutely heterogenous, eh, structure.
You would want to either have a conversion routine in each end, like ntohfoo(), htonfoo() modelled after the int and long ones, or, depending on the contents, you might want to transfer in ASCII, taking performance issues into account.

Atle