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
Last revision Both sides next revision
courses:ct30a5000:start [2012/08/22 16:45]
julaakko [Hello World!]
courses:ct30a5000:start [2012/11/15 17:35]
julaakko [Assignments]
Line 5: Line 5:
 ---- ----
  
-====== !! UNDER CONSTRUCTION - MATERIAL FROM 2011-2012 !! ====== 
- 
-FIXME**WILL BE UPDATED IN AUGUST 2012**FIXME 
  
 ---- ----
Line 13: Line 10:
 ====== CT30A5001 - Network Programming ====== ====== CT30A5001 - Network Programming ======
  
-This is just a place to store some course related material because of limitations of Noppa. This __is not__ the main information channel for course [[https://​noppa.lut.fi/​noppa/​opintojakso/​ct30a5000/​etusivu|Network Programming]]. Here you will find the descriptions of assignments and links to various documentations and tutorials. See [[https://​noppa.lut.fi/​noppa/​opintojakso/​ct30a5000/​etusivu|course main pages]] for more information about course arrangements. ​+This is just a place to store some course related material because of limitations of Noppa. This __is not__ the main information channel for course [[https://​noppa.lut.fi/​noppa/​opintojakso/​ct30a5001/​etusivu|Network Programming]]. Here you will find the descriptions of assignments and links to various documentations and tutorials. See [[https://​noppa.lut.fi/​noppa/​opintojakso/​ct30a5001/​etusivu|course main pages]] for more information about course arrangements. ​
  
  
Line 36: Line 33:
 [[admin:​studentinfo|Departmental computer resources for students]] [[admin:​studentinfo|Departmental computer resources for students]]
   * ** APPARENTLY YOU NEED TO HAVE AN “OLD” ACCOUNT (NO NUMBERS) TO ACCESS SSH.LUT.FI AS IT IS NOT MAINTAINED ANYMORE...**   * ** APPARENTLY YOU NEED TO HAVE AN “OLD” ACCOUNT (NO NUMBERS) TO ACCESS SSH.LUT.FI AS IT IS NOT MAINTAINED ANYMORE...**
 +
 +**[[example_codes|Example codes used on the course]]**
 +
 ===== Assignments ===== ===== Assignments =====
  
Line 50: Line 50:
   * [[assignment3notes|Notes about assignment 3 ]]   * [[assignment3notes|Notes about assignment 3 ]]
  
-[[assignment4|Assignment4:​ Multicast ​(TBA)]], deadline ​xx.xx.2012 @ yy:yy+[[assignment4|Assignment4:​ Multicast ​Game announcement system & tic-tac-toe]], deadline ​25.10.2012 @ 23:59
   * [[assignment4notes|Notes about assignment 4 ]]   * [[assignment4notes|Notes about assignment 4 ]]
  
-[[assignment5|Assignment5:​ SCTP (TBA)]], deadline ​xx.xx.2012 @ yy:yy+[[assignment5|Assignment5:​ SCTP: Read, learn and implement "​Connect four" game]], deadline ​1.11.2012 @ 23:59
  
-[[assignment6|Assignment6: ​RFC implementation (TBA)]], deadline ​xx.xx.2012 @ yy:yy+[[assignment6|Assignment6: ​FTP client]], deadline ​15.11.2012 @ 23:59
  
-[[home_examination|HOME EXAMINATION ​(TBA)]], deadline ​xx.xx.2012 @ yy:yy +[[home_examination|HOME EXAMINATION ​Multiplayer deathmatch game]], deadline ​3.12.2012 @ 8:59
- +
-====== Example codes ====== +
- +
-Some example codes for your use. +
- +
-===== Hello World! ===== +
- +
-Unpack: {{:​courses:​ct30a5000:​helloworld.tar.gz|}} +
-  * Creates a directory "​helloworld"​ +
-  * See README-file in //​helloworld//​ -directory +
- +
-===== UDP client and server ===== +
- +
-Unpack: {{:​courses:​ct30a5000:​udpexample.tar.gz|}} +
-  * creates a folder "​udpexample"​ +
-  * build with **make**+
 ===== Documents, standards, tutorials ===== ===== Documents, standards, tutorials =====
  
Line 80: Line 64:
 [[universityresources|How to utilize university resources remotely]] [[universityresources|How to utilize university resources remotely]]
  
-==== C coding tools (compilers, debuggers, memory analyzers) ====+==== C coding ​and tools (compilers, debuggers, memory analyzers) ==== 
 + 
 +**[[http://​c-faq.com/​index.html|comp.lang.c Frequently Asked Questions]]**
  
 [[http://​gcc.gnu.org/​|GCC,​ The GNU compiler collection]] [[http://​gcc.gnu.org/​|GCC,​ The GNU compiler collection]]
Line 101: Line 87:
  
 [[http://​valgrind.org/​|Valgrind]] [[http://​valgrind.org/​|Valgrind]]
 +  * Some useful parameters (see more from: ''​man valgrind''​) <​code>​
 +# Gives full details of each leak
 +--leak-check=full
 +
 +# Show also reachable and indirectly lost blocks of memory
 +--show-reachable=yes
 +
 +# Show the origin of uninitialized values
 +--track-origins=yes
 +</​code>​
  
 [[http://​valgrind.org/​docs/​manual/​QuickStart.html|Valgrind Quickstart]] [[http://​valgrind.org/​docs/​manual/​QuickStart.html|Valgrind Quickstart]]
  
 [[http://​koti.mbnet.fi/​~inventor/​htyot/​valgrind-adv.html|Short Valgrind tutorial in finnish]] [[http://​koti.mbnet.fi/​~inventor/​htyot/​valgrind-adv.html|Short Valgrind tutorial in finnish]]
- 
 ==== Text editors ==== ==== Text editors ====
  
Line 123: Line 118:
   * **It is highly recommended to go through the section 23!!**   * **It is highly recommended to go through the section 23!!**
   * **See 23.1.2. Lookup Functions for brief explanation of correct usage of __''​getaddrinfo()''​__ function**   * **See 23.1.2. Lookup Functions for brief explanation of correct usage of __''​getaddrinfo()''​__ function**
 +
 +[[http://​www.ietf.org/​rfc/​rfc3493.txt|Basic Socket Interface Extensions for IPv6]]
 +  * The "​official"​ documentation of __''​getaddrinfo()''​__ (**Section 6.1**) and __''​getnameinfo()''​__ (**Section 6.2**)
 +  * RFC descriptions are used as manual pages e.g. in Aptosid Linux distribution (Debian Sid) but is replaced with kernel.org version after installing manpages-dev packet.
  
 [[http://​unlser1.unl.csi.cuny.edu/​faqs/​sock-faq/​html/​unix-socket-faq.html|Programming UNIX Sockets in C – FAQ]] [[http://​unlser1.unl.csi.cuny.edu/​faqs/​sock-faq/​html/​unix-socket-faq.html|Programming UNIX Sockets in C – FAQ]]
Line 133: Line 132:
  
 [[http://​en.wikipedia.org/​wiki/​Data_structure_alignment|Wikipedia article of byte alignment in data structures]] [[http://​en.wikipedia.org/​wiki/​Data_structure_alignment|Wikipedia article of byte alignment in data structures]]
-==== FTP ==== 
- 
-[[http://​www.faqs.org/​rfcs/​rfc959.html| RFC 959 - File Transfer Protocol]] 
- 
-[[http://​slacksite.com/​other/​ftp.html| Active FTP vs. Passive FTP]] 
- 
-==== HTTP ==== 
- 
-[[http://​www.faqs.org/​rfcs/​rfc1945.html| RFC 1945 - Hypertext Transfer Protocol -- HTTP/1.0]] 
- 
-[[http://​www.jmarshall.com/​easy/​http/​|HTTP Made Really Easy]] 
- 
-[[http://​www.faqs.org/​rfcs/​rfc2045.html| RFC 2045 - Multipurpose Internet Mail Extensions (MIME) Part One]] 
- 
-[[http://​www.helpdesk.umd.edu/​topics/​email/​protocols/​315/​|Multipurpose Internet Mail Extensions (MIME) Encoding]] 
  
 ==== Multicast ==== ==== Multicast ====
Line 155: Line 139:
 [[http://​www.internet2.edu/​multicast/​|Multicast Working Group]] [[http://​www.internet2.edu/​multicast/​|Multicast Working Group]]
  
- +Oracle.com Programming Interfaces Guide documentation for SOLARIS (yes, SOLARIS is UNIX and Linux is not UNIX but these pages explain multicast in informative manner): 
-==== POP3 ==== +    ​* ​[[http://docs.oracle.com/cd/E19683-01/806-4125/​sockets-138/​index.html|Sending IPv4 Multicast Datagrams]] 
- +    ​* ​[[http://docs.oracle.com/cd/E19683-01/806-4125/sockets-5/index.html|Receiving IPv4 Multicast Datagrams]] 
-[[http://tools.ietf.org/html/rfc1939|RFC 1939 Post Office Protocol ​Version 3]] +    [[http://​docs.oracle.com/​cd/​E19683-01/​806-4125/​sockets-13/​index.html|Sending IPv6 Multicast Datagrams]] 
- +    ​* ​[[http://docs.oracle.com/cd/E19683-01/​806-4125/​sockets-149/​index.html|Receiving IPv6 Multicast Datagrams]]
-[[http://tcpipguide.com/free/t_TCPIPPostOfficeProtocolPOPPOP3.htm|The TCP/IP Guide TCP/IP Post Office Protocol (POP/POP3)]] +
-  Pages are old (skip history) but the process of POP3 is explained thoroughly+
- +
-==== TFTP ==== +
- +
-[[http://www.faqs.org/rfcs/rfc1350.html|RFC 1350 - The TFTP Protocol (Revision 2)]]+
  
 ==== SCTP ==== ==== SCTP ====
Line 180: Line 158:
  
 [[http://​www.isoc.org/​briefings/​017/​|Why is SCTP needed given TCP and UDP are widely available?​]] By Randall Stewart, Paul D. Amer [[http://​www.isoc.org/​briefings/​017/​|Why is SCTP needed given TCP and UDP are widely available?​]] By Randall Stewart, Paul D. Amer
 +
 +==== PROTOCOLS ====
 +
 +[[protocols_rfcs|Different protocol descriptions & RFCs & tutorials]]
 +
 ==== State machines ==== ==== State machines ====
  
Line 186: Line 169:
 [[http://​edu.pegax.com/​doku.php?​id=old_courses:​csa:​behaviormodel2009]] by [[http://​www.pegax.com|Pekka Jäppinen]] [[http://​edu.pegax.com/​doku.php?​id=old_courses:​csa:​behaviormodel2009]] by [[http://​www.pegax.com|Pekka Jäppinen]]
  
-.. If you find good links, books, etc. please email info to assistant. 
 ==== Packing data to character buffer ==== ==== Packing data to character buffer ====
  
Line 199: Line 181:
 ==== Bit shifting ====  ==== Bit shifting ==== 
 Following [[courses:​ct30a5000:​bit_shifting_example|example]] shows how to use bit shifting with binary or operations to construct a single 8 bit integer to contain packed information. Read about [[http://​www.gamedev.net/​reference/​articles/​article1563.asp|Bitwise operations in C]]. Following [[courses:​ct30a5000:​bit_shifting_example|example]] shows how to use bit shifting with binary or operations to construct a single 8 bit integer to contain packed information. Read about [[http://​www.gamedev.net/​reference/​articles/​article1563.asp|Bitwise operations in C]].
 +
 +==== Find out which header to include ====
 +
 +If you have problems finding out which header has defined certain variable, use: <code bash>​find /​usr/​include/​|xargs grep -s -e "​PARAMETER_TO_SEARCH"</​code>​
 +Exclude the ''/​usr/​include/''​ from the include line and use the rest as include. E.g. if searching for ''​IPV6_MULTICAST'':​ <code bash> ​
 +find  /​usr/​include/​*|xargs grep -s -e "​IPV6_MULTICAST"​
 +/​usr/​include/​i386-linux-gnu/​bits/​in.h:#​define IPV6_MULTICAST_IF 17
 +/​usr/​include/​i386-linux-gnu/​bits/​in.h:#​define IPV6_MULTICAST_HOPS 18
 +/​usr/​include/​i386-linux-gnu/​bits/​in.h:#​define IPV6_MULTICAST_LOOP 19
 +/​usr/​include/​linux/​in6.h:#​define IPV6_MULTICAST_IF 17
 +/​usr/​include/​linux/​in6.h:#​define IPV6_MULTICAST_HOPS 18
 +/​usr/​include/​linux/​in6.h:#​define IPV6_MULTICAST_LOOP 19
 +</​code>​
 +
 +Use the ''​in6.h''​ in ''/​usr/​include/​linux'':​ <code c>#​include <​linux/​in6.h></​code>​
  
 ==== Gnuplot ==== ==== Gnuplot ====
Line 236: Line 233:
 Room: 2517 Room: 2517
  
-Reception hour: +Reception hour: Wednesday 1500 - 1600
  
 +.. If you find good links, books, etc. please email info to [[mailto:​jussi.laakkonen@lut.fi|assistant]].