Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

c-capnproto sync-up merge #4

Open
wants to merge 178 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
178 commits
Select commit Hold shift + click to select a range
859ab61
Add capn.a target
Feb 5, 2014
f0dc17c
Static capnpc-c
Feb 5, 2014
322aa16
Ignore capn.a
Feb 5, 2014
68340f8
Implement serialization to buffers
Feb 21, 2014
89f1ac3
Merge remote-tracking branch 'urbit/master'
Feb 24, 2014
823a820
Initialize x and y unconditionally
Feb 26, 2014
cb26aea
Add padding to preserve alignment on 32-bit systems
Feb 26, 2014
1d79a28
Fixed: missing terminating ' character
johandc Mar 25, 2014
1eb82b0
Added install target
johandc Mar 25, 2014
bf5eb7f
Added gtest 1.6.0, since the included version lacked the headers
johandc Mar 25, 2014
d84a635
Fixed compilation by removing 32-bit padding
johandc Mar 25, 2014
4cc7785
Added eclipse output files to git ignore
johandc Mar 25, 2014
20bd625
Fix build
baruch Aug 3, 2014
54ca88f
Simpler makefile
baruch Aug 3, 2014
8a33a18
Add a README.md file
baruch Aug 3, 2014
d785521
Recompile capnpc schemas for capnpc 0.4
baruch Aug 3, 2014
49483a6
Forego updating sz in capn_write_mem
baruch Aug 4, 2014
0071546
Add comments
baruch Aug 6, 2014
a46581a
Move initialization closer to use
baruch Aug 6, 2014
24ec009
Use constants where possible
baruch Aug 6, 2014
a83769f
Fix use of wrong offset in buffer
baruch Aug 6, 2014
440c662
Implement packed memory write
baruch Aug 6, 2014
2bdc5c4
Implement capn_write_fd
baruch Aug 7, 2014
232cef8
some compile cleanup
gs640 Jan 4, 2015
c653dda
added symlink to gtest-all-test
gs640 Jan 4, 2015
9fe7167
gtest: Use system gtest and pthread libs
kylemanna Aug 18, 2015
7d2e122
signedness: Fix obvious sign problems
kylemanna Aug 18, 2015
5b3e8f1
test: Remove unused variables
kylemanna Aug 18, 2015
e933510
compiler: Fix missing comments
kylemanna Aug 18, 2015
376b63f
signedness: Fix less obvious issues
kylemanna Aug 18, 2015
6ebba52
capn: Avoid uninitialized values
kylemanna Aug 18, 2015
6ebc068
gtest: use installed package, drop files
eqvinox Feb 28, 2016
d87beb1
gtest: use installed package, drop files
eqvinox Feb 28, 2016
da77dcc
Partial revert "all: use unsigned types for more variables that repre…
eqvinox Feb 28, 2016
0ddba4f
Merge branch 'baruch' into merge
eqvinox Feb 28, 2016
aeeae64
Revert "gtest: Use system gtest and pthread libs"
eqvinox Feb 28, 2016
02268ff
Merge branch 'kylemanna' into merge
eqvinox Feb 28, 2016
b55d847
Re-fix signed/unsigned warnings
eqvinox Feb 28, 2016
06f6e98
Tag 640Labs as merged
eqvinox Feb 28, 2016
ae746a3
add approprate per-file license headers
eqvinox Feb 28, 2016
56753b0
fold 2 readme files
eqvinox Feb 28, 2016
34f150d
Update merged forks
eqvinox Feb 28, 2016
89818b0
tack on autoconf/automake build
eqvinox Feb 28, 2016
b18d178
Remove "script" spec from travis.yml
eqvinox Feb 28, 2016
663cfe2
Update Travis icon URL
eqvinox Feb 28, 2016
c02d6d5
Fix up Travis CI
eqvinox Feb 28, 2016
c92a985
Fix Travis CI even more...
eqvinox Feb 28, 2016
48ab119
Travis CI: whatever.
eqvinox Feb 28, 2016
332076e
Fix empty-object pointers
eqvinox Mar 8, 2016
4146290
lib: fix warning on uint16->enum cast
eqvinox Mar 18, 2016
d3b1cad
compiler: regenerate schema.c with enum/int cast
eqvinox Mar 18, 2016
811d304
rename to "[lib]capnp_c", use lib/ subdir
eqvinox Mar 18, 2016
9335126
gtest: integrate as git submodule
eqvinox Mar 18, 2016
c2faf4e
tests: move into tests/ subdir
eqvinox Mar 18, 2016
b18dc3d
include README.md in dist tarball
eqvinox Mar 18, 2016
00eaeeb
lib: fix API
eqvinox Mar 18, 2016
3f91416
add & install pkgconfig file
eqvinox Mar 18, 2016
7ecadef
compiler: fix remaining warnings
eqvinox Mar 18, 2016
4de69a5
test.schema: drop interface & generic, regenerate
eqvinox Mar 18, 2016
e626b3f
README: fix travis link
eqvinox Mar 18, 2016
b58fa3b
c-capnproto 0.1 release
eqvinox Mar 18, 2016
e870b5d
generate setter and getter
mikegarts Mar 27, 2016
61a43a4
static const instead of function in size getters
mikegarts Mar 29, 2016
bf2c598
uint8_t cast
mikegarts Mar 29, 2016
90c3473
support set of non terminated string (with len)
mikegarts Apr 6, 2016
e9df12b
don't write out empty structs
eqvinox Apr 6, 2016
cee25a3
Add build instructions
lilith Apr 27, 2016
a15accf
Merge pull request #3 from nathanaeljones/patch-1
eqvinox Apr 27, 2016
12ad949
working with stricter compiler flags
mikegarts Apr 28, 2016
ec9bb14
compile time endianess check, faster on little endian cpus
mikegarts Apr 28, 2016
1d5a2c8
include fix
mikegarts May 5, 2016
05f5884
add u to avoid undefined shl
mikegarts May 5, 2016
8d0ccbe
Define ssize_t for MSVC
lilith May 11, 2016
8f37e0f
Define default value for char *e
lilith May 11, 2016
27df3d6
Align capn_segment to 64-bit boundaries on MSVC
lilith May 11, 2016
0e850b1
Merge pull request #4 from mikegarts/short.circuit.endian
eqvinox Jun 22, 2016
2b15c6c
Merge pull request #5 from mikegarts/working.with.stricter.compilers
eqvinox Jun 22, 2016
1c0652d
Merge branch 'pullreq-6' (dropped ms_c_capnproto/)
eqvinox Jun 22, 2016
48535d0
whitespace fixes
eqvinox Jun 22, 2016
b3b83e0
lib: make endian check more platform-friendly
eqvinox Jun 22, 2016
0abd16d
lib: try GCC builtins for endian byteswap
eqvinox Jun 22, 2016
1afce95
lib: endianness: don't break strict-aliasing
eqvinox Jun 22, 2016
87591da
Update autogenerated files
eqvinox Jun 22, 2016
5d787b6
compiler: add "C::nameinfix" annotation
eqvinox Jun 22, 2016
3059f4d
lib: make capn_inflate() work with unaligned data
eqvinox Jun 27, 2016
0b12856
tests: duplicate stream tests in packed variant
eqvinox Jun 27, 2016
33ae16b
lib: don't overrun buffer in capn_write_mem_packed
eqvinox Jun 27, 2016
f2058f6
lib: make capn_{de,in}flate + capn_stream private
eqvinox Jun 27, 2016
97f30c5
build: fix filename
eqvinox Jun 27, 2016
81352b0
Revert "lib: endianness: don't break strict-aliasing"
eqvinox Jun 30, 2016
52ca907
compiler: add find_node_mayfail(), remove hack
eqvinox Jul 19, 2016
da663f8
compiler: add annotation to enable field get/set
eqvinox Jul 19, 2016
c322bc9
compiler: apply name infix on include filenames
eqvinox Jul 19, 2016
54a7bb7
compiler: drop outdated find_node comment & IDs
eqvinox Jul 20, 2016
75f7901
c-capnproto 0.2 release
eqvinox Jul 20, 2016
de5a960
Drop gtest submodule and use system one.
aballier Jun 6, 2016
c628547
Drop gtest directory
aballier Jun 6, 2016
7b7346a
lib: make buf arg const in write_fd pointer
ThirteenFish Aug 7, 2016
de11757
Ensure capn segment is aligned properly when build with gcc too. Fixe…
aballier Aug 2, 2016
95d81bc
Use proper format specifiers for size_t.
aballier Aug 2, 2016
f16fae5
Fix GCC warnings in initializers for capn_val0 and capn_seg.
Mar 22, 2017
55b958c
Merge pull request #14 from fluffysquirrels/master
eqvinox Mar 22, 2017
462f6eb
Merge pull request #12 from ThirteenFish/master
eqvinox Mar 22, 2017
0be6206
Fix compiler warnings and errors in GCC.
Mar 22, 2017
1b25eae
Fix runtime library compiler warnings and errors in GCC.
Mar 22, 2017
ef88fd8
Fixed some issues raised by eqvinox in pull request.
Mar 23, 2017
a93ae12
.gitignore .dirstamp files created during the build.
Mar 23, 2017
57d0ffe
Remove UNUSED(x) macro. No longer needed.
Mar 23, 2017
408505a
8 byte alignment on capn_segment, updated comments about this.
Mar 23, 2017
49031ea
Merge pull request #15 from fluffysquirrels/master
eqvinox Mar 23, 2017
3621730
compiler: If an explicit symbol wasn't provided, make generated capn_…
Mar 23, 2017
29a1342
Example usage in unit test.
Mar 23, 2017
e32a85b
Fix build errors in tests/example-test.cpp.
Mar 24, 2017
5a282f6
Add extra files to Makefile.am.
Mar 24, 2017
6b52d61
Add all .capnp files to `make dist` archive.
Mar 26, 2017
a379aa8
Compiler generates absolute #include paths from .capnp imports with l…
Mar 26, 2017
73b5d56
Make task `capnp-compile` to compile from .capnp files in the project.
Mar 26, 2017
989acc3
Most .capnp files use "/c.capnp".fieldgetset. Recompile from schema f…
Mar 26, 2017
531eefc
Rewrite tests/example-test.cpp to use addressbook example from capnpr…
Mar 27, 2017
f7cd568
Add comiler/c.capnp.h to Makefile.am noinst_HEADERS.
Mar 27, 2017
9530312
Add example that uses accessor functions.
Mar 27, 2017
a80f245
Add some missing capn_free() calls to the example test.
Mar 30, 2017
4380d28
Add URL for original addressbook example; example to assert list leng…
Apr 2, 2017
7c81906
Merge branch 'pull/16'
eqvinox Apr 5, 2017
c802ad3
Support creation of struct lists with size 0
jlferrer May 17, 2017
e0d1c36
Resolve pointers in capn_getv*
eqvinox May 19, 2017
2330c17
Merge pull request #19 from jlferrer/fix_empty_lists
eqvinox May 19, 2017
0ffd3fd
Add stddef.h for POSIX ssize_t
eqvinox May 19, 2017
99e9412
Silence GCC unnamed union warning
eqvinox May 19, 2017
b0810da
Silence warning on unused struct parameter
eqvinox May 19, 2017
aa1f31d
Silence empty struct warning
eqvinox May 19, 2017
89dd18a
Add note in header about setting capn_data
eqvinox May 19, 2017
aab56f1
Merge branch 'issue20'
eqvinox May 19, 2017
704a34f
Use proper format specifiers for size_t.
aballier Aug 2, 2016
5cbd52e
Merge branch 'jamvideosolutions/master'
eqvinox May 19, 2017
cb30563
c-capnproto 0.3 release
eqvinox May 19, 2017
d924032
compiler: Allocate all possible space for constants
Feb 1, 2018
bd9911a
Add security warning to README.md
fluffysquirrels Apr 22, 2019
9053ebe
compiler/str.h: include stdarg.h for va_list
JoelsonCarl Oct 9, 2018
e13c143
Fix bug where enums were treated interchangeably with uint16_t.
detly Dec 28, 2020
b995a09
Add an annotation to skip including header files generated from specific
detly Jan 1, 2021
fe3a57d
Added extra line break after structure size block.
detly Jan 1, 2021
9153fc3
Add an annotation to typedef structs and enums.
detly Jan 1, 2021
6661fc9
Fix code generation for nested unions.
detly Jan 14, 2021
72efa0b
Allow field name to be 'p'.
Feb 1, 2021
86bee96
Fix FreeBSD builds
Feb 1, 2021
3c0b223
Change capn_write_mem return value from int to int64_t
QQNN-blue Feb 17, 2021
515c06c
Merge pull request #41 from detly/enum_cast
detly May 10, 2021
b619a87
Merge pull request #44 from detly/nested_unions
detly May 10, 2021
024dca6
Merge pull request #42 from detly/annotations
detly May 10, 2021
d29facc
Implemented capn_size() for dynamically calculating the required buff…
detly Dec 28, 2020
bbc208c
Simplified size calculation.
detly Dec 28, 2020
a2179f4
Make the comment for capn_size() clearer that it only applies to unpa…
detly May 10, 2021
939aa30
Merge pull request #37 from detly/write_size
detly May 10, 2021
0650ccb
Merge pull request #47 from QQNN-blue/change_capn_write_mem_return_va…
detly May 10, 2021
05482f3
Use int64_t for the return value of capn_size(). This makes it consis…
detly May 10, 2021
1772643
only generate '#include' for imports that are used
cbrune Apr 26, 2022
c70796b
add a capnp annotation for creating name spaces
cbrune Apr 26, 2022
40d6895
add 'const' keyword to generated constants
cbrune Oct 13, 2022
3385b1e
add #define definitions for integer constants
cbrune Oct 16, 2022
6eb98cb
Initial Meson build support
XVilka Apr 23, 2023
6b8e3ca
Ignore subprojects in git
XVilka Apr 23, 2023
53f6def
Add Meson building instructions in README
XVilka Apr 23, 2023
6377038
Add GitHub CI
XVilka Apr 23, 2023
b87f0ee
README: make project state clear
eqvinox Apr 23, 2023
4a39ec4
Merge pull request #46 from snar/freebsd-endian
eqvinox Apr 23, 2023
560f2c7
Merge pull request #45 from snar/p-field
eqvinox Apr 23, 2023
2116160
Merge pull request #49 from detly/capn_size_size
eqvinox Apr 23, 2023
0653675
Merge pull request #52 from cbrune/curt/namespace
eqvinox Apr 23, 2023
5c4e497
Merge pull request #53 from cbrune/curt/reduce-imports
eqvinox Apr 23, 2023
4109705
Merge pull request #54 from cbrune/curt/const
eqvinox Apr 23, 2023
32def19
Merge pull request #57 from XVilka/meson-build
eqvinox Apr 23, 2023
32520c5
Merge pull request #60 from XVilka/github-ci
eqvinox Apr 23, 2023
c79b3af
Merge pull request #24 from jlferrer/fix_compiler_big_files
eqvinox Apr 23, 2023
b2b7ade
Fix random warnings
eqvinox Apr 23, 2023
eb1839e
Fix bool defaults for non-first bit
eqvinox Apr 23, 2023
79d6035
Revert "Merge pull request #54 from cbrune/curt/const"
eqvinox Apr 23, 2023
632f0d7
Update autogenerated files
eqvinox Apr 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "CI Unit Tests"

on:
push:
branches:
- master
pull_request:

jobs:
Normal:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install meson and ninja
run: pip3 install --user meson ninja
- name: Run Unit Tests
run: |
export PATH=${HOME}/.local/bin:${PATH}
meson setup -Dbuildtype=release build
meson compile -C build
build/capn-test

Sanitizers:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install meson and ninja
run: pip3 install --user meson ninja
- name: Run Unit Tests with ASAN
env:
ASAN_OPTIONS: detect_leaks=0,detect_odr_violation=0,allocator_may_return_null=1
run: |
export PATH=${HOME}/.local/bin:${PATH}
meson setup -Dbuildtype=debugoptimized -Db_sanitize=address,undefined build
meson compile -C build
build/capn-test
35 changes: 33 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
aclocal.m4
autom4te*.cache
configure
config.h*
confdefs.h
config.status
libtool
stamp-h*

Makefile
Makefile.in
.deps
.libs
.dirstamp

test-driver
*.log
*.trs

tests/*.out

*.o
*.a
*.so
/capn-test
/capnpc-c
*.lo
*.la

capn-test
capnpc-c
c-capnproto.pc

*.tar.gz

subprojects/googletest-*
subprojects/packagecache
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "gtest"]
path = gtest
url = https://github.com/google/googletest.git
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ addons:
install:
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi

script: make
script: autoreconf -f -i -s && ./configure --without-gtest && make && make check

compiler:
- clang
Expand Down
File renamed without changes.
42 changes: 0 additions & 42 deletions Makefile

This file was deleted.

94 changes: 94 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = foreign subdir-objects

lib_LTLIBRARIES =
bin_PROGRAMS =
check_PROGRAMS =
EXTRA_DIST =
noinst_HEADERS =
include_HEADERS =


EXTRA_DIST += README.md

EXTRA_DIST += c-capnproto.pc.in
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = c-capnproto.pc

EXTRA_DIST += compiler/c.capnp
capnp_DATA = compiler/c.capnp
AM_CPPFLAGS = \
-I${srcdir}/compiler \
-I${srcdir}/lib

lib_LTLIBRARIES += libcapnp_c.la
libcapnp_c_la_LDFLAGS = -version-info 0:0:0
libcapnp_c_la_SOURCES = \
lib/capn-malloc.c \
lib/capn-stream.c \
lib/capn.c
EXTRA_DIST += \
lib/capn-list.inc

bin_PROGRAMS += capnpc-c
capnpc_c_SOURCES = \
compiler/capnpc-c.c \
compiler/schema.capnp.c \
compiler/str.c
capnpc_c_LDADD = libcapnp_c.la
include_HEADERS += \
lib/capnp_c.h

noinst_HEADERS += \
lib/capnp_priv.h \
compiler/str.h \
compiler/schema.capnp.h \
compiler/c.capnp.h \
compiler/c++.capnp.h

# Don't try to generate any *.capnp files. Otherwise make wants to compile them
# from *.capnp.c and fails.
%.capnp: ;

# googletest
GTEST_LDADD = gtest/googletest/lib/libgtest.la
gtest/googletest/lib/libgtest.la:
make -C gtest/googletest lib/libgtest.la
GTEST_CPPFLAGS = -I${srcdir}/gtest/googletest/include
DIST_SUBDIRS = gtest/googletest

# Tests
check_PROGRAMS += \
capn-test
capn_test_SOURCES = \
tests/capn-test.cpp \
tests/capn-stream-test.cpp \
tests/example-test.cpp \
tests/addressbook.capnp.c \
compiler/test.capnp.c \
compiler/schema-test.cpp \
compiler/schema.capnp.c
noinst_HEADERS += \
compiler/test.capnp.h \
tests/addressbook.capnp.h
EXTRA_DIST += \
compiler/c.capnp \
compiler/c++.capnp \
compiler/schema.capnp \
compiler/test.capnp \
tests/addressbook.capnp
capn_test_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_CPPFLAGS)
capn_test_CXXFLAGS = -std=gnu++11 -pthread
capn_test_LDADD = libcapnp_c.la $(GTEST_LDADD)
capn_test_LDFLAGS = -pthread
TESTS = capn-test

CAPNP_SCHEMA_FILES := $(shell find . -type f -name \*.capnp)

CAPNP ?= capnp
.PHONY: capnp-compile
capnp-compile:
$(CAPNP) compile \
--output=./capnpc-c \
-Icompiler \
$(CAPNP_SCHEMA_FILES)
120 changes: 120 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
capnpc-c
========

This is a C plugin for [Cap'n Proto](http://kentonv.github.io/capnproto), an
efficient protocol for sharing data and capabilities.

## UNMAINTAINED

This project is currently **NOT MAINTAINED**. If you are interested in
taking over maintenance and/or need this for some project, please look at
issue https://github.com/opensourcerouting/c-capnproto/issues/55

No releases will be made. PRs may sit unreviewed for multiple years. **PRs
MAY get merged WITHOUT ANY REVIEW, as a last ditch attempt to not waste
people's efforts on PRs. This means things may break completely.**

> ## Security warning!

> The generated code assumes all input to be trusted. Do NOT use with
> untrusted input! There is currently no code in place to check if
> structures/pointers are within bounds.

This is only the code generator plugin, to properly make use of it you
need to download, build and install capnpc and then build and install
this project and then you can utilize it as:

```sh
capnpc compiler/test.capnp -oc
```

[![Build Status](https://travis-ci.org/opensourcerouting/c-capnproto.svg?branch=master)](https://travis-ci.org/opensourcerouting/c-capnproto)

## Building on Linux

```sh
git clone --recurse-submodules https://github.com/opensourcerouting/c-capnproto
cd c-capnproto
autoreconf -f -i -s
./configure
make
make check
```

## Building with Meson

```sh
git clone --recurse-submodules https://github.com/opensourcerouting/c-capnproto
cd c-capnproto
meson setup build
meson compile -C build
build/capn-test
```

## Usage

### Generating C code from a `.capnp` schema file

The `compiler` directory contains the C language plugin (`capnpc-c`) for use with the `capnp` tool: https://capnproto.org/capnp-tool.html.

`capnp` will by default search `$PATH` for `capnpc-c` - if it's on your PATH, you can generate code for your schema as follows:

```sh
capnp compile -o c myschema.capnp
```

Otherwise, you can specify the path to the c plugin:

```sh
capnp compile -o ./capnpc-c myschema.capnp
```

`capnp` generates a C struct that corresponds to each capn proto struct, along with read/write functions that convert to/from capn proto form.

If you want accessor functions for struct members, use attribute `fieldgetset` in your `.capnp` file as follows:

```capnp
using C = import "${c-capnproto}/compiler/c.capnp";

$C.fieldgetset;

struct MyStruct {}
```

### Example C code

See the unit tests in [`tests/example-test.cpp`](tests/example-test.cpp).
The example schema file is [`tests/addressbook.capnp`](tests/addressbook.capnp).
The tests are written in C++, but only use C features.

You need to compile these runtime library files and link them into your own project's binaries:

* [`lib/capn.c`](lib/capn.c)
* [`lib/capn-malloc.c`](lib/capn-malloc.c)
* [`lib/capn-stream.c`](lib/capn-stream.c)

Your include path must contain the runtime library directory
[`lib`](lib). Header file [`lib/capnp_c.h`](lib/capnp_c.h) contains
the public interfaces of the library.

Using make-based builds, make may try to compile `${x}.capnp` from
`${x}.capnp.c` using its built-in rule for compiling `${y}` from
`${y}.c`. You can either disable make's built-in compile rules or just
this specific case with the no-op rule: `%.capnp: ;`.

For further reference, please see the other unit tests in [`tests`](tests), and header file [`lib/capnp_c.h`](lib/capnp_c.h).

The project [`quagga-capnproto`](https://github.com/opensourcerouting/quagga-capnproto) uses `c-capnproto` and contains some good examples, as found with [this github repository search](https://github.com/opensourcerouting/quagga-capnproto/search?utf8=%E2%9C%93&q=capn&type=):

* Serialization in function [`bgp_notify_send()`](https://github.com/opensourcerouting/quagga-capnproto/blob/27061648f3418fac0d217b16a46add534343e841/bgpd/bgp_zmq.c#L81-L96) in file `quagga-capnproto/bgpd/bgp_zmq.c`
* Deserialization in function [`qzc_callback()`](https://github.com/opensourcerouting/quagga-capnproto/blob/27061648f3418fac0d217b16a46add534343e841/lib/qzc.c#L249-L257) in file `quagga-capnproto/lib/qzc.c`

## Status

This is a merge of 3 forks of [James McKaskill's great
work](https://github.com/jmckaskill/c-capnproto), which has been untouched for
a while:

- [liamstask's fork](https://github.com/liamstask/c-capnproto)
- [baruch's fork](https://github.com/baruch/c-capnproto)
- [kylemanna's fork](https://github.com/kylemanna/c-capnproto)
26 changes: 0 additions & 26 deletions ReadMe.md

This file was deleted.

2 changes: 2 additions & 0 deletions ac/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
12 changes: 12 additions & 0 deletions c-capnproto.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
bindir=@bindir@
includedir=@includedir@
codegen=${bindir}/capnpc-c

Name: c-capnproto
Description: Cap'n Proto C bindings
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lcapnp_c
Cflags: -I${includedir}
Loading