Index: include/libroar/caps.h
===================================================================
--- include/libroar/caps.h	(revision 4708)
+++ include/libroar/caps.h	(revision 5149)
@@ -52,4 +52,6 @@
 };
 
+const struct roar_stds * libroar_libstds(void);
+
 int roar_caps_to_msg(struct roar_message * mes,  struct roar_caps    * caps, void ** data);
 int roar_caps_from_msg(struct roar_caps  * caps, struct roar_message * mes,  void  * data);
Index: libroar/caps.c
===================================================================
--- libroar/caps.c	(revision 4944)
+++ libroar/caps.c	(revision 5149)
@@ -36,4 +36,12 @@
 #include "libroar.h"
 
+const struct roar_stds * libroar_libstds(void) {
+ static const uint32_t std[] = {
+  ROAR_STD_MAKE(ROAR_STDV_ROARAUDIO, 0, 0)  // ra-msg-v0
+ };
+ static const struct roar_stds stds = {.stds_len = sizeof(std)/sizeof(*std), .stds = (uint32_t*)std};
+ return &stds;
+}
+
 int roar_caps_to_msg(struct roar_message * mes,  struct roar_caps    * caps, void ** data) {
  char * datap;
@@ -116,6 +124,8 @@
   flags = 0;
 
- if ( con == NULL )
-  return -1;
+ if ( con == NULL ) {
+  roar_err_set(ROAR_ERROR_FAULT);
+  return -1;
+ }
 
  if ( out != NULL )
@@ -211,6 +221,8 @@
  struct roar_stds * ret;
 
- if ( len == 0 )
+ if ( len == 0 ) {
+  roar_err_set(ROAR_ERROR_INVAL);
   return NULL;
+ }
 
  ret = roar_mm_malloc(sizeof(struct roar_stds));
@@ -235,6 +247,8 @@
 
 int roar_stds_free(struct roar_stds * stds) {
- if ( stds == NULL )
-  return -1;
+ if ( stds == NULL ) {
+  roar_err_set(ROAR_ERROR_FAULT);
+  return -1;
+ }
 
  if ( stds->stds != NULL )
@@ -260,8 +274,14 @@
  int i;
 
+ if ( vendor == NULL ) {
+  roar_err_set(ROAR_ERROR_FAULT);
+  return -1;
+ }
+
  for (i = 0; _libroar_std_vendors[i].name != NULL; i++)
   if ( !strcasecmp(_libroar_std_vendors[i].name, vendor) )
    return _libroar_std_vendors[i].vendor;
 
+ roar_err_set(ROAR_ERROR_NOENT);
  return -1;
 }
@@ -274,4 +294,5 @@
    return _libroar_std_vendors[i].name;
 
+ roar_err_set(ROAR_ERROR_NOENT);
  return NULL;
 }
Index: roarclients/roarctl.c
===================================================================
--- roarclients/roarctl.c	(revision 5144)
+++ roarclients/roarctl.c	(revision 5149)
@@ -66,4 +66,5 @@
         "  --verbose   -v          - Show verbose output\n"
         "  --list-aiprofiles       - Show audio info profiles and exit\n"
+        "  --list-libstandards     - Gets list of library (libroar) supported standards\n"
         "  --enum-servers          - Show a list of possible servers\n"
        );
@@ -128,4 +129,5 @@
         "\n"
         "  serverstandards         - Gets list of server supported standards\n"
+        "  libstandards            - Gets list of library (libroar) supported standards\n"
         "\n"
         "  listclients             - Gets Information about clients\n"
@@ -295,15 +297,9 @@
 }
 
-void server_standards (struct roar_connection * con) {
- struct roar_stds * stds;
+static void print_stds (const struct roar_stds * stds) {
  size_t i;
  int vendor, standard, version;
  char numbuf[2][8];
  const char * vendor_name;
-
- if ( roar_caps_stds(con, &stds, NULL, -1) == -1 ) {
-  fprintf(stderr, "Error: can not get server standards\n");
-  return;
- }
 
  for (i = 0; i < stds->stds_len; i++) {
@@ -327,4 +323,21 @@
   printf("Server standard       : %s-%i%s\n", vendor_name, standard, numbuf[1]);
  }
+}
+
+void server_standards (struct roar_connection * con) {
+ struct roar_stds * stds;
+
+ if ( roar_caps_stds(con, &stds, NULL, -1) == -1 ) {
+  fprintf(stderr, "Error: can not get server standards\n");
+  return;
+ }
+
+ print_stds(stds);
+
+ roar_stds_free(stds);
+}
+
+void lib_standards (void) {
+ print_stds(libroar_libstds());
 }
 
@@ -1083,4 +1096,7 @@
    list_aiprofiles();
    return 0;
+  } else if ( strcmp(k, "--list-libstandards") == 0 ) {
+   lib_standards();
+   return 0;
   } else if ( strcmp(k, "--enum-servers") == 0 ) {
    enum_servers();
@@ -1186,4 +1202,6 @@
   } else if ( !strcmp(k, "serverstandards") ) {
    server_standards(&con);
+  } else if ( !strcmp(k, "libstandards") ) {
+   lib_standards();
   } else if ( !strcmp(k, "listclients") ) {
    list_clients(&con);
