GithubHelp home page GithubHelp logo

isabella232 / node-zoneid Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tritondatacenter/node-zoneid

0.0 0.0 0.0 124 KB

Binding for illumos zone-related library functions

License: MIT License

Python 2.77% JavaScript 43.73% C++ 53.50%

node-zoneid's Introduction

zoneid: Binding for illumos zone-related library functions

This package exposes the following libc functions on illumos systems:

#include <zone.h>

zoneid_t getzoneid(void);
zoneid_t getzoneidbyname(const char *name);
ssize_t getzonenamebyid(zoneid_t id, char *buf, size_t buflen);

For details on these functions, see getzoneid(3c).

Synopsis

Here's an example use:

var mod_assert = require('assert');
var mod_zoneid = require('zoneid');

var myzoneid = mod_zoneid.getzoneid();
var myzonename = mod_zoneid.getzonenamebyid(myzoneid);

console.log(myzoneid);
console.log(myzonename);
mod_assert.equal(myzoneid, mod_zoneid.getzoneidbyname(myzonename));

In the global zone, this prints:

0
global

In a non-global zone, this could print:

71
a2cf54c9-ec0d-412d-b40d-d38c6092b114

node-zoneid's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.