/syncsm.h (678eed4da259f00ba708f070aeddb69229322df6) (1948 bytes) (mode 100644) (type blob)

#ifndef SYNCSM_H
#define SYNCSM_H
/*
 * this code is protected by the GNU affero GPLv3 license
 * author:Sylvain BERTRAND
 */
#include "namespace/ulinux.h"
#include "namespace/syncsm.h"
/*----------------------------------------------------------------------------*/
struct str_slice_t {
	u8 *s; /* first valid char */
	u8 *l; /* last valid char */
};

#if defined CONFIG_SMTP_IPV4 || defined CONFIG_DNS_IPV4
enum {/* maybe too generic for ip type constants */
	ipv6 = 0x01,
	ipv4 = 0x02
};
#endif
struct ip_t {
#if defined CONFIG_SMTP_IPV4 || defined CONFIG_DNS_IPV4
	u8 type;
#endif
	union {
		/* net endian, aka big endian */
#if defined CONFIG_SMTP_IPV4 || defined CONFIG_DNS_IPV4
		u32 ipv4_net;
#endif
		union { /* different ways to get into an ipv6 addr*/
			u8 ipv6_net[16];
			struct {
				u64 ipv6_net_h;
				u64 ipv6_net_l;
			} PACKED;

		};
	};
};
/*----------------------------------------------------------------------------*/
/*
 * (domain name | address literal) index:
 * for each (domain name | address literal), we'll have the list of recipients
 */
enum {
	literal_ip	= 0x01,
	domain_name	= 0x02
};
struct dn_al_t {
	u8 type;
	struct str_slice_t dn;

	struct str_slice_t local_parts[SMTP_RFC_RCPTS_N_MAX];
	u8 local_parts_n;

	/*
	 * literal ip: smtp_ips[0] is the ip.
	 * domain name: ordered (based on mx preference if existing) smtp
	 *              ips
	 */
	struct ip_t smtp_ips[CONFIG_DN_SMTP_IPS_N_MAX];
	u8 smtp_ips_n;
};
static struct dn_al_t dn_al_v[CONFIG_DN_AL_N_MAX];
static u64 dn_al_n_v;
/*----------------------------------------------------------------------------*/
/*
 * aarch64 gcc/binutils(6.3.0/2.28) is unable to deal with very large 
 * bss sections. we have to mmap manually.
 */
static u8 *email_v;
static u64 email_sz_v;
/*----------------------------------------------------------------------------*/
#define CLEANUP
#include "namespace/ulinux.h"
#include "namespace/syncsm.h"
#undef CLEANUP
#endif


Mode Type Size Ref File
100644 blob 853 cfee40c9af4999813fcbb3a32e07de953696d003 ABBREVIATIONS
100644 blob 3802 1058e91164c6384b9d271e249ee74a7df9952884 README
100644 blob 967 eb0eb02192cae4ec269d7836bcccf789dd3baa09 RULES_GLOBAL_NAMESPACE
100644 blob 226 47e8cbfba1358960f381e80943afaa64d6083673 RULES_POINTER
100644 blob 141 a7eef9c825adfb6cb392c5f61048ae1a9961144f TODO
100644 blob 186 e08b0072d50fa683daf4b72ffcca9afe28f33928 all.S
100644 blob 907 68a9ab080cac0188391966e29be979548a77b537 all.c
100644 blob 2570 9c5f66db8962e15d99644ac8f42fc207e27d3178 config.default.h
100644 blob 448 b3b72c25ea89e0f17ab77ead13e89b915186ec95 dns.h
040000 tree - 60975c8ad01566be3264e1648a304087dae2e6e4 dns
100755 blob 1246 6ebc4041142bda951a9a02320d45deb7ee43f39b make_gcc_aarch64
100755 blob 1245 303ed53e1ef0a6f89a5d13c2eb21c271e0b6dcd0 make_gcc_x86_64
040000 tree - fcae74b207287320abbbd373133626ae7ee67ed0 namespace
100644 blob 434 6b73d3e06f341d75c9f17c00b0720b85498ef628 perr.h
100644 blob 450 88813b86df39c72cc32605e178edfdd544297e42 smtp.h
040000 tree - eca08c8db66629459c72e1223d89a03895dc8bab smtp
100644 blob 13459 1169541482e1d1c3e5a2e61c0dcb338d2d3c5689 syncsm.c
100644 blob 1948 678eed4da259f00ba708f070aeddb69229322df6 syncsm.h
100644 blob 880 82aad126f033e8ecb5c919dbd27996b094bbfbe8 ulinux.h
040000 tree - 503817b57582aa9b3b6a5482104fe81605a6a035 ulinux
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/sylware/syncsm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/sylware/syncsm

Clone this repository using git:
git clone git://git.rocketgit.com/user/sylware/syncsm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main