help understanding configuration structs
Hi Everyone
I am doing some socket and serial programming.
I can follow along with things but there is something I just don't understand and it's fundamental.
So with serial programming on posix we include termios.h and there are various struct fields that can be set to different values.
Once these are all set up, the port itself is configured for use. I assume that other applications could actually access the port using the same parameters(assuming nothing is locked). I am assuming this is how the command stty works.
The thing I don't get is that if I am including some struct via an include file, am I not using a copy of this code. It seems like the changes are global though. Does the struct have function pointers in it that make the changes global.
I am not very far along with socket programming but is this the same situation, function pointers acting on the struct settings to make changes globally ?
Thanks for reading-Patrick
|