EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
File containing the implementation of the protobuf encoder utilities. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "../../../utils/allocs.h"
#include "../../../utils/log.h"
#include "../../../utils/os.h"
#include "../header_middleware/packet_decoder.h"
#include "arp.pb-c.h"
#include "dhcp.pb-c.h"
#include "dns.pb-c.h"
#include "eth.pb-c.h"
#include "icmp4.pb-c.h"
#include "icmp6.pb-c.h"
#include "ip4.pb-c.h"
#include "ip6.pb-c.h"
#include "mdns.pb-c.h"
#include "sync.pb-c.h"
#include "tcp.pb-c.h"
#include "udp.pb-c.h"
#include "protobuf_utils.h"
Functions | |
ssize_t | encode_eth_packet (const struct eth_schema *eths, uint8_t **buffer) |
ssize_t | encode_arp_packet (const struct arp_schema *arps, uint8_t **buffer) |
ssize_t | encode_ip4_pcaket (const struct ip4_schema *ip4s, uint8_t **buffer) |
ssize_t | encode_ip6_packet (const struct ip6_schema *ip6s, uint8_t **buffer) |
ssize_t | encode_tcp_packet (const struct tcp_schema *tcps, uint8_t **buffer) |
ssize_t | encode_udp_packet (const struct udp_schema *udps, uint8_t **buffer) |
ssize_t | encode_icmp4_packet (const struct icmp4_schema *icmp4s, uint8_t **buffer) |
ssize_t | encode_icmp6_packet (const struct icmp6_schema *icmp6s, uint8_t **buffer) |
ssize_t | encode_dns_packet (const struct dns_schema *dnss, uint8_t **buffer) |
ssize_t | encode_mdsn_packet (const struct mdns_schema *mdnss, uint8_t **buffer) |
ssize_t | encode_dhcp_packet (struct dhcp_schema *dhcps, uint8_t **buffer) |
ssize_t | encode_protobuf_packet (const struct tuple_packet *tp, uint8_t **buffer) |
ssize_t | encode_protobuf_sync_delimited (const PACKET_TYPES type, uint8_t *packet_buffer, size_t length, uint8_t **buffer) |
ssize_t | encode_protobuf_sync_wrapper (struct tuple_packet *tp, uint8_t **buffer) |
Encodes the packet into a wrapper protobuf message. More... | |
File containing the implementation of the protobuf encoder utilities.
ssize_t encode_arp_packet | ( | const struct arp_schema * | arps, |
uint8_t ** | buffer | ||
) |
ssize_t encode_dhcp_packet | ( | struct dhcp_schema * | dhcps, |
uint8_t ** | buffer | ||
) |
ssize_t encode_dns_packet | ( | const struct dns_schema * | dnss, |
uint8_t ** | buffer | ||
) |
ssize_t encode_eth_packet | ( | const struct eth_schema * | eths, |
uint8_t ** | buffer | ||
) |
ssize_t encode_icmp4_packet | ( | const struct icmp4_schema * | icmp4s, |
uint8_t ** | buffer | ||
) |
ssize_t encode_icmp6_packet | ( | const struct icmp6_schema * | icmp6s, |
uint8_t ** | buffer | ||
) |
ssize_t encode_ip4_pcaket | ( | const struct ip4_schema * | ip4s, |
uint8_t ** | buffer | ||
) |
ssize_t encode_ip6_packet | ( | const struct ip6_schema * | ip6s, |
uint8_t ** | buffer | ||
) |
ssize_t encode_mdsn_packet | ( | const struct mdns_schema * | mdnss, |
uint8_t ** | buffer | ||
) |
ssize_t encode_protobuf_packet | ( | const struct tuple_packet * | tp, |
uint8_t ** | buffer | ||
) |
ssize_t encode_protobuf_sync_delimited | ( | const PACKET_TYPES | type, |
uint8_t * | packet_buffer, | ||
size_t | length, | ||
uint8_t ** | buffer | ||
) |
ssize_t encode_protobuf_sync_wrapper | ( | struct tuple_packet * | tp, |
uint8_t ** | buffer | ||
) |
Encodes the packet into a wrapper protobuf message.
[in] | tp | The packet |
[out] | buffer | The encoded wrapper protobuf packet |
ssize_t encode_tcp_packet | ( | const struct tcp_schema * | tcps, |
uint8_t ** | buffer | ||
) |
ssize_t encode_udp_packet | ( | const struct udp_schema * | udps, |
uint8_t ** | buffer | ||
) |