KDK_LOCATION_GET(3) Library Functions Manual KDK_LOCATION_GET(3)

kdk_loaction_get - 获取本地地址信息

#include <libkylocation.h>

extern char *kdk_loaction_get();

Link with -lkylocation.

The main function of the interface is to obtain local address information.

On success, returns the address information in JSON format of type char *.

On error, return NULL.

#include "stdio.h"
#include "libkylocation.h"
int main()
{
    printf("location: %s", kdk_loaction_get());
    return 0;
}

These functions are as per the withdrawn POSIX.1e draft specification.

Thu Sep 14 2023 Linux Programmer's Manual