UPnPsdk 0.1
Universal Plug and Play +, Software Development Kit
 
Loading...
Searching...
No Matches
Glossary

Basic specifications and definitions.


address family

The address family is one of

  • AF_UNSPEC for an unspecified or unknown address family
  • AF_INET6 for the IPv6 protocol stack, that is default used
  • AF_INET for the IPv4 protocol stack

No other address family is supported.

connection

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.

connections

This is a C++ container object that contains connections.

control point

Retrieves UPnP device and service descriptions, sends actions to services, polls for service state variables, and receives events from services.

dependency injection

Because Dependency Injection is used by GoogleMock for the Unit Tests I will note its four roles for unique nomenclature.

  • The di-service object to be injected.
  • The di-client object which depends on the service(s) being injected.
  • The di-interface through which the client object uses the service(s).
  • The di-injector which injects the service(s) into the client.

The services that a client requires are the client's dependencies.

IPv6 addresses

  • LLA: Link-Local Addresses may have a scope id "%n" appended, e.g. "[fe80::1%1]", that usually is the local network interface index number.
  • ULA: Unicast Local Addresses, Unique Local Addresses or Site-Local Unicast Addresses are deprecated due to RFC 4291 - section 2.5.7. and not supported by this SDK. New implementations must treat this prefix as Global Unicast.
  • GUA: Global Unicast Addresses or Global Unique Addresses.

multicast link

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.

netaddress, netaddr

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:

  • "[]" - This is an invalid numeric or alphanumeric IPv6 address name because there is already a well defined unspecified numeric IPv6 (AF_INET6) network address given with "[::]" and an alphanumeric name cannot start with '['. And of course it is never any kind of IPv4 address. Long story short it's general an invalid network address.
  • "" - This is an unspecified (AF_UNSPEC) network address with all attributes unspecified. It may be "[::]:0" or "0.0.0.0:0".

A netaddress and a socket address are equivalent, contain the same information and can be converted into one another.

port

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.

POSIX threads, pthreads

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.

response timeout

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.

root device

A UPnP device that is not embedded in any other UPnP device.

service

Logical functional unit. Smallest units of control. Exposes actions and models the state of a UPnP device with state variables.

socket

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.

socket address, sockaddr

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:

union sockaddr_t {
::sockaddr_storage ss;
::sockaddr_in6 sin6;
::sockaddr_in sin;
::sockaddr sa;
};

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.

socket type, socktype

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.

unicast link

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.

UPnP Device

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.

UPnP Unit

This is a UPnP device or a control point.

WEB Directory, webdir

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.