IP 不要在 Mac OS 上碎片化位 [英] IP Don't fragment bit on Mac OS

查看:22
本文介绍了IP 不要在 Mac OS 上碎片化位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个通过 TCP 传输文件的程序.

I am writing a file transferring program over TCP.

我想在 IP 上设置不分段标志

I want to set the don't fragment flag on IP

在套接字上这是我想做的:

On a socket this is what I want to do:

int val = 1;
setsockopt(sd, IPPROTO_IP, IP_DONTFRAG, &val, sizeof(val));

但是 IP_DONTFRAG 在 Mac OS 上似乎不可用.我错过了什么吗?还是我忘记正确包含它?

However IP_DONTFRAG does not seem available on Mac OS. Am I missing something? or did I forget to include it correctly?

如果有人知道,在此先感谢

Thanks in advance if anyone knows

--山姆

推荐答案

google 提出了这个:http://lists.apple.com/archives/macnetworkprog/2006/Jul/msg00014.html

google brought up this: http://lists.apple.com/archives/macnetworkprog/2006/Jul/msg00014.html

这篇关于IP 不要在 Mac OS 上碎片化位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆