nquiry regarding macOS compatibility and header structure differences (PA2) #304
Replies: 1 comment
-
|
Hello, this is Seongjun Im, the TA for CS30401. Grading will be conducted in an Ubuntu 24.04-based Docker container. Therefore, as long as your code compiles successfully on Ubuntu, there won't be any issues. In an Ubuntu environment, the Because you only mentioned that "compilation error" without specifying exactly which fields you used or how you used them, it's difficult to provide a precise answer. I hope this explanation helps. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
현재 pa2를 하는 과정에서 맥OS에서 tcp.h와 같은 구조가 달라 프로젝트를 진행하는데 문제를 겪었습니다.
Linux의 netinet/tcp.h는 tcphdr 구조체에 source, dest, syn, ack, fin, rst, seq 같은 멤버를 정의합니다
macOS의 netinet/tcp.h는 다른 멤버 이름을 사용합니다 (예: th_sport, th_dport 등)
Linux의 netinet/ip.h의 iphdr도 macOS에서는 구조가 다릅니다
결과:
이 코드는 Linux에서는 정상 컴파일됨
macOS에서만 컴파일 에러 발생
그래서 어떻게든 macOS에 맞는 형태로 구현을 하여 모든 테스트 케이스를 통과한 상태인데, 혹시 해당 코드를 제출을 하게 되었을 때, 불이익이 있을 수 있을까요?
I am writing to inquire about the environment requirements for PA2.
While working on the assignment, I encountered compilation errors on macOS due to differences in the network header structures compared to Linux. For example:
TCP Header: In Linux's netinet/tcp.h, the tcphdr struct uses members like source, dest, syn, and ack. However, macOS uses th_sport, th_dport, th_flags, etc.
IP Header: The iphdr struct in netinet/ip.h also follows a different naming convention on macOS.
I have successfully modified the code to be compatible with macOS and passed all the test cases. However, I am concerned whether submitting this macOS-specific implementation will result in a penalty if the grading is conducted in a Linux environment.
Should I revert the code to the Linux-standard structure before submission, or is it acceptable to submit the current version?
Thank you for your time and guidance.
Beta Was this translation helpful? Give feedback.
All reactions