summaryrefslogtreecommitdiff
path: root/include/asterisk/utils.h
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2006-10-12 18:43:52 +0000
committerKevin P. Fleming <kpfleming@digium.com>2006-10-12 18:43:52 +0000
commit035aeb82e4b9c41b0a34e0f77ec95463f8e7e1b7 (patch)
tree0343a7b57047a36738125d659775dadbe3234744 /include/asterisk/utils.h
parent43f1054d0700285ec82ec1fdbd4b3632eee5a495 (diff)
Merged revisions 44956 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r44956 | kpfleming | 2006-10-12 13:38:51 -0500 (Thu, 12 Oct 2006) | 10 lines Merged revisions 44955 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r44955 | kpfleming | 2006-10-12 13:31:26 -0500 (Thu, 12 Oct 2006) | 2 lines ensure that IAX2 and SIP sockets allow UDP fragmentation when running on Linux (thanks to Brian Candler on the asterisk-dev list for the tip) ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/utils.h')
-rw-r--r--include/asterisk/utils.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index 9ae2e4595..30e9523e2 100644
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -515,4 +515,19 @@ int _ast_vasprintf(char **ret, const char *file, int lineno, const char *func, c
}))
#endif
+/*!
+ \brief Disable PMTU discovery on a socket
+ \param sock The socket to manipulate
+ \return Nothing
+
+ On Linux, UDP sockets default to sending packets with the Dont Fragment (DF)
+ bit set. This is supposedly done to allow the application to do PMTU
+ discovery, but Asterisk does not do this.
+
+ Because of this, UDP packets sent by Asterisk that are larger than the MTU
+ of any hop in the path will be lost. This function can be called on a socket
+ to ensure that the DF bit will not be set.
+ */
+void ast_enable_packet_fragmentation(int sock);
+
#endif /* _ASTERISK_UTILS_H */