---
name: "lo_lowlevel.h"
section: "3"
platform: "linux"
package: "liblo"
version: "1:0.36-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/lo_lowlevel.h"
---

# lo\_lowlevel.h(3)

## NAME

lo\_lowlevel.h

## SYNOPSIS

### Data Structures

struct **lo\_server\_config**\
 A configuration struct for initializing **lo\_server** using **lo\_server\_new\_from\_config()**.

### Typedefs

typedef long double **lo\_hires**\
 Type used to represent numerical values in conversions between OSC types.

### Enumerations

enum **lo\_slip\_encoding** \
 Used with **lo\_address\_set\_stream\_slip()** to specify whether sent messages should be encoded with SLIP, and whether the encoding should be single- or double-ENDed.

### Functions

int **lo\_send\_message** (**lo\_address** targ, const char \*path, **lo\_message** msg)\
 Send a **lo\_message** object to target targ.  int **lo\_send\_message\_from** (**lo\_address** targ, **lo\_server** serv, const char \*path, **lo\_message** msg)\
 Send a **lo\_message** object to target targ from address of serv.  int **lo\_send\_bundle** (**lo\_address** targ, **lo\_bundle** b)\
 Send a **lo\_bundle** object to address targ.  int **lo\_send\_bundle\_from** (**lo\_address** targ, **lo\_server** serv, **lo\_bundle** b)\
 Send a **lo\_bundle** object to address targ from address of serv.  **lo\_message** **lo\_message\_new** (void)\
 Create a new **lo\_message** object.  void **lo\_message\_incref** (**lo\_message** m)\
 Add one to a message's reference count.  int **lo\_message\_decref** (**lo\_message** m)\
 Subtract one from a message's reference count.  **lo\_message** **lo\_message\_clone** (**lo\_message** m)\
 Create a new **lo\_message** object by cloning an already existing one.  void **lo\_message\_free** (**lo\_message** m)\
 Free memory allocated by **lo\_message\_new()** and any subsequent **lo\_message\_add\_int32** lo\_message\_add\*() calls.  void **lo\_message\_clear** (**lo\_message** m)\
 Clear elements from a **lo\_message** but do not free allocated memory.  int **lo\_message\_add** (**lo\_message** m, const char \*types,...)\
 Append a number of arguments to a message.  int **lo\_message\_add\_varargs** (**lo\_message** m, const char \*types, va\_list ap)\
 Append a varargs list to a message.  int **lo\_message\_add\_int32** (**lo\_message** m, int32\_t a)\
 Append a data item and typechar of the specified type to a message.  int **lo\_message\_add\_float** (**lo\_message** m, float a)\
 Append a data item and typechar of the specified type to a message. See **lo\_message\_add\_int32()** for details.  int **lo\_message\_add\_string** (**lo\_message** m, const char \*a)\
 Append a data item and typechar of the specified type to a message. See **lo\_message\_add\_int32()** for details.  int **lo\_message\_add\_blob** (**lo\_message** m, **lo\_blob** a)\
 Append a data item and typechar of the specified type to a message. See **lo\_message\_add\_int32()** for details.  int **lo\_message\_add\_int64** (**lo\_message** m, int64\_t a)\
 Append a data item and typechar of the specified type to a message. See **lo\_message\_add\_int32()** for details.  int **lo\_message\_add\_timetag** (**lo\_message** m, **lo\_timetag** a)\
 Append a data item and typechar of the specified type to a message. See **lo\_message\_add\_int32()** for details.  int **lo\_message\_add\_double** (**lo\_message** m, double a)\
 Append a data item and typechar of the specified type to a message. See **lo\_message\_add\_int32()** for details.  int **lo\_message\_add\_symbol** (**lo\_message** m, const char \*a)\
 Append a data item and typechar of the specified type to a message. See **lo\_message\_add\_int32()** for details.  int **lo\_message\_add\_char** (**lo\_message** m, char a)\
 Append a data item and typechar of the specified type to a message. See **lo\_message\_add\_int32()** for details.  int **lo\_message\_add\_midi** (**lo\_message** m, uint8\_t a\[4\])\
 Append a data item and typechar of the specified type to a message. See **lo\_message\_add\_int32()** for details.  int **lo\_message\_add\_true** (**lo\_message** m)\
 Append a data item and typechar of the specified type to a message. See **lo\_message\_add\_int32()** for details.  int **lo\_message\_add\_false** (**lo\_message** m)\
 Append a data item and typechar of the specified type to a message. See **lo\_message\_add\_int32()** for details.  int **lo\_message\_add\_nil** (**lo\_message** m)\
 Append a data item and typechar of the specified type to a message. See **lo\_message\_add\_int32()** for details.  int **lo\_message\_add\_infinitum** (**lo\_message** m)\
 Append a data item and typechar of the specified type to a message. See **lo\_message\_add\_int32()** for details.  **lo\_address** **lo\_message\_get\_source** (**lo\_message** m)\
 Returns the source (**lo\_address**) of an incoming message.  **lo\_timetag** **lo\_message\_get\_timestamp** (**lo\_message** m)\
 Returns the timestamp (**lo\_timetag** \*) of a bundled incoming message.  char \* **lo\_message\_get\_types** (**lo\_message** m)\
 Return the message type tag string.  int **lo\_message\_get\_argc** (**lo\_message** m)\
 Return the message argument count.  **lo\_arg** \*\* **lo\_message\_get\_argv** (**lo\_message** m)\
 Return the message arguments. Do not free the returned data.  size\_t **lo\_message\_length** (**lo\_message** m, const char \*path)\
 Return the length of a message in bytes.  void \* **lo\_message\_serialise** (**lo\_message** m, const char \*path, void \*to, size\_t \*size)\
 Serialise the **lo\_message** object to an area of memory and return a pointer to the serialised form. Opposite of **lo\_message\_deserialise()**.  **lo\_message** **lo\_message\_deserialise** (void \*data, size\_t size, int \*result)\
 Deserialise a raw OSC message and return a new **lo\_message** object. Opposite of **lo\_message\_serialise()**.  int **lo\_server\_dispatch\_data** (**lo\_server** s, void \*data, size\_t size)\
 Dispatch a raw block of memory containing an OSC message.  const char \* **lo\_address\_get\_hostname** (**lo\_address** a)\
 Return the hostname of a **lo\_address** object.  const char \* **lo\_address\_get\_port** (**lo\_address** a)\
 Return the port/service name of a **lo\_address** object.  int **lo\_address\_get\_protocol** (**lo\_address** a)\
 Return the protocol of a **lo\_address** object.  char \* **lo\_address\_get\_url** (**lo\_address** a)\
 Return a URL representing an OSC address.  void **lo\_address\_set\_ttl** (**lo\_address** t, int ttl)\
 Set the Time-to-Live value for a given target address.  int **lo\_address\_get\_ttl** (**lo\_address** t)\
 Get the Time-to-Live value for a given target address.  int **lo\_address\_set\_iface** (**lo\_address** t, const char \*iface, const char \*ip)\
 Set the network interface to use for a given target address.  const char \* **lo\_address\_get\_iface** (**lo\_address** t)\
 Get the name of the network interface assigned to an OSC address.  int **lo\_address\_set\_tcp\_nodelay** (**lo\_address** t, int enable)\
 Set the TCP\_NODELAY flag on outgoing TCP connections.  int **lo\_address\_set\_stream\_slip** (**lo\_address** t, **lo\_slip\_encoding** encoding)\
 Set outgoing stream connections (e.g., TCP) to be transmitted using the SLIP packetizing protocol.  **lo\_bundle** **lo\_bundle\_new** (**lo\_timetag** tt)\
 Create a new bundle object.  void **lo\_bundle\_incref** (**lo\_bundle** b)\
 Add one to a bundle's reference count.  int **lo\_bundle\_add\_message** (**lo\_bundle** b, const char \*path, **lo\_message** m)\
 Adds an OSC message to an existing bundle.  int **lo\_bundle\_add\_bundle** (**lo\_bundle** b, **lo\_bundle** n)\
 Adds an OSC bundle to an existing bundle.  size\_t **lo\_bundle\_length** (**lo\_bundle** b)\
 Return the length of a bundle in bytes.  unsigned int **lo\_bundle\_count** (**lo\_bundle** b)\
 Return the number of top-level elements in a bundle.  **lo\_element\_type** **lo\_bundle\_get\_type** (**lo\_bundle** b, int index)\
 Gets the element type contained within a bundle.  **lo\_bundle** **lo\_bundle\_get\_bundle** (**lo\_bundle** b, int index)\
 Gets a nested bundle contained within a bundle.  **lo\_message** **lo\_bundle\_get\_message** (**lo\_bundle** b, int index, const char \*\*path)\
 Gets a message contained within a bundle.  **lo\_timetag** **lo\_bundle\_get\_timestamp** (**lo\_bundle** b)\
 Get the timestamp associated with a bundle.  void **lo\_bundle\_set\_timestamp** (**lo\_bundle** b, **lo\_timetag** t)\
 Get the timestamp associated with a bundle.  void \* **lo\_bundle\_serialise** (**lo\_bundle** b, void \*to, size\_t \*size)\
 Serialise the bundle object to an area of memory and return a pointer to the serialised form.  void **lo\_bundle\_clear** (**lo\_bundle** b)\
 Clear elements from a **lo\_bundle** but do not free allocated memory.  void **lo\_bundle\_free** (**lo\_bundle** b)\
 Frees the memory taken by a bundle object.  void **lo\_bundle\_free\_recursive** (**lo\_bundle** b)\
 Frees the memory taken by a bundle object and its messages and nested bundles recursively.  void **lo\_bundle\_free\_messages** (**lo\_bundle** b)\
 Obsolete, use lo\_bundle\_free\_recursive instead.  int **lo\_is\_numerical\_type** (**lo\_type** a)\
 Return true if the type specified has a numerical value, such as LO\_INT32, LO\_FLOAT etc.  int **lo\_is\_string\_type** (**lo\_type** a)\
 Return true if the type specified has a textual value, such as LO\_STRING or LO\_SYMBOL.  int **lo\_coerce** (**lo\_type** type\_to, **lo\_arg** \*to, **lo\_type** type\_from, **lo\_arg** \*from)\
 Attempt to convert one OSC type to another.  **lo\_hires** **lo\_hires\_val** (**lo\_type** type, **lo\_arg** \*p)\
 Return the numerical value of the given argument with the maximum native system precision.  **lo\_server** **lo\_server\_new** (const char \*port, **lo\_err\_handler** err\_h)\
 Create a new server instance.  **lo\_server** **lo\_server\_new\_with\_proto** (const char \*port, int proto, **lo\_err\_handler** err\_h)\
 Create a new server instance, specifying protocol.  **lo\_server** **lo\_server\_new\_multicast** (const char \*group, const char \*port, **lo\_err\_handler** err\_h)\
 Create a new server instance, and join a UDP multicast group.  **lo\_server** **lo\_server\_new\_multicast\_iface** (const char \*group, const char \*port, const char \*iface, const char \*ip, **lo\_err\_handler** err\_h)\
 Create a new server instance, and join a UDP multicast group, optionally specifying which network interface to use. Note that usually only one of iface or ip are specified.  **lo\_server** **lo\_server\_new\_from\_url** (const char \*url, **lo\_err\_handler** err\_h)\
 Create a new server instance, taking port and the optional multicast group IP from an URL string.  **lo\_server** **lo\_server\_new\_from\_config** (**lo\_server\_config** \*config)\
 Create a new server instance, using a configuration struct.  int **lo\_server\_enable\_coercion** (**lo\_server** server, int enable)\
 Enables or disables type coercion during message dispatch.  void **lo\_server\_free** (**lo\_server** s)\
 Free up memory used by the **lo\_server** object.  int **lo\_server\_wait** (**lo\_server** s, int timeout)\
 Wait for an OSC message to be received.  int **lo\_servers\_wait** (**lo\_server** \*s, int \*status, int num\_servers, int timeout)\
 Wait on multiple servers for an OSC message to be received.  int **lo\_server\_recv\_noblock** (**lo\_server** s, int timeout)\
 Look for an OSC message waiting to be received.  int **lo\_servers\_recv\_noblock** (**lo\_server** \*s, int \*recvd, int num\_servers, int timeout)\
 Look for an OSC message waiting to be received on multiple servers.  int **lo\_server\_recv** (**lo\_server** s)\
 Block, waiting for an OSC message to be received.  **lo\_method** **lo\_server\_add\_method** (**lo\_server** s, const char \*path, const char \*typespec, **lo\_method\_handler** h, const void \*user\_data)\
 Add an OSC method to the specifed server.  void **lo\_server\_del\_method** (**lo\_server** s, const char \*path, const char \*typespec)\
 Delete an OSC method from the specified server.  int **lo\_server\_del\_lo\_method** (**lo\_server** s, **lo\_method** m)\
 Delete a specific OSC method from the specified server.  int **lo\_server\_add\_bundle\_handlers** (**lo\_server** s, **lo\_bundle\_start\_handler** sh, **lo\_bundle\_end\_handler** eh, void \*user\_data)\
 Add bundle notification handlers to the specified server.  int **lo\_server\_get\_socket\_fd** (**lo\_server** s)\
 Return the file descriptor of the server socket.  int **lo\_server\_get\_port** (**lo\_server** s)\
 Return the port number that the server has bound to.  int **lo\_server\_get\_protocol** (**lo\_server** s)\
 Return the protocol that the server is using.  char \* **lo\_server\_get\_url** (**lo\_server** s)\
 Return an OSC URL that can be used to contact the server.  int **lo\_server\_enable\_queue** (**lo\_server** s, int queue\_enabled, int dispatch\_remaining)\
 Toggle event queue. If queueing is enabled, timetagged messages that are sent in advance of the current time will be put on an internal queue, and they will be dispatched at the indicated time. By default, queueing is enabled. Use this function to disable it, if it is desired to have a server process messages immediately. In that case, use **lo\_message\_get\_timestamp()** to get the message timestamp from within a method handler.  int **lo\_server\_events\_pending** (**lo\_server** s)\
 Return true if there are scheduled events (eg. from bundles) waiting to be dispatched by the server.  double **lo\_server\_next\_event\_delay** (**lo\_server** s)\
 Return the time in seconds until the next scheduled event.  int **lo\_server\_max\_msg\_size** (**lo\_server** s, int req\_size)\
 Set the maximum message size accepted by a server.  char \* **lo\_url\_get\_protocol** (const char \*url)\
 Return the protocol portion of an OSC URL, eg. udp, tcp.  int **lo\_url\_get\_protocol\_id** (const char \*url)\
 Return the protocol ID of an OSC URL.  char \* **lo\_url\_get\_hostname** (const char \*url)\
 Return the hostname portion of an OSC URL.  char \* **lo\_url\_get\_port** (const char \*url)\
 Return the port portion of an OSC URL.  char \* **lo\_url\_get\_path** (const char \*url)\
 Return the path portion of an OSC URL.  int **lo\_strsize** (const char \*s)\
 A function to calculate the amount of OSC message space required by a C char \*.  uint32\_t **lo\_blobsize** (**lo\_blob** b)\
 A function to calculate the amount of OSC message space required by a **lo\_blob** object.  int **lo\_pattern\_match** (const char \*str, const char \*p)\
 Test a string against an OSC pattern glob.  int **lo\_string\_contains\_pattern** (const char \*str)\
 Test if a string contains any OSC pattern characters.  double **lo\_timetag\_diff** (**lo\_timetag** a, **lo\_timetag** b)\
 Find the time difference between two timetags.  void **lo\_timetag\_now** (**lo\_timetag** \*t)\
 Return a timetag for the current time.  size\_t **lo\_arg\_size** (**lo\_type** type, void \*data)\
 Return the storage size, in bytes, of the given argument.  char \* **lo\_get\_path** (void \*data, ssize\_t size)\
 Given a raw OSC message, return the message path.  void **lo\_arg\_host\_endian** (**lo\_type** type, void \*data)\
 Convert the specified argument to host byte order where necessary.  void **lo\_arg\_network\_endian** (**lo\_type** type, void \*data)\
 Convert the specified argument to network byte order where necessary.  void **lo\_bundle\_pp** (**lo\_bundle** b)\
 Pretty-print a **lo\_bundle** object.  void **lo\_message\_pp** (**lo\_message** m)\
 Pretty-print a **lo\_message** object.  void **lo\_arg\_pp** (**lo\_type** type, void \*data)\
 Pretty-print a set of typed arguments.  void **lo\_server\_pp** (**lo\_server** s)\
 Pretty-print a **lo\_server** object.  void **lo\_method\_pp** (**lo\_method** m)\
 Pretty-print a **lo\_method** object.  void **lo\_method\_pp\_prefix** (**lo\_method** m, const char \*p)\
 Pretty-print a **lo\_method** object, but prepend a given prefix to all field names.

## Detailed Description

The liblo headerfile defining the low-level API functions.

Definition in file **lo\_lowlevel.h**.

## Author

Generated automatically by Doxygen for liblo from the source code.
