From c2154c0d362ced8f8b5181799c369e1497c958e1 Mon Sep 17 00:00:00 2001 From: Dan Klein Date: Thu, 27 Aug 2015 10:58:01 +0300 Subject: reverting to dpkt v1.8.6 instead of 1.8.6.2 to avoid importing error of pystone modue --- scripts/external_libs/dpkt-1.8.6/dpkt/sip.py | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 scripts/external_libs/dpkt-1.8.6/dpkt/sip.py (limited to 'scripts/external_libs/dpkt-1.8.6/dpkt/sip.py') diff --git a/scripts/external_libs/dpkt-1.8.6/dpkt/sip.py b/scripts/external_libs/dpkt-1.8.6/dpkt/sip.py new file mode 100644 index 00000000..398eab8a --- /dev/null +++ b/scripts/external_libs/dpkt-1.8.6/dpkt/sip.py @@ -0,0 +1,32 @@ +# $Id: sip.py 48 2008-05-27 17:31:15Z yardley $ + +"""Session Initiation Protocol.""" + +import http + +class Request(http.Request): + """SIP request.""" + __hdr_defaults__ = { + 'method':'INVITE', + 'uri':'sip:user@example.com', + 'version':'2.0', + 'headers':{ 'To':'', 'From':'', 'Call-ID':'', 'CSeq':'', 'Contact':'' } + } + __methods = dict.fromkeys(( + 'ACK', 'BYE', 'CANCEL', 'INFO', 'INVITE', 'MESSAGE', 'NOTIFY', + 'OPTIONS', 'PRACK', 'PUBLISH', 'REFER', 'REGISTER', 'SUBSCRIBE', + 'UPDATE' + )) + __proto = 'SIP' + +class Response(http.Response): + """SIP response.""" + __hdr_defaults__ = { + 'version':'2.0', + 'status':'200', + 'reason':'OK', + 'headers':{ 'To':'', 'From':'', 'Call-ID':'', 'CSeq':'', 'Contact':'' } + } + __proto = 'SIP' + + -- cgit 1.2.3-korg