Rizin
unix-like reverse engineering framework and cli tools
utils.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2014 defragger <rlaemmert@gmail.com>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
5 #ifndef UTILS_H
6 #define UTILS_H
7 
8 #include <stdint.h>
9 #include <stdio.h>
10 
11 uint8_t cmd_checksum(const char *command);
12 uint64_t unpack_uint64(char *buff, int len);
13 uint64_t unpack_uint64_co(char *buff, int len);
14 int unpack_hex(const char *src, ut64 len, char *dst);
15 int pack_hex(const char *src, ut64 len, char *dst);
16 int hex2int(int ch);
17 int int2hex(int i);
18 void hexdump(void *ptr, ut64 len, ut64 offset);
19 int write_thread_id(char *dest, int len, int pid, int tid, bool multiprocess);
20 int read_thread_id(const char *src, int *pid, int *tid, bool multiprocess);
21 
22 #endif
size_t len
Definition: 6502dis.c:15
lzma_index ** i
Definition: index.h:629
lzma_index * src
Definition: index.h:567
voidpf uLong offset
Definition: ioapi.h:144
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc pid
Definition: sflib.h:64
char * dst
Definition: lz4.h:724
char * dest
Definition: lz4.h:697
unsigned long uint64_t
Definition: sftypes.h:28
unsigned char uint8_t
Definition: sftypes.h:31
const char * command
Definition: main.c:7
uint64_t unpack_uint64(char *buff, int len)
Definition: utils.c:27
void hexdump(void *ptr, ut64 len, ut64 offset)
Definition: utils.c:123
int int2hex(int i)
Definition: utils.c:78
uint8_t cmd_checksum(const char *command)
Definition: utils.c:16
uint64_t unpack_uint64_co(char *buff, int len)
Definition: utils.c:45
int unpack_hex(const char *src, ut64 len, char *dst)
Definition: utils.c:95
int write_thread_id(char *dest, int len, int pid, int tid, bool multiprocess)
Definition: utils.c:144
int read_thread_id(const char *src, int *pid, int *tid, bool multiprocess)
Definition: utils.c:161
int pack_hex(const char *src, ut64 len, char *dst)
Definition: utils.c:111
int hex2int(int ch)
Definition: utils.c:61
ut64(WINAPI *w32_GetEnabledXStateFeatures)()