meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
courses:ct30a5000:introexercises [2012/08/28 13:42]
julaakko [Helpful sources, books..]
courses:ct30a5000:introexercises [2012/08/30 16:24] (current)
julaakko
Line 1: Line 1:
-Network programming [[https://​noppa.lut.fi/​noppa/​opintojakso/​ct30a5000/etusivu|@ Noppa]] | [[courses:​ct30a5000:​start|@ wiki]] - +Network programming [[https://​noppa.lut.fi/​noppa/​opintojakso/​ct30a5001/etusivu|@ Noppa]] | [[courses:​ct30a5000:​start|@ wiki]] - 
 Updated: ​ --- //​[[jussi.laakkonen@lut.fi|Jussi Laakkonen]] 2012/08/20 17:40// Updated: ​ --- //​[[jussi.laakkonen@lut.fi|Jussi Laakkonen]] 2012/08/20 17:40//
 ~~SLIDESHOW~~ ~~SLIDESHOW~~
Line 18: Line 18:
 Additionally:​ two days (4.12.2011 & 5.12.2011) are reserved for Home examination demonstration. Additionally:​ two days (4.12.2011 & 5.12.2011) are reserved for Home examination demonstration.
  
-Reception hour: Xday xx00 xx00 (Room: 2517)+Reception hour: Wednesday 1500 1600 (Room: 2517)
  
 ===== Arrangements ===== ===== Arrangements =====
Line 62: Line 62:
 ===== Sending an assignment ===== ===== Sending an assignment =====
  
-  * Put your code into SVN repository+  * Put your code into SVN repository ​at https://​www2.it.lut.fi/​svn/​courses/​CT30A5001/​ 
 +  * Your login name is mapped to folder with your student number (read/​write)
   * Code will be checked out at deadline   * Code will be checked out at deadline
     * only then, not before, not after     * only then, not before, not after
   * Put into following directories:​   * Put into following directories:​
-    * E<n>, where ''<​n>''​ is the assignment number+    * A<n>, where ''<​n>''​ is the assignment number
     * E.g. Assignment 1 into ''​A1'',​ assignment 2 into ''​A2'',​ etc.     * E.g. Assignment 1 into ''​A1'',​ assignment 2 into ''​A2'',​ etc.
     * Except Home Examination,​ it goes into ''​HE''​ directory     * Except Home Examination,​ it goes into ''​HE''​ directory
    
- 
 ===== The directory content ==== ===== The directory content ====
  
Line 99: Line 99:
   * Use e.g. {{:​courses:​ct30a5000:​helloworld.tar.gz|}} for testing   * Use e.g. {{:​courses:​ct30a5000:​helloworld.tar.gz|}} for testing
  
-===== 1.1 Vim =====+===== 1.1 Vi / Vim =====
  
   * Terminal editor, starts in normal mode (editing not enabled)   * Terminal editor, starts in normal mode (editing not enabled)
   * There is also Vim with GUI: **gvim**   * There is also Vim with GUI: **gvim**
-  * Usage: **vim sourcecode.c**+  * Usage: **vim sourcecode.c** or **vi sourcecode.c**
   * Some basic commands: <​code>​a ​     - append (start editing)   * Some basic commands: <​code>​a ​     - append (start editing)
 i      - insert (start editing) i      - insert (start editing)
Line 222: Line 222:
 Connecting with ssh outside university: Connecting with ssh outside university:
   - Connect with **ssh** to **ssh.lut.fi** with your university account (connections from Lnet are allowed).   - Connect with **ssh** to **ssh.lut.fi** with your university account (connections from Lnet are allowed).
-    * E.g. **ssh 0123456@ssh.lut.fi**+    * E.g. **ssh lutlogin@ssh.lut.fi**
   - After login connect with **ssh** to selected [[admin:​pentinkulma|class 6218 computer]]   - After login connect with **ssh** to selected [[admin:​pentinkulma|class 6218 computer]]
  
Line 236: Line 236:
  
   * Beej's Guide to Network Programming (read the usage of ''​getaddrinfo()''​ carefully, for getting local IP addresses see also ''​getifaddrs()''​)   * Beej's Guide to Network Programming (read the usage of ''​getaddrinfo()''​ carefully, for getting local IP addresses see also ''​getifaddrs()''​)
-  * IPv6 Network Programming,​ //Jun-ichiro itojun ​Hagino//+  * IPv6 Network Programming,​ //Jun-Ichiro Itojun ​Hagino//
     * Chapters: 1.4, 2.1, 2.2, 2.3, 4.1, 4.2, 4.3, 4.4, 4.5, 4.7     * Chapters: 1.4, 2.1, 2.2, 2.3, 4.1, 4.2, 4.3, 4.4, 4.5, 4.7
-  * TCP/IP illustrated,​ //TCP/IP illustrated//+  * TCP/IP illustrated,​ //W. Richard Stevens ​//
   * TCP/IP Sockets in C: Practical Guide for Programmers,​ //Michael J. Donahoo, Kenneth L. Calvert//   * TCP/IP Sockets in C: Practical Guide for Programmers,​ //Michael J. Donahoo, Kenneth L. Calvert//
   * UNIX Network Programming:​ The Sockets Networking API Volume 1, //W. Richard Stevens,​Bill Fenner,​Andrew M. Rudoff//   * UNIX Network Programming:​ The Sockets Networking API Volume 1, //W. Richard Stevens,​Bill Fenner,​Andrew M. Rudoff//
Line 263: Line 263:
   * Client sends a character to given address and quits.   * Client sends a character to given address and quits.
  
-Unpack: {{:​courses:​ct30a5000:​udpexample.tar.gz|}}+Unpack: {{:​courses:​ct30a5000:​udpexample2012.tar.gz|}}
   * creates a folder "​udpexample"​   * creates a folder "​udpexample"​
   * build with **make**   * build with **make**
 +
 +===== TCP client and server =====
 +
 +Simple TCP client and server example.
 +  * Server listens for incoming connections and disconnects them right after accept().
 +  * Server prints address information of the connected client.
 +  * Client just connects and quits right after disconnection.
 +
 +Unpack: {{:​courses:​ct30a5000:​tcpexample2012.tar.gz|}}
 +  * Creates a folder "​tcpexample"​
 +  * build with **make**
 +