Basic specifications and definitions.
The address family is one of
No other address family is supported.
A connection is an object that describes a network communication between UPnP™ nodes. It is a unicast link or a multicast link. One of the connections properties is either socket type SOCK_STREAM
or SOCK_DGRAM
. Other types are not supported. A connection is a member of the connections container.
This is a C++ container object that contains connections.
Retrieves UPnP device and service descriptions, sends actions to services, polls for service state variables, and receives events from services.
Because Dependency Injection is used by GoogleMock for the Unit Tests I will note its four roles for unique nomenclature.
The services that a client requires are the client's dependencies.
This is a connection that follows the network multicast specification. It has one local socket and a number of remote sockets that are interested to receive UPnP™ messages. It uses stateless UDP datagrams as given by its sockets of type SOCK_DGRAM
.
This is a string of an IPv4 or IPv6 internet network address as described at Wikipedia IP address. A complete netaddress consists of ip address and port number. A netaddress without port has the port number 0. Examples are
"[2001:db8:1234:5678:9abc:def0:1234:5678]:56789" "[2001:db8::1]:59877" "[2001:db8::2]" same as "[2001:db8::2]:" and "[2001:db8::2]:0" "192.168.123.234:56789" "192.168.1.2" same as "192.168.1.2:" and "192.168.1.2:0"
Surounding brackets define a numeric IPv6 (AF_INET6) address. The numeric IPv6 address part must always be surrounded by [] otherwise it cannot be unique with a port number. Without brackets an address will be treated as alphanumeric (if no hints given to be numeric), even if it looks like an IPv6 numeric address. Then it may trigger an expensive DNS lookup.
Special cases are:
A netaddress and a socket address are equivalent, contain the same information and can be converted into one another.
The port number is part of the netaddress. It specifies a specific service provided by a host with the ip address as defined by the POSIX standard. Port 0 has a special meaning and represents the unknown port. A not given port number is coded with the zero port number.
This SDK reffers to Linux implementations of POSIX threads NPTL (Native POSIX Threads Library) inclusive "pthread rwlock", that all is based on the POSIX.1 specification.
The default response timeout is 30 seconds.
The UPnP™ Device Architecture 2.0 specifies for several different responses a default timeout of 30 seconds. In summary, this SDK uses a timeout of 30 seconds by default for responses if nothing others noted.
A UPnP device that is not embedded in any other UPnP device.
Logical functional unit. Smallest units of control. Exposes actions and models the state of a UPnP device with state variables.
If nothing others said, with socket I mean a network socket. It is an endpoint for a network communication as given by the POSIX specification and in the library it is an object. One of its properties is a protocol family either PF_INET6
or PF_INET
or PF_UNSPEC
(if unbound). Other types are not supported. A free socket will bind to the ip address of a local network interface and must have the same socket type SOCK_STREAM
or SOCK_DGRAM
as given by the connection it will be get part of. A socket must have only one of these two types and is mainly instantiated with information from CAddrinfo.
These are trivial address structures used by sockets and defined by the POSIX standard, depending on the address family. The structures are summarized in a union:
The socket address is the union sockaddr_t
and has always the sizeof(::sockaddr_storage)
that is able to hold all other structures. For further information about ussage of this union have a look at sockaddr structures as union. A socket address and a netaddress are equivalent, contain the same information and can be converted into one another.
This is a main property of a connection. It is either SOCK_STREAM
for a stateful TCP connection or SOCK_DGRAM
for a stateless UDP datagram connection. A socket as endpoint of a connection must have the same socket type property as the connection.
This is a connection with exactly two sockets, each on its endpoints, a local and a remote one. The local socket will bind to a local network interface socket address, the remote one will be accepted. It uses a stateful TCP stream as given by its sockets of type SOCK_STREAM
.
A C++ container object that embeds one or more services and advertises its presence on network(s). It may also embed other UPnP devices. It may also represent a network node that serves at least a root device.
This is a UPnP device or a control point.
This is a virtual directory of the HTTP website presented by the internal webserver. It is not a directory of the filesystem on the physical local storage so we call it a virtual directory. You register the web root directory of the local website with UpnpSetWebServerRootDir(). Its subdirectories are managed by the internal webserver that uses callback funtions for it. Its addresses are stored in VirtualDirCallbacks.