diff options
author | Günther Deschner <gd@samba.org> | 2016-09-20 00:20:18 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2016-11-24 20:24:26 +0100 |
commit | e91895f41158a40c09bf145234b0cf45df0ea8c5 (patch) | |
tree | 75cec4d8434724efea0ded06014c31649939a0f6 /librpc/ndr/ndr_cab.c | |
parent | 983dac44f282cc570fb4a576416bd851c18eddd0 (diff) | |
download | samba-e91895f41158a40c09bf145234b0cf45df0ea8c5.tar.gz |
librpc: Add ndr_cab_get_compression() for Cabinet compression evaluation
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'librpc/ndr/ndr_cab.c')
-rw-r--r-- | librpc/ndr/ndr_cab.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/librpc/ndr/ndr_cab.c b/librpc/ndr/ndr_cab.c index 3923aece6d0..0d2b36b3249 100644 --- a/librpc/ndr/ndr_cab.c +++ b/librpc/ndr/ndr_cab.c @@ -138,6 +138,15 @@ static uint32_t ndr_size_cab_file(const struct cab_file *r) return size; } +enum cf_compress_type ndr_cab_get_compression(const struct cab_file *r) +{ + if (r->cfheader.cFolders == 0) { + return CF_COMPRESS_NONE; + } + + return r->cffolders[0].typeCompress; +} + _PUBLIC_ enum ndr_err_code ndr_push_cab_file(struct ndr_push *ndr, int ndr_flags, const struct cab_file *r) { uint32_t cntr_cffolders_0; |