Jun 16th update

This commit is contained in:
noam
2023-01-17 11:34:09 +02:00
parent 90bcc544a2
commit ad04b8d063
168 changed files with 64034 additions and 932 deletions

View File

@@ -53,6 +53,10 @@ enum DccpPacketType {
DCCP_PKT_INVALID,
};
struct net_device {
int ifindex;
};
struct sk_buff {
uint16_t protocol;
union {
@@ -67,10 +71,13 @@ struct sk_buff {
struct sctphdr *sctp_header;
struct dccphdr *dccp_header;
} transport_header;
unsigned char *tail;
unsigned char *data;
unsigned char *head;
unsigned int len;
unsigned char *tail;
unsigned char *data;
unsigned char *head;
unsigned int len;
struct sock *sk;
void (*destructor)(struct sk_buff *);
struct net_device *dev;
};
struct geneve_opt {

View File

@@ -32,13 +32,6 @@ class I_Encryptor;
class I_AgentDetails;
class I_SignalHandler;
namespace Config
{
enum class Errors;
}
std::ostream & operator<<(std::ostream &os, const Config::Errors &err);
class Debug
:
Singleton::Consume<I_TimeGet>,

View File

@@ -0,0 +1,103 @@
// Copyright (C) 2022 Check Point Software Technologies Ltd. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License");
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef __TENANT_PROFILE_PAIR_H__
#define __TENANT_PROFILE_PAIR_H__
#include <string>
#include "hash_combine.h"
class TenantProfilePair
{
public:
TenantProfilePair(const std::string &_tenant_id, const std::string &_profile_id)
:
tenant_id(_tenant_id),
profile_id(_profile_id)
{
}
size_t
hash() const
{
size_t seed = 0;
hashCombine(seed, tenant_id);
hashCombine(seed, profile_id);
return seed;
}
bool
operator==(const TenantProfilePair &other) const
{
return (tenant_id == other.tenant_id && profile_id == other.profile_id);
}
bool
operator>(const TenantProfilePair &other) const
{
if (tenant_id > other.tenant_id) {
return true;
} else if (tenant_id == other.tenant_id && profile_id > other.profile_id) {
return true;
}
return false;
}
bool
operator<(const TenantProfilePair &other) const
{
return !(*this >= other);
}
bool
operator>=(const TenantProfilePair &other) const
{
return (*this > other) || (*this == other);
}
bool
operator<=(const TenantProfilePair &other) const
{
return !(*this > other);
}
std::string
getTenantId() const
{
return tenant_id;
}
std::string
getPfofileId() const
{
return profile_id;
}
private:
std::string tenant_id;
std::string profile_id;
};
namespace std
{
template <>
struct hash<TenantProfilePair>
{
size_t operator()(const TenantProfilePair &tenant_profile) const { return tenant_profile.hash(); }
};
}
#endif // __TENANT_PROFILE_PAIR_H__