Skip to content

Commit

Permalink
Rename ipset → libcorkipset
Browse files Browse the repository at this point in the history
`ipset` is pretty generic, and already taken.  Arch and Debian both
renamed this to libcorkipset, so that's what we'll do too!

I've cleaned up the header files a bit; the main one is now installed as
<libcork/ipset.h> instead of <libcorkipset/ipset.h>, which is what's
used in the current Arch and Debian packages.  I've kept a copy
available at the old location, with a deprecation warning telling you
about the new location.
  • Loading branch information
dcreager committed Nov 11, 2017
1 parent c6f3f11 commit 6842a63
Show file tree
Hide file tree
Showing 43 changed files with 124 additions and 109 deletions.
2 changes: 1 addition & 1 deletion .buzzy/package.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ipset
name: libcorkipset
build_dependencies:
- pkg-config
- check >= 0.9.4
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# ----------------------------------------------------------------------

cmake_minimum_required(VERSION 2.6)
set(PROJECT_NAME ipset)
set(PROJECT_NAME libcorkipset)
set(RELEASE_DATE 2013-12-11)
project(${PROJECT_NAME})
enable_testing()
Expand Down
8 changes: 4 additions & 4 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
Installation instructions
=========================

The ipset library is written in ANSI C. It uses cmake as its build
The libcorkipset library is written in ANSI C. It uses cmake as its build
manager.


Prerequisite libraries
----------------------

To build ipset, you need the following libraries installed on your
To build libcorkipset, you need the following libraries installed on your
system:

* pkg-config
* libcork (https://github.com/redjack/libcork)
* libcork (https://github.com/dcreager/libcork)
* check (http://check.sourceforge.net)


Building from source
--------------------

The ipset library uses cmake as its build manager. In most cases, you
The libcorkipset library uses cmake as its build manager. In most cases, you
should be able to build the source code using the following:

$ mkdir build
Expand Down
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://img.shields.io/travis/redjack/ipset/develop.svg)](https://travis-ci.org/redjack/ipset)

The ipset library provides C data types for storing sets of IP
The libcorkipset library provides C data types for storing sets of IP
addresses, and maps of IP addresses to integers. It supports both
IPv4 and IPv6 addresses. It's implemented using [Binary Decision
Diagrams](http://en.wikipedia.org/wiki/Binary_decision_diagram)
Expand Down
2 changes: 1 addition & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ add_c_executable(
LIBRARIES
libcork
LOCAL_LIBRARIES
libipset
libcorkipset
)
2 changes: 1 addition & 1 deletion examples/ipv4-set-size.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <time.h>

#include <libcork/core.h>
#include <ipset/ipset.h>
#include <libcork/ipset.h>


static inline void
Expand Down
9 changes: 4 additions & 5 deletions include/ipset/ipset.h → include/libcork/ipset.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@
* ----------------------------------------------------------------------
*/

#ifndef IPSET_IPSET_H
#define IPSET_IPSET_H
#ifndef LIBCORK_IPSET_H
#define LIBCORK_IPSET_H

#include <stdio.h>

#include <libcork/core.h>
#include <libcork/ds.h>

#include <ipset/bdd/nodes.h>
#include <libcork/ipset/nodes.h>


struct ip_set {
Expand Down Expand Up @@ -261,4 +260,4 @@ int
ipmap_ip_get(struct ip_map *map, struct cork_ip *addr);


#endif /* IPSET_IPSET_H */
#endif /* LIBCORK_IPSET_H */
6 changes: 3 additions & 3 deletions include/ipset/bits.h → include/libcork/ipset/bits.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* ----------------------------------------------------------------------
*/

#ifndef IPSET_BITS_H
#define IPSET_BITS_H
#ifndef LIBCORK_IPSET_BITS_H
#define LIBCORK_IPSET_BITS_H

#include <libcork/core.h>

Expand Down Expand Up @@ -54,4 +54,4 @@
| ((val)? IPSET_BIT_ON_MASK(i): 0))


#endif /* IPSET_BITS_H */
#endif /* LIBCORK_IPSET_BITS_H */
6 changes: 3 additions & 3 deletions include/ipset/errors.h → include/libcork/ipset/errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* ----------------------------------------------------------------------
*/

#ifndef IPSET_ERRORS_H
#define IPSET_ERRORS_H
#ifndef LIBCORK_IPSET_ERRORS_H
#define LIBCORK_IPSET_ERRORS_H


#include <libcork/core.h>
Expand All @@ -27,4 +27,4 @@ enum ipset_error {
};


#endif /* IPSET_ERRORS_H */
#endif /* LIBCORK_IPSET_ERRORS_H */
6 changes: 3 additions & 3 deletions include/ipset/logging.h → include/libcork/ipset/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* ----------------------------------------------------------------------
*/

#ifndef IPSET_LOGGING_H
#define IPSET_LOGGING_H
#ifndef LIBCORK_IPSET_LOGGING_H
#define LIBCORK_IPSET_LOGGING_H


#if !defined(IPSET_DEBUG)
Expand All @@ -27,4 +27,4 @@
#endif


#endif /* IPSET_LOGGING_H */
#endif /* LIBCORK_IPSET_LOGGING_H */
6 changes: 3 additions & 3 deletions include/ipset/bdd/nodes.h → include/libcork/ipset/nodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
* ----------------------------------------------------------------------
*/

#ifndef IPSET_BDD_NODES_H
#define IPSET_BDD_NODES_H
#ifndef LIBCORK_IPSET_NODES_H
#define LIBCORK_IPSET_NODES_H


#include <stdio.h>
Expand Down Expand Up @@ -532,4 +532,4 @@ void
ipset_bdd_iterator_advance(struct ipset_bdd_iterator *iterator);


#endif /* IPSET_BDD_NODES_H */
#endif /* LIBCORK_IPSET_NODES_H */
16 changes: 16 additions & 0 deletions include/libcorkipset/ipset.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* -*- coding: utf-8 -*-
* ----------------------------------------------------------------------
* Copyright © 2017, libcorkipset authors
* All rights reserved.
*
* Please see the COPYING file in this distribution for license details.
* ----------------------------------------------------------------------
*/

#ifndef LIBCORKIPSET_IPSET_H
#define LIBCORKIPSET_IPSET_H

#warning "<libcorkipset/ipset.h> is deprecated; use <libcork/ipset.h> instead"
#include <libcork/ipset.h>

#endif /* LIBCORKIPSET_IPSET_H */
50 changes: 25 additions & 25 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,30 @@
# [1] http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html#Updating-version-info

add_c_library(
libipset
OUTPUT_NAME ipset
PKGCONFIG_NAME ipset
libcorkipset
OUTPUT_NAME corkipset
PKGCONFIG_NAME libcorkipset
VERSION_INFO 2:0:1
SOURCES
libipset/general.c
libipset/bdd/assignments.c
libipset/bdd/basics.c
libipset/bdd/bdd-iterator.c
libipset/bdd/expanded.c
libipset/bdd/reachable.c
libipset/bdd/read.c
libipset/bdd/write.c
libipset/map/allocation.c
libipset/map/inspection.c
libipset/map/ipv4_map.c
libipset/map/ipv6_map.c
libipset/map/storage.c
libipset/set/allocation.c
libipset/set/inspection.c
libipset/set/ipv4_set.c
libipset/set/ipv6_set.c
libipset/set/iterator.c
libipset/set/storage.c
libcorkipset/general.c
libcorkipset/bdd/assignments.c
libcorkipset/bdd/basics.c
libcorkipset/bdd/bdd-iterator.c
libcorkipset/bdd/expanded.c
libcorkipset/bdd/reachable.c
libcorkipset/bdd/read.c
libcorkipset/bdd/write.c
libcorkipset/map/allocation.c
libcorkipset/map/inspection.c
libcorkipset/map/ipv4_map.c
libcorkipset/map/ipv6_map.c
libcorkipset/map/storage.c
libcorkipset/set/allocation.c
libcorkipset/set/inspection.c
libcorkipset/set/ipv4_set.c
libcorkipset/set/ipv6_set.c
libcorkipset/set/iterator.c
libcorkipset/set/storage.c
LIBRARIES
libcork
)
Expand All @@ -71,21 +71,21 @@ add_c_executable(
OUTPUT_NAME ipsetbuild
SOURCES ipsetbuild/ipsetbuild.c
LOCAL_LIBRARIES
libipset
libcorkipset
)

add_c_executable(
ipsetcat
OUTPUT_NAME ipsetcat
SOURCES ipsetcat/ipsetcat.c
LOCAL_LIBRARIES
libipset
libcorkipset
)

add_c_executable(
ipsetdot
OUTPUT_NAME ipsetdot
SOURCES ipsetdot/ipsetdot.c
LOCAL_LIBRARIES
libipset
libcorkipset
)
2 changes: 1 addition & 1 deletion src/ipsetbuild/ipsetbuild.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include <libcork/core.h>

#include "ipset/ipset.h"
#include "libcork/ipset.h"


static char *output_filename = NULL;
Expand Down
2 changes: 1 addition & 1 deletion src/ipsetcat/ipsetcat.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include <libcork/core.h>

#include "ipset/ipset.h"
#include "libcork/ipset.h"


static char *input_filename = NULL;
Expand Down
2 changes: 1 addition & 1 deletion src/ipsetdot/ipsetdot.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include <libcork/core.h>

#include "ipset/ipset.h"
#include "libcork/ipset.h"


static char *input_filename = NULL;
Expand Down
8 changes: 4 additions & 4 deletions src/ipset.pc.in → src/libcorkipset.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ exec_prefix=${prefix}
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
sharedir=${prefix}/share
sphinxdir=${sharedir}/doc/ipset/html
sphinxdir=${sharedir}/doc/libcorkipset/html

Name: ipset
Name: libcorkipset
Description: Library for storing IP sets and maps
Version: @VERSION@
URL: http://github.com/dcreager/ipset/
URL: https://github.com/dcreager/libcorkipset/
Requires: libcork >= 0.12.0
Libs: -L${libdir} -lipset
Libs: -L${libdir} -lcorkipset
Cflags: -I${includedir}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include <libcork/core.h>

#include "ipset/bdd/nodes.h"
#include "libcork/ipset/nodes.h"


struct ipset_assignment *
Expand Down
6 changes: 3 additions & 3 deletions src/libipset/bdd/basics.c → src/libcorkipset/bdd/basics.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

#include <libcork/core.h>

#include "ipset/bdd/nodes.h"
#include "ipset/bits.h"
#include "ipset/logging.h"
#include "libcork/ipset/bits.h"
#include "libcork/ipset/logging.h"
#include "libcork/ipset/nodes.h"


void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

#include <libcork/core.h>

#include "ipset/bdd/nodes.h"
#include "ipset/logging.h"
#include "libcork/ipset/logging.h"
#include "libcork/ipset/nodes.h"


/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

#include <libcork/core.h>

#include "ipset/bdd/nodes.h"
#include "ipset/bits.h"
#include "ipset/logging.h"
#include "libcork/ipset/bits.h"
#include "libcork/ipset/logging.h"
#include "libcork/ipset/nodes.h"


static void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include <libcork/core.h>
#include <libcork/ds.h>

#include "ipset/bdd/nodes.h"
#include "ipset/logging.h"
#include "libcork/ipset/logging.h"
#include "libcork/ipset/nodes.h"


size_t
Expand Down
6 changes: 3 additions & 3 deletions src/libipset/bdd/read.c → src/libcorkipset/bdd/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#include <libcork/ds.h>
#include <libcork/helpers/errors.h>

#include "ipset/bdd/nodes.h"
#include "ipset/errors.h"
#include "ipset/logging.h"
#include "libcork/ipset/errors.h"
#include "libcork/ipset/logging.h"
#include "libcork/ipset/nodes.h"


static const char MAGIC_NUMBER[] = "IP set";
Expand Down
4 changes: 2 additions & 2 deletions src/libipset/bdd/write.c → src/libcorkipset/bdd/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#include <libcork/core.h>
#include <libcork/helpers/errors.h>

#include "ipset/bdd/nodes.h"
#include "ipset/logging.h"
#include "libcork/ipset/logging.h"
#include "libcork/ipset/nodes.h"


/*-----------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/libipset/general.c → src/libcorkipset/general.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

#include <libcork/core.h>

#include "ipset/bdd/nodes.h"
#include "ipset/ipset.h"
#include "libcork/ipset.h"
#include "libcork/ipset/nodes.h"


int
Expand Down
Loading

0 comments on commit 6842a63

Please sign in to comment.