Debugging DBus Ted Gould Device Sprint Oct 2014

Slides:



Advertisements
Similar presentations
STRING AN EXAMPLE OF REFERENCE DATA TYPE. 2 Primitive Data Types  The eight Java primitive data types are:  byte  short  int  long  float  double.
Advertisements

CSCI 1730 April 1 st, Materials Class notes slides & some “plain old” html & source code examples linked from course calendar board notes & diagrams.
Chapter 15 : Attacking Compiled Applications Alexis Kirat - International Student.
Computer Science 1620 Other Data Types. Quick Review: checklist for performing user input: 1) Be sure variable is declared 2) Prompt the user for input.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
Inter Process Communication:  It is an essential aspect of process management. By allowing processes to communicate with each other: 1.We can synchronize.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
Client Server Model The client machine (or the client process) makes the request for some resource or service, and the server machine (the server process)
Data Representation Kieran Mathieson. Outline Digital constraints Data types Integer Real Character Boolean Memory address.
Data Exchange Packet switching  Packet switching breaks data in to packets before sending it through a network, then reassembles it at the other end –
Chapter 2 Network Models Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Networks. ProtocolMeaningApplication DNSDomain Name System (Server)Translates domain names such as ocr.org.uk into IP Addresses TLS/SSLTransport Layer.
Characteristics of Communication Systems
Internet Addresses. Universal Identifiers Universal Communication Service - Communication system which allows any host to communicate with any other host.
Networks – Network Architecture Network architecture is specification of design principles (including data formats and procedures) for creating a network.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
Local-Area-Network (LAN) Architecture Department of Computer Science Southern Illinois University Edwardsville Fall, 2013 Dr. Hiroshi Fujinoki
Networking Tutorial Special Interest Group for Software Engineering Luke Rajlich.
Transport Layer3-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
1 Simple Input/Output  C++ offers the iostream library, which defines a system of character-oriented Input/Output (I/O) using object oriented programming.
Socket Programming Lab 1 1CS Computer Networks.
Socket Programming Introduction. Socket Definition A network socket is one endpoint in a two-way communication flow between two programs running over.
IP addresses IPv4 and IPv6. IP addresses (IP=Internet Protocol) Each computer connected to the Internet must have a unique IP address.
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
Matlab Data types, input and output. Data types Char: >> a = ‘ Jim ’ Char: >> a = ‘ Jim ’ Numeric: uint8, uint16, uint32, uint64 int8, int16, int32, int64.
Protocol Layering Chapter 11.
Chapter One Lesson Three DATA TYPES ©
 Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory. 
Sudeshna Sarkar, IIT Kharagpur 1 Programming and Data Structure Sudeshna Sarkar Lecture 3.
1.3 The ZigBee application framework Jae Shin Lee.
Java Programming Language Lecture27- An Introduction.
1 ENERGY 211 / CME 211 Lecture 3 September 26, 2008.
Distributed Systems1 Socket API  The socket API is an Interprocess Communication (IPC) programming interface originally provided as part of the Berkeley.
3.1 Objects. Data type. Set of values and operations on those values. Primitive/Built-In types. n Usually single values n Can build arrays but they can.
D-Bus with Perl Emmanuel Rodriguez Vienna What is D-Bus? ● A message bus system (IPC) – Influenced by KDE's DCOP – Language independent (C/C++,
DBus, PolicyKit and YaST Modern Technologies in Linux Ing. Ladislav Slezák Novell.
D-Bus and Friends: Making Linux “Just Work” on the Desktop John (J5) Palmieri Desktop Engineer
An Introduction F2f CES2017 Integration Workshop Yokohama
Introduction to Networks
Chapter 5 Network and Transport Layers
JavaIOC Overview and Update
User Interaction and Variables
Data Representation.
How Computers Store Variables
Java Coding – part 2 David Davenport Computer Eng. Dept.,
Click to edit Master subtitle style
Chapter 3 Internet Applications and Network Programming
Session 1 - Introduction
Layered Architectures
Understand Computer Storage and Data Types
Java package classes Java package classes.
CT1303 LAN Rehab AlFallaj.
CS703 - Advanced Operating Systems
XML-RPC a lightweight data communication protocol
Programming in C Input / Output.
Human Interface Devices
Programming in C Input / Output.
Chapter 6 Variables What is VBScript?
.Net Programming with C#
XML-RPC.
Bob Tabor | Microsoft Azure Fundamentals: Data Understanding Microsoft Azure Storage Queues Bob Tabor |
ECE 544 Project3 Team member: BIAO LI, BO QU, XIAO ZHANG 1 1.
C++ Data Types Data Type
CS 3700 Networks and Distributed Systems
Data Types Imran Rashid CTO at ManiWeber Technologies.
Java Programming Review 1
B065: PROGRAMMING Variables 1.
Java Programming Language
Section 6 Primitive Data Types
Presentation transcript:

Debugging DBus Ted Gould Device Sprint Oct 2014

What is DBus? Simple Message Bus Divided into System/Session instances De facto IPC for services on Ubuntu

DBus Message key values description type signal, method_call, method_return, error How the message behaves sender Address in the form :0.1 Who the message originated from interface String in the reverse domain form (com.canonical.foo) Chooses which interface the client is expecting to use (next slide) member string Select which part of the interface to use path String in the form /foo/bar Provides a way for services to provide multiple end points to clients destination Address (typically unset for signals) Provides routing suggestions to the DBus daemon payload Serialized data Let's talk about this in a slide or two

DBus Interfaces <?xml version="1.0" encoding="UTF-8" ?> <node name="/org/freedesktop/Notifications"> <interface name="org.freedesktop.Notifications"> <method name="Notify"> <arg type="s" name="app_name" direction="in" /> <arg type="u" name="id" direction="in" /> <arg type="s" name="icon" direction="in" /> <arg type="s" name="summary" direction="in" /> <arg type="s" name="body" direction="in" /> <arg type="as" name="actions" direction="in" /> <arg type="a{sv}" name="hints" direction="in" /> <arg type="i" name="timeout" direction="in" /> <arg type="u" name="return_id" direction="out" /> </method> <method name="CloseNotification"> </interface> </node>

DBus Types For Payloads Character Type y 8-bit unsigned integer b boolean n 16-bit signed integer q 16-bit unsigned integer i 32-bit signed integer u 32-bit unsigned integer x 64-bit signed integer t 64-bit unsigned integer d double-precision floating point s UTF8 string (no embedded null) o DBus object path a Array v Variant h Unix file descriptor ( ) Structure (i.e. a(ss), a(iisv), a(sa(ss)inqay)

DBus Introspection $ gdbus call --session --dest org.freedesktop.Notifications --object-path /org/freedesktop/Notifications --method org.freedesktop.DBus.Introspectable.Introspec t ('<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"\n"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">\n<node>\n <interface name="org.freedesktop.DBus.Introspectable">\n <method name="Introspect">\n <arg name="data" direction="out" type="s"/>\n </method>\n </interface>\n <interface name="org.freedesktop.DBus.Properties">\n <method name="Get">\n <arg name="interface" direction="in" type="s"/>\n <arg name="propname" direction="in" type="s"/>\n <arg name="value" direction="out" type="v"/>\n </method>\n <method name="Set">\n <arg name="interface" direction="in" type="s"/>\n <arg name="propname" direction="in" type="s"/>\n <arg name="value" direction="in" type="v"/>\n </method>\n <method name="GetAll">\n <arg name="interface" direction="in" type="s"/>\n <arg name="props" direction="out" type="a{sv}"/>\n </method>\n </interface>\n <interface name="org.freedesktop.Notifications">\n <method name="GetServerInformation">\n <arg name="return_name" type="s" direction="out"/>\n <arg name="return_vendor" type="s" direction="out"/>\n <arg name="return_version" type="s" direction="out"/>\n <arg name="return_spec_version" type="s" direction="out"/>\n </method>\n <method name="GetCapabilities">\n <arg name="return_caps" type="as" direction="out"/>\n </method>\n <method name="CloseNotification">\n <arg name="id" type="u" direction="in"/>\n </method>\n <method name="Notify">\n <arg name="app_name" type="s" direction="in"/>\n <arg name="id" type="u" direction="in"/>\n <arg name="icon" type="s" direction="in"/>\n <arg name="summary" type="s" direction="in"/>\n <arg name="body" type="s" direction="in"/>\n <arg name="actions" type="as" direction="in"/>\n <arg name="hints" type="a{sv}" direction="in"/>\n <arg name="timeout" type="i" direction="in"/>\n <arg name="return_id" type="u" direction="out"/>\n </method>\n </interface>\n</node>\n',)

DBus Monitor $ dbus-monitor interface=org.freedesktop.Notifications method call sender=:1.156 -> dest=:1.59 serial=6 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=GetServerInformation method call sender=:1.156 -> dest=:1.59 serial=7 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify string "notify-send" uint32 0 string "" string "example" array [ ] dict entry( string "urgency" variant byte 1 ) int32 -1

Bustle $ bustle-pcap test.bustle Logging D-Bus traffic to 'test.bustle'... Hit Control-C to stop logging. $ bustle test.bustle

D-Feet (Introspection)

D-Feet (Method Call)