Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want to use LXC to 'container' plugins my application is loading. Am I able to do this through C? I have been Googling a lot about it, but there don't seem to be any headers, only scripts that can be called through the terminal.

I know I can execute the scripts inside C, but I'd rather use the headers if there are any.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

If you look at the LXC homepage, you'll notice liblxc referred to, implying there's an ABI, and if you look further down, you'll notice a link to the C API documentation.

That page looks empty at first because it has been done (rather lazily, I think) with doxygen. However, if you start clicking around you'll find stuff. Just keep in mind, again, that it's auto-generated from source and perhaps not a huge effort was put into annotating that in a doxygen friendly way. Another perhaps confusing thing is all the actual functions are documented via function pointers in data structures (looks like an OO-ish interface).

But if you already know how to use LXC on the command line you should be able to deduce some correlations.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.