Code Monkey home page Code Monkey logo

libnica's Introduction

DISCONTINUATION OF PROJECT

This project will no longer be maintained by Intel.

Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project.

Intel no longer accepts patches to this project.

If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the open source software community, please create your own fork of this project.

Contact: [email protected] libnica

Build Status Coverage Status

DISCLAIMER

This library is undergoing an active development cycle. It is currently being developed in tandem with multiple projects, and as such the ABI and API should be considered currently unstable.

Scheduled changes:

  • Thread pool
  • Timing tests on all data types (and relevant improvements)
  • N-ary tree addition
  • List API changes
  • Move from C99 to C11
  • Thread-safe APIs (Atomic)
  • Improved file access functions
  • mmap helpers (RAII based)
  • Improved INI parser (lex-based w/ line continuation)
  • Fold in cve-check-tool changes/additions
  • Potential:
    • Fold in the templating mini-lib from new cve-check-tool
    • Simplified networking access (retaining underlying transparency)

Common C library functions

Lightweight library containing common functionality of typical "C utility libs".

Currently contains:

  • Dynamic array
  • List type
  • Simplified file manipulation functions (mkdir_p, rm_rf, etc)
  • A Hashmap implementation
  • A simple, efficient, INI File parser
  • Safe string manipulation functions for when strlen is out of the question

The majority of the API is designed to work on a RAII principle, using scope-based autofree helpers (see util.h) with minimal fuss.

Another important principle to keep in mind while hacking on libnica, is that memory leaks of any description in a successful usage, are forbidden. This includes any "possibly lost" memory through static initialisation as seen with heavier libraries.

License

LGPL-2.1

Copyright (C) 2014-2016 Intel Corporation

libnica's People

Contributors

anselmolsm avatar bryteise avatar ikeydoherty avatar rdower avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

libnica's Issues

Start documentation

Add, at minimum, a Doxyen system to document the API, with real-world examples

Create proper filesystem APIs

A common pitfall in C programs that require filesystem manipulation, is actually testing them.

An example of this, and the biggest consumer of Nica, is clr-boot-manager. It has to go around
in circles to create fake roots, mock the content, and skip many important feature tests because
it would be dangerous to actually test them.

This is where we need real filesystem mocking.
The Nica APIs will provide the nc_fs namespace for all filesystem operations. Additionally, this will be achieved with an OOPish design, with each implementation handled with a simple vtable struct, kernel style.

There should be two implementations, the NativeFS, and the MemoryFS. The NativeFS will essentially be a pass through to native APIs, performing real operations.

The MemoryFS will provide an emulated filesystem. The operations only affect the backing story in memory, allowing for useful mocking, i.e. creation of fake VFS, etc.

Prepare for first release

There are a few more "bare minimums" that need to be added to the library before we can do a "version 1":

  • List type (needs work!)
  • More string management functions (ala cve_string)
  • Add a pkg-config file
  • Install headers to a subdirectory ($includedir/nica ?)
  • Basic common file management functions
  • ABI versioned library
  • Find a non-stupid name

Consuming json data feeds instead of xml

NVD is now offering a BETA release for a new vulnerability data feed using the JSON format. According to them, these JSON feeds are intended to supplant the XML feeds.

Is there any plan to consume json feeds instead of xml feeds ?

Upstream the clr-boot-manager features

clr-boot-manager has a whole bunch of really nice APIs, which should be in libnica itself

Notably:

  • CbmWriter - a failsafe memstream based stream writer ✓
  • CbmMappedFile - a very simple mechanism for working with mapped files (with autofrees) ✓
  • File manipulation functions (atomic copies, etc) ✓
  • A trivial log mechanism (expand this to be libraryfied) ✓
  • Better string functions (string_printf) ✓

Perhaps:

  • Filesystem APIs which allow overriding the process-space vtable for all file ops? Enables easy, safe mocking (would be nice)
  • Port the cmdline reader into a generic config reader? Especially with the *.d/*.conf support (very low priority, ideally just nice "read this thing" APIs) (meh. maybe)

Add n-ary tree

Pretty obvious really. Likely candidate for name being NcNode

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.