version 1.337, 2019/11/11 13:16:25
|
version 1.356, 2025/04/15 10:17:57
|
Line 1
|
Line 1
|
#define DEBUG_MEMOIRE |
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.32 |
RPL/2 (R) version 4.1.36 |
Copyright (C) 1989-2019 Dr. BERTRAND Joël |
Copyright (C) 1989-2025 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 94
|
Line 93
|
#include <poll.h> |
#include <poll.h> |
#include <signal.h> |
#include <signal.h> |
#include <sys/time.h> |
#include <sys/time.h> |
|
#include <pthread.h> |
|
|
#ifndef RPLARGS |
#ifndef RPLARGS |
# include <sys/mman.h> |
# include <sys/mman.h> |
Line 101
|
Line 101
|
# include <sys/select.h> |
# include <sys/select.h> |
# include <sys/socket.h> |
# include <sys/socket.h> |
# include <sys/stat.h> |
# include <sys/stat.h> |
# include <sys/timeb.h> |
|
# include <sys/types.h> |
# include <sys/types.h> |
# include <sys/un.h> |
# include <sys/un.h> |
# include <sys/wait.h> |
# include <sys/wait.h> |
# include <omp.h> |
|
|
|
# include <arpa/inet.h> |
# include <arpa/inet.h> |
# include <netinet/in.h> |
# include <netinet/in.h> |
Line 113
|
Line 111
|
|
|
# include <dlfcn.h> |
# include <dlfcn.h> |
# include <fcntl.h> |
# include <fcntl.h> |
# include <pthread.h> |
|
# include <regex.h> |
# include <regex.h> |
|
|
# ifdef OS2 |
# ifdef OS2 |
Line 187
|
Line 184
|
# include "zlib.h" |
# include "zlib.h" |
|
|
# include "openssl/evp.h" |
# include "openssl/evp.h" |
# ifndef OPENSSL_NO_MD2 |
# ifndef RPLCXX |
# include "openssl/md2.h" |
# ifndef OPENSSL_NO_MD2 |
# endif |
# include "openssl/md2.h" |
# ifndef OPENSSL_NO_MD4 |
# endif |
# include "openssl/md4.h" |
# ifndef OPENSSL_NO_MD4 |
# endif |
# include "openssl/md4.h" |
# ifndef OPENSSL_NO_MD5 |
# endif |
# include "openssl/md5.h" |
# ifndef OPENSSL_NO_MD5 |
# endif |
# include "openssl/md5.h" |
# ifndef OPENSSL_NO_MDC2 |
# endif |
# include "openssl/mdc2.h" |
# ifndef OPENSSL_NO_MDC2 |
# endif |
# include "openssl/mdc2.h" |
# ifndef OPENSSL_NO_RIPEMD |
# endif |
# include "openssl/ripemd.h" |
# ifndef OPENSSL_NO_RIPEMD |
# endif |
# include "openssl/ripemd.h" |
# ifndef OPENSSL_NO_SHA |
# endif |
# include "openssl/sha.h" |
# ifndef OPENSSL_NO_SHA |
# endif |
# include "openssl/sha.h" |
# ifndef OPENSSL_NO_WHIRLPOOL |
# endif |
# include "openssl/whrlpool.h" |
# ifndef OPENSSL_NO_WHIRLPOOL |
# endif |
# include "openssl/whrlpool.h" |
# ifndef OPENSSL_NO_AES |
# endif |
# include "openssl/aes.h" |
# ifndef OPENSSL_NO_AES |
# endif |
# include "openssl/aes.h" |
# ifndef OPENSSL_NO_CAMELLIA |
# endif |
# include "openssl/camellia.h" |
# ifndef OPENSSL_NO_CAMELLIA |
# endif |
# include "openssl/camellia.h" |
# ifndef OPENSSL_NO_RC2 |
# endif |
# include "openssl/rc2.h" |
# ifndef OPENSSL_NO_RC2 |
# endif |
# include "openssl/rc2.h" |
# ifndef OPENSSL_NO_IDEA |
# endif |
# include "openssl/idea.h" |
# ifndef OPENSSL_NO_IDEA |
|
# include "openssl/idea.h" |
|
# endif |
# endif |
# endif |
|
|
# include "sqlite3.h" |
# include "sqlite3.h" |
Line 270
|
Line 269
|
|
|
#ifndef RPLARGS |
#ifndef RPLARGS |
# ifndef UNIX_PATH_MAX |
# ifndef UNIX_PATH_MAX |
struct sockaddr_un sizecheck; |
# pragma GCC diagnostic push |
|
# pragma GCC diagnostic ignored "-Wunused-variable" |
|
static struct sockaddr_un sizecheck; |
# define UNIX_PATH_MAX sizeof(sizecheck.sun_path) |
# define UNIX_PATH_MAX sizeof(sizecheck.sun_path) |
|
# pragma GCC diagnostic pop |
# endif |
# endif |
#endif |
#endif |
|
|
Line 732 void *debug_memoire_modification(void *p
|
Line 734 void *debug_memoire_modification(void *p
|
void debug_memoire_retrait(void *ptr); |
void debug_memoire_retrait(void *ptr); |
void debug_memoire_verification(); |
void debug_memoire_verification(); |
|
|
#define malloc(s) debug_memoire_ajout(s, __FUNCTION__, __LINE__, #s) |
|
#define free(s) debug_memoire_retrait(s) |
#define free(s) debug_memoire_retrait(s) |
#define realloc(s, t) debug_memoire_modification(s, t, \ |
#ifdef RPLCXX |
__FUNCTION__, __LINE__, #t) |
# define malloc(s) debug_memoire_ajout(s, \ |
|
const_cast<const unsigned char *> \ |
|
(reinterpret_cast<unsigned char *> \ |
|
(const_cast<char *>(__FUNCTION__))), __LINE__, \ |
|
const_cast<const unsigned char *> \ |
|
(reinterpret_cast<unsigned char *> \ |
|
(const_cast<char *>(#s)))) |
|
# define realloc(s, t) debug_memoire_modification(s, t, \ |
|
const_cast<const unsigned char *> \ |
|
(reinterpret_cast<unsigned char *> \ |
|
(const_cast<char *>(__FUNCTION__))), __LINE__, \ |
|
const_cast<const unsigned char *> \ |
|
(reinterpret_cast<unsigned char *> \ |
|
(const_cast<char *>(#t)))) |
|
#else |
|
# define malloc(s) debug_memoire_ajout(s, __FUNCTION__, __LINE__, \ |
|
(const unsigned char *) #s) |
|
# define realloc(s, t) debug_memoire_modification(s, t, \ |
|
__FUNCTION__, __LINE__, (const unsigned char *) #t) |
|
#endif |
#define fork() debug_fork(s_etat_processus) |
#define fork() debug_fork(s_etat_processus) |
#endif |
#endif |
|
|
Line 1114 void debug_memoire_verification();
|
Line 1134 void debug_memoire_verification();
|
#define VIN __RPL_VIN |
#define VIN __RPL_VIN |
#define VRL __RPL_VRL |
#define VRL __RPL_VRL |
|
|
enum t_rplcas_commandes { RPLCAS_INTEGRATION = 0, RPLCAS_LIMITE }; |
enum t_rplcas_commandes { RPLCAS_INTEGRATION = 0, RPLCAS_LIMITE, |
|
RPLCAS_SIMPLIFICATION }; |
|
|
enum t_type { ADR = 0, ALG, BIN, CHN, CPL, EXT, FCH, FCT, INT, LST, |
enum t_type { ADR = 0, ALG, BIN, CHN, CPL, EXT, FCH, FCT, INT, LST, |
MCX, MIN, MRL, MTX, NOM, NON, PRC, REC, REL, RPN, SCK, |
MCX, MIN, MRL, MTX, NOM, NON, PRC, REC, REL, RPN, SCK, |
Line 1331 typedef struct descripteur_fichier
|
Line 1352 typedef struct descripteur_fichier
|
pid_t pid; |
pid_t pid; |
pthread_t tid; |
pthread_t tid; |
|
|
union |
struct |
{ |
{ |
file *descripteur_c; |
file *descripteur_c; |
sqlite3 *descripteur_sqlite; |
sqlite3 *descripteur_sqlite; |
Line 2651 void instruction_clrcntxt(struct_process
|
Line 2672 void instruction_clrcntxt(struct_process
|
void instruction_clrerr(struct_processus *s_etat_processus); |
void instruction_clrerr(struct_processus *s_etat_processus); |
void instruction_clrfuse(struct_processus *s_etat_processus); |
void instruction_clrfuse(struct_processus *s_etat_processus); |
void instruction_clrmtx(struct_processus *s_etat_processus); |
void instruction_clrmtx(struct_processus *s_etat_processus); |
|
void instruction_clrsock(struct_processus *s_etat_processus); |
void instruction_clrsmphr(struct_processus *s_etat_processus); |
void instruction_clrsmphr(struct_processus *s_etat_processus); |
void instruction_clrswi(struct_processus *s_etat_processus); |
void instruction_clrswi(struct_processus *s_etat_processus); |
void instruction_cls(struct_processus *s_etat_processus); |
void instruction_cls(struct_processus *s_etat_processus); |
Line 3421 unsigned char *chiffrement(struct_proces
|
Line 3443 unsigned char *chiffrement(struct_proces
|
logical1 encodage, unsigned char *message, integer8 longueur_message, |
logical1 encodage, unsigned char *message, integer8 longueur_message, |
unsigned char *clef, integer8 longueur_clef, |
unsigned char *clef, integer8 longueur_clef, |
unsigned char *vecteur_initialisation, |
unsigned char *vecteur_initialisation, |
integer8 *longueur_message_chiffre); |
integer8 *longueur_message_chiffre, |
|
unsigned char padding); |
unsigned char *compactage(struct_processus *s_etat_processus, |
unsigned char *compactage(struct_processus *s_etat_processus, |
unsigned char *chaine); |
unsigned char *chaine); |
unsigned char *conversion_majuscule(struct_processus *s_etat_processus, |
unsigned char *conversion_majuscule(struct_processus *s_etat_processus, |