automatic generation of network protocol gateways
play

Automatic Generation of Network protocol gateways David Bromberg, - PowerPoint PPT Presentation

Automatic Generation of Network protocol gateways David Bromberg, Laurent Rveillre, Julia Lawall and Gilles Muller LaBRI University of Bordeaux Ubiquitous environment 2 LaBRI Heterogeneous protocols 3 LaBRI Gateways for providing


  1. Automatic Generation of Network protocol gateways David Bromberg, Laurent Réveillère, Julia Lawall and Gilles Muller LaBRI – University of Bordeaux

  2. Ubiquitous environment 2 LaBRI

  3. Heterogeneous protocols 3 LaBRI

  4. Gateways for providing interoperability Translation logic 4 LaBRI

  5. Huge set of interaction protocols DAP TLS POP CHARGEN SLP DSP DNS IAMC SSIP RTP STOMP DELTA 9P STUN SSH CCSO GOPHER CFDP THRIFT SIMPLE MGCP SMTP IIOP GTP SNMP NNTP RTSP ALSP DIS PINT BTP ENRP IMAP DAYTIME NTP AMQP SIP XMPP FTP HTTP SMB APPC RTCP RMI SOAP 5 LaBRI

  6. Binary protocols DAP TLS POP CHARGEN SLP DSP DNS IAMC SSIP RTP STOMP DELTA 9P STUN SSH CCSO GOPHER CFDP THRIFT SIMPLE MGCP SMTP IIOP GTP SNMP NNTP RTSP ALSP DIS PINT BTP ENRP IMAP DAYTIME NTP AMQP SIP XMPP FTP HTTP SMB APPC RTCP RMI SOAP 6 LaBRI

  7. Textual protocols DAP TLS POP CHARGEN SLP DSP DNS IAMC SSIP RTP STOMP DELTA 9P STUN SSH CCSO GOPHER CFDP THRIFT SIMPLE MGCP SMTP IIOP GTP SNMP NNTP RTSP ALSP DIS PINT BTP ENRP IMAP DAYTIME NTP AMQP SIP XMPP FTP HTTP SMB APPC RTCP RMI SOAP 7 LaBRI

  8. XML protocols POP CHARGEN IAMC SSIP STOMP CCSO GOPHER SIMPLE MGCP SMTP NNTP RTSP PINT BTP IMAP DAYTIME SIP XMPP FTP HTTP SOAP 8 LaBRI

  9. Other protocol characteristics NNTP IMAP FTP ….. ….. ….. ….. SNMP ….. ….. POP SMTP ….. SIP ….. ….. RTSP HTTP Synchronous Asynchronous HTTP …. …. IMAP FTP ….. ….. ….. ….. ….. ….. …. POP RTSP …. SLP SMTP ….. ….. ….. Multicast Unicast 9 LaBRI

  10. Developing a gateway  Challenging task requiring  knowledge of the protocols involved  substantial understanding of low-level network programming  A gateway must take into account  the different degrees of expressiveness of the different protocols  the range of communication methods used by the protocols  the need of the various protocols to maintain state across multiple messages 10 LaBRI

  11. Mismatched protocol expressiveness  One single SIP request  multiple RTSP messages SIP RTSP RTSP agent SIP agent SIP to RTSP Gateway 11 LaBRI

  12. Mismatched protocol expressiveness  RTSP requests send synchronously using separate TCP connections  SIP responses returned asynchronously over UDP SIP RTSP RTSP agent SIP agent SIP to RTSP Gateway Unicast / asynchronous Unicast / synchronous 12 LaBRI

  13. Heterogeneous communication  One protocol on the left  several protocols on the right SLP SSDP HTTP SLP agent UPnP service SLP to UPnP Gateway 13 LaBRI

  14. Heterogeneous communication  Different communication schemes  Unicast / Multicast SLP SSDP HTTP SLP agent UPnP service SLP to UPnP Gateway 14 LaBRI

  15. Heterogeneous communication  Different communication schemes  Unicast / Multicast  Synchronous / Asynchronous SLP SSDP Asynchronous HTTP SLP agent UPnP service SLP to UPnP Synchronous Gateway Asynchronous 15 LaBRI

  16. Session management  Multiple SMTP messages flow within the same TCP stream  gateways need to manage a state SMTP over TCP SMTP over TCP HTTP over UDP TCP Stream TCP Stream … … … SMTP HTTP to SMTP SMTP SMTP to HTTP agent Gateway server Gateway Unicast sync. Unicast async. Unicast sync. 16 LaBRI

  17. Open issue Protocol specification Code & translation semantics 17 LaBRI

  18. Our approach High level specifications Verification • Consistency checks Code generation • Dataflow analyses Translation engine Runtime system 18 LaBRI

  19. z2z : an umbrella of DSLs  Protocol specification language (PSL)  How to interact with the network to send or receive messages  Message specification language (MSL)  Defines a view from an incoming message  Defines templates to forge new messages  Message translation language (MTL)  Defines a set of handlers (one for each relevant request in the source protocol)  C-like notation augmented with domain-specific operators 19 LaBRI

  20. Z2Z by example http.msl http.psl slp2upnp.mtl slp.msl slp.psl ssdp.msl ssdp.psl 20 LaBRI

  21. Protocol Specification (SLP) http.msl http.psl slp2upnp.mtl slp.msl slp.psl ssdp.msl ssdp.psl 21 LaBRI

  22. Protocol Specification (SLP) slp.psl Information about interaction protocol slp { with the network attributes { transport = udp / 427; mode = async / multicast; group = 239.255 .255 .253; } request req { response SrvReq when req.function_id == 1; … } Requests that should be sending response resp ( request req) { handled by the gateway // according to RFC 2608 resp.xid = req.xid; How to identify a transaction: resp.url_len = strlen(resp.url); Response associated to a request … } Protocol-specific information that flow { xid } … all messages must contain } 22 LaBRI

  23. Message Specification (SLP) http.msl http.psl slp.msl slp.msl slp2upnp.mtl slp.psl slp.psl ssdp.msl ssdp.psl 23 LaBRI

  24. Message Specification (SLP) slp.msl message slp { read { mandatory private int function_id; mandatory private int xid; optional public int url_count; optional public fragment list urls; optional public fragment scope; optional public fragment service_type; optional public fragment predicate; } Message View Interface of ad-hoc message parser  Select information useful for the gateway  } 24 LaBRI

  25. Message Specification (SLP) http.msl http.psl slp2upnp.mtl slp.msl slp.psl ssdp.msl ssdp.psl 25 LaBRI

  26. Message Specification (SLP) slp.msl message slp { read { … } reponse binary template srvReply { magic = ″ foo ″; private int16 total_len; private int16 url_len; Binary Template private int16 xid private int16 lifetime; Expressed as a sequence of hexadecimal values  public fragment url; Holes fields with values fields  −− foo Response Template 02 02 00 <%total len%> 20 00 00 00 00 Similar to a message view  <%xid%> 00 02 65 6e 00 00 00 01 00 All field are mandatory  <%lifetime%> <%url len%> <%url%> 00 00 Private fields are filled in sending block (psl)  −− foo Public fields must be filled in MTL  } } 26 LaBRI

  27. Message Specification (SSDP) http.msl http.psl slp.msl slp.msl slp2upnp.mtl slp.psl ssdp.msl ssdp.msl ssdp.psl 27 LaBRI

  28. Message Specification (SSDP) ssdp.msl message ssdp { read { … } request template response Search { magic = " foo "; newline = "\r\n"; public int mx; public fragment st; −− foo M-SEARCH * HTTP/1.1 ST: <%st%> MX: <%mx%> MAN: "ssdp:discover" HOST: 239.255.255.250:1900 −− foo } } 28 LaBRI

  29. Message Translation (SLP 2 UPnP) http.msl http.psl slp.msl slp2upnp.mtl slp2upnp.mtl slp.psl ssdp.msl ssdp.msl ssdp.psl 29 LaBRI

  30. Message Translation  Defines a set of handlers  One for each relevant request in the source protocol  Handlers written using a C-like notation augmented with domain-specific operators for  Manipulating messages  Forging messages  Sending requests (target protocol)  Returning responses (source protocol)  Session managment 30 LaBRI

  31. Message Translation Slp2upnp.mtl slp response SrvReq ( slp request s) { SrvReq Handler Parametrized by a view of the request  Information in the view extracted using  structure field access notation } 31 LaBRI

  32. Message Translation Slp2upnp.mtl slp response SrvReq ( slp request s) { ssdp response res_ssdp; ssdp message search_ssdp; http response res_http; search_ssdp = Search(mx= 3, st="upnp:rootdevice")); New messages forged by invoking a template (Search)  Public fields must be initialized before sending the message  } 32 LaBRI

  33. Message Translation Slp2upnp.mtl slp response SrvReq ( slp request s) { ssdp response res_ssdp; ssdp message search_ssdp; http response res_http; search_ssdp = Search(mx= 3, st="upnp:rootdevice")); res_ssdp = send (search_ssdp); Sending a request (multicast send) Execution pauses until a response is received  Semantic preserved regardless of the sync/async properties  } 33 LaBRI

  34. Message Translation Slp2upnp.mtl slp response SrvReq ( slp request s) { ssdp response res_ssdp; ssdp message search_ssdp; http response res_http; search_ssdp = Search(mx= 3, st="upnp:rootdevice")); res_ssdp = send (search_ssdp); Receiving a ssdp response (unicast response) Execution resumed  } 34 LaBRI

  35. Message Translation Slp2upnp.mtl slp response SrvReq ( slp request s) { ssdp response res_ssdp; ssdp message search_ssdp; Sending a request (unicast send) http response res_http; HTTP Get message generated and sent  search_ssdp = Search(mx= 3, st="upnp:rootdevice")); Response received synchronously (no continuation)  res_ssdp = send (search_ssdp); res_http = send (Get(path = res_ssdp.location_path, ip = res_ssdp.location_ip, port = res_ssdp.location_port)); } 35 LaBRI

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend