ИУП: интенсив 7 дней + диагностический пакет (32 вопроса, 9 задач с автопроверкой)

This commit is contained in:
Kodlo-chan
2026-09-23 16:05:09 +07:00
commit 4cd63b3d4d
40 changed files with 2464 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
// Задача 04 — разбор IPv4-пакета. Заполни реализации.
#include <cstdint>
#include <cstddef>
struct Ipv4Header {
uint8_t version;
uint8_t ihl;
uint8_t protocol;
uint16_t total_length;
uint32_t src_ip;
uint32_t dst_ip;
uint16_t header_checksum;
};
bool parse_ipv4(const uint8_t* buf, size_t len, Ipv4Header* out) {
(void)buf; (void)len; (void)out;
return false; // TODO
}
uint16_t compute_checksum(const uint8_t* buf, size_t len) {
(void)buf; (void)len;
return 0; // TODO
}
bool checksum_valid(const uint8_t* buf, size_t len) {
(void)buf; (void)len;
return false; // TODO
}