1#ifndef C234BFC2_5BE1_49B6_90C3_0DFD7690BAB5
2#define C234BFC2_5BE1_49B6_90C3_0DFD7690BAB5
4#include <vanetza/common/position_provider.hpp>
5#include <vanetza/common/runtime.hpp>
15 virtual ~SigningPolicy() =
default;
ChunckPacket is a packet consisting of several memory chunks.
virtual const PositionFix & position_fix()=0
virtual void cancel(const void *scope)=0
void update_rate(Clock::duration interval)
PositionUpdater(Runtime &runtime, PositionProvider &pos, Router &router)
void add(const DataRequestVariant &, const DataRequest::Repetition &, const DownPacket &)
void trigger(std::list< Repetition >::iterator, Clock::time_point)
Repeater(Runtime &rt, const Callback &cb)
void add(const REQUEST &request, const DownPacket &payload)
void reset_beacon_timer(Clock::duration next)
Reschedule timer for next Beacon transmission.
const CbfPacketBuffer & get_cbf_buffer() const
Get the Contention-Based-Forwarding buffer.
NextHop area_advanced_forwarding(PendingPacketForwarding &&, const LinkLayer *sender)
Determine next hop for area advanced forwarding See EN 302 636-4-1 v1.3.1 Annex F....
void flush_broadcast_forwarding_buffer()
Send all packets in the broadcast forwarding buffer with expired waiting time.
void indicate_extended(IndicationContext &, const CommonHeader &)
Process ExtendedHeader at packet indication.
const MIB & get_mib() const
Get Management Information Base (MIB).
bool detect_duplicate_packet(const Address &source, SequenceNumber sn)
Detect duplicate packets See EN 302 636-4-1 v1.3.1 Annex A.2.
void pass_down(const dcc::DataRequest &, PduPtr, DownPacketPtr)
Send packet using the information in the DataRequest. The packet is formed using the data in PDU and ...
NextHop greedy_forwarding(PendingPacketForwarding &&)
Determine next hop for greedy forwarding. See EN 302 636-4-1 v1.3.1 Annex E.2.
bool process_extended(const ExtendedPduConstRefs< ShbHeader > &, const UpPacket &, const LinkLayer &ll)
Process ExtendedHeader information. Update router's LocationTable and neighbour relationship....
void pass_up(const DataIndication &, UpPacketPtr)
Pass packet up to the transport layer.
units::Duration timeout_cbf(units::Length distance) const
Determine CBF buffering time for a packet. Complies to EN 302 636-4-1 v1.3.1 Annex E....
void on_beacon_timer_expired()
Send Beacon packet to all neighbours with updated position vector. Only to be called when the beacon ...
void indicate_common(IndicationContext &, const BasicHeader &)
Process CommonHeader at packet indication.
DownPacketPtr encap_packet(ItsAid aid, ByteBuffer ssp, Pdu &pdu, DownPacketPtr packet)
Encaspulate a packet according to security profile.
bool decide_pass_up(bool within_destination, const GeoBroadcastHeader &gbc)
Decide if GBC packet shall be passed up to transport layer.
void set_access_interface(dcc::RequestInterface *ifc)
Register access layer interface.
void set_random_seed(std::uint_fast32_t seed)
Set seed for internal random number generator (RNG) RNG is used e.g. for random Beacon jitter.
units::Duration timeout_cbf(const MacAddress &sender) const
Determine (area) CBF buffering time for a packet from a sender.
NextHop area_contention_based_forwarding(PendingPacketForwarding &&, const MacAddress *sender)
Determine next hop for area contention-based forwarding See EN 302 636-4-1 v1.3.1 Annex F....
std::unique_ptr< ShbPdu > create_shb_pdu(const ShbDataRequest &)
Create an initialized Single-Hop-Broadcast PDU.
void flush_unicast_forwarding_buffer(const Address &addr)
Send all matching packets in the unicast forwarding buffer with expired waiting time.
void detect_duplicate_address(const Address &source, const MacAddress &sender)
Helper method to handle duplicate addresses. If own address collides with the address of a received p...
std::unique_ptr< BeaconPdu > create_beacon_pdu()
Create an initialzed Beacon PDU.
void indicate_basic(IndicationContextBasic &)
Process BasicHeader at packet indication.
void set_dcc_field_generator(DccFieldGenerator *dcc)
Register generator for DCC-MCO fields.
Hook< PacketDropReason > packet_dropped
When a packet is dropped, this Hook is invoked.
bool process_extended(const ExtendedPduConstRefs< TsbHeader > &, const UpPacket &, const LinkLayer &ll)
packet handling of received TSB packet
Hook< ForwardingStopReason > forwarding_stopped
When packet forwarding is stopped, this Hook is invoked.
PacketDropReason
Reason for packet drop used by drop hook.
const LocationTable & get_location_table() const
Get the LocationTable. The table holds information about neighbouring ITS-Routers.
DataConfirm request(const ShbDataRequest &, DownPacketPtr)
Request to send payload per single hop broadcast (SHB). If security is enabled, the message gets enca...
void pass_down(const MacAddress &, PduPtr, DownPacketPtr)
Pass down the packet to the access layer.
void dispatch_repetition(const DataRequestVariant &, DownPacketPtr)
Callback function for dispatching a packet repetition. Invoked by Repeater when a scheduled repetitio...
NextHop non_area_contention_based_forwarding(PendingPacketForwarding &&, const MacAddress *sender)
Determine next hop for non-area contention-based forwarding See EN 302 636-4-1 v1....
bool process_extended(const ExtendedPduConstRefs< GeoBroadcastHeader > &, const UpPacket &, const LinkLayer &ll)
Process ExtendedHeader information. Update router's LocationTable and neighbour relationship....
void indicate(UpPacketPtr, const MacAddress &sender, const MacAddress &destination)
Handle the received packet on network layer. Packet handling involves these steps:
void set_transport_handler(UpperProtocol proto, TransportInterface *ifc)
Register a transport protocol handler.
void reset_beacon_timer()
Reschedule timer for next Beacon transmission Timer will be scheduled according to MIB's Beacon timer...
void update_position(const PositionFix &)
Update router's local position vector.
void execute_media_procedures(CommunicationProfile)
Executes media specific functionalities Details are described in TS 102 636-4-2.
void set_security_entity(security::SecurityEntity *entity)
Register security entity used when itsGnSecurity is enabled.
std::unique_ptr< GbcPdu > create_gbc_pdu(const GbcDataRequest &)
Create an initialized GeoBroadcast PDU.
void set_address(const Address &)
Set Router's own GeoNetworking address.
NextHop forwarding_algorithm_selection(PendingPacketForwarding &&, const LinkLayer *ll=nullptr)
DataConfirm request(const GbcDataRequest &, DownPacketPtr)
Request to send payload per GeoBroadcast (GBC). If security is enabled, the message gets encapsulated...
const LongPositionVector & get_local_position_vector() const
Get the local position vector. This vector describes the current position of the router.
void execute_itsg5_procedures()
Executes ITS-G5 media specific procedures Details are described in TS 102 636-4-2.
bool process_extended(const ExtendedPduConstRefs< BeaconHeader > &, const UpPacket &, const LinkLayer &ll)
Process ExtendedHeader information. Update router's LocationTable and neighbour relationship.
void indicate_secured(IndicationContextBasic &, const BasicHeader &)
Process SecuredMessage at packet indication.
bool outside_sectorial_contention_area(const MacAddress &sender, const MacAddress &forwarder) const
Check if router is outside the sectorial contention area See TS 102 636-4-1 v1.2.3 section E....
virtual EncapConfirm encapsulate_packet(EncapRequest &&request)=0
Creates a security envelope covering the given payload.
virtual DecapConfirm decapsulate_packet(DecapRequest &&request)=0
Decapsulates the payload within a SecuredMessage.
Input data for decapsulating a secured message.