![]() |
||||||||||||||||||||||||
<< Computer Networks Practicum: Questions and Answers
// Globals that come in handy.
$DateFormat = "l \\t\h\e jS \o\f F Y";
$myname=ereg_replace('^.*/export','',$_SERVER['PATH_TRANSLATED']);
echo "Last-Modified: ".date($DateFormat, filemtime($myname)).".";
?>
1. What must be in the documentation?
2. What must not be in the documentation?
3. What can be in the documentation?
4. The RFC states we must wait 5 minutes on connection close, it that true? Indeed, the operating system is supposed to wait a certain time before connections are released. This is supposed to wait for late data packets arriving after the connection has been closed. Of course, in normal implementations, this task is handled by the system and applications can go on without being blocked that long. 5. I get an alignment error, what is that? In the console window (usually in the lower right corner) the IP library generates alignment errors. This is nothing to worry about on a PC, but a Sparc machine would crash. The Minix kernel sets the alignment flag for a new process, and when an alignment error occurs, the Minix kernel prints a message on the console (including the address where the error occured). To find the place in the source code, use 'dis program | less' and search for the address that was given. 6. What causes an alignment error? Usually a 'ps = *(short *)&buffer[3];' or alike. If something is to be a short, then its address should be even. Malloc() always returns an 'even' pointer and the compile knows how to handle 'struct {char c; short s;}' (char c is patched to 2 bytes). The only way to get an mis-aligned address (pointer) is by using an odd offset in a buffer. Don't do this. The PC can handle this, but it shows bad programming. 7. I have problems with pointers A comprehensive understanding of pointers is essential to most C programming. You can read for example this C tutorial, which has a whole section about pointers here. 8. How do you write a Makefile? A Makefile defines the relationships between files: to construct a given file (say, an executable file), it says which other (source) files are needed and what is the command to create the former based on the latter. Here is a small example: |
||||||||||||||||||||||||
|
||||||||||||||||||||||||