~ubuntu-branches/ubuntu/maverick/clamav/maverick-backports

« back to all changes in this revision

Viewing changes to libclamav/elf.h

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Gran, Stephen Gran, Michael Tautschnig
  • Date: 2010-04-26 21:41:18 UTC
  • mfrom: (2.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100426214118-i6lo606wnh7ywfj6
Tags: 0.96+dfsg-4
[ Stephen Gran ]
* Fixed typo in clamav-milter's postinst

[ Michael Tautschnig ]
* Fixed typo in clamav-freshclam's postinst (closes: #579271)
* Debconf translation updates
  - Portuguese (closes: #579068)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 *  Copyright (C) 2007-2008 Sourcefire, Inc.
 
2
 *  Copyright (C) 2007-2009 Sourcefire, Inc.
3
3
 *
4
4
 *  Authors: Tomasz Kojm
5
5
 *
25
25
#include "clamav.h"
26
26
#include "execs.h"
27
27
#include "others.h"
 
28
#include "fmap.h"
28
29
 
29
30
struct elf_file_hdr32 {
30
31
    unsigned char e_ident[16];
43
44
    uint16_t e_shstrndx;
44
45
};
45
46
 
 
47
struct elf_file_hdr64 {
 
48
    unsigned char e_ident[16];
 
49
    uint16_t e_type;
 
50
    uint16_t e_machine;
 
51
    uint32_t e_version;
 
52
    uint64_t e_entry;
 
53
    uint64_t e_phoff;
 
54
    uint64_t e_shoff;
 
55
    uint32_t e_flags;
 
56
    uint16_t e_ehsize;
 
57
    uint16_t e_phentsize;
 
58
    uint16_t e_phnum;
 
59
    uint16_t e_shentsize;
 
60
    uint16_t e_shnum;
 
61
    uint16_t e_shstrndx;
 
62
};
 
63
 
46
64
struct elf_program_hdr32 {
47
65
    uint32_t p_type;
48
66
    uint32_t p_offset;
54
72
    uint32_t p_align;
55
73
};
56
74
 
 
75
struct elf_program_hdr64 {
 
76
    uint32_t p_type;
 
77
    uint32_t p_flags;
 
78
    uint64_t p_offset;
 
79
    uint64_t p_vaddr;
 
80
    uint64_t p_paddr;
 
81
    uint64_t p_filesz;
 
82
    uint64_t p_memsz;
 
83
    uint64_t p_align;
 
84
};
 
85
 
57
86
struct elf_section_hdr32 {
58
87
    uint32_t sh_name;
59
88
    uint32_t sh_type;
67
96
    uint32_t sh_entsize;
68
97
};
69
98
 
70
 
int cli_scanelf(int desc, cli_ctx *ctx);
71
 
 
72
 
int cli_elfheader(int desc, struct cli_exe_info *elfinfo);
 
99
struct elf_section_hdr64 {
 
100
    uint32_t sh_name;
 
101
    uint32_t sh_type;
 
102
    uint64_t sh_flags;
 
103
    uint64_t sh_addr;
 
104
    uint64_t sh_offset;
 
105
    uint64_t sh_size;
 
106
    uint32_t sh_link;
 
107
    uint32_t sh_info;
 
108
    uint64_t sh_addralign;
 
109
    uint64_t sh_entsize;
 
110
};
 
111
 
 
112
int cli_scanelf(cli_ctx *ctx);
 
113
 
 
114
int cli_elfheader(fmap_t *map, struct cli_exe_info *elfinfo);
73
115
 
74
116
#endif