Q: My program worked last lab, now everything works different
or doesn't work at all although I didn't change one line! I even get this
strange "RPC can't register program blah blah" in my CONSOLE window.
How is this possible?...
A: Check the rpc services already running on your host
(rpcinfo). It might happen that an rpc service with the same
prognumber (ether.x) as your ether_server is already running,
started by some other user.
Q: ... So what? I can't kill somebody else's processes!
A: Modify the prognumber in the ether.x file and
remake all.
Q: Why do I keep getting this "Bus error" or "Segmentation
fault" message?
A: Check the pointers. Did you allocate memory before you copy/scanf
at that pointer? Do you copy more bytes then you allocated? Do you wanna
printf a NULL pointer?
Q: Why do I get only empty or partial messages in the receiver
client, even the source and destination fields are passed correctly?
A: You might have used strcpy or strdup in the
server implementation. This functions work only until a NULL character
is encountered and your message structure (eth_frame) contains such
characters. Use memcpy instead.
Q: Why do I get junk characters after the correct string printed
on the screen?
A: Don't forget to send the end of string character (NULL) together
with the message, or fill it in before you printf the message.
Q: If the acknowledge for the last data package sent during a
T_Send is lost, the receiving client gets stuck in T_Receive
and keeps sending old data; finally, after timeout returns Error
even the data transfer was successful. How can we avoid this?
A: Whenever you get a package with an acknowledge number smaller
then the current sequence number (from the right peer of course) it means
that the package you received has already been acknowledged but the acknowledge
got lost. The simple solution is to resend the acknowledge for that specific
package and go back in waiting for the right package. And don't forget
to use the SEQ and ACK numbers throughout the whole communication - do
not initialize them before every T_Receive or T_Send.
TDTS41 Computer Network..