-
Notifications
You must be signed in to change notification settings - Fork 1.3k
icmp ipv6可用 #709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
icmp ipv6可用 #709
Conversation
| @@ -0,0 +1,15 @@ | |||
| #include <stdio.h> | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
存在一份unittest/ping_test.c可以复用
| icmp_res->icmp_seq == seq) { | ||
| icmp_res = (icmp_t *)(recvbuf + iphdr_len); | ||
| if (!addr_ipv6) { | ||
| // IPv4校验需先把数据包中的校验码段置0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不要使用中文
| else | ||
| fprintf(stderr, "usage: ping <host ip or address>\n"); | ||
| return 0; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hconfig.h这个文件还没决定是否删除,这个PR里先不要删
| #define ICMP_ADDRESS 17 /* Address Mask Request */ | ||
| #define ICMP_ADDRESSREPLY 18 /* Address Mask Reply */ | ||
|
|
||
| #define ICMPV6_DEST_UNREACH 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
数值前增加空格对齐下吧
windows:
ubuntu: