{"id":20707904,"url":"https://github.com/code-help-tutor/cmsc417-assignment-2-dv","last_synced_at":"2025-06-19T08:39:05.279Z","repository":{"id":234136048,"uuid":"776021341","full_name":"code-help-tutor/CMSC417-Assignment-2-DV","owner":"code-help-tutor","description":"CMSC417 辅导, code help, CS tutor, WeChat: cstutorcs Email: tutorcs@163.com","archived":false,"fork":false,"pushed_at":"2024-03-22T14:18:17.000Z","size":234,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-07T04:03:20.969Z","etag":null,"topics":["cmsc417"],"latest_commit_sha":null,"homepage":null,"language":"C","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/code-help-tutor.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}},"created_at":"2024-03-22T14:18:09.000Z","updated_at":"2024-03-22T14:18:20.000Z","dependencies_parsed_at":"2024-04-18T09:18:53.608Z","dependency_job_id":"83d56b9c-5821-4c88-9d55-9951ae77e919","html_url":"https://github.com/code-help-tutor/CMSC417-Assignment-2-DV","commit_stats":null,"previous_names":["code-help-tutor/cmsc417-assignment-2-dv"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-help-tutor%2FCMSC417-Assignment-2-DV","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-help-tutor%2FCMSC417-Assignment-2-DV/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-help-tutor%2FCMSC417-Assignment-2-DV/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-help-tutor%2FCMSC417-Assignment-2-DV/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code-help-tutor","download_url":"https://codeload.github.com/code-help-tutor/CMSC417-Assignment-2-DV/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code-help-tutor%2FCMSC417-Assignment-2-DV/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258509785,"owners_count":22712734,"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":["cmsc417"],"created_at":"2024-11-17T01:28:28.253Z","updated_at":"2025-06-19T08:39:00.265Z","avatar_url":"https://github.com/code-help-tutor.png","language":"C","readme":"# Assignment 2\n\n## Distance Vector Routing on Virtual Network\nSee the assignment specification.\n\nWe **highly** recommend you read both the spec and README.md (this file) in full before you start!\n\nWe also **highly** recommend you to review the DV algorithm from the early lectures. It may help to hand-trace the algorithm on a small network.\n\nYou may reuse any code from assignments 0 and 1 as well.\n\n## Piazza\nPlease tag any questions pertaining to this assignment with `as-2`.\n\n---\n## Project Structure\n\n### A TA's attempt at explaining this 30-year old code\nWe have partially restructured the sample code so you can spend less time deciphering existing code.\n\nAll the parts you need to modify are marked with `TODO:`, with some hints.\n\n`dv.c` is the file where you will implement your DV algorithm. You will have to modify most (if not all) of this file.\n\nFor the `ls.c`, you will only have to implement `create_link_sock()` function.\n\n---\nBelow is some explanation for other files. You don't have to touch these:\n\nThe entrypoint is on `dr.c` - the `main()` function parses arguments, parses `config` file, initializes global routing table variables, and start executing events using the `walk_event_set_list()` function.\n\nThe `walk_event_set_list()` (in `dv.c`) does things on the \"list of [event sets]\". (i.e. this \"list\" is 2-d)\n\n`rt.h` and `ls.h` contains definitions and helper functions for `routing table` data structure and `link` data structure, respectively.\n\nYou may have a compiler warning for `lex.ru.c`. It is safe to ignore this.\n\n---\n\n### FILES\n```\ndv.*\t :: your code goes here\nru.*\t :: parser and scanner \nes.*\t :: event set \nls.*\t :: link set \nrt.*\t :: routing table \nn2h.*\t :: node-to-hostname \ndr.c\t :: a testing driver, including main(), calls walk_event_set_list()\ncommon.h :: common definitions\nqueue.h\t :: queue operation definition and macros\nmakefile :: type 'make' to generate executable \"rt\"\nconfig\t :: a sample scenario file\n```\n# CMSC417 Assignment 2 DV\n\n# WeChat: cstutorcs\n\n# QQ: 749389476\n\n# Email: tutorcs@163.com\n\n# Computer Science Tutor\n\n# Programming Code Help\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-help-tutor%2Fcmsc417-assignment-2-dv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode-help-tutor%2Fcmsc417-assignment-2-dv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode-help-tutor%2Fcmsc417-assignment-2-dv/lists"}