Serial port programming

I am developing an application in c with Linux OS, where a radio modem working at baud rate 9600 will be attached to PC on serial port. More than four such units will be communicating at one time, so there may be jamming or data corruption. Each module will be transmitting Data packets less than 500 bytes.
How should I set my serial port and program my application so that I can receive packets correctly.
Your suggestions will be welcomed

It's been a long time, but if I recall it works like this....

Each serial port has a port-buffer (in the old days this could be as little as 8 bytes) and you process buffer traffic 1 character at a time. I don't know what higher-level abstractions are provided these days for processing the bytes in the buffer, but the basic idea remains the same....

While (forever){
if (character-at-buffer-1){
read it;
do something with it;
}
if (character-at-buffer-2){
read it;
do something with it;
}
do other stuff here, but never so much that at 9600 cps the buffer(s)
could over-flow
}

For example, a simple terminal emulator comes down to this...

Open handle SR to read serial buffer;
Open handle SW to write serial buffer;
Open handle KR to read keyboard press;
Open handle TW to write to terminal;
while (forever){
if (SR has char){
write to TW;
}
if (KR has char){
write to SW;
}
Do other stuff;
}

This is the best tutorial on the web IMO - read the html free version -
Serial Programming Guide for POSIX Operating Systems - Michael R Sweet

It covers what quine showed you as well as a lot of other considerations.