{"id":23101161,"url":"https://github.com/carusel02/switch-implementation","last_synced_at":"2025-07-12T15:34:49.696Z","repository":{"id":223318105,"uuid":"718545236","full_name":"Carusel02/Switch-implementation","owner":"Carusel02","description":"Switch implementation","archived":false,"fork":false,"pushed_at":"2024-02-19T18:14:27.000Z","size":449,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T21:18:04.059Z","etag":null,"topics":["packets","python","stp","switch","vlan"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Carusel02.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-14T10:00:00.000Z","updated_at":"2024-11-12T20:47:04.000Z","dependencies_parsed_at":"2024-02-19T16:53:21.511Z","dependency_job_id":"6bad547e-c91a-4704-8f67-ab8d01dcfe31","html_url":"https://github.com/Carusel02/Switch-implementation","commit_stats":null,"previous_names":["carusel02/rl","carusel02/switch-implementation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Carusel02%2FSwitch-implementation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Carusel02%2FSwitch-implementation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Carusel02%2FSwitch-implementation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Carusel02%2FSwitch-implementation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Carusel02","download_url":"https://codeload.github.com/Carusel02/Switch-implementation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247078865,"owners_count":20879953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["packets","python","stp","switch","vlan"],"created_at":"2024-12-16T23:50:29.474Z","updated_at":"2025-04-03T21:18:08.479Z","avatar_url":"https://github.com/Carusel02.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"1 2 3\n\n# README \n##### MARIN MARIUS DANIEL 332CC\n## [Tema1 - RL](https://gitlab.cs.pub.ro/rl/tema1-public)\n\n\n### Implementare:\n* s-au rezolvat urmatoarele 3 functii:\n    - `tabela de comutare`\n    - `vlan`\n    - `stp`\n\n### Pentru\n* `tabela de comutare`\n    - s-a creat un dictionar global pentru fiecare switch in\n    care se mapeaza o intrare de forma (mac, port)\n    - se adauga mac-ul sursa si portul in dictionar de la fiecare\n    pachet primit\n    - se verifica daca exista deja o intrare pentru mac-ul destinatie,\n    altfel se trimite pachetul pe toate celelalte porturi\n    - implementarea este conform pseudocodului din enunt\n\n* `vlan`\n    - s-a creat o functie care primeste ca parametru switch id ul,\n    si realizeaza parsarea fisierului de configurare corespunzator\n    acestuia\n    - se verifica daca pachetul primit vine de pe o interfata acces/\n    trunk si se ia apoi in considerare pe ce fel de interfata se trimite\n    - se implementeaza astfel cazurile posibile explicate in enunt\n\n* `stp`\n    - pentru stp s-au mai adaugat niste vectori globali ce contin informatii\n    legate de starea si tipul fiecarui port de pe un switch\n    - pentru formarea cadrului bdpu s-a creat o functie speciala care face\n    impachetarea datelor folosind struct pack (s-au folosit doar campurile\n    root bridge id, root path cost, bridge id, port id)\n    - la extragerea informatiilor din cadrul bdpu s-a folosit struct unpack\n    - partea de trimitere a cadrului bdpu este conform pseudocodului din enunt\n    (doar root bridge-ul trimite cadre bdpu)\n    - partea de tratare a unui bdpu cand este primit este conform pseudocodului\n    din enunt\n\n### Mai multe detalii se regasesc in cod.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarusel02%2Fswitch-implementation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarusel02%2Fswitch-implementation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarusel02%2Fswitch-implementation/lists"}