title: ftp server in C
body: <p>I have to develop 1 FTP (simple) server in C.<br>
  What do i mean with <em>simple</em>??
  I mean that FTP server has to support:<br></p>
  
  <ol>
  <li>authentication (USER, PASS, PORT)</li>
  <li>change directory (CD)</li>
  <li>file listing (LIST)</li>
  <li>file retrive (RETR)</li>
  </ol>
  
  <p>I have just developed as "split part" the numbers 1-2-3-4 and i have to merge them into <em>main.c</em>. So no problem with them.<br>
  What i don't understand is how to "receive" communications from the client.<br>I mean how can implement what the client wants (USER, PASS, CD, LIST, RETR)?<br>
  I've read the rfc959 but i have not totally understood the communication between client and sever.<br>
  Summary:</p>
  
  <ol>
  <li>client connect to server (so into the server this part is the socket "accept(..)"), rigth?
  1a server send to client "you are connected" right?</li>
  <li>client send to server user,password (file 1, auth.c but i don't know how to read when client send to the server the user and password request)</li>
  <li>after successful login the server send file list (part 3, list.c, no problem)</li>
  <li>the client send to the server the file it wants to download or the changedir command (again, how to read this info from client's request?)<br></li>
  </ol>
  
  <p>i hope you have understand :)</p>
  
  <p><strong>EDIT:</strong> i'm on GNU/Linux</p>