/* metadata.h
****************************************************************************************************************
****************************************************************************************************************

    Copyright (C) 2021 Askar Almatov

    This file is part of Trafficmeter.

    Trafficmeter is free software: you can redistribute it and/or modify it under the terms of the GNU General
    Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
    option) any later version.

    Trafficmeter is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
    implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
    License for more details.

    You should have received a copy of the GNU General Public License along with Trafficmeter. If not, see
    <http://www.gnu.org/licenses/>.
*/

#ifndef __METADATA_H
#define __METADATA_H 1

#include <libiclass/ipv4>

#include "macaddress.h"
#include "timestamp.h"

namespace trafficmeter
{
    /**********************************************************************************************************/
    struct Metadata
    {
        Timestamp                       timestamp;
        unsigned                        nBytes2;
        unsigned                        nBytes;
        int                             offsetLayer3;
        int                             offsetLayer4;
        unsigned                        etype;
        unsigned                        vlan;
        MacAddress                      smac;
        MacAddress                      dmac;
        unsigned                        proto;
        iclass::ipaddr4t                sip;
        iclass::ipaddr4t                dip;
        unsigned                        sport;
        unsigned                        dport;

                                        Metadata( Timestamp timestamp, const uint8_t* data2, unsigned nBytes2 );
    };
}

#endif  // __METADATA_H
