Switch from header guards to pragma once

This commit is contained in:
Dominik Charousset 2019-09-17 14:10:30 +02:00
parent 83180a2553
commit c1f3fe7829
254 changed files with 260 additions and 1008 deletions

View file

@ -8,8 +8,7 @@
//
// http://ita.ee.lbl.gov/html/contrib/tcpdpriv.html
#ifndef anon_h
#define anon_h
#pragma once
#include <vector>
#include <set>
@ -136,5 +135,3 @@ ipaddr32_t anonymize_ip(ipaddr32_t ip, enum ip_addr_anonymization_class_t cl);
#define LOG_ANONYMIZATION_MAPPING
void log_anonymization_mapping(ipaddr32_t input, ipaddr32_t output);
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef attr_h
#define attr_h
#pragma once
#include "Obj.h"
@ -103,5 +102,3 @@ protected:
bool in_record;
bool global_var;
};
#endif

View file

@ -1,5 +1,4 @@
#ifndef base64_h
#define base64_h
#pragma once
#include <assert.h>
#include <stdio.h>
@ -71,5 +70,3 @@ protected:
BroString* decode_base64(const BroString* s, const BroString* a = 0, Connection* conn = 0);
BroString* encode_base64(const BroString* s, const BroString* a = 0, Connection* conn = 0);
#endif /* base64_h */

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef brolist_h
#define brolist_h
#pragma once
#include "List.h"
@ -25,5 +24,3 @@ typedef PList<Attr> attr_list;
class Timer;
typedef PList<Timer> timer_list;
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef brostring_h
#define brostring_h
#pragma once
#include <vector>
#include <string>
@ -187,5 +186,3 @@ extern BroString* concatenate(std::vector<data_chunk_t>& v);
extern BroString* concatenate(BroString::Vec& v);
extern BroString* concatenate(BroString::CVec& v);
extern void delete_strings(std::vector<const BroString*>& v);
#endif

View file

@ -1,5 +1,4 @@
#ifndef BROFILER_H_
#define BROFILER_H_
#pragma once
#include <map>
#include <utility>
@ -79,5 +78,3 @@ private:
};
extern Brofiler brofiler;
#endif /* BROFILER_H_ */

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef ccl_h
#define ccl_h
#pragma once
#include <vector>
#include "List.h"
@ -33,5 +32,3 @@ protected:
int negated;
int index;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef comphash_h
#define comphash_h
#pragma once
#include "Hash.h"
#include "Type.h"
@ -89,5 +88,3 @@ protected:
InternalTypeTag singleton_tag;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef conn_h
#define conn_h
#pragma once
#include <sys/types.h>
@ -378,5 +377,3 @@ protected:
#define ADD_TIMER(timer, t, do_expire, type) \
AddTimer(timer_func(timer), (t), (do_expire), (type))
#endif

View file

@ -4,8 +4,7 @@
// TODO: - Document how to use this.
// - Find some nice macro-based interface?
#ifndef continuation_h
#define continuation_h
#pragma once
#include "List.h"
@ -54,5 +53,3 @@ private:
voidp_list states;
};
#endif

View file

@ -136,8 +136,7 @@
------------------------------------------------------------------------ */
#ifndef LLVM_SUPPORT_CONVERTUTF_H
#define LLVM_SUPPORT_CONVERTUTF_H
#pragma once
/* ---------------------------------------------------------------------
The following 4 definitions are compiler-specific.
@ -232,5 +231,3 @@ unsigned getNumBytesForUTF8(UTF8 firstByte);
#endif
/* --------------------------------------------------------------------- */
#endif

View file

@ -1,8 +1,7 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef dfa_h
#define dfa_h
#pragma once
#include <assert.h>
@ -146,5 +145,3 @@ inline DFA_State* DFA_State::Xtion(int sym, DFA_Machine* machine)
else
return xtions[sym];
}
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef dnsmgr_h
#define dnsmgr_h
#pragma once
#include <list>
#include <map>
@ -246,5 +245,3 @@ protected:
};
extern DNS_Mgr* dns_mgr;
#endif

View file

@ -1,7 +1,6 @@
// Structures and methods for implementing breakpoints in the Bro debugger.
#ifndef DbgBreakpoint_h
#define DbgBreakpoint_h
#pragma once
#include "Debug.h"
@ -77,5 +76,3 @@ protected:
string condition; // condition to evaluate; nil for none
};
#endif

View file

@ -1,7 +1,6 @@
// Structures and methods for implementing watches in the Bro debugger.
#ifndef dbg_display_h
#define dbg_display_h
#pragma once
#include "Debug.h"
@ -24,5 +23,3 @@ protected:
bool enabled;
Expr* expression;
};
#endif

View file

@ -1,7 +1,6 @@
// Structures and methods for implementing watches in the Bro debugger.
#ifndef dbgwatch_h
#define dbgwatch_h
#pragma once
#include "Debug.h"
@ -15,5 +14,3 @@ protected:
BroObj* var;
Expr* expr;
};
#endif

View file

@ -1,7 +1,6 @@
// Debugging support for Bro policy files.
#ifndef debug_h
#define debug_h
#pragma once
#include <vector>
#include <map>
@ -180,5 +179,3 @@ extern std::map<string, Filemap*> g_dbgfilemaps; // filename => filemap
// Perhaps add a code/priority argument to do selective output.
int debug_msg(const char* fmt, ...) __attribute__ ((format (printf, 1, 2)));
#endif

View file

@ -1,8 +1,7 @@
// Support routines to help deal with Bro debugging commands and
// implementation of most commands.
#ifndef debug_cmds_h
#define debug_cmds_h
#pragma once
#include <stdlib.h>
#include <string>
@ -77,5 +76,3 @@ DbgCmdFn dbg_cmd_print;
DbgCmdFn dbg_cmd_info;
DbgCmdFn dbg_cmd_list;
DbgCmdFn dbg_cmd_trace;
#endif

View file

@ -1,8 +1,7 @@
// A logger for (selective) debugging output. Only compiled in if DEBUG is
// defined.
#ifndef debug_logger_h
#define debug_logger_h
#pragma once
#ifdef DEBUG
@ -103,5 +102,3 @@ extern DebugLogger debug_logger;
#define DBG_POP(stream)
#define PLUGIN_DBG_LOG(plugin, args...)
#endif
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef descriptor_h
#define descriptor_h
#pragma once
#include <stdio.h>
#include <set>
@ -202,5 +201,3 @@ protected:
std::set<const BroType*> encountered_types;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef dict_h
#define dict_h
#pragma once
#include "List.h"
#include "Hash.h"
@ -219,5 +218,3 @@ public:
T* RemoveEntry(const HashKey* key)
{ return (T*) Remove(key->Key(), key->Size(), key->Hash()); }
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef discard_h
#define discard_h
#pragma once
#include "IP.h"
#include "Func.h"
@ -35,5 +34,3 @@ protected:
// Maximum amount of application data passed to filtering functions.
int discarder_maxlen;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef equiv_class_h
#define equiv_class_h
#pragma once
#include <stdio.h>
@ -42,5 +41,3 @@ protected:
int* ccl_flags;
int ec_nil, no_class, no_rep;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef event_h
#define event_h
#pragma once
#include "EventRegistry.h"
@ -143,5 +142,3 @@ protected:
};
extern EventMgr mgr;
#endif

View file

@ -1,7 +1,6 @@
// Capsulates local and remote event handlers.
#ifndef EVENTHANDLER
#define EVENTHANDLER
#pragma once
#include <assert.h>
#include <unordered_set>
@ -90,5 +89,3 @@ public:
private:
EventHandler* handler;
};
#endif

View file

@ -1,6 +1,3 @@
#ifndef event_launcher_h
#define event_launcher_h
#pragma once
#include "event.bif.func_h"
#endif

View file

@ -1,7 +1,6 @@
// Each event raised/handled by Bro is registered in the EventRegistry.
#ifndef EVENT_REGISTRY
#define EVENT_REGISTRY
#pragma once
#include <map>
#include <string>
@ -43,5 +42,3 @@ private:
};
extern EventRegistry* event_registry;
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef expr_h
#define expr_h
#pragma once
// BRO expressions.
@ -1108,5 +1107,3 @@ extern int expr_greater(const Expr* e1, const Expr* e2);
// True if the given Val* has a vector type
inline bool is_vector(Expr* e) { return e->Type()->Tag() == TYPE_VECTOR; }
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef file_h
#define file_h
#pragma once
#include <fcntl.h>
#include "util.h"
@ -102,5 +101,3 @@ protected:
private:
static std::list<std::pair<std::string, BroFile*>> open_files;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef BRO_FLARE_H
#define BRO_FLARE_H
#pragma once
#include "Pipe.h"
@ -40,5 +39,3 @@ private:
};
} // namespace bro
#endif // BRO_FLARE_H

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef frag_h
#define frag_h
#pragma once
#include <tuple>
@ -67,5 +66,3 @@ public:
protected:
FragReassembler* f;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef frame_h
#define frame_h
#pragma once
#include <unordered_map>
#include <memory>
@ -282,5 +281,3 @@ private:
* https://stackoverflow.com/a/16211097
*/
extern std::vector<Frame*> g_frame_stack;
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef func_h
#define func_h
#pragma once
#include <utility>
#include <memory>
@ -207,5 +206,3 @@ extern std::string render_call_stack();
// This is set to true after the built-in functions have been initialized.
extern bool did_builtin_init;
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef hash_h
#define hash_h
#pragma once
#include <stdlib.h>
@ -86,5 +85,3 @@ protected:
};
extern void init_hash_function();
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef id_h
#define id_h
#pragma once
#include "Type.h"
#include "Attr.h"
@ -132,5 +131,3 @@ protected:
bool infer_return_type;
bool weak_ref;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef ip_h
#define ip_h
#pragma once
#include "zeek-config.h"
#include "net_util.h"
@ -586,5 +585,3 @@ private:
bool del;
const IPv6_Hdr_Chain* ip6_hdrs;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef IPADDR_H
#define IPADDR_H
#pragma once
#include <netinet/in.h>
#include <arpa/inet.h>
@ -736,5 +735,3 @@ private:
IPAddr prefix; // We store it as an address with the non-prefix bits masked out via Mask().
uint8_t length; // The bit length of the prefix relative to full IPv6 addr.
};
#endif

View file

@ -4,8 +4,7 @@
// It's implemented via a bitmap so the memory usage increases linearly
// with max(set).
#ifndef intset_h
#define intset_h
#pragma once
#include <string.h>
@ -68,5 +67,3 @@ inline void IntSet::Clear()
{
bzero(set, size);
}
#endif

View file

@ -1,5 +1,4 @@
#ifndef list_h
#define list_h
#pragma once
// BaseList.h --
// Interface for class BaseList, current implementation is as an
@ -348,5 +347,3 @@ typedef PList<char> name_list;
#define loop_over_list(list, iterator) \
int iterator; \
for ( iterator = 0; iterator < (list).length(); ++iterator )
#endif /* list_h */

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef nfa_h
#define nfa_h
#pragma once
#include "RE.h"
#include "IntSet.h"
@ -133,5 +132,3 @@ extern NFA_state_list* epsilon_closure(NFA_state_list* states);
// For sorting NFA states based on their ID fields (decreasing)
extern bool NFA_state_cmp_neg(const NFA_State* v1, const NFA_State* v2);
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef net_h
#define net_h
#pragma once
#include "net_util.h"
#include "util.h"
@ -99,5 +98,3 @@ struct ScannedFile {
extern std::list<ScannedFile> files_scanned;
extern std::vector<string> sig_files;
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef netvar_h
#define netvar_h
#pragma once
#include "Val.h"
#include "Func.h"
@ -203,5 +202,3 @@ extern void init_net_var();
#include "types.bif.netvar_h"
#include "event.bif.netvar_h"
#include "reporter.bif.netvar_h"
#endif

View file

@ -5,8 +5,7 @@
// from notifier::Receiver and register the interesting objects with the
// notification::Registry.
#ifndef NOTIFIER_H
#define NOTIFIER_H
#pragma once
#include <set>
#include <unordered_map>
@ -112,5 +111,3 @@ protected:
};
}
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef obj_h
#define obj_h
#pragma once
#include <limits.h>
@ -212,5 +211,3 @@ inline void Unref(BroObj* o)
// A dict_delete_func that knows to Unref() dictionary entries.
extern void bro_obj_delete_func(void* v);
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef OPAQUEVAL_H
#define OPAQUEVAL_H
#pragma once
#include <broker/data.hh>
#include <broker/expected.hh>
@ -335,5 +334,3 @@ protected:
private:
std::unique_ptr<paraglob::Paraglob> internal_paraglob;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef packetdumper_h
#define packetdumper_h
#pragma once
using namespace std;
@ -38,5 +37,3 @@ struct ltipid {
typedef set<IP_ID, ltipid> IP_IDSet;
uint16_t NextIP_ID(const uint32_t src_addr, const uint16_t id);
#endif

View file

@ -1,7 +1,6 @@
// Provides some very limited but fast packet filter mechanisms
#ifndef PACKETFILTER_H
#define PACKETFILTER_H
#pragma once
#include "IP.h"
#include "PrefixTable.h"
@ -41,5 +40,3 @@ private:
PrefixTable src_filter;
PrefixTable dst_filter;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef BRO_PIPE_H
#define BRO_PIPE_H
#pragma once
namespace bro {
@ -52,5 +51,3 @@ private:
};
} // namespace bro
#endif // BRO_PIPE_H

View file

@ -1,3 +1,5 @@
#pragma once
// Functions for displaying the contents of policy files.
// Mostly useful for debugging code that wants to show context.
//

View file

@ -1,5 +1,4 @@
#ifndef PREFIXTABLE_H
#define PREFIXTABLE_H
#pragma once
#include "Val.h"
#include "net_util.h"
@ -55,5 +54,3 @@ private:
patricia_tree_t* tree;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef __PriorityQueue__
#define __PriorityQueue__
#pragma once
#include <math.h>
#include "util.h"
@ -96,5 +95,3 @@ protected:
int max_heap_size;
uint64_t cumulative_num;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef queue_h
#define queue_h
#pragma once
// Queue.h --
// Interface for class Queue, current implementation is as an
@ -195,5 +194,3 @@ protected:
template<typename T>
using PQueue = Queue<T*>;
#endif /* queue_h */

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef re_h
#define re_h
#pragma once
#include "Obj.h"
#include "Dict.h"
@ -229,5 +228,3 @@ protected:
extern RE_Matcher* RE_Matcher_conjunction(const RE_Matcher* re1, const RE_Matcher* re2);
extern RE_Matcher* RE_Matcher_disjunction(const RE_Matcher* re1, const RE_Matcher* re2);
#endif

View file

@ -1,5 +1,4 @@
#ifndef RANDTEST_H
#define RANDTEST_H
#pragma once
#include "util.h"
@ -29,5 +28,3 @@ class RandTest {
double cexp, montex, montey, montepi,
sccu0, scclast, scct1, scct2, scct3;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef reassem_h
#define reassem_h
#pragma once
#include "Obj.h"
#include "IPAddr.h"
@ -111,5 +110,3 @@ inline DataBlock::~DataBlock()
Reassembler::sizes[rtype] -= pad_size(upper - seq) + padded_sizeof(DataBlock);
delete [] block;
}
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef REPORTER_H
#define REPORTER_H
#pragma once
#include <stdarg.h>
@ -280,5 +279,3 @@ private:
};
extern Reporter* reporter;
#endif

View file

@ -1,5 +1,4 @@
#ifndef rule_h
#define rule_h
#pragma once
#include <limits.h>
#include <map>
@ -108,5 +107,3 @@ private:
// Array of rules indexed by payloadid.
static rule_list rule_table;
};
#endif

View file

@ -1,5 +1,4 @@
#ifndef ruleaction_h
#define ruleaction_h
#pragma once
#include "BroString.h"
#include "List.h"
@ -98,5 +97,3 @@ public:
void PrintDebug() override;
};
#endif

View file

@ -1,5 +1,4 @@
#ifndef rulecondition_h
#define rulecondition_h
#pragma once
#include "BroString.h"
#include "Func.h"
@ -117,5 +116,3 @@ private:
};
#endif

View file

@ -1,5 +1,4 @@
#ifndef sigs_h
#define sigs_h
#pragma once
#include <limits.h>
#include <vector>
@ -391,5 +390,3 @@ private:
RuleEndpointState* orig_match_state;
RuleEndpointState* resp_match_state;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef scope_h
#define scope_h
#pragma once
#include <string>
#include <map>
@ -92,5 +91,3 @@ extern Scope* global_scope();
// Current module (identified by its name).
extern string current_module;
#endif

View file

@ -1,7 +1,6 @@
// Implements different data formats for serialization.
#ifndef SERIALIZATION_FORMAT
#define SERIALIZATION_FORMAT
#pragma once
#include <string>
@ -133,5 +132,3 @@ public:
bool WriteCloseTag(const char* tag) override;
bool WriteSeparator() override;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef sessions_h
#define sessions_h
#pragma once
#include <map>
#include <utility>
@ -283,5 +282,3 @@ private:
// Manager for the currently active sessions.
extern NetSessions* sessions;
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef smith_waterman_h
#define smith_waterman_h
#pragma once
#include "BroString.h"
#include <map>
@ -153,5 +152,3 @@ struct SWParams {
extern BroSubstring::Vec* smith_waterman(const BroString* s1,
const BroString* s2,
SWParams& params);
#endif

View file

@ -1,7 +1,6 @@
// Classes that collect and report statistics.
#ifndef STATS_H
#define STATS_H
#pragma once
#include <sys/types.h>
#include <sys/time.h>
@ -131,5 +130,3 @@ protected:
uint64_t pkt_cnt;
uint64_t byte_cnt;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef stmt_h
#define stmt_h
#pragma once
// BRO statements.
@ -495,5 +494,3 @@ protected:
Expr* timeout;
bool is_return;
};
#endif

View file

@ -1,8 +1,7 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef stmt_enums_h
#define stmt_enums_h
#pragma once
// These are in a separate file to break circular dependences
typedef enum {
@ -31,5 +30,3 @@ typedef enum {
} stmt_flow_type;
extern const char* stmt_name(BroStmtTag t);
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef TAG_H
#define TAG_H
#pragma once
#include "zeek-config.h"
#include "util.h"
@ -139,5 +138,3 @@ private:
subtype_t subtype; // Subtype.
mutable EnumVal* val; // Script-layer value.
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef timer_h
#define timer_h
#pragma once
#include <string>
@ -175,5 +174,3 @@ protected:
};
extern TimerMgr* timer_mgr;
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef traverse_h
#define traverse_h
#pragma once
#include "Obj.h"
#include "Stmt.h"
@ -38,5 +37,3 @@ public:
};
TraversalCode traverse_all(TraversalCallback* cb);
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef statictypes_h
#define statictypes_h
#pragma once
enum TraversalCode {
TC_CONTINUE = 0,
@ -35,5 +34,3 @@ enum TraversalCode {
return (code);
class TraversalCallback;
#endif

View file

@ -1,5 +1,4 @@
#ifndef TRIGGER_H
#define TRIGGER_H
#pragma once
#include <list>
#include <map>
@ -112,5 +111,3 @@ private:
static unsigned long total_triggers;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef TUNNELS_H
#define TUNNELS_H
#pragma once
#include "zeek-config.h"
#include "NetVar.h"
@ -216,5 +215,3 @@ public:
protected:
vector<EncapsulatingConn>* conns;
};
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef type_h
#define type_h
#pragma once
#include <string>
#include <set>
@ -735,5 +734,3 @@ extern int is_assignable(BroType* t);
// True if either tag is the error type.
#define EitherError(t1, t2) (IsErrorType(t1) || IsErrorType(t2))
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef BRO_UID_H
#define BRO_UID_H
#pragma once
#include <string>
@ -111,5 +110,3 @@ inline std::string UID::Base62(std::string prefix) const
}
} // namespace Bro
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef val_h
#define val_h
#pragma once
#include <vector>
#include <list>
@ -1133,5 +1132,3 @@ extern bool can_cast_value_to_type(const Val* v, BroType* t);
// However, even this function returns true, casting may still fail for a
// specific instance later.
extern bool can_cast_value_to_type(const BroType* s, BroType* t);
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef var_h
#define var_h
#pragma once
#include <memory> // std::unique_ptr
@ -49,5 +48,3 @@ extern Func* internal_func(const char* name);
extern EventHandlerPtr internal_handler(const char* name);
extern int signal_val; // 0 if no signal pending
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef WEIRDSTATE_H
#define WEIRDSTATE_H
#pragma once
#include <string>
#include <unordered_map>
@ -16,6 +15,3 @@ using WeirdStateMap = std::unordered_map<std::string, WeirdState>;
bool PermitWeird(WeirdStateMap& wsm, const char* name, uint64_t threshold,
uint64_t rate, double duration);
#endif // WEIRDSTATE_H

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef ANALYZER_ANALYZER_H
#define ANALYZER_ANALYZER_H
#pragma once
#include <list>
#include <vector>
@ -918,5 +917,3 @@ private:
};
}
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef ANALYZER_COMPONENT_H
#define ANALYZER_COMPONENT_H
#pragma once
#include "Tag.h"
#include "plugin/Component.h"
@ -109,5 +108,3 @@ private:
};
}
#endif

View file

@ -18,8 +18,7 @@
* maintains mappings of (1) analyzer::Tag to component, and (2)
* human-readable analyzer name to component.
*/
#ifndef ANALYZER_MANAGER_H
#define ANALYZER_MANAGER_H
#pragma once
#include <queue>
#include <vector>
@ -417,5 +416,3 @@ extern analyzer::Manager* analyzer_mgr;
# define DBG_ANALYZER(conn, txt)
# define DBG_ANALYZER_ARGS(conn, fmt, args...)
#endif
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef ANALYZER_TAG_H
#define ANALYZER_TAG_H
#pragma once
#include "zeek-config.h"
#include "util.h"
@ -110,5 +109,3 @@ protected:
};
}
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef ANALYZER_PROTOCOL_ARP_ARP_H
#define ANALYZER_PROTOCOL_ARP_ARP_H
#pragma once
#include "zeek-config.h"
#include <sys/types.h>
@ -53,5 +52,3 @@ protected:
};
} } // namespace analyzer::*
#endif

View file

@ -1,5 +1,4 @@
#ifndef ANALYZER_PROTOCOL_AYIYA_AYIYA_H
#define ANALYZER_PROTOCOL_AYIYA_AYIYA_H
#pragma once
#include "ayiya_pac.h"
@ -22,5 +21,3 @@ protected:
};
} } // namespace analyzer::*
#endif

View file

@ -1,7 +1,6 @@
// This code contributed by Nadi Sarrar.
#ifndef ANALYZER_PROTOCOL_BITTORRENT_BITTORRENT_H
#define ANALYZER_PROTOCOL_BITTORRENT_BITTORRENT_H
#pragma once
#include "analyzer/protocol/tcp/TCP.h"
@ -31,5 +30,3 @@ protected:
};
} } // namespace analyzer::*
#endif

View file

@ -1,7 +1,6 @@
// This code contributed by Nadi Sarrar.
#ifndef ANALYZER_PROTOCOL_BITTORRENT_BITTORRENTTRACKER_H
#define ANALYZER_PROTOCOL_BITTORRENT_BITTORRENTTRACKER_H
#pragma once
#include "analyzer/protocol/tcp/TCP.h"
@ -129,5 +128,3 @@ protected:
};
} } // namespace analyzer::*
#endif

View file

@ -1,8 +1,7 @@
// See the file "COPYING" in the main distribution directory for copyright.
//
#ifndef ANALYZER_PROTOCOL_CONN_SIZE_CONNSIZE_H
#define ANALYZER_PROTOCOL_CONN_SIZE_CONNSIZE_H
#pragma once
#include "analyzer/Analyzer.h"
#include "NetVar.h"
@ -52,5 +51,3 @@ protected:
};
} } // namespace analyzer::*
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef ANALYZER_PROTOCOL_DCE_RPC_DCE_RPC_H
#define ANALYZER_PROTOCOL_DCE_RPC_DCE_RPC_H
#pragma once
#include "NetVar.h"
#include "analyzer/protocol/tcp/TCP.h"
@ -34,5 +33,3 @@ protected:
};
} } // namespace analyzer::*
#endif /* dce_rpc_h */

View file

@ -1,5 +1,4 @@
#ifndef ANALYZER_PROTOCOL_DHCP_DHCP_H
#define ANALYZER_PROTOCOL_DHCP_DHCP_H
#pragma once
#include "analyzer/protocol/udp/UDP.h"
@ -24,5 +23,3 @@ protected:
};
} } // namespace analyzer::*
#endif

View file

@ -1,6 +1,5 @@
#ifndef ANALYZER_PROTOCOL_DNP3_DNP3_H
#define ANALYZER_PROTOCOL_DNP3_DNP3_H
#pragma once
#include "analyzer/protocol/tcp/TCP.h"
#include "analyzer/protocol/udp/UDP.h"
@ -90,5 +89,3 @@ public:
} } // namespace analyzer::*
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef ANALYZER_PROTOCOL_DNS_DNS_H
#define ANALYZER_PROTOCOL_DNS_DNS_H
#pragma once
#include "analyzer/protocol/tcp/TCP.h"
#include "binpac_bro.h"
@ -375,5 +374,3 @@ protected:
int IsReuse(double t, const u_char* pkt);
} } // namespace analyzer::*
#endif

View file

@ -1,7 +1,6 @@
// Analyzer for connections that transfer binary data.
#ifndef ANALYZER_PROTOCOL_FILE_FILE_H
#define ANALYZER_PROTOCOL_FILE_FILE_H
#pragma once
#include "analyzer/protocol/tcp/TCP.h"
@ -53,5 +52,3 @@ public:
};
} } // namespace analyzer::*
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef ANALYZER_PROTOCOL_FINGER_FINGER_H
#define ANALYZER_PROTOCOL_FINGER_FINGER_H
#pragma once
#include "analyzer/protocol/tcp/TCP.h"
#include "analyzer/protocol/tcp/ContentLine.h"
@ -27,5 +26,3 @@ protected:
};
} } // namespace analyzer::*
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef ANALYZER_PROTOCOL_FTP_FTP_H
#define ANALYZER_PROTOCOL_FTP_FTP_H
#pragma once
#include "analyzer/protocol/login/NVT.h"
#include "analyzer/protocol/tcp/TCP.h"
@ -50,5 +49,3 @@ protected:
};
} } // namespace analyzer::*
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef ANALYZER_PROTOCOL_GNUTELLA_GNUTELLA_H
#define ANALYZER_PROTOCOL_GNUTELLA_GNUTELLA_H
#pragma once
#include "analyzer/protocol/tcp/TCP.h"
@ -70,5 +69,3 @@ private:
};
} } // namespace analyzer::*
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef ANALYZER_PROTOCOL_GSSAPI_GSSAPI_H
#define ANALYZER_PROTOCOL_GSSAPI_GSSAPI_H
#pragma once
#include "events.bif.h"
#include "analyzer/protocol/tcp/TCP.h"
@ -35,5 +34,3 @@ protected:
};
} } // namespace analyzer::*
#endif

View file

@ -1,5 +1,4 @@
#ifndef ANALYZER_PROTOCOL_GTPV1_GTPV1_H
#define ANALYZER_PROTOCOL_GTPV1_GTPV1_H
#pragma once
#include "gtpv1_pac.h"
@ -22,5 +21,3 @@ protected:
};
} } // namespace analyzer::*
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef ANALYZER_PROTOCOL_HTTP_HTTP_H
#define ANALYZER_PROTOCOL_HTTP_HTTP_H
#pragma once
#include "analyzer/protocol/tcp/TCP.h"
#include "analyzer/protocol/tcp/ContentLine.h"
@ -271,5 +270,3 @@ extern BroString* unescape_URI(const u_char* line, const u_char* line_end,
analyzer::Analyzer* analyzer);
} } // namespace analyzer::*
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef ANALYZER_PROTOCOL_ICMP_ICMP_H
#define ANALYZER_PROTOCOL_ICMP_ICMP_H
#pragma once
#include "RuleMatcher.h"
#include "analyzer/Analyzer.h"
@ -91,5 +90,3 @@ extern int ICMP4_counterpart(int icmp_type, int icmp_code, bool& is_one_way);
extern int ICMP6_counterpart(int icmp_type, int icmp_code, bool& is_one_way);
} } // namespace analyzer::*
#endif

View file

@ -1,7 +1,6 @@
// See the file "COPYING" in the main distribution directory for copyright.
#ifndef ANALYZER_PROTOCOL_IDENT_IDENT_H
#define ANALYZER_PROTOCOL_IDENT_IDENT_H
#pragma once
#include "analyzer/protocol/tcp/TCP.h"
#include "analyzer/protocol/tcp/ContentLine.h"
@ -35,5 +34,3 @@ protected:
};
} } // namespace analyzer::*
#endif

Some files were not shown because too many files have changed in this diff Show more