Differences

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

Link to this comparison view

rl:labs:02:contents:00 [2023/10/02 16:19]
vlad_andrei.badoiu created
— (current)
Line 1: Line 1:
-==== 00. [10p] Implementare Hub ==== 
  
-Vom implementa in Python funcționalitatea de baza a unui Hub. Cum am vazut si in cadrul exercitiului anterior, pentru fiecare frame primit, hub-ul îl trimite pe toate interfețele (link sau port). Mai jos gasim o descriere in pseudocod: 
- 
-<​code>​ 
-while hub is powered on: 
-    for each port: 
-        if there is incoming data: 
-            read the incoming data 
-            for each other port: 
-                send the data to that port 
-</​code>​ 
- 
-In acest exercițiu vom implementa un Hub in Python pornind de la un API simplu de primire si trimitere de frame-uri Ethernet. Vom porni 
-de la scheletul de la [[https://​gitlab.cs.pub.ro/​rl/​schelet-hub|urmatoarea adresa]]. Implementarea se va face in **hub.py**, in dreptul celor doua TODO-uri. 
- 
-<code Python> 
-# data este de tip byte array 
-interface, data, length = recv_from_any_link() 
-send_to_link(interface,​ data, length) 
-</​code>​ 
rl/labs/02/contents/00.1696252775.txt.gz · Last modified: 2023/10/02 16:19 by vlad_andrei.badoiu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0