strongswan.org
Wiki/Project Management
Downloads
Gitweb
projects
/
strongswan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
6819e4d
)
added chunk_from_thing() macro
author
Martin Willi
<martin@strongswan.org>
Thu, 29 Mar 2007 11:06:59 +0000
(11:06 -0000)
committer
Martin Willi
<martin@strongswan.org>
Thu, 29 Mar 2007 11:06:59 +0000
(11:06 -0000)
src/libstrongswan/chunk.h
patch
|
blob
|
history
diff --git
a/src/libstrongswan/chunk.h
b/src/libstrongswan/chunk.h
index
9880ae2
..
e4e816f
100644
(file)
--- a/
src/libstrongswan/chunk.h
+++ b/
src/libstrongswan/chunk.h
@@
-89,6
+89,11
@@
void chunk_free(chunk_t *chunk);
#define chunk_from_buf(str) { str, sizeof(str) }
/**
+ * Initialize a chunk to point to a thing
+ */
+#define chunk_from_thing(thing) chunk_create((char*)&(thing), sizeof(thing))
+
+/**
* Allocate a chunk on the heap
*/
#define chunk_alloc(bytes) chunk_create(malloc(bytes), bytes)