2
* Copyright (C) 2009 Sourcefire, Inc.
4
* Authors: aCaB <acab@clamav.net>
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
34
unsigned short dont_cache_flag;
47
uint32_t placeholder_for_bitmap;
50
fmap_t *fmap(int fd, off_t offset, size_t len);
51
void funmap(fmap_t *m);
52
void *fmap_need_off(fmap_t *m, size_t at, size_t len);
53
void *fmap_need_off_once(fmap_t *m, size_t at, size_t len);
54
void *fmap_need_ptr(fmap_t *m, void *ptr, size_t len);
55
void *fmap_need_ptr_once(fmap_t *m, void *ptr, size_t len);
56
void fmap_unneed_off(fmap_t *m, size_t at, size_t len);
57
void fmap_unneed_ptr(fmap_t *m, void *ptr, size_t len);
58
int fmap_readn(fmap_t *m, void *dst, size_t at, size_t len);
59
void *fmap_need_str(fmap_t *m, void *ptr, size_t len_hint);
60
void *fmap_need_offstr(fmap_t *m, size_t at, size_t len_hint);
61
void *fmap_gets(fmap_t *m, char *dst, size_t *at, size_t max_len);