diff --git a/src/Anon.cc b/src/Anon.cc index 7780a4dfd5..8bcdd69afd 100644 --- a/src/Anon.cc +++ b/src/Anon.cc @@ -171,7 +171,7 @@ bool AnonymizeIPAddr_A50::PreservePrefix(ipaddr32_t input, int num_bits) if ( ! before_anonymization ) { - reporter->Error("prefix perservation specified after anonymization begun"); + reporter->Error("prefix preservation specified after anonymization begun"); return false; } diff --git a/src/Attr.cc b/src/Attr.cc index d927af639c..d486090f87 100644 --- a/src/Attr.cc +++ b/src/Attr.cc @@ -514,7 +514,7 @@ void Attributes::CheckAttr(Attr* a) } // Only support atomic types for the moment, unless - // explicitly overriden + // explicitly overridden if ( ! type->AsTableType()->IsSet() && ! input::Manager::IsCompatibleType(type->AsTableType()->Yield().get(), true) && ! Find(ATTR_BROKER_STORE_ALLOW_COMPLEX) ) @@ -549,7 +549,7 @@ void Attributes::CheckAttr(Attr* a) } // Only support atomic types for the moment, unless - // explicitly overriden + // explicitly overridden if ( ! type->AsTableType()->IsSet() && ! input::Manager::IsCompatibleType(type->AsTableType()->Yield().get(), true) && ! Find(ATTR_BROKER_STORE_ALLOW_COMPLEX) ) diff --git a/src/CompHash.h b/src/CompHash.h index b5cb0ed53a..eb76090bd3 100644 --- a/src/CompHash.h +++ b/src/CompHash.h @@ -45,7 +45,7 @@ protected: // Compute the size of the composite key. If v is non-nil then // the value is computed for the particular list of values. - // Returns 0 if the key has an indeterminant size (if v not given), + // Returns 0 if the key has an indeterminate size (if v not given), // or if v doesn't match the index type (if given). bool ReserveKeySize(HashKey& hk, const Val* v, bool type_check, bool calc_static_size) const; diff --git a/src/Conn.cc b/src/Conn.cc index e27c0923bd..e01fce29c3 100644 --- a/src/Conn.cc +++ b/src/Conn.cc @@ -400,7 +400,7 @@ void Connection::Describe(ODesc* d) const case TRANSPORT_UNKNOWN: d->Add("unknown"); - reporter->InternalWarning("unknown transport in Connction::Describe()"); + reporter->InternalWarning("unknown transport in Connection::Describe()"); break; diff --git a/src/DNS_Mgr.cc b/src/DNS_Mgr.cc index 46739eeddf..addab9ed76 100644 --- a/src/DNS_Mgr.cc +++ b/src/DNS_Mgr.cc @@ -350,7 +350,7 @@ static int get_ttl(unsigned char* abuf, int alen, int* ttl) /** * Called in response to ares_getaddrinfo requests. Builds a hostent structure from - * the result data and sends it to the DNS manager via Addresult(). + * the result data and sends it to the DNS manager via AddResult(). */ static void addrinfo_cb(void* arg, int status, int timeouts, struct ares_addrinfo* result) { @@ -536,7 +536,7 @@ static void query_cb(void* arg, int status, int timeouts, unsigned char* buf, in } /** - * Called when the c-ares socket changes state, whcih indicates that it's connected to + * Called when the c-ares socket changes state, which indicates that it's connected to * some source of data (either a host file or a DNS server). This indicates that we're * able to do lookups against c-ares now and should activate the IOSource. */ diff --git a/src/DebugCmdInfoConstants.in b/src/DebugCmdInfoConstants.in index ad90d7ed83..d00b6dbde6 100644 --- a/src/DebugCmdInfoConstants.in +++ b/src/DebugCmdInfoConstants.in @@ -25,7 +25,7 @@ cmd: dcStep names: step s resume: true repeatable: true -help: Step to following statements, stepping in to function calls +help: Step to following statements, stepping into function calls cmd: dcContinue names: continue c diff --git a/src/DebugLogger.h b/src/DebugLogger.h index 591bfb85c4..158e4dc950 100644 --- a/src/DebugLogger.h +++ b/src/DebugLogger.h @@ -46,7 +46,7 @@ enum DebugStream DBG_ANALYZER, // Analyzer framework DBG_PACKET_ANALYSIS, // Packet analysis DBG_FILE_ANALYSIS, // File analysis - DBG_TM, // Time-machine packet input via Brocolli + DBG_TM, // Time-machine packet input via Broccoli DBG_LOGGING, // Logging streams DBG_INPUT, // Input streams DBG_THREADING, // Threading system @@ -83,7 +83,7 @@ public: void EnableStream(DebugStream stream) { streams[int(stream)].enabled = true; } void DisableStream(DebugStream stream) { streams[int(stream)].enabled = false; } - // Takes comma-seperated list of stream prefixes. + // Takes comma-separated list of stream prefixes. void EnableStreams(const char* streams); // Check the enabled streams for invalid ones. diff --git a/src/Desc.cc b/src/Desc.cc index ba5849c226..dc022528bf 100644 --- a/src/Desc.cc +++ b/src/Desc.cc @@ -363,7 +363,7 @@ void ODesc::AddBytesRaw(const void* bytes, unsigned int n) // The following casting contortions are necessary because // simply using &base[offset] generates complaints about - // using a void* for pointer arithemtic. + // using a void* for pointer arithmetic. memcpy((void*)&((char*)base)[offset], bytes, n); offset += n; diff --git a/src/Dict.h b/src/Dict.h index 58fa6b401d..859791f4f7 100644 --- a/src/Dict.h +++ b/src/Dict.h @@ -535,7 +535,7 @@ public: { if ( initial_size > 0 ) { - // If an initial size is speicified, init the table right away. Otherwise wait until the + // If an initial size is specified, init the table right away. Otherwise wait until the // first insertion to init. SetLog2Buckets(static_cast(std::log2(initial_size))); Init(); @@ -640,7 +640,7 @@ public: if ( order ) order->emplace_back(detail::HashKey{key, static_cast(key_size), hash}); - // Allocate memory for key if necesary. Key is updated to reflect internal key if + // Allocate memory for key if necessary. Key is updated to reflect internal key if // necessary. detail::DictEntry entry(key, key_size, hash, val, insert_distance, copy_key); InsertRelocateAndAdjust(entry, insert_position); @@ -1250,7 +1250,7 @@ private: // not found #ifdef ZEEK_DICT_DEBUG if ( linear_position >= 0 ) - { // different. stop and try to see whats happending. + { // different. stop and try to see whats happening. ASSERT(false); // rerun the function in debugger to track down the bug. LookupIndex(key, key_size, hash); @@ -1654,7 +1654,7 @@ private: void IncrIters() { ++num_iterators; } void DecrIters() { --num_iterators; } - // alligned on 8-bytes with 4-leading bytes. 7*8=56 bytes a dictionary. + // aligned on 8-bytes with 4-leading bytes. 7*8=56 bytes a dictionary. // when sizeup but the current mapping is in progress. the current mapping will be ignored // as it will be remapped to new dict size anyway. however, the missed count is recorded diff --git a/src/Event.cc b/src/Event.cc index 8759eeed74..2a894cfbfd 100644 --- a/src/Event.cc +++ b/src/Event.cc @@ -139,7 +139,7 @@ void EventMgr::Drain() // a handler queued new events during its execution. This could lead // to endless loops in case a handler kept triggering its own event. // We now limit this to just a couple of rounds. We do more than - // just one round to make it less likley to break existing scripts + // just one round to make it less likely to break existing scripts // that expect the old behavior to trigger something quickly. for ( int round = 0; head && round < 2; round++ ) diff --git a/src/EventRegistry.cc b/src/EventRegistry.cc index f4c68c5ad2..d83368510c 100644 --- a/src/EventRegistry.cc +++ b/src/EventRegistry.cc @@ -172,7 +172,7 @@ EventGroup::~EventGroup() noexcept { } // Run through all ScriptFunc instances associated with this group and // update their bodies after a group's enable/disable state has changed. // -// EventGroup is private friend with Func, so fiddeling with the bodies +// EventGroup is private friend with Func, so fiddling with the bodies // directly works and keeps the logic away from Func for now. void EventGroup::UpdateFuncBodies() { diff --git a/src/EventRegistry.h b/src/EventRegistry.h index 52dbdec005..f79951224d 100644 --- a/src/EventRegistry.h +++ b/src/EventRegistry.h @@ -125,7 +125,7 @@ private: * Different kinds of event groups exist. Currently, attribute and module * event groups are implemented. The first relates to event handler tagged * with the &group attribute. The second is based on grouping event and hook - * handlers by the module in which and these are implmented. + * handlers by the module in which and these are implemented. * * Different kinds of are separate: Disabling the "HTTP" module event group does * not disable event handlers tagged with &group="HTTP", or vice versa. diff --git a/src/EventTrace.cc b/src/EventTrace.cc index e55e368e00..168c720164 100644 --- a/src/EventTrace.cc +++ b/src/EventTrace.cc @@ -462,7 +462,7 @@ void ValTrace::ComputeTableDelta(const ValTrace* prev, DeltaVector& deltas) cons // We can't compare pointers for the indices because they're // new objects generated afresh by TableVal::ToMap. So we do - // explict full comparisons for equality, distinguishing values + // explicit full comparisons for equality, distinguishing values // newly added, common to both, or (implicitly) removed. We'll // then go through the common to check them further. // @@ -561,7 +561,7 @@ void ValTrace::ComputeVectorDelta(const ValTrace* prev, DeltaVector& deltas) con return; } - // Look for existing entries that need reassigment. + // Look for existing entries that need reassignment. auto i = 0U; for ( ; i < prev_n; ++i ) { diff --git a/src/Expr.cc b/src/Expr.cc index 318d9369cb..afe1e70437 100644 --- a/src/Expr.cc +++ b/src/Expr.cc @@ -1143,7 +1143,7 @@ ValPtr BinaryExpr::SetFold(Val* v1, Val* v2) const case EXPR_GE: case EXPR_GT: - // These should't happen due to canonicalization. + // These shouldn't happen due to canonicalization. reporter->InternalError("confusion over canonicalization in set comparison"); break; diff --git a/src/Expr.h b/src/Expr.h index 9cffbabd3f..4d5603ff67 100644 --- a/src/Expr.h +++ b/src/Expr.h @@ -955,7 +955,7 @@ public: bool HasReducedOps(Reducer* c) const override; ExprPtr Reduce(Reducer* c, StmtPtr& red_stmt) override; - // Reduce to simplifed LHS form, i.e., a reference to only a name. + // Reduce to simplified LHS form, i.e., a reference to only a name. StmtPtr ReduceToLHS(Reducer* c); }; diff --git a/src/File.h b/src/File.h index 5d675a88d8..e5c2dab9c8 100644 --- a/src/File.h +++ b/src/File.h @@ -44,7 +44,7 @@ public: const char* Name() const; - // Returns false if an error occured. + // Returns false if an error occurred. bool Write(const char* data, int len = 0); void Flush() { fflush(f); } diff --git a/src/Frame.h b/src/Frame.h index b56f547680..774dd435e5 100644 --- a/src/Frame.h +++ b/src/Frame.h @@ -86,7 +86,7 @@ public: * Gets the value associated with *id* and returns it. Returns * nullptr if no such element exists. * - * @param id the id who's value to retreive + * @param id the id who's value to retrieve * @return the value associated with *id* */ const ValPtr& GetElementByID(const IDPtr& id) const { return GetElementByID(id.get()); } @@ -247,7 +247,7 @@ private: /** The arguments to the function that this Frame is associated with. */ const zeek::Args* func_args; - /** The next statement to be evaluted in the context of this frame. */ + /** The next statement to be evaluated in the context of this frame. */ Stmt* next_stmt; trigger::TriggerPtr trigger; diff --git a/src/Hash.cc b/src/Hash.cc index 9229655800..c9c9f16af2 100644 --- a/src/Hash.cc +++ b/src/Hash.cc @@ -592,7 +592,7 @@ bool HashKey::Equal(const void* other_key, size_t other_size, hash_t other_hash) return true; // If either key is nullptr, return false. If they were both nullptr, it - // would have fallen in to the above block already. + // would have fallen into the above block already. if ( key == nullptr || other_key == nullptr ) return false; diff --git a/src/Hash.h b/src/Hash.h index 4f70ce1219..cc5f5967be 100644 --- a/src/Hash.h +++ b/src/Hash.h @@ -360,7 +360,7 @@ public: protected: char* CopyKey(const char* key, size_t size) const; - // Payload setters for types stored directoly in the key_u union. These + // Payload setters for types stored directly in the key_u union. These // adjust the size and write_size markers to indicate a full buffer, and // use the key_u union for storage. void Set(bool b); diff --git a/src/Notifier.h b/src/Notifier.h index bc4c65085f..de15c3ea9e 100644 --- a/src/Notifier.h +++ b/src/Notifier.h @@ -49,7 +49,7 @@ public: * @param m object to track. Does not take ownership, but the object * will automatically unregister itself on destruction. * - * @param r receiver to notify on changes. Does not take ownershop, + * @param r receiver to notify on changes. Does not take ownership, * the receiver must remain valid as long as the registration stays * in place. */ @@ -60,7 +60,7 @@ public: * modification. The arguments to the method must match what was * originally registered. * - * @param m object to no loger track. + * @param m object to no longer track. * * @param r receiver to no longer notify. */ @@ -68,9 +68,9 @@ public: /** * Cancels any active receiver requests to be informed about a - * partilar object's modifications. + * particular object's modifications. * - * @param m object to no loger track. + * @param m object to no longer track. */ void Unregister(Modifiable* m); diff --git a/src/OpaqueVal.h b/src/OpaqueVal.h index e18f889530..619c002bd8 100644 --- a/src/OpaqueVal.h +++ b/src/OpaqueVal.h @@ -42,7 +42,7 @@ using BloomFilterValPtr = IntrusivePtr; /** * Singleton that registers all available all available types of opaque - * values. This faciliates their serialization into Broker values. + * values. This facilitates their serialization into Broker values. */ class OpaqueMgr { @@ -146,7 +146,7 @@ protected: virtual broker::expected DoSerialize() const = 0; /** - * Must be overridden to recreate the the derived class' state from a + * Must be overridden to recreate the derived class' state from a * serialization. * * @return true if successful. diff --git a/src/Pipe.h b/src/Pipe.h index c2c1754af0..07bfec9861 100644 --- a/src/Pipe.h +++ b/src/Pipe.h @@ -66,7 +66,7 @@ private: }; /** - * A pair of pipes that can be used for bi-directinoal IPC. + * A pair of pipes that can be used for bi-directional IPC. */ class PipePair { diff --git a/src/RE.h b/src/RE.h index 28c343f655..b56660399f 100644 --- a/src/RE.h +++ b/src/RE.h @@ -99,9 +99,9 @@ public: bool MatchAll(const char* s); bool MatchAll(const String* s); - // Compiles a set of regular expressions simultaniously. - // 'idx' contains indizes associated with the expressions. - // On matching, the set of indizes is returned which correspond + // Compiles a set of regular expressions simultaneously. + // 'idx' contains indices associated with the expressions. + // On matching, the set of indices is returned which correspond // to the matching expressions. (idx must not contain zeros). bool CompileSet(const string_list& set, const int_list& idx); diff --git a/src/Reporter.h b/src/Reporter.h index ec057e3ab4..c52d54f8b2 100644 --- a/src/Reporter.h +++ b/src/Reporter.h @@ -77,7 +77,7 @@ public: Reporter(bool abort_on_scripting_errors); ~Reporter(); - // Initialize reporter-sepcific options that are defined in script-layer. + // Initialize reporter-specific options that are defined in script-layer. void InitOptions(); // Report an informational message, nothing that needs specific @@ -117,7 +117,7 @@ public: [[noreturn]] void CPPRuntimeError(const char* fmt, ...) __attribute__((format(printf, 2, 3))); // Report a traffic weirdness, i.e., an unexpected protocol situation - // that may lead to incorrectly processing a connnection. + // that may lead to incorrectly processing a connection. void Weird(const char* name, const char* addl = "", const char* source = ""); // Raises net_weird(). void Weird(file_analysis::File* f, const char* name, const char* addl = "", diff --git a/src/RuleCondition.cc b/src/RuleCondition.cc index 35eb903f2b..5ef39b6097 100644 --- a/src/RuleCondition.cc +++ b/src/RuleCondition.cc @@ -13,7 +13,7 @@ static inline bool is_established(const zeek::analyzer::tcp::TCP_Endpoint* e) { // We more or less follow Snort here: an established session - // is one for which the initial handshake has succeded (but we + // is one for which the initial handshake has succeeded (but we // add partial connections). The connection tear-down is part // of the connection. return e->state != zeek::analyzer::tcp::TCP_ENDPOINT_INACTIVE && diff --git a/src/RuleMatcher.cc b/src/RuleMatcher.cc index 5d22f5964d..e5f35bca5d 100644 --- a/src/RuleMatcher.cc +++ b/src/RuleMatcher.cc @@ -406,7 +406,7 @@ void RuleMatcher::BuildRulesTree() void RuleMatcher::InsertRuleIntoTree(Rule* r, int testnr, RuleHdrTest* dest, int level) { - // Initiliaze the preconditions + // Initialize the preconditions for ( const auto& pc : r->preconds ) { auto entry = rules_by_id.find(pc->id); diff --git a/src/RuleMatcher.h b/src/RuleMatcher.h index f4418dc1a3..613865c87e 100644 --- a/src/RuleMatcher.h +++ b/src/RuleMatcher.h @@ -263,7 +263,7 @@ public: bool ReadFiles(const std::vector& files); /** - * Inititialize a state object for matching file magic signatures. + * Initialize a state object for matching file magic signatures. * @return A state object that can be used for file magic mime type * identification. */ @@ -282,7 +282,7 @@ public: * RuleMatcher::InitFileMagic() * @param data Chunk of data to match signatures against. * @param len Length of \a data in bytes. - * @param matches An optional pre-existing match result object to + * @param matches An optional preexisting match result object to * modify with additional matches. If it's a null * pointer, one will be instantiated and returned from * this method. @@ -297,7 +297,7 @@ public: */ void ClearFileMagicState(RuleFileMagicState* state) const; - // Initialize the matching state for a endpoind of a connection based on + // Initialize the matching state for a endpoint of a connection based on // the given packet (which should be the first packet encountered for // this endpoint). If the matching is triggered by an PIA, a pointer to // it needs to be given. @@ -361,7 +361,7 @@ private: // Traverse tree building the combined regular expressions. void BuildRegEx(RuleHdrTest* hdr_test, string_list* exprs, int_list* ids); - // Build groups of regular epxressions. + // Build groups of regular expressions. void BuildPatternSets(RuleHdrTest::pattern_set_list* dst, const string_list& exprs, const int_list& ids); diff --git a/src/ScriptCoverageManager.h b/src/ScriptCoverageManager.h index 1cc74bb43d..b9c804ad79 100644 --- a/src/ScriptCoverageManager.h +++ b/src/ScriptCoverageManager.h @@ -54,7 +54,7 @@ private: std::list stmts; /** - * Indicates whether new statments will not be considered as part of + * Indicates whether new statements will not be considered as part of * coverage statistics because it was marked with the @no-test tag. */ uint32_t ignoring; diff --git a/src/ScriptProfile.h b/src/ScriptProfile.h index f4c41fcbbe..99b3c8f419 100644 --- a/src/ScriptProfile.h +++ b/src/ScriptProfile.h @@ -85,7 +85,7 @@ private: uint64_t memory = 0; }; -// Manages all of the profile instances assocaited with a given script. +// Manages all of the profile instances associated with a given script. class ScriptProfile : public ScriptProfileStats { @@ -102,7 +102,7 @@ public: loc = *body->GetLocationInfo(); } - // Constructor used for the special case of non-script acocunting. + // Constructor used for the special case of non-script accounting. ScriptProfile() : ScriptProfileStats("non-scripts") { func = nullptr; diff --git a/src/SmithWaterman.cc b/src/SmithWaterman.cc index 239fccca5a..7e590b0ccb 100644 --- a/src/SmithWaterman.cc +++ b/src/SmithWaterman.cc @@ -486,7 +486,7 @@ Substring::Vec* smith_waterman(const String* s1, const String* s2, SWParams& par if ( current->swn_score == score_tl && current->swn_byte_assigned ) { // If we had matched bytes (*and* it's the - // best neighbor), marke the node accordingly + // best neighbor), mark the node accordingly // if ( i >= br_max_b && j >= br_max_r ) { diff --git a/src/Stmt.cc b/src/Stmt.cc index f017301c63..a52c08ef2a 100644 --- a/src/Stmt.cc +++ b/src/Stmt.cc @@ -1964,7 +1964,7 @@ void WhenInfo::Build(StmtPtr ws) // in that the condition needs to return a boolean, whereas the body // and timeout *might* return a value (for "return when") constructs, // or might not (for vanilla "when"). We address that issue by - // (1) making the return type be "any", and (2) introducing elsehwere + // (1) making the return type be "any", and (2) introducing elsewhere // the notion of functions marked as being allowed to have bare // returns (no associated expression) even though they have a return // type (to deal with the vanilla "when" case). diff --git a/src/Trigger.h b/src/Trigger.h index 351377494e..46f07cffa3 100644 --- a/src/Trigger.h +++ b/src/Trigger.h @@ -101,7 +101,7 @@ public: // later to avoid race conditions. void Modified(zeek::notifier::detail::Modifiable* m) override; - // Overridden from notifer::Receiver. If we're still waiting + // Overridden from notifier::Receiver. If we're still waiting // on an ID/Val to be modified at termination time, we can't hope // for any further progress to be made, so just Unref ourselves. void Terminate() override; diff --git a/src/Type.cc b/src/Type.cc index 7556da698b..59c67173f7 100644 --- a/src/Type.cc +++ b/src/Type.cc @@ -1890,7 +1890,7 @@ const TypePtr& VectorType::Yield() const // Work around the fact that we use void internally to mark a vector // as being unspecified. When looking at its yield type, we need to // return any as that's what other code historically expects for type - // comparisions. + // comparisons. if ( IsUnspecifiedVector() ) return zeek::base_type(TYPE_ANY); diff --git a/src/Type.h b/src/Type.h index 0e34e83c48..c6686815cc 100644 --- a/src/Type.h +++ b/src/Type.h @@ -450,7 +450,7 @@ public: std::string deprecation_msg; RecordTypePtr args; // Maps from parameter index in canonical prototype to - // parameter index in this alternate prorotype. + // parameter index in this alternate prototype. std::map offsets; }; @@ -785,7 +785,7 @@ public: // The value of this name is set to val. Once a value has been // explicitly assigned using this method, no further names can be - // added that aren't likewise explicitly initalized. + // added that aren't likewise explicitly initialized. void AddName(const std::string& module_name, const char* name, zeek_int_t val, bool is_export, detail::Expr* deprecation = nullptr, bool from_redef = false); @@ -988,13 +988,13 @@ inline bool IsFunc(TypeTag t) return (t == TYPE_FUNC); } -// True if the given type type is a vector. +// True if the given type tag is a vector. inline bool IsVector(TypeTag t) { return (t == TYPE_VECTOR); } -// True if the given type type is a string. +// True if the given type tag is a string. inline bool IsString(TypeTag t) { return (t == TYPE_STRING); diff --git a/src/Val.cc b/src/Val.cc index 67b4c94744..cbbb71c23b 100644 --- a/src/Val.cc +++ b/src/Val.cc @@ -3005,7 +3005,7 @@ ValPtr RecordVal::DoClone(CloneState* state) // We set origin to 0 here. Origin only seems to be used for exactly one // purpose - to find the connection record that is associated with a // record. As we cannot guarantee that it will ber zeroed out at the - // approproate time (as it seems to be guaranteed for the original record) + // appropriate time (as it seems to be guaranteed for the original record) // we don't touch it. auto rv = make_intrusive(rt, false); rv->origin = nullptr; diff --git a/src/Val.h b/src/Val.h index ab1eb46036..2bf0a48c90 100644 --- a/src/Val.h +++ b/src/Val.h @@ -139,7 +139,7 @@ public: } // Add this value to the given value (if appropriate). - // Returns true if succcessful. is_first_init is true only if + // Returns true if successful. is_first_init is true only if // this is the *first* initialization of the value, not // if it's a subsequent += initialization. virtual bool AddTo(Val* v, bool is_first_init) const; @@ -846,7 +846,7 @@ public: * @return The value associated with the index. If the index doesn't * exist, this is a nullptr. For sets that don't really contain associated * values, a placeholder value is returned to differentiate it from - * non-existent index (nullptr), but otherwise has no meaning in relation + * nonexistent index (nullptr), but otherwise has no meaning in relation * to the set's contents. */ const ValPtr& Find(const ValPtr& index); @@ -857,7 +857,7 @@ public: * @param index The index to lookup in the table. * @return The value associated with the index. If the index doesn't * exist, instead returns the &default value. If there's no &default - * attribute, then nullptr is still returned for non-existent index. + * attribute, then nullptr is still returned for nonexistent index. */ ValPtr FindOrDefault(const ValPtr& index); @@ -899,7 +899,7 @@ public: * may have invalidated existing iterators. * @return The value associated with the index if it exists, else nullptr. * For a sets that don't really contain associated values, a placeholder - * value is returned to differentiate it from non-existent index (nullptr), + * value is returned to differentiate it from nonexistent index (nullptr), * but otherwise has no meaning in relation to the set's contents. */ ValPtr Remove(const Val& index, bool broker_forward = true, @@ -993,7 +993,7 @@ public: void DisableChangeNotifications() { in_change_func = true; } /** - * Re-enables change notifcations after being disabled by DisableChangeNotifications. + * Re-enables change notifications after being disabled by DisableChangeNotifications. */ void EnableChangeNotifications() { in_change_func = false; } @@ -1521,7 +1521,7 @@ public: bool AssignRepeat(unsigned int index, unsigned int how_many, ValPtr element); // Add this value to the given value (if appropriate). - // Returns true if succcessful. + // Returns true if successful. bool AddTo(Val* v, bool is_first_init) const override; unsigned int Size() const { return vector_val->size(); } @@ -1737,7 +1737,7 @@ extern ValPtr cast_value_to_type(Val* v, Type* t); // Returns true if v can be casted to type T. If so, check_and_cast() will // succeed as well. // -// Note: This implements the script-level type comparision operator. +// Note: This implements the script-level type comparison operator. extern bool can_cast_value_to_type(const Val* v, Type* t); // Returns true if values of type s may support casting to type t. This is diff --git a/src/ZeekString.cc b/src/ZeekString.cc index 7ed3a46140..f0c66a7a1d 100644 --- a/src/ZeekString.cc +++ b/src/ZeekString.cc @@ -190,7 +190,7 @@ const char* String::CheckString() const char* String::Render(int format, int* len) const { - // Maxmimum character expansion is as \xHH, so a factor of 4. + // Maximum character expansion is as \xHH, so a factor of 4. char* s = new char[n * 4 + 1]; // +1 is for final '\0' char* sp = s; int tmp_len; diff --git a/src/ZeekString.h b/src/ZeekString.h index 61b2a9ca6b..2775bb30d9 100644 --- a/src/ZeekString.h +++ b/src/ZeekString.h @@ -46,7 +46,7 @@ public: String(std::string_view str); String(const String& bs); - // Constructor that takes owernship of the vector passed in. + // Constructor that takes ownership of the vector passed in. String(bool arg_final_NUL, byte_vec str, int arg_n); String(); diff --git a/src/analyzer/Analyzer.cc b/src/analyzer/Analyzer.cc index 60203bf000..955a7186f4 100644 --- a/src/analyzer/Analyzer.cc +++ b/src/analyzer/Analyzer.cc @@ -601,7 +601,7 @@ void Analyzer::RemoveSupportAnalyzer(SupportAnalyzer* analyzer) // We mark the analyzer as being removed here, which will prevent it // from being used further. However, we don't actually delete it - // before the parent gets destroyed. While we woulc do that, it's a + // before the parent gets destroyed. While we could do that, it's a // bit tricky to do at the right time and it doesn't seem worth the // trouble. analyzer->removing = true; diff --git a/src/analyzer/Analyzer.h b/src/analyzer/Analyzer.h index f5387a2f4a..1f391aa695 100644 --- a/src/analyzer/Analyzer.h +++ b/src/analyzer/Analyzer.h @@ -61,7 +61,7 @@ using ID = uint32_t; using analyzer_timer_func = void (Analyzer::*)(double t); /** - * Class to receive processed output from an anlyzer. + * Class to receive processed output from an analyzer. */ class OutputHandler { @@ -101,7 +101,7 @@ public: * SupportAnalyzer. All analyzer input first passes through this list of * support analyzers, which can perform arbitrary preprocessing. * - * When overiding any of the class' methods, always make sure to call the + * When overriding any of the class' methods, always make sure to call the * base-class version first. */ class Analyzer @@ -293,7 +293,7 @@ public: /** * Returns the analyzer instance's internal ID. These IDs are unique - * across all analyzer instantiated and can thus be used to indentify + * across all analyzer instantiated and can thus be used to identify * a specific instance. */ ID GetID() const { return id; } @@ -310,7 +310,7 @@ public: OutputHandler* GetOutputHandler() const { return output_handler; } /** - * Associates an OutputHandler with the connnection. + * Associates an OutputHandler with the connection. * * @param handler The handler. */ @@ -330,7 +330,7 @@ public: void SetSignature(const zeek::detail::Rule* sig) { signature = sig; } /** - * Signals the analyzer to skip all further input processsing. The \a + * Signals the analyzer to skip all further input processing. The \a * Next*() methods check this flag and discard the input if its set. * * @param do_skip If true, further processing will be skipped. @@ -373,7 +373,7 @@ public: /** * Returns a textual description of the analyzer's type. This is - * what's passed to the constructor and usally corresponds to the + * what's passed to the constructor and usually corresponds to the * protocol name, e.g., "HTTP". */ const char* GetAnalyzerName() const; @@ -392,7 +392,7 @@ public: * the same type already exists or is prevented, the one passed in is * silently discarded. * - * @param analyzer The ananlyzer to add. Takes ownership. + * @param analyzer The analyzer to add. Takes ownership. * @return false if analyzer type was already a child or prevented, else true. */ bool AddChildAnalyzer(Analyzer* analyzer) { return AddChildAnalyzer(analyzer, true); } @@ -469,7 +469,7 @@ public: * Recursively searches all (direct or indirect) childs of the * analyzer for an analyzer of a given type. * - * @param name The naem of the analyzer type to search (e.g., + * @param name The name of the analyzer type to search (e.g., * "HTTP"). * * @return The first analyzer of the given type found, or null if @@ -571,7 +571,7 @@ public: * TODO: The above comment needs updating, there's no BuildConnVal() * anymore -VP * - * @param conn_val The connenction value being updated. + * @param conn_val The connection value being updated. */ virtual void UpdateConnVal(RecordVal* conn_val); @@ -617,7 +617,7 @@ protected: friend class zeek::packet_analysis::IP::IPBasedAnalyzer; /** - * Return a string represantation of an analyzer, containing its name + * Return a string representation of an analyzer, containing its name * and ID. */ static std::string fmt_analyzer(const Analyzer* a) @@ -642,7 +642,7 @@ protected: * @param t The absolute time when the timer will fire. * * @param do_expire If true, the timer will also fire when Zeek - * terminates even if \a t has not been reache yet. + * terminates even if \a t has not been reached yet. * * @param type The timer's type. */ @@ -677,12 +677,12 @@ protected: SupportAnalyzer* FirstSupportAnalyzer(bool orig); /** - * Adds a a new child analyzer with the option whether to intialize + * Adds a a new child analyzer with the option whether to initialize * it. This is an internal method. * * @param analyzer The analyzer to add. Takes ownership. * - * @param init If true, Init() will be calle.d + * @param init If true, Init() will be called. * @return false if analyzer type was already a child, else true. */ bool AddChildAnalyzer(Analyzer* analyzer, bool init); diff --git a/src/analyzer/Component.h b/src/analyzer/Component.h index 323d31a823..e82f57a0ec 100644 --- a/src/analyzer/Component.h +++ b/src/analyzer/Component.h @@ -39,7 +39,7 @@ public: * @param factory A factory function to instantiate instances of the * analyzer's class, which must be derived directly or indirectly * from zeek::analyzer::Analyzer. This is typically a static \c - * Instatiate() method inside the class that just allocates and + * Instantiate() method inside the class that just allocates and * returns a new instance. * * @param subtype A subtype associated with this component that @@ -104,7 +104,7 @@ public: protected: /** - * Overriden from plugin::Component. + * Overridden from plugin::Component. */ void DoDescribe(ODesc* d) const override; diff --git a/src/analyzer/Manager.cc b/src/analyzer/Manager.cc index dfc6236147..26f4e2951f 100644 --- a/src/analyzer/Manager.cc +++ b/src/analyzer/Manager.cc @@ -243,7 +243,7 @@ bool Manager::RegisterAnalyzerForPort(const zeek::Tag& tag, TransportProto proto else { // Cannot register these before PostScriptInit() has run because we - // depend on packet analyis having been set up. That also means we don't have + // depend on packet analysis having been set up. That also means we don't have // a reliable return value, for now we just assume it's working. pending_analyzers_for_ports.emplace(tag, proto, port); return true; diff --git a/src/analyzer/Manager.h b/src/analyzer/Manager.h index 22167e2f03..e0b997d085 100644 --- a/src/analyzer/Manager.h +++ b/src/analyzer/Manager.h @@ -50,10 +50,10 @@ namespace analyzer * * The manager maintains a registry of all available protocol analyzers, * including a mapping between their textual names and Tag. It - * instantantiates new analyzers on demand. For new connections, the manager + * instantiates new analyzers on demand. For new connections, the manager * sets up their initial analyzer tree, including adding the right \c PIA, * respecting well-known ports, and tracking any analyzers specifically - * scheduled for individidual connections. + * scheduled for individual connections. */ class Manager : public plugin::ComponentManager { @@ -134,7 +134,7 @@ public: void DisableAllAnalyzers(); /** - * Returns the tag associated with an analyer name, or the tag + * Returns the tag associated with an analyzer name, or the tag * associated with an error if no such analyzer exists. * * @param name The canonical analyzer name to check. @@ -186,7 +186,7 @@ public: bool RegisterAnalyzerForPort(const zeek::Tag& tag, TransportProto proto, uint32_t port); /** - * Unregisters a well-known port for an anlyzers. + * Unregisters a well-known port for an analyzers. * * @param tag The analyzer's tag as an enum of script type \c * Tag. @@ -200,7 +200,7 @@ public: bool UnregisterAnalyzerForPort(EnumVal* tag, PortVal* port); /** - * Unregisters a well-known port for an anlyzers. + * Unregisters a well-known port for an analyzers. * * @param tag The analyzer's tag. * @@ -250,7 +250,7 @@ public: * 0.0.0.0 can be used as a wildcard matching any originator. * * @param resp The connection's anticipated responder address (no - * wilcard). + * wildcard). * * @param resp_p The connection's anticipated responder port. * @@ -272,8 +272,8 @@ public: * @param orig The connection's anticipated originator address. 0 can * be used as a wildcard matching any originator. * - * @param resp The The connection's anticipated responder address (no - * wilcard). + * @param resp The connection's anticipated responder address (no + * wildcard). * * @param resp_p The connection's anticipated responder port. * @@ -315,7 +315,7 @@ public: * be used as a wildcard matching any originator. * * @param resp The connection's anticipated responder address (no - * wilcard). + * wildcard). * * @param resp_p The connection's anticipated responder port. * diff --git a/src/analyzer/protocol/conn-size/ConnSize.cc b/src/analyzer/protocol/conn-size/ConnSize.cc index 597543095c..47c6606e96 100644 --- a/src/analyzer/protocol/conn-size/ConnSize.cc +++ b/src/analyzer/protocol/conn-size/ConnSize.cc @@ -162,7 +162,7 @@ void ConnSize_Analyzer::SetDurationThreshold(double duration) void ConnSize_Analyzer::UpdateConnVal(RecordVal* conn_val) { - // RecordType *connection_type is decleared in NetVar.h + // RecordType *connection_type is declared in NetVar.h RecordVal* orig_endp = conn_val->GetFieldAs("orig"); RecordVal* resp_endp = conn_val->GetFieldAs("resp"); diff --git a/src/analyzer/protocol/conn-size/functions.bif b/src/analyzer/protocol/conn-size/functions.bif index ead9ffdf38..6278f07434 100644 --- a/src/analyzer/protocol/conn-size/functions.bif +++ b/src/analyzer/protocol/conn-size/functions.bif @@ -26,7 +26,7 @@ static zeek::analyzer::Analyzer* GetConnsizeAnalyzer(zeek::Val* cid) ## ## threshold: Threshold in bytes. ## -## is_orig: If true, threshold is set for bytes from originator, otherwhise for bytes from responder. +## is_orig: If true, threshold is set for bytes from originator, otherwise for bytes from responder. ## ## .. zeek:see:: set_current_conn_packets_threshold conn_bytes_threshold_crossed conn_packets_threshold_crossed ## get_current_conn_bytes_threshold get_current_conn_packets_threshold @@ -42,7 +42,7 @@ function set_current_conn_bytes_threshold%(cid: conn_id, threshold: count, is_or return zeek::val_mgr->True(); %} -## Sets a threshold for connection packets, overwtiting any potential old thresholds. +## Sets a threshold for connection packets, overwriting any potential old thresholds. ## Be aware that in nearly any case you will want to use the high level API ## instead (:zeek:see:`ConnThreshold::set_packets_threshold`). ## @@ -50,7 +50,7 @@ function set_current_conn_bytes_threshold%(cid: conn_id, threshold: count, is_or ## ## threshold: Threshold in packets. ## -## is_orig: If true, threshold is set for packets from originator, otherwhise for packets from responder. +## is_orig: If true, threshold is set for packets from originator, otherwise for packets from responder. ## ## .. zeek:see:: set_current_conn_bytes_threshold conn_bytes_threshold_crossed conn_packets_threshold_crossed ## get_current_conn_bytes_threshold get_current_conn_packets_threshold @@ -92,7 +92,7 @@ function set_current_conn_duration_threshold%(cid: conn_id, threshold: interval% ## ## cid: The connection id. ## -## is_orig: If true, threshold of originator, otherwhise threshold of responder. +## is_orig: If true, threshold of originator, otherwise threshold of responder. ## ## Returns: 0 if no threshold is set or the threshold in bytes ## @@ -112,7 +112,7 @@ function get_current_conn_bytes_threshold%(cid: conn_id, is_orig: bool%): count ## ## cid: The connection id. ## -## is_orig: If true, threshold of originator, otherwhise threshold of responder. +## is_orig: If true, threshold of originator, otherwise threshold of responder. ## ## Returns: 0 if no threshold is set or the threshold in packets ## diff --git a/src/analyzer/protocol/dce-rpc/events.bif b/src/analyzer/protocol/dce-rpc/events.bif index bc9f252054..0b5d0c4a5f 100644 --- a/src/analyzer/protocol/dce-rpc/events.bif +++ b/src/analyzer/protocol/dce-rpc/events.bif @@ -10,7 +10,7 @@ ## ## ptype_id: Numeric representation of the procedure type of the message. ## -## ptype: Enum representation of the prodecure type of the message. +## ptype: Enum representation of the procedure type of the message. ## ## .. zeek:see:: dce_rpc_bind dce_rpc_bind_ack dce_rpc_request dce_rpc_response event dce_rpc_message%(c: connection, is_orig: bool, fid: count, ptype_id: count, ptype: DCE_RPC::PType%); @@ -27,7 +27,7 @@ event dce_rpc_message%(c: connection, is_orig: bool, fid: count, ptype_id: count ## ## ctx_id: The context identifier of the data representation. ## -## uuid: The string interpretted uuid of the endpoint being requested. +## uuid: The string interpreted uuid of the endpoint being requested. ## ## ver_major: The major version of the endpoint being requested. ## @@ -48,7 +48,7 @@ event dce_rpc_bind%(c: connection, fid: count, ctx_id: count, uuid: string, ver_ ## ## ctx_id: The context identifier of the data representation. ## -## uuid: The string interpretted uuid of the endpoint being requested. +## uuid: The string interpreted uuid of the endpoint being requested. ## ## ver_major: The major version of the endpoint being requested. ## diff --git a/src/analyzer/protocol/dnp3/DNP3.cc b/src/analyzer/protocol/dnp3/DNP3.cc index 73637a2a0b..ae52c885e1 100644 --- a/src/analyzer/protocol/dnp3/DNP3.cc +++ b/src/analyzer/protocol/dnp3/DNP3.cc @@ -21,7 +21,7 @@ // Traditionally, the DNP3 Application Layer in serial links contains a // "DNP3 Application Layer Fragment". The data that is parsed by the end // device and then executed. As the "DNP3 Application Layer Fragment" can -// be long (>255 bytes), it may be trunkcated and carried in different +// be long (>255 bytes), it may be truncated and carried in different // DNP3 Application Layer of more than one DNP3 packets. // // So we may find a long DNP3 Application Layer Fragment to be transmitted in the following @@ -44,7 +44,7 @@ // Layer used in serial link as Pseudo Link Layer, Pseudo Transport Layer and // Pseudo Application Layer. // -// For a long DNP3 application layer fragment, we may find it tramistted +// For a long DNP3 application layer fragment, we may find it transmitted // over IP network in the following format: // // Network Packet #1 : TCP Header | DNP3 Pseudo Link Layer | DNP3 Pseudo Transport Layer | DNP3 @@ -60,7 +60,7 @@ // // 0x05 0x64 Len Ctrl Dest_LSB Dest_MSB Src_LSB Src_MSB CRC_LSB CRC_MSB // -// Each field is a byte; LSB: least significant byte; MSB: most significatn byte. +// Each field is a byte; LSB: least significant byte; MSB: most significant byte. // // "Len" indicates the length of the byte stream right after this field // (excluding CRC fields) in the current DNP3 packet. @@ -93,7 +93,7 @@ // DNP3 Packet : DNP3 Pseudo Data Link Layer : DNP3 Pseudo Transport Layer : DNP3 Pseudo // Application Layer // || || -// || (length field) || (original paylad byte +// || (length field) || (original payload byte // stream) // \/ \/ // DNP3 Additional Header : Reassembled DNP3 Pseudo @@ -227,7 +227,7 @@ bool DNP3_Base::ProcessData(int len, const u_char* data, bool orig) if ( res < 0 ) return false; - // Parse the the application layer data. + // Parse the application layer data. if ( ! ParseAppLayer(endp) ) return false; diff --git a/src/analyzer/protocol/dnp3/dnp3-objects.pac b/src/analyzer/protocol/dnp3/dnp3-objects.pac index af0cf7b81b..5be97ef73a 100644 --- a/src/analyzer/protocol/dnp3/dnp3-objects.pac +++ b/src/analyzer/protocol/dnp3/dnp3-objects.pac @@ -207,14 +207,14 @@ type Request_Data_Object(function_code: uint8, qualifier_field: uint8, object_ty 0x2202 -> ai_dead_32: empty; 0x2203 -> ai_dead_sp: empty; - # analog ouput status g40 + # analog output status g40 0x2800 -> aos_default: empty; 0x2801 -> aos_32: empty; 0x2802 -> aos_16: empty; 0x2803 -> aos_sp: empty; 0x2804 -> aos_dp: empty; - # analog ouput g41 + # analog output g41 0x2901 -> ao_32: empty; 0x2902 -> ao_16: empty; 0x2903 -> ao_sp: empty; @@ -502,13 +502,13 @@ type Response_Data_Object(function_code: uint8, qualifier_field: uint8, object_t 0x2202 -> ai_dead_32: uint32; 0x2203 -> ai_dead_sp: uint32; - # analog ouput status g40 + # analog output status g40 0x2801 -> aos_32: AnaOutStatus32; 0x2802 -> aos_16: AnaOutStatus16; 0x2803 -> aos_sp: AnaOutStatusSP; 0x2804 -> aos_dp: AnaOutStatusDP; - # analog ouput g41 + # analog output g41 0x2901 -> ao_32: AnaOut32; 0x2902 -> ao_16: AnaOut16; 0x2903 -> ao_sp: AnaOutSP; @@ -611,7 +611,7 @@ type Response_Data_Object(function_code: uint8, qualifier_field: uint8, object_t 0x780E -> update_key_sig: UpdateKeySig(prefix.prefix_value); 0x780F -> update_key_con: UpdateKeyCon(prefix.prefix_value); - #default -> unkonwndata: Debug_Byte; # &check( T ); + #default -> unknowndata: Debug_Byte; # &check( T ); default -> unmatched: Default_Wrap(object_type_field); }; } @@ -861,7 +861,7 @@ type AnalogInput16woFlag = record { value: int16; } &byteorder = littleendian; -# group: 30; variation: 5; singple precision 32 bit +# group: 30; variation: 5; single precision 32 bit type AnalogInputSPwFlag = record { flag: uint8; value: uint32; @@ -951,7 +951,7 @@ type AnalogInput16wTime = record { time48: bytestring &length = 6; } &byteorder = littleendian; -# group: 32; variation: 5; singple precision 32 bit +# group: 32; variation: 5; single precision 32 bit type AnalogInputSPwoTime = record { flag: uint8; value: uint32; @@ -1144,7 +1144,7 @@ type AnaOutEveDPwTime = record { time48: bytestring &length = 6; } &byteorder = littleendian; -## g43 data format is exacatly same as g42 so use g42 directly +## g43 data format is exactly same as g42 so use g42 directly # g50v1 type AbsTime = record { @@ -1353,11 +1353,11 @@ type DescEle = record { # g86v1 is the same structure of DescEle -# g86v3 does not quite understant specification description +# g86v3 does not quite understand specification description -# g87 doest not quite understand specfication description +# g87 doest not quite understand specification description -# g88 doest not quite understand specfication description +# g88 doest not quite understand specification description # g90v1 type App_Id(qualifier_field: uint8, object_size16: uint16) = record { diff --git a/src/analyzer/protocol/dnp3/dnp3-protocol.pac b/src/analyzer/protocol/dnp3/dnp3-protocol.pac index c0bd39b663..31ac9da961 100644 --- a/src/analyzer/protocol/dnp3/dnp3-protocol.pac +++ b/src/analyzer/protocol/dnp3/dnp3-protocol.pac @@ -35,11 +35,11 @@ type DNP3_Request = record { FREEZE_AT_TIME_NR -> freeze_time_nr_requests: Request_Objects(app_header.function_code)[]; COLD_RESTART -> cold_restart: empty; WARM_RESTART -> warm_restart: empty; - INITIALIZE_DATA -> initilize_data: empty; # obsolete - INITIALIZE_APPL -> initilize_appl: Request_Objects(app_header.function_code)[]; + INITIALIZE_DATA -> initialize_data: empty; # obsolete + INITIALIZE_APPL -> initialize_appl: Request_Objects(app_header.function_code)[]; START_APPL -> start_appl: Request_Objects(app_header.function_code)[]; STOP_APPL -> stop_appl: Request_Objects(app_header.function_code)[]; - SAVE_CONFIG -> save_config: empty; # depracated + SAVE_CONFIG -> save_config: empty; # deprecated ENABLE_UNSOLICITED -> enable_unsolicited: Request_Objects(app_header.function_code)[]; DISABLE_UNSOLICITED -> disable_unsolicited: Request_Objects(app_header.function_code)[]; ASSIGN_CLASS -> assign_class: Request_Objects(app_header.function_code)[]; @@ -98,7 +98,7 @@ type Request_Objects(function_code: uint8) = record { # time data interval data object g50 0x3201 -> g50v1_objs: Request_Data_Object(function_code, object_header.qualifier_field, object_header.object_type_field )[ object_header.number_of_item]; - #0x3202 -> time_interval_ojbects: Request_Data_Object(function_code, object_header.qualifier_field, object_header.object_type_field )[ object_header.number_of_item]; + #0x3202 -> time_interval_objects: Request_Data_Object(function_code, object_header.qualifier_field, object_header.object_type_field )[ object_header.number_of_item]; # &check( object_header.qualifier_field == 0x0f && object_header.number_of_item == 0x01); 0x3202 -> g50v2_objs: Request_Data_Object(function_code, object_header.qualifier_field, object_header.object_type_field )[ object_header.number_of_item]; 0x3203 -> g50v3_objs: Request_Data_Object(function_code, object_header.qualifier_field, object_header.object_type_field )[ object_header.number_of_item]; @@ -140,7 +140,7 @@ type Request_Objects(function_code: uint8) = record { 0x780E -> g120v14_objs: Request_Data_Object(function_code, object_header.qualifier_field, object_header.object_type_field )[ object_header.number_of_item]; 0x780F -> g120v15_objs: Request_Data_Object(function_code, object_header.qualifier_field, object_header.object_type_field )[ object_header.number_of_item]; - # default -> ojbects: Request_Data_Object(function_code, object_header.qualifier_field, object_header.object_type_field )[ object_header.number_of_item]; + # default -> objects: Request_Data_Object(function_code, object_header.qualifier_field, object_header.object_type_field )[ object_header.number_of_item]; default -> objects: empty; }; # dump_data is always empty; I intend to use it for checking some conditions; diff --git a/src/analyzer/protocol/dnp3/events.bif b/src/analyzer/protocol/dnp3/events.bif index 7cb989e8d3..981b63ab67 100644 --- a/src/analyzer/protocol/dnp3/events.bif +++ b/src/analyzer/protocol/dnp3/events.bif @@ -226,7 +226,7 @@ event dnp3_analog_input_event_DPwoTime%(c: connection, is_orig: bool, flag: coun event dnp3_analog_input_event_SPwTime%(c: connection, is_orig: bool, flag: count, value: count, time48: count%); ## Generated for DNP3 objects with the group number 32 and variation number 8 -## analog input event double-precisiion float point with time +## analog input event double-precision float point with time event dnp3_analog_input_event_DPwTime%(c: connection, is_orig: bool, flag: count, value_low: count, value_high: count, time48: count%); ## Generated for DNP3 objects with the group number 33 and variation number 1 diff --git a/src/analyzer/protocol/dns/DNS.cc b/src/analyzer/protocol/dns/DNS.cc index fa22dabbb2..0a7355e76d 100644 --- a/src/analyzer/protocol/dns/DNS.cc +++ b/src/analyzer/protocol/dns/DNS.cc @@ -1364,7 +1364,7 @@ bool DNS_Interpreter::ParseRR_DS(detail::DNS_MsgInfo* msg, const u_char*& data, case detail::SHA384: break; case detail::reserved: - analyzer->Weird("DNSSEC_DS_ResrevedDigestType", util::fmt("%d", ds_dtype)); + analyzer->Weird("DNSSEC_DS_ReservedDigestType", util::fmt("%d", ds_dtype)); break; default: analyzer->Weird("DNSSEC_DS_unknown_DigestType", util::fmt("%d", ds_dtype)); diff --git a/src/analyzer/protocol/dns/DNS.h b/src/analyzer/protocol/dns/DNS.h index edfeee031f..3db984f8dd 100644 --- a/src/analyzer/protocol/dns/DNS.h +++ b/src/analyzer/protocol/dns/DNS.h @@ -235,7 +235,7 @@ struct DNSKEY_DATA unsigned short dflags; // 16 : ExtractShort(data, len) unsigned short dalgorithm; // 8 unsigned short dprotocol; // 8 - String* public_key; // Variable lenght Public Key + String* public_key; // Variable length Public Key }; struct NSEC3_DATA @@ -264,7 +264,7 @@ struct DS_DATA unsigned short key_tag; // 16 : ExtractShort(data, len) unsigned short algorithm; // 8 unsigned short digest_type; // 8 - String* digest_val; // Variable lenght Digest of DNSKEY RR + String* digest_val; // Variable length Digest of DNSKEY RR }; struct BINDS_DATA @@ -317,7 +317,7 @@ public: int opcode; ///< query type, see DNS_Opcode int rcode; ///< return code, see DNS_Code int QR; ///< query record flag - int AA; ///< authoritiave answer flag + int AA; ///< authoritative answer flag int TC; ///< truncated - size > 512 bytes for udp int RD; ///< recursion desired int RA; ///< recursion available diff --git a/src/analyzer/protocol/dns/events.bif b/src/analyzer/protocol/dns/events.bif index bbc5bd86ed..a951fc94d2 100644 --- a/src/analyzer/protocol/dns/events.bif +++ b/src/analyzer/protocol/dns/events.bif @@ -692,7 +692,7 @@ event dns_DS%(c: connection, msg: dns_msg, ans: dns_answer, ds: dns_ds_rr%); ## ## ans: The type-independent part of the parsed answer record. ## -## binds: The parsed RDATA of BIND-Signeing state record. +## binds: The parsed RDATA of BIND-Signing state record. event dns_BINDS%(c: connection, msg: dns_msg, ans: dns_answer, binds: dns_binds_rr%); ## Generated for DNS replies of type *BINDS*. For replies with multiple answers, @@ -705,7 +705,7 @@ event dns_BINDS%(c: connection, msg: dns_msg, ans: dns_answer, binds: dns_binds_ ## ## ans: The type-independent part of the parsed answer record. ## -## binds: The parsed RDATA of BIND-Signeing state record. +## binds: The parsed RDATA of BIND-Signing state record. event dns_SSHFP%(c: connection, msg: dns_msg, ans: dns_answer, algo: count, fptype: count, fingerprint: string%); ## Generated for DNS replies of type *LOC*. For replies with multiple answers, diff --git a/src/analyzer/protocol/gssapi/GSSAPI.h b/src/analyzer/protocol/gssapi/GSSAPI.h index 89d716ec9a..06a1f247c8 100644 --- a/src/analyzer/protocol/gssapi/GSSAPI.h +++ b/src/analyzer/protocol/gssapi/GSSAPI.h @@ -16,13 +16,13 @@ public: explicit GSSAPI_Analyzer(Connection* conn); ~GSSAPI_Analyzer() override; - // Overriden from Analyzer. + // Overridden from Analyzer. void Done() override; void DeliverStream(int len, const u_char* data, bool orig) override; void Undelivered(uint64_t seq, int len, bool orig) override; - // Overriden from analyzer::tcp::TCP_ApplicationAnalyzer. + // Overridden from analyzer::tcp::TCP_ApplicationAnalyzer. void EndpointEOF(bool is_orig) override; static analyzer::Analyzer* Instantiate(Connection* conn) { return new GSSAPI_Analyzer(conn); } diff --git a/src/analyzer/protocol/http/HTTP.cc b/src/analyzer/protocol/http/HTTP.cc index 96f275176c..60a425e402 100644 --- a/src/analyzer/protocol/http/HTTP.cc +++ b/src/analyzer/protocol/http/HTTP.cc @@ -246,7 +246,7 @@ bool HTTP_Entity::Undelivered(int64_t len) expect_data_length); } - // Don't propogate an entity (file) gap if we're still in the headers, + // Don't propagate an entity (file) gap if we're still in the headers, // or the body length was declared to be zero. if ( (end_of_data && in_header) || body_length == 0 ) return false; @@ -1683,7 +1683,7 @@ String* unescape_URI(const u_char* line, const u_char* line_end, analyzer::Analy else if ( line + 1 == line_end ) { // % + one character at end of line. Log weird - // and just add to unescpaped URI. + // and just add to unescaped URI. *URI_p++ = '%'; *URI_p++ = *line; if ( analyzer ) @@ -1714,7 +1714,7 @@ String* unescape_URI(const u_char* line, const u_char* line_end, analyzer::Analy // Decode escaping like this: %u00AE // The W3C rejected escaping this way, and // there is no RFC that specifies it. - // Appparently there is some software doing + // Apparently there is some software doing // this sort of 4 byte unicode encoding anyway. // Likely causing an increase in it's use is // the third edition of the ECMAScript spec diff --git a/src/analyzer/protocol/http/HTTP.h b/src/analyzer/protocol/http/HTTP.h index da671f8ff2..90e9f98888 100644 --- a/src/analyzer/protocol/http/HTTP.h +++ b/src/analyzer/protocol/http/HTTP.h @@ -180,12 +180,12 @@ public: bool IsConnectionClose() { return connection_close; } int HTTP_ReplyCode() const { return reply_code; }; - // Overriden from Analyzer. + // Overridden from Analyzer. void Done() override; void DeliverStream(int len, const u_char* data, bool orig) override; void Undelivered(uint64_t seq, int len, bool orig) override; - // Overriden from analyzer::tcp::TCP_ApplicationAnalyzer + // Overridden from analyzer::tcp::TCP_ApplicationAnalyzer void EndpointEOF(bool is_orig) override; void ConnectionFinished(bool half_finished) override; void ConnectionReset() override; diff --git a/src/analyzer/protocol/imap/IMAP.h b/src/analyzer/protocol/imap/IMAP.h index 3ef9ea131f..8131f60f77 100644 --- a/src/analyzer/protocol/imap/IMAP.h +++ b/src/analyzer/protocol/imap/IMAP.h @@ -22,7 +22,7 @@ public: void DeliverStream(int len, const u_char* data, bool orig) override; void Undelivered(uint64_t seq, int len, bool orig) override; - // Overriden from analyzer::tcp::TCP_ApplicationAnalyzer. + // Overridden from analyzer::tcp::TCP_ApplicationAnalyzer. void EndpointEOF(bool is_orig) override; void StartTLS(); diff --git a/src/analyzer/protocol/krb/KRB_TCP.h b/src/analyzer/protocol/krb/KRB_TCP.h index ccb541fb48..cfc4f2fb3e 100644 --- a/src/analyzer/protocol/krb/KRB_TCP.h +++ b/src/analyzer/protocol/krb/KRB_TCP.h @@ -20,7 +20,7 @@ public: void DeliverStream(int len, const u_char* data, bool orig) override; void Undelivered(uint64_t seq, int len, bool orig) override; - // Overriden from analyzer::tcp::TCP_ApplicationAnalyzer. + // Overridden from analyzer::tcp::TCP_ApplicationAnalyzer. void EndpointEOF(bool is_orig) override; StringValPtr GetAuthenticationInfo(const String* principal, const String* ciphertext, diff --git a/src/analyzer/protocol/login/NVT.cc b/src/analyzer/protocol/login/NVT.cc index 80f35eabe0..f7df41a1eb 100644 --- a/src/analyzer/protocol/login/NVT.cc +++ b/src/analyzer/protocol/login/NVT.cc @@ -518,7 +518,7 @@ void NVT_Analyzer::DeliverChunk(int& len, const u_char*& data) if ( last_char == '\r' ) { if ( CRLFAsEOL() & CR_as_EOL ) - // we already emited, skip + // we already emitted, skip ; else { diff --git a/src/analyzer/protocol/login/events.bif b/src/analyzer/protocol/login/events.bif index 45b82ea11e..36681a5199 100644 --- a/src/analyzer/protocol/login/events.bif +++ b/src/analyzer/protocol/login/events.bif @@ -146,7 +146,7 @@ event login_input_line%(c: connection, line: string%); ## ## c: The connection. ## -## line: The ouput line. +## line: The output line. ## ## .. zeek:see:: login_confused login_confused_text login_display login_failure ## login_input_line login_prompt login_success login_terminal rsh_reply diff --git a/src/analyzer/protocol/modbus/modbus-protocol.pac b/src/analyzer/protocol/modbus/modbus-protocol.pac index d804780f5e..fba0a9cd3a 100644 --- a/src/analyzer/protocol/modbus/modbus-protocol.pac +++ b/src/analyzer/protocol/modbus/modbus-protocol.pac @@ -71,7 +71,7 @@ type ModbusTCP_PDU(is_orig: bool) = record { type ModbusTCP_TransportHeader = record { tid: uint16; # Transaction identifier pid: uint16; # Protocol identifier - len: uint16; # Length of everyting after this field + len: uint16; # Length of everything after this field uid: uint8; # Unit identifier (previously 'slave address') fc: uint8; # MODBUS function code (see function_codes enum) } &byteorder=bigendian, &let { diff --git a/src/analyzer/protocol/mqtt/events.bif b/src/analyzer/protocol/mqtt/events.bif index ee2e22a761..4d2041938e 100644 --- a/src/analyzer/protocol/mqtt/events.bif +++ b/src/analyzer/protocol/mqtt/events.bif @@ -105,7 +105,7 @@ event mqtt_pingreq%(c: connection%); ## c: The connection event mqtt_pingresp%(c: connection%); -## Generated for MQTT disconnect messages sent by the client when it is diconnecting cleanly. +## Generated for MQTT disconnect messages sent by the client when it is disconnecting cleanly. ## ## c: The connection event mqtt_disconnect%(c: connection%); diff --git a/src/analyzer/protocol/mysql/MySQL.h b/src/analyzer/protocol/mysql/MySQL.h index 273c585818..cabd96bcd0 100644 --- a/src/analyzer/protocol/mysql/MySQL.h +++ b/src/analyzer/protocol/mysql/MySQL.h @@ -16,13 +16,13 @@ public: explicit MySQL_Analyzer(Connection* conn); ~MySQL_Analyzer() override; - // Overriden from Analyzer. + // Overridden from Analyzer. void Done() override; void DeliverStream(int len, const u_char* data, bool orig) override; void Undelivered(uint64_t seq, int len, bool orig) override; - // Overriden from analyzer::tcp::TCP_ApplicationAnalyzer. + // Overridden from analyzer::tcp::TCP_ApplicationAnalyzer. void EndpointEOF(bool is_orig) override; static analyzer::Analyzer* Instantiate(Connection* conn) { return new MySQL_Analyzer(conn); } diff --git a/src/analyzer/protocol/mysql/mysql.pac b/src/analyzer/protocol/mysql/mysql.pac index 1ef0eea8b1..572024e52e 100644 --- a/src/analyzer/protocol/mysql/mysql.pac +++ b/src/analyzer/protocol/mysql/mysql.pac @@ -29,7 +29,7 @@ flow MySQL_Flow(is_orig: bool) { # There are two options here: flowunit or datagram. # flowunit = MySQL_PDU(is_orig) withcontext(connection, this); flowunit = MySQL_PDU(is_orig) withcontext(connection, this); - # Using flowunit will cause the anlayzer to buffer incremental input. + # Using flowunit will cause the analyzer to buffer incremental input. # This is needed for &oneline and &length. If you don't need this, you'll # get better performance with datagram. }; diff --git a/src/analyzer/protocol/ncp/NCP.cc b/src/analyzer/protocol/ncp/NCP.cc index e915d5023f..fd00345bb5 100644 --- a/src/analyzer/protocol/ncp/NCP.cc +++ b/src/analyzer/protocol/ncp/NCP.cc @@ -195,7 +195,7 @@ void Contents_NCP_Analyzer::DeliverStream(int len, const u_char* data, bool orig { // Assume NCP frames align with packet boundary. if ( (IsOrig() && len < 22) || (! IsOrig() && len < 16) ) - { // ignore small fragmeents + { // ignore small fragments return; } diff --git a/src/analyzer/protocol/ntlm/NTLM.h b/src/analyzer/protocol/ntlm/NTLM.h index 13d8030428..b7d770a98f 100644 --- a/src/analyzer/protocol/ntlm/NTLM.h +++ b/src/analyzer/protocol/ntlm/NTLM.h @@ -16,13 +16,13 @@ public: explicit NTLM_Analyzer(Connection* conn); ~NTLM_Analyzer() override; - // Overriden from Analyzer. + // Overridden from Analyzer. void Done() override; void DeliverStream(int len, const u_char* data, bool orig) override; void Undelivered(uint64_t seq, int len, bool orig) override; - // Overriden from analyzer::tcp::TCP_ApplicationAnalyzer. + // Overridden from analyzer::tcp::TCP_ApplicationAnalyzer. void EndpointEOF(bool is_orig) override; static analyzer::Analyzer* Instantiate(Connection* conn) { return new NTLM_Analyzer(conn); } diff --git a/src/analyzer/protocol/ntp/NTP.h b/src/analyzer/protocol/ntp/NTP.h index b0aa5e237c..d0353d4df5 100644 --- a/src/analyzer/protocol/ntp/NTP.h +++ b/src/analyzer/protocol/ntp/NTP.h @@ -13,7 +13,7 @@ public: explicit NTP_Analyzer(Connection* conn); ~NTP_Analyzer() override; - // Overriden from Analyzer. + // Overridden from Analyzer. void Done() override; void DeliverPacket(int len, const u_char* data, bool orig, uint64_t seq, const IP_Hdr* ip, int caplen) override; diff --git a/src/analyzer/protocol/ntp/ntp-mode7.pac b/src/analyzer/protocol/ntp/ntp-mode7.pac index 0e4f16738d..62292d6cd2 100644 --- a/src/analyzer/protocol/ntp/ntp-mode7.pac +++ b/src/analyzer/protocol/ntp/ntp-mode7.pac @@ -48,7 +48,7 @@ # # Implementation number: The number of the implementation this request code # is defined by. An implementation number of zero is used -# for requst codes/data formats which all implementations +# for request codes/data formats which all implementations # agree on. Implementation number 255 is reserved (for # extensions, in case we run out). # diff --git a/src/analyzer/protocol/ntp/ntp-protocol.pac b/src/analyzer/protocol/ntp/ntp-protocol.pac index 2c31832f09..6c92aee1e8 100644 --- a/src/analyzer/protocol/ntp/ntp-protocol.pac +++ b/src/analyzer/protocol/ntp/ntp-protocol.pac @@ -26,7 +26,7 @@ type NTP_PDU(is_orig: bool) = record { } &byteorder=bigendian &exportsourcedata; # This is the most common type of message, corresponding to modes 1-5 -# This kind of msg are used for normal operation of syncronization +# This kind of msg are used for normal operation of synchronization # See RFC 5905 for details type NTP_std_msg = record { stratum: uint8; diff --git a/src/analyzer/protocol/pia/PIA.cc b/src/analyzer/protocol/pia/PIA.cc index 3103c84ad9..eebd7f1d24 100644 --- a/src/analyzer/protocol/pia/PIA.cc +++ b/src/analyzer/protocol/pia/PIA.cc @@ -230,7 +230,7 @@ void PIA_TCP::FirstPacket(bool is_orig, const IP_Hdr* ip) ip4_hdr = new IP_Hdr(ip4, false); } - // Locals used to avoid potentil alignment problems + // Locals used to avoid potential alignment problems // with some archs/compilers when grabbing the address // of the struct member directly in the following. in_addr tmp_src; diff --git a/src/analyzer/protocol/pia/PIA.h b/src/analyzer/protocol/pia/PIA.h index b00145d2c9..5a9babe55f 100644 --- a/src/analyzer/protocol/pia/PIA.h +++ b/src/analyzer/protocol/pia/PIA.h @@ -28,7 +28,7 @@ public: virtual ~PIA(); // Called when PIA wants to put an Analyzer in charge. rule is the - // signature that triggered the activitation, if any. + // signature that triggered the activation, if any. virtual void ActivateAnalyzer(zeek::Tag tag, const zeek::detail::Rule* rule = nullptr) = 0; // Called when PIA wants to remove an Analyzer. diff --git a/src/analyzer/protocol/radius/RADIUS.h b/src/analyzer/protocol/radius/RADIUS.h index 34d1231f3e..30a655b75b 100644 --- a/src/analyzer/protocol/radius/RADIUS.h +++ b/src/analyzer/protocol/radius/RADIUS.h @@ -12,7 +12,7 @@ public: explicit RADIUS_Analyzer(Connection* conn); ~RADIUS_Analyzer() override; - // Overriden from Analyzer. + // Overridden from Analyzer. void Done() override; void DeliverPacket(int len, const u_char* data, bool orig, uint64_t seq, const IP_Hdr* ip, int caplen) override; diff --git a/src/analyzer/protocol/rdp/RDP.h b/src/analyzer/protocol/rdp/RDP.h index 7e0e467416..bb84b7e775 100644 --- a/src/analyzer/protocol/rdp/RDP.h +++ b/src/analyzer/protocol/rdp/RDP.h @@ -15,7 +15,7 @@ public: explicit RDP_Analyzer(Connection* conn); ~RDP_Analyzer() override; - // Overriden from Analyzer. + // Overridden from Analyzer. void Done() override; void DeliverStream(int len, const u_char* data, bool orig) override; void Undelivered(uint64_t seq, int len, bool orig) override; diff --git a/src/analyzer/protocol/rfb/RFB.h b/src/analyzer/protocol/rfb/RFB.h index 397231091a..57d7af49f8 100644 --- a/src/analyzer/protocol/rfb/RFB.h +++ b/src/analyzer/protocol/rfb/RFB.h @@ -14,13 +14,13 @@ public: explicit RFB_Analyzer(Connection* conn); ~RFB_Analyzer() override; - // Overriden from Analyzer. + // Overridden from Analyzer. void Done() override; void DeliverStream(int len, const u_char* data, bool orig) override; void Undelivered(uint64_t seq, int len, bool orig) override; - // Overriden from analyzer::tcp::TCP_ApplicationAnalyzer. + // Overridden from analyzer::tcp::TCP_ApplicationAnalyzer. void EndpointEOF(bool is_orig) override; static analyzer::Analyzer* InstantiateAnalyzer(Connection* conn) diff --git a/src/analyzer/protocol/rpc/NFS.cc b/src/analyzer/protocol/rpc/NFS.cc index e4432c93b8..762ef944ba 100644 --- a/src/analyzer/protocol/rpc/NFS.cc +++ b/src/analyzer/protocol/rpc/NFS.cc @@ -663,7 +663,7 @@ RecordValPtr NFS_Interp::nfs3_write_reply(const u_char*& buf, int& n, rep->Assign(3, nfs3_stable_how(buf, n)); // Writeverf. While the RFC says that this should be a fixed - // length opaque, it specifies the lenght as 8 bytes, so we + // length opaque, it specifies the length as 8 bytes, so we // can also just as easily extract a uint64. rep->Assign(4, ExtractUint64(buf, n)); } diff --git a/src/analyzer/protocol/rpc/RPC.cc b/src/analyzer/protocol/rpc/RPC.cc index 4064e67881..789918cd06 100644 --- a/src/analyzer/protocol/rpc/RPC.cc +++ b/src/analyzer/protocol/rpc/RPC.cc @@ -181,7 +181,7 @@ int RPC_Interpreter::DeliverRPC(const u_char* buf, int n, int rpclen, bool is_or // We now have a valid RPC_CallInfo (either the previous one // in case of a rexmit or the current one). - // TODO: What to do in case of a rexmit_inconistency?? + // TODO: What to do in case of a rexmit_inconsistency?? Event_RPC_Call(call); if ( RPC_BuildCall(call, buf, n) ) @@ -468,11 +468,11 @@ bool Contents_RPC::CheckResync(int& len, const u_char*& data, bool orig) // We try to look for the beginning of a RPC frame, assuming RPC // frames begin at packet boundaries (though they may span over // multiple packets) (note that the data* of DeliverStream() usually - // starts at a packet boundrary). + // starts at a packet boundary). // // If we see a frame start that makes sense (direction and frame - // lenght seem ok), we try to read (skip over) the next RPC message. - // If this is successfull and we the place we are seems like a valid + // length seem ok), we try to read (skip over) the next RPC message. + // If this is successful and we the place we are seems like a valid // start of a RPC msg (direction and frame length seem ok). We assume // that we have successfully resync'ed. @@ -509,7 +509,7 @@ bool Contents_RPC::CheckResync(int& len, const u_char*& data, bool orig) } // Now lets see whether data points to the beginning of a RPC - // frame. If the resync processs is successful, we should be + // frame. If the resync processes is successful, we should be // at the beginning of a frame. if ( len < 12 ) @@ -552,7 +552,7 @@ bool Contents_RPC::CheckResync(int& len, const u_char*& data, bool orig) { // Skip this chunk if ( DEBUG_rpc_resync ) - DEBUG_MSG("RPC resync: Need to resync. dicarding %d bytes.\n", len); + DEBUG_MSG("RPC resync: Need to resync. discarding %d bytes.\n", len); NeedResync(); // let's try the resync again from the beginning return false; diff --git a/src/analyzer/protocol/rpc/XDR.cc b/src/analyzer/protocol/rpc/XDR.cc index 40101aca78..f9e76d7523 100644 --- a/src/analyzer/protocol/rpc/XDR.cc +++ b/src/analyzer/protocol/rpc/XDR.cc @@ -20,7 +20,7 @@ uint32_t zeek::analyzer::rpc::extract_XDR_uint32(const u_char*& buf, int& len) return 0; } - // Takes care of alignment and endianess differences. + // Takes care of alignment and endianness differences. uint32_t buf_bits32; memcpy(&buf_bits32, buf, 4); uint32_t bits32 = ntohl(buf_bits32); diff --git a/src/analyzer/protocol/sip/SIP_TCP.h b/src/analyzer/protocol/sip/SIP_TCP.h index 16699dc52d..29b999a523 100644 --- a/src/analyzer/protocol/sip/SIP_TCP.h +++ b/src/analyzer/protocol/sip/SIP_TCP.h @@ -22,7 +22,7 @@ public: void DeliverStream(int len, const u_char* data, bool orig) override; void Undelivered(uint64_t seq, int len, bool orig) override; - // Overriden from analyzer::tcp::TCP_ApplicationAnalyzer. + // Overridden from analyzer::tcp::TCP_ApplicationAnalyzer. void EndpointEOF(bool is_orig) override; static analyzer::Analyzer* Instantiate(Connection* conn) { return new SIP_Analyzer(conn); } diff --git a/src/analyzer/protocol/smb/smb2_com_set_info.bif b/src/analyzer/protocol/smb/smb2_com_set_info.bif index 2b4b1894d7..9bab18921f 100644 --- a/src/analyzer/protocol/smb/smb2_com_set_info.bif +++ b/src/analyzer/protocol/smb/smb2_com_set_info.bif @@ -36,7 +36,7 @@ event smb2_file_delete%(c: connection, hdr: SMB2::Header, file_id: SMB2::GUID, d ## Generated for :abbr:`SMB (Server Message Block)`/:abbr:`CIFS (Common Internet File System)` ## version 2 requests of type *set_info* of the *file* subtype ## -## For more infomation, see MS-SMB2:2.2.39 +## For more information, see MS-SMB2:2.2.39 ## ## c: The connection. ## @@ -55,7 +55,7 @@ event smb2_file_sattr%(c: connection, hdr: SMB2::Header, file_id: SMB2::GUID, ti ## Generated for :abbr:`SMB (Server Message Block)`/:abbr:`CIFS (Common Internet File System)` ## version 2 requests of type *set_info* of the *allocation* subtype ## -## For more infomation, see MS-SMB2:2.2.39 +## For more information, see MS-SMB2:2.2.39 ## ## c: The connection. ## @@ -71,7 +71,7 @@ event smb2_file_allocation%(c: connection, hdr: SMB2::Header, file_id: SMB2::GUI ## Generated for :abbr:`SMB (Server Message Block)`/:abbr:`CIFS (Common Internet File System)` ## version 2 requests of type *set_info* of the *end_of_file* subtype ## -## For more infomation, see MS-SMB2:2.2.39 +## For more information, see MS-SMB2:2.2.39 ## ## c: The connection. ## @@ -88,7 +88,7 @@ event smb2_file_endoffile%(c: connection, hdr: SMB2::Header, file_id: SMB2::GUID ## Generated for :abbr:`SMB (Server Message Block)`/:abbr:`CIFS (Common Internet File System)` ## version 2 requests of type *set_info* of the *mode* subtype ## -## For more infomation, see MS-SMB2:2.2.39 +## For more information, see MS-SMB2:2.2.39 ## ## c: The connection. ## @@ -105,7 +105,7 @@ event smb2_file_mode%(c: connection, hdr: SMB2::Header, file_id: SMB2::GUID, mod ## Generated for :abbr:`SMB (Server Message Block)`/:abbr:`CIFS (Common Internet File System)` ## version 2 requests of type *set_info* of the *pipe* subtype ## -## For more infomation, see MS-SMB2:2.2.39 +## For more information, see MS-SMB2:2.2.39 ## ## c: The connection. ## @@ -124,7 +124,7 @@ event smb2_file_pipe%(c: connection, hdr: SMB2::Header, file_id: SMB2::GUID, rea ## Generated for :abbr:`SMB (Server Message Block)`/:abbr:`CIFS (Common Internet File System)` ## version 2 requests of type *set_info* of the *position* subtype ## -## For more infomation, see MS-SMB2:2.2.39 +## For more information, see MS-SMB2:2.2.39 ## ## c: The connection. ## @@ -140,7 +140,7 @@ event smb2_file_position%(c: connection, hdr: SMB2::Header, file_id: SMB2::GUID, ## Generated for :abbr:`SMB (Server Message Block)`/:abbr:`CIFS (Common Internet File System)` ## version 2 requests of type *set_info* of the *short_name* subtype ## -## For more infomation, see MS-SMB2:2.2.39 +## For more information, see MS-SMB2:2.2.39 ## ## c: The connection. ## @@ -156,7 +156,7 @@ event smb2_file_shortname%(c: connection, hdr: SMB2::Header, file_id: SMB2::GUID ## Generated for :abbr:`SMB (Server Message Block)`/:abbr:`CIFS (Common Internet File System)` ## version 2 requests of type *set_info* of the *valid_data_length* subtype ## -## For more infomation, see MS-SMB2:2.2.39 +## For more information, see MS-SMB2:2.2.39 ## ## c: The connection. ## @@ -172,7 +172,7 @@ event smb2_file_validdatalength%(c: connection, hdr: SMB2::Header, file_id: SMB2 ## Generated for :abbr:`SMB (Server Message Block)`/:abbr:`CIFS (Common Internet File System)` ## version 2 requests of type *set_info* of the *full_EA* subtype ## -## For more infomation, see MS-SMB2:2.2.39 +## For more information, see MS-SMB2:2.2.39 ## ## c: The connection. ## @@ -188,7 +188,7 @@ event smb2_file_fullea%(c: connection, hdr: SMB2::Header, file_id: SMB2::GUID, f ## Generated for :abbr:`SMB (Server Message Block)`/:abbr:`CIFS (Common Internet File System)` ## version 2 requests of type *set_info* of the *link* subtype ## -## For more infomation, see MS-SMB2:2.2.39 +## For more information, see MS-SMB2:2.2.39 ## ## c: The connection. ## @@ -206,7 +206,7 @@ event smb2_file_link%(c: connection, hdr: SMB2::Header, file_id: SMB2::GUID, roo ## Generated for :abbr:`SMB (Server Message Block)`/:abbr:`CIFS (Common Internet File System)` ## version 2 requests of type *set_info* of the *fs_control* subtype ## -## For more infomation, see MS-SMB2:2.2.39 +## For more information, see MS-SMB2:2.2.39 ## ## c: The connection. ## @@ -222,7 +222,7 @@ event smb2_file_fscontrol%(c: connection, hdr: SMB2::Header, file_id: SMB2::GUID ## Generated for :abbr:`SMB (Server Message Block)`/:abbr:`CIFS (Common Internet File System)` ## version 2 requests of type *set_info* of the *fs_object_id* subtype ## -## For more infomation, see MS-SMB2:2.2.39 +## For more information, see MS-SMB2:2.2.39 ## ## c: The connection. ## diff --git a/src/analyzer/protocol/socks/SOCKS.cc b/src/analyzer/protocol/socks/SOCKS.cc index 49d66490d1..3aa8dbc5a5 100644 --- a/src/analyzer/protocol/socks/SOCKS.cc +++ b/src/analyzer/protocol/socks/SOCKS.cc @@ -52,7 +52,7 @@ void SOCKS_Analyzer::DeliverStream(int len, const u_char* data, bool orig) if ( orig_done && resp_done ) { // Finished decapsulating tunnel layer. Now do standard processing - // with the rest of the conneciton. + // with the rest of the connection. // // Note that we assume that no payload data arrives before both endpoints // are done with their part of the SOCKS protocol. diff --git a/src/analyzer/protocol/ssh/SSH.h b/src/analyzer/protocol/ssh/SSH.h index d26c9cd849..f9eb695ede 100644 --- a/src/analyzer/protocol/ssh/SSH.h +++ b/src/analyzer/protocol/ssh/SSH.h @@ -16,12 +16,12 @@ public: explicit SSH_Analyzer(Connection* conn); ~SSH_Analyzer() override; - // Overriden from Analyzer. + // Overridden from Analyzer. void Done() override; void DeliverStream(int len, const u_char* data, bool orig) override; void Undelivered(uint64_t seq, int len, bool orig) override; - // Overriden from analyzer::tcp::TCP_ApplicationAnalyzer. + // Overridden from analyzer::tcp::TCP_ApplicationAnalyzer. void EndpointEOF(bool is_orig) override; static analyzer::Analyzer* Instantiate(Connection* conn) { return new SSH_Analyzer(conn); } diff --git a/src/analyzer/protocol/ssh/events.bif b/src/analyzer/protocol/ssh/events.bif index 5fb32d67ad..451f445e89 100644 --- a/src/analyzer/protocol/ssh/events.bif +++ b/src/analyzer/protocol/ssh/events.bif @@ -55,7 +55,7 @@ event ssh_auth_successful%(c: connection, auth_method_none: bool%); ## connection was determined to have had an authentication attempt. ## This determination is based on packet size analysis, and errs ## on the side of caution - that is, if there's any doubt about -## whether or not an authenication attempt occured, this event is +## whether or not an authentication attempt occurred, this event is ## *not* raised. ## ## At this point in the protocol, all we can determine is whether diff --git a/src/analyzer/protocol/ssl/DTLS.h b/src/analyzer/protocol/ssl/DTLS.h index d5b908a51a..50e3c33344 100644 --- a/src/analyzer/protocol/ssl/DTLS.h +++ b/src/analyzer/protocol/ssl/DTLS.h @@ -26,7 +26,7 @@ public: explicit DTLS_Analyzer(Connection* conn); ~DTLS_Analyzer() override; - // Overriden from Analyzer. + // Overridden from Analyzer. void Done() override; void DeliverPacket(int len, const u_char* data, bool orig, uint64_t seq, const IP_Hdr* ip, int caplen) override; diff --git a/src/analyzer/protocol/ssl/SSL.h b/src/analyzer/protocol/ssl/SSL.h index e8c113b48e..a73875e7e7 100644 --- a/src/analyzer/protocol/ssl/SSL.h +++ b/src/analyzer/protocol/ssl/SSL.h @@ -65,7 +65,7 @@ public: * connection. (For TLS 1.2 this is the pre-master secret) * * Please note that these functions currently are hardcoded to only work with a single TLS 1.2 - * cuphersuite (TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384). + * ciphersuite (TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384). * * @param len Length of the secret bytes * @@ -78,7 +78,7 @@ public: * TLS application data in the connection. * * Please note that these functions currently are hardcoded to only work with a single TLS 1.2 - * cuphersuite (TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384). + * ciphersuite (TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384). * * @param keys The key buffer as derived via TLS PRF (for * AES_GCM this should be 72 bytes in length) @@ -90,7 +90,7 @@ public: * TLS application data in the connection. * * Please note that these functions currently are hardcoded to only work with a single TLS 1.2 - * cuphersuite (TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384). + * ciphersuite (TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384). * * @param keys The key buffer as derived via TLS PRF (for * AES_GCM this should be 72 bytes in length) @@ -110,7 +110,7 @@ protected: * Try to decrypt TLS application data from a packet. Requires secret or keys to be set prior. * * Please note that these functions currently are hardcoded to only work with a single TLS 1.2 - * cuphersuite (TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384). + * ciphersuite (TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384). * * @param len Length of the encrypted bytes to decrypt * @@ -129,10 +129,10 @@ protected: /** * TLS 1.2 pseudo random function (PRF) used to expand the pre-master secret and derive keys. - * The seed is obtained by concatinating rnd1 and rnd2. + * The seed is obtained by concatenating rnd1 and rnd2. * * Please note that these functions currently are hardcoded to only work with a single TLS 1.2 - * cuphersuite (TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384). + * ciphersuite (TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384). * * @param secret Secret as defined in the TLS RFC * @@ -168,7 +168,7 @@ protected: // client and server sequence number, used for TLS 1.2 decryption int c_seq; int s_seq; - // secret, for decyption + // secret, for decryption std::string secret; // derived keys, for decryption std::vector keys; diff --git a/src/analyzer/protocol/ssl/dtls-analyzer.pac b/src/analyzer/protocol/ssl/dtls-analyzer.pac index f9e4e05c62..1a68e0d846 100644 --- a/src/analyzer/protocol/ssl/dtls-analyzer.pac +++ b/src/analyzer/protocol/ssl/dtls-analyzer.pac @@ -4,9 +4,9 @@ refine connection SSL_Conn += { %member{ struct message_info { - uint64 message_first_sequence; // the minumum dtls sequence number for this handshake fragment + uint64 message_first_sequence; // the minimum dtls sequence number for this handshake fragment bool first_sequence_seen; // did we actually see the fragment with the smallest number - uint64 message_last_sequence; // the mazimum dtls sequence number for this handshake fragment + uint64 message_last_sequence; // the maximum dtls sequence number for this handshake fragment uint16 message_handshake_sequence; // the handshake sequence number of this handshake (to identify) uint32 message_length; // data length of this handshake (data in buffer) uint32 message_sequence_seen; // a bitfield that shows which sequence numbers we already saw, offset from first_seq. diff --git a/src/analyzer/protocol/ssl/events.bif b/src/analyzer/protocol/ssl/events.bif index 01f294f913..91248b2648 100644 --- a/src/analyzer/protocol/ssl/events.bif +++ b/src/analyzer/protocol/ssl/events.bif @@ -421,7 +421,7 @@ event ssl_extension_signed_certificate_timestamp%(c: connection, is_client: bool ## Generated for an TLS Supported Versions extension. This TLS extension ## is defined in the TLS 1.3 rfc and sent by the client in the initial handshake. -## It contains the TLS versions that it supports. This informaion can be used by +## It contains the TLS versions that it supports. This information can be used by ## the server to choose the best TLS version o use. ## ## c: The connection. diff --git a/src/analyzer/protocol/ssl/functions.bif b/src/analyzer/protocol/ssl/functions.bif index 75e4d3c26a..185d57a941 100644 --- a/src/analyzer/protocol/ssl/functions.bif +++ b/src/analyzer/protocol/ssl/functions.bif @@ -6,7 +6,7 @@ %%} ## Sets if the SSL analyzer should consider the connection established (handshake -## finished succesfully). +## finished successfully). ## ## c: The SSL connection. ## diff --git a/src/analyzer/protocol/ssl/ssl-protocol.pac b/src/analyzer/protocol/ssl/ssl-protocol.pac index 195c614d1d..f291bf5551 100644 --- a/src/analyzer/protocol/ssl/ssl-protocol.pac +++ b/src/analyzer/protocol/ssl/ssl-protocol.pac @@ -171,7 +171,7 @@ refine connection SSL_Conn += { // some sort of TLS1.3. So - let's do it this way round instead. if ( negotiated_version != SSLv20 && negotiated_version != SSLv30 && negotiated_version != TLSv10 && negotiated_version != TLSv11 && negotiated_version != TLSv12 ) { - // well, it seems like this is a TLS 1.3 (or equivalent) applicatio data packet. Let's enable encryption + // well, it seems like this is a TLS 1.3 (or equivalent) application data packet. Let's enable encryption // and handle it as encrypted. startEncryption(is_orig); return STATE_ENCRYPTED; @@ -183,7 +183,7 @@ refine connection SSL_Conn += { function determine_ssl_record_layer(head0 : uint8, head1 : uint8, head2 : uint8, head3: uint8, head4: uint8, is_orig: bool) : int %{ - // stop processing if we already had a protocol violation or otherwhise + // stop processing if we already had a protocol violation or otherwise // decided that we do not want to parse anymore. Just setting skip is not // enough for the data that is already in the pipe. if ( zeek_analyzer()->Skipping() ) diff --git a/src/analyzer/protocol/ssl/tls-handshake-protocol.pac b/src/analyzer/protocol/ssl/tls-handshake-protocol.pac index 8cbc1ed868..9fd408e070 100644 --- a/src/analyzer/protocol/ssl/tls-handshake-protocol.pac +++ b/src/analyzer/protocol/ssl/tls-handshake-protocol.pac @@ -806,7 +806,7 @@ type SupportedVersions(rec: HandshakeRecord) = record { versions: uint16[] &until($input.length() == 0); } &length=length+1; -# If the server sends it, this is the authorative version. Set it. +# If the server sends it, this is the authoritative version. Set it. type OneSupportedVersion(rec: HandshakeRecord) = record { version: uint16; } &let { diff --git a/src/analyzer/protocol/tcp/TCP_Endpoint.h b/src/analyzer/protocol/tcp/TCP_Endpoint.h index d885be3899..625249558c 100644 --- a/src/analyzer/protocol/tcp/TCP_Endpoint.h +++ b/src/analyzer/protocol/tcp/TCP_Endpoint.h @@ -99,7 +99,7 @@ public: /** * @param tcp_seq_num A 32-bit TCP sequence space number. * @param wraparounds Number of times a 32-bit sequence space has wrapped. - * @return \a tcp_seq_num expanded out in to a 64-bit sequence space, + * @return \a tcp_seq_num expanded out into a 64-bit sequence space, * accounting for the number of times the 32-bit space overflowed. */ static uint64_t ToFullSeqSpace(uint32_t tcp_seq_num, uint32_t wraparounds) @@ -110,7 +110,7 @@ public: /** * @param tcp_seq_num A 32-bit TCP sequence space number. * @param wraparounds Number of times a 32-bit sequence space has wrapped. - * @return \a tcp_seq_num expanded out in to a 64-bit sequence space, + * @return \a tcp_seq_num expanded out into a 64-bit sequence space, * accounting for the number of times the 32-bit space overflowed * and relative to the starting sequence number for this endpoint. */ diff --git a/src/analyzer/protocol/tcp/TCP_Reassembler.cc b/src/analyzer/protocol/tcp/TCP_Reassembler.cc index 7c521f7bfd..889696f755 100644 --- a/src/analyzer/protocol/tcp/TCP_Reassembler.cc +++ b/src/analyzer/protocol/tcp/TCP_Reassembler.cc @@ -171,7 +171,7 @@ void TCP_Reassembler::Undelivered(uint64_t up_to_seq) // first packet we saw instantiating the partial connection // was a keep-alive. So, in either case, just ignore it. - // TODO: Don't we need to update last_reassm_seq ???? + // TODO: Don't we need to update last_reassem_seq ???? return; } @@ -187,7 +187,7 @@ void TCP_Reassembler::Undelivered(uint64_t up_to_seq) if ( DEBUG_tcp_contents ) { - DEBUG_MSG("%.6f Undelivered: IsOrig()=%d up_to_seq=%" PRIu64 ", last_reassm=%" PRIu64 ", " + DEBUG_MSG("%.6f Undelivered: IsOrig()=%d up_to_seq=%" PRIu64 ", last_reassem=%" PRIu64 ", " "endp: FIN_cnt=%d, RST_cnt=%d, " "peer: FIN_cnt=%d, RST_cnt=%d\n", zeek::run_state::network_time, IsOrig(), up_to_seq, last_reassem_seq, @@ -286,7 +286,7 @@ void TCP_Reassembler::MatchUndelivered(uint64_t up_to_seq, bool use_last_upper) // ### Note: the original code did not check whether blocks have // already been delivered, but not ACK'ed, and therefore still - // must be kept in the reassember. + // must be kept in the reassembler. // We are to match any undelivered data, from last_reassem_seq to // min(last_block->upper, up_to_seq). @@ -546,10 +546,10 @@ void TCP_Reassembler::AckReceived(uint64_t seq) void TCP_Reassembler::CheckEOF() { // It is important that the check on whether we have pending data here - // is consistent with the check in TCP_Connection::ConnnectionClosed(). + // is consistent with the check in TCP_Connection::ConnectionClosed(). // // If we choose to call EndpointEOF here because, for example, we - // are already skipping deliveries, ConnnectionClosed() might decide + // are already skipping deliveries, ConnectionClosed() might decide // that there is still DataPending, because it does not check // SkipDeliveries(), and the connection will not be closed until // timeout, since the did_EOF flag makes sure that EndpointEOF will diff --git a/src/analyzer/protocol/xmpp/XMPP.h b/src/analyzer/protocol/xmpp/XMPP.h index 3ffe4241a7..f6ea7dada5 100644 --- a/src/analyzer/protocol/xmpp/XMPP.h +++ b/src/analyzer/protocol/xmpp/XMPP.h @@ -19,7 +19,7 @@ public: void DeliverStream(int len, const u_char* data, bool orig) override; void Undelivered(uint64_t seq, int len, bool orig) override; - // Overriden from analyzer::tcp::TCP_ApplicationAnalyzer. + // Overridden from analyzer::tcp::TCP_ApplicationAnalyzer. void EndpointEOF(bool is_orig) override; void StartTLS(); diff --git a/src/binpac_zeek-lib.pac b/src/binpac_zeek-lib.pac index a4748d45ea..2b32edccd9 100644 --- a/src/binpac_zeek-lib.pac +++ b/src/binpac_zeek-lib.pac @@ -27,7 +27,7 @@ zeek::StringValPtr utf16_to_utf8_val(zeek::Connection* conn, const bytestring& u // here, so make a copy. auto utf16_copy_buf = std::make_unique(utf16.length()); // Twice as much memory than necessary. auto utf16_copy = utf16_copy_buf.get(); - memset(utf16_copy, 0, sizeof(UTF16) * utf16.length()); // needs to be set to 0, otherwhise we have uninitialized memory issues when utf16.length is odd. + memset(utf16_copy, 0, sizeof(UTF16) * utf16.length()); // needs to be set to 0, otherwise we have uninitialized memory issues when utf16.length is odd. memcpy(utf16_copy, utf16.begin(), utf16.length()); const char* utf16_copy_end = reinterpret_cast(utf16_copy) + utf16.length(); diff --git a/src/broker/Data.cc b/src/broker/Data.cc index da0ddca878..87007e5d8b 100644 --- a/src/broker/Data.cc +++ b/src/broker/Data.cc @@ -1176,7 +1176,7 @@ broker::data& opaque_field_to_data(RecordVal* v, zeek::detail::Frame* f) if ( ! d ) reporter->RuntimeError(f->GetCallLocation(), "Broker::Data's opaque field is not set"); - // RuntimeError throws an exception which causes this line to never exceute. + // RuntimeError throws an exception which causes this line to never execute. // NOLINTNEXTLINE(clang-analyzer-core.uninitialized.UndefReturn) return static_cast(d.get())->data; } diff --git a/src/broker/Data.h b/src/broker/Data.h index 4c0ce7197b..a785662789 100644 --- a/src/broker/Data.h +++ b/src/broker/Data.h @@ -166,7 +166,7 @@ struct type_name_getter * @param v a Broker::Data value. * @param f used to get location information on error. * @return a reference to the wrapped Broker data value. A runtime interpreter - * exception is thrown if the the optional opaque value of \a v is not set. + * exception is thrown if the optional opaque value of \a v is not set. */ broker::data& opaque_field_to_data(zeek::RecordVal* v, zeek::detail::Frame* f); @@ -176,7 +176,7 @@ broker::data& opaque_field_to_data(zeek::RecordVal* v, zeek::detail::Frame* f); * @param d a Broker data value to get variant data out of. * @param tag a Zeek tag which corresponds to T (just used for error reporting). * @param f used to get location information on error. - * @return a refrence to the requested type in the variant Broker data. + * @return a reference to the requested type in the variant Broker data. * A runtime interpret exception is thrown if trying to access a type which * is not currently stored in the Broker data. */ @@ -200,7 +200,7 @@ inline T& require_data_type(zeek::RecordVal* v, zeek::TypeTag tag, zeek::detail: return require_data_type(opaque_field_to_data(v, f), tag, f); } -// Copying data in to iterator vals is not the fastest approach, but safer... +// Copying data into iterator vals is not the fastest approach, but safer... class SetIterator : public zeek::OpaqueVal { diff --git a/src/broker/Manager.cc b/src/broker/Manager.cc index 37e7f9d4c1..59b614dcf3 100644 --- a/src/broker/Manager.cc +++ b/src/broker/Manager.cc @@ -930,7 +930,7 @@ bool Manager::AutoPublishEvent(string topic, Val* event) return false; } - DBG_LOG(DBG_BROKER, "Enabling auto-publising of event %s to topic %s", handler->Name(), + DBG_LOG(DBG_BROKER, "Enabling auto-publishing of event %s to topic %s", handler->Name(), topic.c_str()); handler->AutoPublish(move(topic)); @@ -1075,7 +1075,7 @@ bool Manager::Unsubscribe(const string& topic_prefix) for ( size_t i = 0; i < forwarded_prefixes.size(); ++i ) if ( forwarded_prefixes[i] == topic_prefix ) { - DBG_LOG(DBG_BROKER, "Unforwading topic prefix %s", topic_prefix.c_str()); + DBG_LOG(DBG_BROKER, "Unforwarding topic prefix %s", topic_prefix.c_str()); forwarded_prefixes.erase(forwarded_prefixes.begin() + i); break; } @@ -1648,7 +1648,7 @@ bool Manager::ProcessIdentifierUpdate(broker::zeek::IdentifierUpdate iu) if ( ! id ) { - reporter->Warning("Received id-update request for unkown id: %s", id_name.c_str()); + reporter->Warning("Received id-update request for unknown id: %s", id_name.c_str()); return false; } @@ -1758,7 +1758,7 @@ void Manager::ProcessError(broker::error_view err) else { - reporter->Warning("Unknown Broker error code %u: mapped to unspecificed enum value ", + reporter->Warning("Unknown Broker error code %u: mapped to unspecified enum value ", static_cast(int_code)); ec = BifEnum::Broker::ErrorCode::UNSPECIFIED; } diff --git a/src/broker/Manager.h b/src/broker/Manager.h index 27945d892b..67bb8a5581 100644 --- a/src/broker/Manager.h +++ b/src/broker/Manager.h @@ -110,7 +110,7 @@ public: void Terminate(); /** - * Returns true if any Broker communincation is currently active. + * Returns true if any Broker communication is currently active. */ bool Active(); diff --git a/src/digest.h b/src/digest.h index 06b5854929..62809c4580 100644 --- a/src/digest.h +++ b/src/digest.h @@ -74,7 +74,7 @@ unsigned char* internal_md5(const unsigned char* data, unsigned long len, unsign * @param data Data to hash. * @param len Length of data to hash. * @param out Buffer to write data to. If set to nullptr, a static buffer will be used - * @return Buffer that the hash was written to. Length is deoendent on the chosen hash function. + * @return Buffer that the hash was written to. Length is dependent on the chosen hash function. */ unsigned char* calculate_digest(HashAlgorithm Alg, const unsigned char* data, uint64_t len, unsigned char* out); diff --git a/src/event.bif b/src/event.bif index 7e2f0c6830..28f309c824 100644 --- a/src/event.bif +++ b/src/event.bif @@ -8,7 +8,7 @@ # # Documentation conventions: # -# - Use past tense for activity that has already occured. +# - Use past tense for activity that has already occurred. # # - List parameters with an empty line in between. # @@ -925,7 +925,7 @@ event Pcap::file_done%(path: string%); ## Generated when a packet analyzer attempts to forward a protocol that it doesn't ## know how to handle. ## -## analzyer_name: The string name of the analyzer attempting to forward the protocol +## analyzer_name: The string name of the analyzer attempting to forward the protocol ## ## protocol: The identifier of the protocol being forwarded ## diff --git a/src/file_analysis/Analyzer.h b/src/file_analysis/Analyzer.h index 126e3be53c..6bdcf123e3 100644 --- a/src/file_analysis/Analyzer.h +++ b/src/file_analysis/Analyzer.h @@ -86,7 +86,7 @@ public: /** * Returns the analyzer instance's internal ID. These IDs are unique * across all analyzers instantiated and can thus be used to - * indentify a specific instance. + * identify a specific instance. */ ID GetID() const { return id; } @@ -120,7 +120,7 @@ public: /** * Signals that the analyzer is to skip all further input - * processsing. This won't have an immediate effect internally, but + * processing. This won't have an immediate effect internally, but * the flag can be queried through Skipping(). * * @param do_skip If true, further processing will be skipped. @@ -168,10 +168,10 @@ public: protected: /** * Constructor. Only derived classes are meant to be instantiated. - * @param arg_tag the tag definining the analyzer's type. - * @param arg_args an \c AnalyzerArgs (script-layer type) value specifiying + * @param arg_tag the tag defining the analyzer's type. + * @param arg_args an \c AnalyzerArgs (script-layer type) value specifying * tunable options, if any, related to a particular analyzer type. - * @param arg_file the file to which the the analyzer is being attached. + * @param arg_file the file to which the analyzer is being attached. */ Analyzer(zeek::Tag arg_tag, RecordValPtr arg_args, File* arg_file); @@ -180,9 +180,9 @@ protected: * As this version of the constructor does not receive a name or tag, * SetAnalyzerTag() must be called before the instance can be used. * - * @param arg_args an \c AnalyzerArgs (script-layer type) value specifiying + * @param arg_args an \c AnalyzerArgs (script-layer type) value specifying * tunable options, if any, related to a particular analyzer type. - * @param arg_file the file to which the the analyzer is being attached. + * @param arg_file the file to which the analyzer is being attached. */ Analyzer(RecordValPtr arg_args, File* arg_file); diff --git a/src/file_analysis/AnalyzerSet.h b/src/file_analysis/AnalyzerSet.h index c1d609091c..39889229d2 100644 --- a/src/file_analysis/AnalyzerSet.h +++ b/src/file_analysis/AnalyzerSet.h @@ -127,7 +127,7 @@ protected: file_analysis::Analyzer* InstantiateAnalyzer(const zeek::Tag& tag, RecordValPtr args) const; /** - * Insert an analyzer instance in to the set. + * Insert an analyzer instance into the set. * @param a an analyzer instance. * @param key the hash key which represents the analyzer's \c AnalyzerArgs. */ @@ -135,7 +135,7 @@ protected: /** * Remove an analyzer instance from the set. - * @param tag enumarator which specifies type of the analyzer to remove, + * @param tag enumerator which specifies type of the analyzer to remove, * just used for debugging messages. * @param key the hash key which represents the analyzer's \c AnalyzerArgs. */ diff --git a/src/file_analysis/Component.h b/src/file_analysis/Component.h index 5e391e3599..3047a5a77a 100644 --- a/src/file_analysis/Component.h +++ b/src/file_analysis/Component.h @@ -41,7 +41,7 @@ public: * @param factory A factory function to instantiate instances of the * analyzer's class, which must be derived directly or indirectly * from file_analysis::Analyzer. This is typically a static \c - * Instatiate() method inside the class that just allocates and + * Instantiate() method inside the class that just allocates and * returns a new instance. * * @param subtype A subtype associated with this component that @@ -90,7 +90,7 @@ public: protected: /** - * Overriden from plugin::Component. + * Overridden from plugin::Component. */ void DoDescribe(ODesc* d) const override; diff --git a/src/file_analysis/File.h b/src/file_analysis/File.h index da87e6a963..ed7dcc092c 100644 --- a/src/file_analysis/File.h +++ b/src/file_analysis/File.h @@ -156,7 +156,7 @@ public: /** * Inform attached analyzers about a gap in file stream. - * @param offset number of bytes in to file at which missing chunk starts. + * @param offset number of bytes into file at which missing chunk starts. * @param len length in bytes of the missing chunk of file data. */ void Gap(uint64_t offset, uint64_t len); diff --git a/src/file_analysis/Manager.cc b/src/file_analysis/Manager.cc index b05545dd23..1a767f5c81 100644 --- a/src/file_analysis/Manager.cc +++ b/src/file_analysis/Manager.cc @@ -327,7 +327,7 @@ File* Manager::GetFile(const string& file_id, Connection* conn, const zeek::Tag& rval->ScheduleInactivityTimer(); // Generate file_new after inserting it into manager's mapping - // in case script-layer calls back in to core from the event. + // in case script-layer calls back into core from the event. rval->FileEvent(file_new); // Same for file_over_new_connection. rval->RaiseFileOverNewConnection(conn, is_orig); diff --git a/src/file_analysis/Manager.h b/src/file_analysis/Manager.h index 30a78fef7c..238e4a03c1 100644 --- a/src/file_analysis/Manager.h +++ b/src/file_analysis/Manager.h @@ -48,7 +48,7 @@ public: ~Manager(); /** - * First-stage initializion of the manager. This is called early on + * First-stage initialization of the manager. This is called early on * during Zeek's initialization, before any scripts are processed. */ void InitPreScript(); @@ -105,7 +105,7 @@ public: * This parameter only has any effect for the first DataIn call of each * file. It is ignored for all subsequent calls. * @return a unique file ID string which, in certain contexts, may be - * cached and passed back in to a subsequent function call in order + * cached and passed back into a subsequent function call in order * to avoid costly file handle lookups (which have to go through * the \c get_file_handle script-layer event). An empty string * indicates the associate file is not going to be analyzed further. @@ -131,7 +131,7 @@ public: * disabled. * This parameter is only used for the first bit of data for each file. * @return a unique file ID string which, in certain contexts, may be - * cached and passed back in to a subsequent function call in order + * cached and passed back into a subsequent function call in order * to avoid costly file handle lookups (which have to go through * the \c get_file_handle script-layer event). An empty string * indicates the associated file is not going to be analyzed further. @@ -201,7 +201,7 @@ public: /** * Signal a gap in the file data stream. - * @param offset number of bytes in to file at which missing chunk starts. + * @param offset number of bytes into file at which missing chunk starts. * @param len length in bytes of the missing chunk of file data. * @param tag network protocol over which the file data is transferred. * @param conn network connection over which the file data is transferred. @@ -210,7 +210,7 @@ public: * @param precomputed_file_id may be set to a previous return value in order to * bypass costly file handle lookups. * @return a unique file ID string which, in certain contexts, may be - * cached and passed back in to a subsequent function call in order + * cached and passed back into a subsequent function call in order * to avoid costly file handle lookups (which have to go through * the \c get_file_handle script-layer event). An empty string * indicates the associate file is not going to be analyzed further. @@ -228,7 +228,7 @@ public: * @param precomputed_file_id may be set to a previous return value in order to * bypass costly file handle lookups. * @return a unique file ID string which, in certain contexts, may be - * cached and passed back in to a subsequent function call in order + * cached and passed back into a subsequent function call in order * to avoid costly file handle lookups (which have to go through * the \c get_file_handle script-layer event). An empty string * indicates the associate file is not going to be analyzed further. @@ -290,7 +290,7 @@ public: File* LookupFile(const std::string& file_id) const; /** - * Queue attachment of an analzer to the file identifier. Multiple + * Queue attachment of an analyzer to the file identifier. Multiple * analyzers of a given type can be attached per file identifier at a time * as long as the arguments differ. * @param file_id the file identifier/hash. @@ -319,8 +319,8 @@ public: /** * Instantiates a new file analyzer instance for the file. * @param tag The file analyzer's tag. - * @param args The file analzer argument/option values. - * @param f The file analzer is to be associated with. + * @param args The file analyzer argument/option values. + * @param f The file analyzer is to be associated with. * @return The new analyzer instance or null if tag is invalid. */ Analyzer* InstantiateAnalyzer(const Tag& tag, RecordValPtr args, File* f) const; @@ -330,7 +330,7 @@ public: * chunk of data. * @param data A chunk of bytes to match magic MIME signatures against. * @param len The number of bytes in \a data. - * @param rval An optional pre-existing structure in which to insert + * @param rval An optional preexisting structure in which to insert * new matches. If it's a null pointer, an object is * allocated and returned from the method. * @return Set of all matching file magic signatures, which may be diff --git a/src/file_analysis/analyzer/data_event/DataEvent.h b/src/file_analysis/analyzer/data_event/DataEvent.h index 9467e3e439..703f256348 100644 --- a/src/file_analysis/analyzer/data_event/DataEvent.h +++ b/src/file_analysis/analyzer/data_event/DataEvent.h @@ -42,7 +42,7 @@ public: * @param args the \c AnalyzerArgs value which represents the analyzer. * @param file the file to which the analyzer will be attached. * @return the new DataEvent analyzer instance or a null pointer if - * no "chunk_event" or "stream_event" field was specfied in \a args. + * no "chunk_event" or "stream_event" field was specified in \a args. */ static file_analysis::Analyzer* Instantiate(RecordValPtr args, file_analysis::File* file); diff --git a/src/file_analysis/analyzer/hash/Hash.h b/src/file_analysis/analyzer/hash/Hash.h index 8958a94d23..095bb0e57d 100644 --- a/src/file_analysis/analyzer/hash/Hash.h +++ b/src/file_analysis/analyzer/hash/Hash.h @@ -34,7 +34,7 @@ public: /** * Finalizes the hash and raises a "file_hash" event. - * @return always false so analyze will be deteched from file. + * @return always false so analyze will be detached from file. */ bool EndOfFile() override; diff --git a/src/file_analysis/analyzer/x509/X509.cc b/src/file_analysis/analyzer/x509/X509.cc index 29e5d951a8..058d82fff1 100644 --- a/src/file_analysis/analyzer/x509/X509.cc +++ b/src/file_analysis/analyzer/x509/X509.cc @@ -164,7 +164,7 @@ RecordValPtr X509::ParseCertificate(X509Val* cert_val, file_analysis::File* f) // we only read 255 bytes because byte 256 is always 0. // if the string is longer than 255, that will be our null-termination, - // otherwhise i2t does null-terminate. + // otherwise i2t does null-terminate. ASN1_OBJECT* algorithm; X509_PUBKEY_get0_param(&algorithm, NULL, NULL, NULL, X509_get_X509_PUBKEY(ssl_cert)); if ( ! i2t_ASN1_OBJECT(buf, 255, algorithm) ) @@ -280,7 +280,7 @@ X509_STORE* X509::GetRootStore(TableVal* root_certs) X509_free(x); } - // Save the newly constructed certificate store into the cacheing map. + // Save the newly constructed certificate store into the caching map. x509_stores[root_certs] = ctx; return ctx; diff --git a/src/file_analysis/analyzer/x509/X509Common.cc b/src/file_analysis/analyzer/x509/X509Common.cc index 9d5f839b0b..a4dd56a50a 100644 --- a/src/file_analysis/analyzer/x509/X509Common.cc +++ b/src/file_analysis/analyzer/x509/X509Common.cc @@ -193,7 +193,7 @@ double X509Common::GetTimeFromAsn1(const ASN1_TIME* atime, file_analysis::File* void X509Common::ParseSignedCertificateTimestamps(X509_EXTENSION* ext) { // Ok, signed certificate timestamps are a bit of an odd case out; we don't - // want to use the (basically nonexistant) OpenSSL functionality to parse them. + // want to use the (basically nonexistent) OpenSSL functionality to parse them. // Instead we have our own, self-written binpac parser to parse just them, // which we will initialize here and tear down immediately again. diff --git a/src/file_analysis/analyzer/x509/functions.bif b/src/file_analysis/analyzer/x509/functions.bif index 1383b62c2d..8a13f4d446 100644 --- a/src/file_analysis/analyzer/x509/functions.bif +++ b/src/file_analysis/analyzer/x509/functions.bif @@ -24,7 +24,7 @@ static zeek::RecordValPtr x509_result_record(uint64_t num, const char* reason, z return rrecord; } -// get all cretificates starting at the second one (assuming the first one is the host certificate) +// get all certificates starting at the second one (assuming the first one is the host certificate) STACK_OF(X509)* x509_get_untrusted_stack(zeek::VectorVal* certs_vec) { STACK_OF(X509)* untrusted_certs = sk_X509_new_null(); @@ -83,7 +83,7 @@ X509* x509_get_ocsp_signer(const STACK_OF(X509)* certs, return X509_find_by_subject(const_cast(certs), const_cast(name)); - // Just like OpenSSL, we just support SHA-1 lookups and bail out otherwhise. + // Just like OpenSSL, we just support SHA-1 lookups and bail out otherwise. if ( key->length != SHA_DIGEST_LENGTH ) return 0; @@ -660,7 +660,7 @@ x509_verify_chainerror: ## This only has to be provided if the SCT was encountered in an X.509 ## certificate extension; in that case, it is necessary for validation. ## -## Returns: T if the validation could be performed succesfully, F otherwhise. +## Returns: T if the validation could be performed successfully, F otherwise. ## ## .. zeek:see:: ssl_extension_signed_certificate_timestamp ## x509_ocsp_ext_signed_certificate_timestamp diff --git a/src/file_analysis/analyzer/x509/ocsp_events.bif b/src/file_analysis/analyzer/x509/ocsp_events.bif index fe17344490..0f839c0ee5 100644 --- a/src/file_analysis/analyzer/x509/ocsp_events.bif +++ b/src/file_analysis/analyzer/x509/ocsp_events.bif @@ -87,11 +87,11 @@ event ocsp_response_bytes%(f: fa_file, status: string, version: count, responder ## ## revokeTime: Time the certificate was revoked, 0 if not revoked. ## -## revokeTeason: Reason certificate was revoked; empty string if not revoked or not specified. +## revokeReason: Reason certificate was revoked; empty string if not revoked or not specified. ## ## thisUpdate: Time this response was generated. ## -## nextUpdate: Time next response will be ready; 0 if not supploed. +## nextUpdate: Time next response will be ready; 0 if not supplied. ## ## .. zeek:see:: ocsp_request ocsp_request_certificate ocsp_response_status ## ocsp_response_bytes ocsp_extension diff --git a/src/input/Component.h b/src/input/Component.h index 2c8b184108..e471b9e2f8 100644 --- a/src/input/Component.h +++ b/src/input/Component.h @@ -27,7 +27,7 @@ public: * * @param factory A factory function to instantiate instances of the * readers's class, which must be derived directly or indirectly from - * input::ReaderBackend. This is typically a static \c Instatiate() + * input::ReaderBackend. This is typically a static \c Instantiate() * method inside the class that just allocates and returns a new * instance. */ @@ -52,7 +52,7 @@ public: protected: /** - * Overriden from plugin::Component. + * Overridden from plugin::Component. */ void DoDescribe(ODesc* d) const override; diff --git a/src/input/Manager.cc b/src/input/Manager.cc index 0a801d2424..ba1f96a9bd 100644 --- a/src/input/Manager.cc +++ b/src/input/Manager.cc @@ -948,7 +948,7 @@ bool Manager::UnrollRecordType(vector* fields, const RecordType* rec, } } - reporter->Error("Incompatible type \"%s\" in type definition for for field \"%s\" in " + reporter->Error("Incompatible type \"%s\" in type definition for field \"%s\" in " "ReaderFrontend", type_name(rec->GetFieldType(i)->Tag()), name.c_str()); return false; @@ -1206,7 +1206,7 @@ int Manager::SendEntryTable(Stream* i, const Value* const* vals) // seen before if ( stream->num_val_fields == 0 || h->valhash == valhash ) { - // ok, exact duplicate, move entry to new dicrionary and do nothing else. + // ok, exact duplicate, move entry to new dictionary and do nothing else. stream->lastDict->Remove(idxhash); stream->currDict->Insert(idxhash, h); delete idxhash; @@ -1248,7 +1248,7 @@ int Manager::SendEntryTable(Stream* i, const Value* const* vals) predidx = ValueToRecordVal(i, vals, stream->itype, &startpos, pred_convert_error); // if we encountered a convert error here - just continue as we would have without - // emitting the event. I do not really think that that can happen just here and not + // emitting the event. I do not really think that can happen just here and not // at the top-level. But - this is safe. if ( ! pred_convert_error ) { diff --git a/src/input/Manager.h b/src/input/Manager.h index 4d875ebe12..18b140481e 100644 --- a/src/input/Manager.h +++ b/src/input/Manager.h @@ -188,7 +188,7 @@ private: bool CreateStream(Stream*, RecordVal* description); // Check if the types of the error_ev event are correct. If table is - // true, check for tablestream type, otherwhise check for eventstream + // true, check for tablestream type, otherwise check for eventstream // type. bool CheckErrorEventTypes(const std::string& stream_name, const Func* error_event, bool table) const; diff --git a/src/input/ReaderBackend.cc b/src/input/ReaderBackend.cc index 21420edd79..83529a52c4 100644 --- a/src/input/ReaderBackend.cc +++ b/src/input/ReaderBackend.cc @@ -201,7 +201,7 @@ using namespace input; ReaderBackend::ReaderBackend(ReaderFrontend* arg_frontend) : MsgThread() { - disabled = true; // disabled will be set correcty in init. + disabled = true; // disabled will be set correctly in init. frontend = arg_frontend; info = new ReaderInfo(frontend->Info()); num_fields = 0; diff --git a/src/input/ReaderBackend.h b/src/input/ReaderBackend.h index bd055cf003..0c3244c8b3 100644 --- a/src/input/ReaderBackend.h +++ b/src/input/ReaderBackend.h @@ -162,7 +162,7 @@ public: * @param config A string map containing additional configuration options * for the reader. * - * @return False if an error occured. + * @return False if an error occurred. */ bool Init(int num_fields, const threading::Field* const* fields); @@ -173,7 +173,7 @@ public: * * An backend can choose to ignore this. * - * @return False if an error occured. + * @return False if an error occurred. */ bool Update(); @@ -243,12 +243,12 @@ protected: // Methods that have to be overwritten by the individual readers /** - * Reader-specific intialization method. Note that data may only be + * Reader-specific initialization method. Note that data may only be * read from the input source after the Init() function has been * called. * * A reader implementation must override this method. If it returns - * false, it will be assumed that a fatal error has occured that + * false, it will be assumed that a fatal error has occurred that * prevents the reader from further operation; it will then be * disabled and eventually deleted. When returning false, an * implementation should also call Error() to indicate what happened. @@ -258,7 +258,7 @@ protected: * Note that derived classes don't need to store the values passed in * here if other methods need them to; the \a ReaderBackend class * provides accessor methods to get them later, and they are passed - * in here only for convinience. + * in here only for convenience. */ virtual bool DoInit(const ReaderInfo& info, int arg_num_fields, const threading::Field* const* fields) = 0; @@ -284,7 +284,7 @@ protected: * the current input reading mode. * * If it returns false, it will be assumed that a fatal error has - * occured that prevents the reader from further operation; it will + * occurred that prevents the reader from further operation; it will * then be disabled and eventually deleted. When returning false, an * implementation should also call Error to indicate what happened. */ diff --git a/src/input/ReaderFrontend.h b/src/input/ReaderFrontend.h index d9e3632abd..bfcaaf624a 100644 --- a/src/input/ReaderFrontend.h +++ b/src/input/ReaderFrontend.h @@ -131,7 +131,7 @@ protected: friend class Manager; private: - ReaderBackend* backend; // The backend we have instanatiated. + ReaderBackend* backend; // The backend we have instantiated. ReaderBackend::ReaderInfo* info; // Meta information. const threading::Field* const* fields; // The input fields. int num_fields; // Information as passed to Init(). diff --git a/src/input/readers/raw/Raw.cc b/src/input/readers/raw/Raw.cc index 8275a01040..a820ed0619 100644 --- a/src/input/readers/raw/Raw.cc +++ b/src/input/readers/raw/Raw.cc @@ -418,7 +418,7 @@ bool Raw::DoInit(const ReaderInfo& info, int num_fields, const Field* const* fie Error( Fmt("Filter for raw reader contains wrong number of fields -- got %d, expected %d. " "Filters for the raw reader contain one string field when used in normal mode and " - "one string and one bool fields when using execute mode with stderr capuring. " + "one string and one bool fields when using execute mode with stderr capturing. " "Filter ignored.", num_fields, want_fields)); return false; @@ -481,7 +481,7 @@ int64_t Raw::GetLine(FILE* arg_file) if ( pos == 0 && errno != 0 ) break; - // researching everything each time is a bit... cpu-intensive. But otherwhise we have + // researching everything each time is a bit... cpu-intensive. But otherwise we have // to deal with situations where the separator is multi-character and split over multiple // reads... int found = util::strstr_n(pos, (unsigned char*)buf.get(), separator.size(), diff --git a/src/input/readers/sqlite/Plugin.cc b/src/input/readers/sqlite/Plugin.cc index 83d7bc036f..6ad018f7ba 100644 --- a/src/input/readers/sqlite/Plugin.cc +++ b/src/input/readers/sqlite/Plugin.cc @@ -22,4 +22,4 @@ public: } } plugin; - } // namespae zeek::plugin::detail::Zeek_SQLiteReader + } // namespace zeek::plugin::detail::Zeek_SQLiteReader diff --git a/src/iosource/BPF_Program.h b/src/iosource/BPF_Program.h index d4f7715688..9d4f1af583 100644 --- a/src/iosource/BPF_Program.h +++ b/src/iosource/BPF_Program.h @@ -77,7 +77,7 @@ public: FilterState GetState() const { return state; } /** - * Returns an error message, if any, that was returned from the compliation process. + * Returns an error message, if any, that was returned from the compilation process. */ std::string GetStateMessage() const { return state_message; } diff --git a/src/iosource/Component.h b/src/iosource/Component.h index 3f6edc3023..0452a65dd6 100644 --- a/src/iosource/Component.h +++ b/src/iosource/Component.h @@ -39,7 +39,7 @@ protected: /** * Constructor to use by derived classes. * - * @param type The type of the componnent. + * @param type The type of the component. * * @param name A descriptive name for the component. This name must * be unique across all components of this type. @@ -128,7 +128,7 @@ private: /** * Component description for plugins providing a PktDumper for packet output. * - * PktDumpers aren't IOSurces but we locate them here to keep them along with + * PktDumpers aren't IOSources but we locate them here to keep them along with * the PktSrc. */ class PktDumperComponent : public plugin::Component diff --git a/src/iosource/IOSource.h b/src/iosource/IOSource.h index 16fc76a6c5..bd66f41068 100644 --- a/src/iosource/IOSource.h +++ b/src/iosource/IOSource.h @@ -59,7 +59,7 @@ public: * overridden by source classes where they have a timeout value * that can wake up the poll. * - * Must be overriden by derived classes. + * Must be overridden by derived classes. * * @return A value for the next time that the source thinks the * poll should time out in seconds from the current time. Return diff --git a/src/iosource/Manager.h b/src/iosource/Manager.h index ebbf85d561..6fad1adcc5 100644 --- a/src/iosource/Manager.h +++ b/src/iosource/Manager.h @@ -99,7 +99,7 @@ public: * @param is_live True if \a path represents a live interface, false * for a file. * - * @return The new packet source, or null if an error occured. + * @return The new packet source, or null if an error occurred. */ PktSrc* OpenPktSrc(const std::string& path, bool is_live); diff --git a/src/iosource/PktDumper.h b/src/iosource/PktDumper.h index c39895e405..5ad513f061 100644 --- a/src/iosource/PktDumper.h +++ b/src/iosource/PktDumper.h @@ -52,7 +52,7 @@ public: /** * Returns if the dumper has encountered an error, returns a - * corresponding error message. Returns an emoty string otherwise. + * corresponding error message. Returns an empty string otherwise. */ const char* ErrorMsg() const; @@ -104,7 +104,7 @@ protected: /** * Called from the implementations of \a Open() to signal that the - * source has been successully opened. + * source has been successfully opened. * * @param props A properties instance describing the now open source. */ diff --git a/src/iosource/PktSrc.h b/src/iosource/PktSrc.h index f5e25a603e..0cacba7845 100644 --- a/src/iosource/PktSrc.h +++ b/src/iosource/PktSrc.h @@ -149,14 +149,14 @@ public: */ bool GetCurrentPacket(const Packet** hdr); - // PacketSource interace for derived classes to override. + // PacketSource interface for derived classes to override. /** * Precompiles a filter and associates a given index with it. The - * filter syntax is defined by the packet source's implenentation. + * filter syntax is defined by the packet source's implementation. * * Derived classes can override this method to implement their own - * filtering. If not overriden, it uses the pcap-based BPF filtering + * filtering. If not overridden, it uses the pcap-based BPF filtering * by default. * * @param index The index to associate with the filter @@ -201,7 +201,7 @@ public: * * @return A value for the next time that the source thinks the * poll should time out in seconds from the current time. Return - * -1 if this should should not be considered. + * -1 if this should not be considered. */ virtual double GetNextTimeout() override; @@ -251,7 +251,7 @@ protected: /** * Called from the implementations of \a Open() to signal that the - * source has been successully opened. + * source has been successfully opened. * * @param props A properties instance describing the now open source. */ @@ -279,7 +279,7 @@ protected: void Error(const std::string& msg); /** - * Can be called from derived classes to flah a "weird" situation. + * Can be called from derived classes to flag a "weird" situation. * * @param msg The message to pass on. * @@ -320,13 +320,13 @@ protected: * * @param pkt The packet structure to fill in with the packet's * information. The callee keep ownership of the data but must - * guaranetee that it stays available at least until \a + * guarantee that it stays available at least until \a * DoneWithPacket() is called. It is guaranteed that no two calls to - * this method will hapen with \a DoneWithPacket() in between. + * this method will happen with \a DoneWithPacket() in between. * * @return True if a packet is available and *pkt* filled in. False - * if not packet is available or an error occured (which must be - * flageed via Error()). + * if not packet is available or an error occurred (which must be + * flagged via Error()). */ virtual bool ExtractNextPacket(Packet* pkt) = 0; @@ -338,7 +338,7 @@ protected: /** * Performs the actual filter compilation. This can be overridden to - * provide a different implementation of the compiilation called by + * provide a different implementation of the compilation called by * PrecompileBPFFilter(). This is primarily used by the pcap source * use a different version of BPF_Filter::Compile; * diff --git a/src/iosource/pcap/pcap.bif b/src/iosource/pcap/pcap.bif index 4e8e863a5c..14fc22c4d1 100644 --- a/src/iosource/pcap/pcap.bif +++ b/src/iosource/pcap/pcap.bif @@ -34,7 +34,7 @@ function precompile_pcap_filter%(id: PcapFilterID, s: string%): bool if ( id->AsEnum() >= 100 ) { // We use a vector as underlying data structure for fast - // lookups and limit the ID space so that that doesn't grow too + // lookups and limit the ID space so that it doesn't grow too // large. zeek::emit_builtin_error( zeek::util::fmt("PCAP filter ids must remain below 100 (is %" PRId64 ")", id->AsInt())); diff --git a/src/logging/Component.h b/src/logging/Component.h index 305401c341..c39bbdded2 100644 --- a/src/logging/Component.h +++ b/src/logging/Component.h @@ -27,7 +27,7 @@ public: * * @param factory A factory function to instantiate instances of the * writers's class, which must be derived directly or indirectly from - * logging::WriterBackend. This is typically a static \c Instatiate() + * logging::WriterBackend. This is typically a static \c Instantiate() * method inside the class that just allocates and returns a new * instance. */ @@ -52,7 +52,7 @@ public: protected: /** - * Overriden from plugin::Component. + * Overridden from plugin::Component. */ void DoDescribe(ODesc* d) const override; diff --git a/src/logging/Manager.cc b/src/logging/Manager.cc index 1947828449..463cc45ba7 100644 --- a/src/logging/Manager.cc +++ b/src/logging/Manager.cc @@ -726,7 +726,7 @@ bool Manager::Write(EnumVal* id, RecordVal* columns_arg) auto v = log_stream_policy_hook->Invoke(columns, IntrusivePtr{NewRef{}, id}); if ( v && ! v->AsBool() ) { - // We recod the fact that this hook is vetoing + // We record the fact that this hook is vetoing // the write, but continue on to the filter- // level hooks to allow them to run anyway. // They cannot "un-veto". diff --git a/src/logging/Manager.h b/src/logging/Manager.h index fbdfc97e35..739b6be7e9 100644 --- a/src/logging/Manager.h +++ b/src/logging/Manager.h @@ -88,7 +88,7 @@ public: bool RemoveStream(EnumVal* id); /** - * Enables a log log stream. + * Enables a log stream. * * @param id The enum value corresponding the log stream. * @@ -148,7 +148,7 @@ public: * * @param id The enum value corresponding the log stream. * - * @param colums A record of the type defined for the stream's + * @param columns A record of the type defined for the stream's * columns. * * This methods corresponds directly to the internal BiF defined in diff --git a/src/logging/WriterBackend.h b/src/logging/WriterBackend.h index c9278a6257..9b9ded0f6e 100644 --- a/src/logging/WriterBackend.h +++ b/src/logging/WriterBackend.h @@ -144,7 +144,7 @@ public: * * @param frontend_name The name of the front-end writer implementation. * - * @return False if an error occured. + * @return False if an error occurred. */ bool Init(int num_fields, const threading::Field* const* fields); @@ -155,13 +155,13 @@ public: * value must match what was passed to Init(). * * @param An array of size \a num_fields with the log values. Their - * types musst match with the field passed to Init(). The method + * types must match with the field passed to Init(). The method * takes ownership of \a vals.. * - * Returns false if an error occured, in which case the writer must + * Returns false if an error occurred, in which case the writer must * not be used any further. * - * @return False if an error occured. + * @return False if an error occurred. */ bool Write(int num_fields, int num_writes, threading::Value*** vals); @@ -172,7 +172,7 @@ public: * @param enabled False if buffering is to be disabled (by default * it's on). * - * @return False if an error occured. + * @return False if an error occurred. */ bool SetBuf(bool enabled); @@ -182,7 +182,7 @@ public: * * @param network_time The network time when the flush was triggered. * - * @return False if an error occured. + * @return False if an error occurred. */ bool Flush(double network_time); @@ -190,7 +190,7 @@ public: * Triggers rotation, if the writer supports that. (If not, it will * be ignored). * - * @return False if an error occured. + * @return False if an error occurred. */ bool Rotate(const char* rotated_path, double open, double close, bool terminating); @@ -240,9 +240,9 @@ public: * * @param open: The timestamp when the original file was opened. * - * @param close: The timestamp when the origina file was closed. + * @param close: The timestamp when the original file was closed. * - * @param terminating: True if the original rotation request occured + * @param terminating: True if the original rotation request occurred * due to the main Zeek process shutting down. */ bool FinishedRotation(const char* new_name, const char* old_name, double open, double close, @@ -272,10 +272,10 @@ protected: friend class FinishMessage; /** - * Writer-specific intialization method. + * Writer-specific initialization method. * * A writer implementation must override this method. If it returns - * false, it will be assumed that a fatal error has occured that + * false, it will be assumed that a fatal error has occurred that * prevents the writer from further operation; it will then be * disabled and eventually deleted. When returning false, an * implementation should also call Error() to indicate what happened. @@ -288,7 +288,7 @@ protected: * entry. * * A writer implementation must override this method. If it returns - * false, it will be assumed that a fatal error has occured that + * false, it will be assumed that a fatal error has occurred that * prevents the writer from further operation; it will then be * disabled and eventually deleted. When returning false, an * implementation should also call Error() to indicate what happened. @@ -297,7 +297,7 @@ protected: threading::Value** vals) = 0; /** - * Writer-specific method implementing a change of fthe buffering + * Writer-specific method implementing a change of the buffering * state. If buffering is disabled, the writer should attempt to * write out information as quickly as possible even if doing so may * have a performance impact. If enabled (which is the default), it @@ -309,7 +309,7 @@ protected: * ignore calls if buffering doesn't align with its semantics. * * If the method returns false, it will be assumed that a fatal error - * has occured that prevents the writer from further operation; it + * has occurred that prevents the writer from further operation; it * will then be disabled and eventually deleted. When returning * false, an implementation should also call Error() to indicate what * happened. @@ -323,7 +323,7 @@ protected: * ignore calls if flushing doesn't align with its semantics. * * If the method returns false, it will be assumed that a fatal error - * has occured that prevents the writer from further operation; it + * has occurred that prevents the writer from further operation; it * will then be disabled and eventually deleted. When returning * false, an implementation should also call Error() to indicate what * happened. @@ -336,7 +336,7 @@ protected: * Writer-specific method implementing log rotation. Most directly * this only applies to writers writing into files, which should then * close the current file and open a new one. However, a writer may - * also trigger other apppropiate actions if semantics are similar. + * also trigger other appropriate actions if semantics are similar. * Once rotation has finished, the implementation *must* call * FinishedRotation() to signal the log manager that potential * postprocessors can now run. @@ -346,7 +346,7 @@ protected: * still needs to call FinishedRotation() though. * * If the method returns false, it will be assumed that a fatal error - * has occured that prevents the writer from further operation; it + * has occurred that prevents the writer from further operation; it * will then be disabled and eventually deleted. When returning * false, an implementation should also call Error() to indicate what * happened. @@ -363,7 +363,7 @@ protected: * @param close The network time when the *current* file was closed. * * @param terminating Indicates whether the rotation request occurs - * due the main Zeek prcoess terminating (and not because we've + * due the main Zeek process terminating (and not because we've * reached a regularly scheduled time for rotation). */ virtual bool DoRotate(const char* rotated_path, double open, double close, diff --git a/src/logging/WriterFrontend.cc b/src/logging/WriterFrontend.cc index 62b5ba8d27..7fc7396f7a 100644 --- a/src/logging/WriterFrontend.cc +++ b/src/logging/WriterFrontend.cc @@ -225,7 +225,7 @@ void WriterFrontend::Write(int arg_num_fields, Value** vals) write_buffer[write_buffer_pos++] = vals; if ( write_buffer_pos >= WRITER_BUFFER_SIZE || ! buf || run_state::terminating ) - // Buffer full (or no bufferin desired or termiating). + // Buffer full (or no buffering desired or terminating). FlushWriteBuffer(); } diff --git a/src/logging/WriterFrontend.h b/src/logging/WriterFrontend.h index 0fccbb01d8..52b2a1ae58 100644 --- a/src/logging/WriterFrontend.h +++ b/src/logging/WriterFrontend.h @@ -147,7 +147,7 @@ public: * Disables the writer frontend. From now on, all method calls that * would normally send message over to the backend, turn into no-ops. * Note though that it does not stop the backend itself, use Stop() - * to do thast as well (this method is primarily for use as callback + * to do that as well (this method is primarily for use as callback * when the backend wants to disable the frontend). * * Disabled frontend will eventually be discarded by the diff --git a/src/logging/writers/sqlite/SQLite.cc b/src/logging/writers/sqlite/SQLite.cc index f92c3f6e74..3747ddd06f 100644 --- a/src/logging/writers/sqlite/SQLite.cc +++ b/src/logging/writers/sqlite/SQLite.cc @@ -99,7 +99,7 @@ string SQLite::GetTableType(int arg_type, int arg_subtype) return type; } -// returns true true in case of error +// returns true in case of error bool SQLite::checkError(int code) { if ( code != SQLITE_OK && code != SQLITE_DONE ) diff --git a/src/net_util.h b/src/net_util.h index 8ddc4d99e9..be222a3dbd 100644 --- a/src/net_util.h +++ b/src/net_util.h @@ -247,7 +247,7 @@ extern uint32_t extract_uint32(const u_char* data); // Endian conversions for double. // This is certainly not a very clean solution but should work on the -// major platforms. Alternativly, we could use a string format or the +// major platforms. Alternatively, we could use a string format or the // XDR library. #ifdef WORDS_BIGENDIAN diff --git a/src/packet_analysis/Analyzer.h b/src/packet_analysis/Analyzer.h index 69a13a2174..d698022e80 100644 --- a/src/packet_analysis/Analyzer.h +++ b/src/packet_analysis/Analyzer.h @@ -102,7 +102,7 @@ public: /** * Adds a protocol to this analyzer's dispatcher. * - * @param idenfitier The identifier for the protocol being added. + * @param identifier The identifier for the protocol being added. * @param child The analyzer that will be called for the new protocol during * forwarding. */ diff --git a/src/packet_analysis/Component.h b/src/packet_analysis/Component.h index 5d97985b75..f0372df733 100644 --- a/src/packet_analysis/Component.h +++ b/src/packet_analysis/Component.h @@ -52,7 +52,7 @@ public: protected: /** - * Overriden from plugin::Component. + * Overridden from plugin::Component. */ void DoDescribe(ODesc* d) const override; diff --git a/src/packet_analysis/protocol/ip/IPBasedAnalyzer.cc b/src/packet_analysis/protocol/ip/IPBasedAnalyzer.cc index 83a4303b50..345bfe0722 100644 --- a/src/packet_analysis/protocol/ip/IPBasedAnalyzer.cc +++ b/src/packet_analysis/protocol/ip/IPBasedAnalyzer.cc @@ -63,7 +63,7 @@ bool IPBasedAnalyzer::AnalyzePacket(size_t len, const uint8_t* data, Packet* pkt if ( ! conn ) return false; - // If we successfuly made a connection for this packet that means it'll eventually + // If we successfully made a connection for this packet that means it'll eventually // get logged, which means we can mark this packet as having been processed. pkt->processed = true; diff --git a/src/packet_analysis/protocol/ip/IPBasedAnalyzer.h b/src/packet_analysis/protocol/ip/IPBasedAnalyzer.h index 0f87d907f8..4424e18c14 100644 --- a/src/packet_analysis/protocol/ip/IPBasedAnalyzer.h +++ b/src/packet_analysis/protocol/ip/IPBasedAnalyzer.h @@ -77,7 +77,7 @@ public: static void SetIgnoreChecksumsNets(TableValPtr t); /** - * Gets the interpal pointer to the script-level variable `ignore_checksums_nets`. + * Gets the internal pointer to the script-level variable `ignore_checksums_nets`. * This is used to prevent repeated (costly) lookup of the script-level variable * by IP-based analyzers. * @@ -178,7 +178,7 @@ protected: private: // While this is storing session analyzer tags, we store it here since packet analyzers - // are persitent objects. We can't do this in the adapters because those get created + // are persistent objects. We can't do this in the adapters because those get created // and destroyed for each connection. using tag_set = std::set; using analyzer_map_by_port = std::map; diff --git a/src/packet_analysis/protocol/ip/SessionAdapter.h b/src/packet_analysis/protocol/ip/SessionAdapter.h index 305d56b653..2721054ae5 100644 --- a/src/packet_analysis/protocol/ip/SessionAdapter.h +++ b/src/packet_analysis/protocol/ip/SessionAdapter.h @@ -45,7 +45,7 @@ public: virtual bool IsReuse(double t, const u_char* pkt); /** - * Pure virtual method to allow extra session analzyers to be added to this analyzer's + * Pure virtual method to allow extra session analyzers to be added to this analyzer's * tree of children. This is used by analyzer::Manager when creating the session analyzer * tree. */ @@ -54,7 +54,7 @@ public: /** * Associates a file with the analyzer in which to record all * analyzed input. This must only be called with derived classes that - * overide the method; the default implementation will abort. + * override the method; the default implementation will abort. * * @param direction One of the CONTENTS_* constants indicating which * direction of the input stream is to be recorded. @@ -66,7 +66,7 @@ public: /** * Returns an associated contents file, if any. This must only be - * called with derived classes that overide the method; the default + * called with derived classes that override the method; the default * implementation will abort. * * @param direction One of the CONTENTS_* constants indicating which @@ -90,7 +90,7 @@ public: /** * Helper to raise a \c packet_contents event. * - * @param data The dass to pass to the event. + * @param data The data to pass to the event. * * @param len The length of \a data. */ diff --git a/src/packet_analysis/protocol/iptunnel/IPTunnel.h b/src/packet_analysis/protocol/iptunnel/IPTunnel.h index dcb528fb29..cddd981045 100644 --- a/src/packet_analysis/protocol/iptunnel/IPTunnel.h +++ b/src/packet_analysis/protocol/iptunnel/IPTunnel.h @@ -85,7 +85,7 @@ protected: * * @param outer_pkt The packet containing the encapsulation. This packet should contain * @param encap_index A return value for the current index into the encapsulation stack. - * This is returned to allow analzyers to know what point in the stack they were operating + * This is returned to allow analyzers to know what point in the stack they were operating * on as the packet analysis chain unwinds as it returns. * @param encap_stack Tracks the encapsulations as the new encapsulations are discovered * in the inner packets. diff --git a/src/packet_analysis/protocol/tcp/TCPSessionAdapter.cc b/src/packet_analysis/protocol/tcp/TCPSessionAdapter.cc index 3bd418ea86..0330d6ccfa 100644 --- a/src/packet_analysis/protocol/tcp/TCPSessionAdapter.cc +++ b/src/packet_analysis/protocol/tcp/TCPSessionAdapter.cc @@ -908,7 +908,7 @@ void TCPSessionAdapter::UpdateInactiveState(double t, analyzer::tcp::TCP_Endpoin else if ( flags.ACK() && peer->state == analyzer::tcp::TCP_ENDPOINT_ESTABLISHED ) { // No SYN packet from originator but SYN/ACK from - // responder, and now a pure ACK. Problably means we + // responder, and now a pure ACK. Probably means we // just missed that initial SYN. Let's not treat it // as partial and instead establish the connection. endpoint->SetState(analyzer::tcp::TCP_ENDPOINT_ESTABLISHED); @@ -1602,7 +1602,7 @@ void TCPSessionAdapter::AddExtraAnalyzers(Connection* conn) static zeek::Tag analyzer_connsize = analyzer_mgr->GetComponentTag("CONNSIZE"); static zeek::Tag analyzer_tcpstats = analyzer_mgr->GetComponentTag("TCPSTATS"); - // We have to decide whether to reassamble the stream. + // We have to decide whether to reassemble the stream. // We turn it on right away if we already have an app-layer // analyzer, reassemble_first_packets is true, or the user // asks us to do so. In all other cases, reassembly may diff --git a/src/packet_analysis/protocol/tcp/TCPSessionAdapter.h b/src/packet_analysis/protocol/tcp/TCPSessionAdapter.h index d20b28765b..96c158488d 100644 --- a/src/packet_analysis/protocol/tcp/TCPSessionAdapter.h +++ b/src/packet_analysis/protocol/tcp/TCPSessionAdapter.h @@ -100,7 +100,7 @@ protected: // includes our pseudo-states such as TCP_ENDPOINT_PARTIAL. // // On return, do_close is true if we should consider the connection - // as closed, and gen_event if we shouuld generate an event about + // as closed, and gen_event if we should generate an event about // this fact. void UpdateStateMachine(double t, analyzer::tcp::TCP_Endpoint* endpoint, analyzer::tcp::TCP_Endpoint* peer, uint32_t base_seq, uint32_t ack_seq, diff --git a/src/parse.y b/src/parse.y index 9aa09bf799..2d06d662ca 100644 --- a/src/parse.y +++ b/src/parse.y @@ -1062,7 +1062,7 @@ enum_body_list: enum_body_elem: /* TODO: We could also define this as TOK_ID '=' expr, (or TOK_ID '=' = TOK_ID) so that we can return more descriptive - error messages if someboy tries to use constant variables as + error messages if somebody tries to use constant variables as enumerator. */ TOK_ID '=' TOK_CONSTANT opt_deprecated @@ -1081,7 +1081,7 @@ enum_body_elem: | TOK_ID '=' '-' TOK_CONSTANT { // We only accept counts as enumerator, but we want to return a nice - // error message if users triy to use a negative integer (will also + // error message if users try to use a negative integer (will also // catch other cases, but that's fine.) reporter->Error("enumerator is not a count constant"); } diff --git a/src/plugin/Component.h b/src/plugin/Component.h index 57ce88d699..f0625cc328 100644 --- a/src/plugin/Component.h +++ b/src/plugin/Component.h @@ -49,7 +49,7 @@ public: /** * Constructor. * - * @param type The type of the compoment. + * @param type The type of the component. * * @param name A descriptive name for the component. This name must * be unique across all components of the same type. @@ -83,17 +83,17 @@ public: virtual void Initialize() { } /** - * Returns the compoment's type. + * Returns the component's type. */ component::Type Type() const { return type; } /** - * Returns the compoment's name. + * Returns the component's name. */ const std::string& Name() const { return name; } /** - * Returns a canonocalized version of the components's name. The + * Returns a canonicalized version of the components's name. The * returned name is derived from what's passed to the constructor but * upper-cased and transformed to allow being part of a script-level * ID. diff --git a/src/plugin/ComponentManager.h b/src/plugin/ComponentManager.h index 1d3dfcb411..927867fe1d 100644 --- a/src/plugin/ComponentManager.h +++ b/src/plugin/ComponentManager.h @@ -95,7 +95,7 @@ public: * * @param name A component's canonical name. * @return The component's tag, or a tag representing an error if - * no such component assoicated with the name exists. + * no such component associated with the name exists. */ zeek::Tag GetComponentTag(const std::string& name) const; @@ -104,7 +104,7 @@ public: * * @param v A component's enum value. * @return The component's tag, or a tag representing an error if - * no such component assoicated with the value exists. + * no such component associated with the value exists. */ zeek::Tag GetComponentTag(Val* v) const; @@ -308,7 +308,7 @@ void ComponentManager::RegisterComponent(C* component, const std::string& pre components_by_tag.insert(std::make_pair(component->Tag(), component)); components_by_val.insert(std::make_pair(component->Tag().AsVal()->InternalInt(), component)); - // Install an identfier for enum value + // Install an identifier for enum value std::string id = util::fmt("%s%s", prefix.c_str(), cname.c_str()); tag_enum_type->AddName(module, id.c_str(), component->Tag().AsVal()->InternalInt(), true, nullptr); diff --git a/src/plugin/Manager.cc b/src/plugin/Manager.cc index fcf46295af..155907d141 100644 --- a/src/plugin/Manager.cc +++ b/src/plugin/Manager.cc @@ -87,7 +87,7 @@ void Manager::SearchDynamicPlugins(const std::string& dir) searched_dirs.emplace(canon_path); - // Check if it's a plugin dirctory. + // Check if it's a plugin directory. const std::string magic = dir + "/__bro_plugin__"; @@ -121,7 +121,7 @@ void Manager::SearchDynamicPlugins(const std::string& dir) return; } - // No plugin here, traverse subirectories. + // No plugin here, traverse subdirectories. DIR* d = opendir(dir.c_str()); diff --git a/src/plugin/Manager.h b/src/plugin/Manager.h index c3fcc287fc..b6a4bd2f7b 100644 --- a/src/plugin/Manager.h +++ b/src/plugin/Manager.h @@ -155,7 +155,7 @@ public: template std::list Components() const; /** - * Returns the (dynamic) plugin associated with a given filesytem + * Returns the (dynamic) plugin associated with a given filesystem * path. The path can be the plugin directory itself, or any path * inside it. */ @@ -208,7 +208,7 @@ public: * for it. Normally a plugin receives events through HookQueueEvent() * only if Zeek actually has code to execute for it. By calling this * method, the plugin tells Zeek to raise the event even if there's no - * correspondong handler; it will then go into HookQueueEvent() just as + * corresponding handler; it will then go into HookQueueEvent() just as * any other. * * @param handler The event being interested in. @@ -273,7 +273,7 @@ public: * If the plugins takes over by returning 1, there are two cases: if the * second tuple element remains unset, the plugin handled the loading * completely internally; the caller must not process it any further. - * Alternatively, the plugin may optionally return the acutal content to + * Alternatively, the plugin may optionally return the actual content to * use for the file as a string through the tuple's second element. If so, * the caller must ignore the file on disk and use that provided content * instead (including when there's actually no physical file in place on @@ -493,7 +493,7 @@ private: using dynamic_plugin_map = std::map; dynamic_plugin_map dynamic_plugins; - // We temporarliy buffer scripts to load to get them to load in the + // We temporarily buffer scripts to load to get them to load in the // right order. using file_list = std::list; file_list scripts_to_load; diff --git a/src/plugin/Plugin.h b/src/plugin/Plugin.h index b3879ec9fb..c83a48bdd4 100644 --- a/src/plugin/Plugin.h +++ b/src/plugin/Plugin.h @@ -236,7 +236,7 @@ public: BifItem(const BifItem& other); /** - * Assigment operator. + * Assignment operator. */ BifItem& operator=(const BifItem& other); @@ -770,7 +770,7 @@ public: /** * Registers an individual BiF that the plugin defines. The - * information is for informational purpuses only and will show up in + * information is for informational purposes only and will show up in * the result of BifItems() as well as in the Describe() output. * Another way to add this information is via overriding * CustomBifItems(). @@ -778,7 +778,7 @@ public: * Note that this method is rarely the right one to use. As it's for * informational purposes only, the plugin still needs to register * the BiF items themselves with the corresponding Zeek parts. Doing - * so can be tricky, and it's recommned to instead define BiF items + * so can be tricky, and it's recommend to instead define BiF items * in separate *.bif files that the plugin then pulls in. If defined * there, one does *not* need to call this method. * @@ -888,7 +888,7 @@ protected: * Registers interest in an event, even if there's no handler for it. * Normally a plugin receives events through HookQueueEvent() only if Zeek * actually has code to execute for it. By calling this method, the - * plugin tells Zeek to raise the event even if there's no correspondong + * plugin tells Zeek to raise the event even if there's no corresponding * handler; it will then go into HookQueueEvent() just as any other. * * @param handler The event handler being interested in. @@ -970,11 +970,11 @@ protected: * must be 1 if the plugin takes over loading the file (see below); 0 if * the plugin wanted to take over the file but had trouble loading it * (processing will abort in this case, and the plugin should have printed - * an error message); and -1 if the plugin wants Zeek to proceeed processing + * an error message); and -1 if the plugin wants Zeek to proceed processing * the file normally. If the plugins takes over by returning 1, there are * two cases: if the second tuple element remains unset, the plugin handled * the loading completely internally; Zeek will not do anything further with - * it. Alternatively, the plugin may optionally return the acutal content + * it. Alternatively, the plugin may optionally return the actual content * to use for the file as a string through the tuple's second element. If * so, Zeek will ignore the file on disk and use that provided content * instead (including when there's actually no physical file in place on @@ -1082,7 +1082,7 @@ protected: * causes a log line to be written. It will _not_ be called on the logger * node. The function will be called each for every instantiated writer. * - * @param writer The name of the writer being insantiated. + * @param writer The name of the writer being instantiated. * * @param instantiating_filter Name of the filter causing the * writer instantiation. @@ -1195,7 +1195,7 @@ private: virtual Configuration Configure() = 0; /** - * Intializes the plugin's internal configuration. Called by the + * Initializes the plugin's internal configuration. Called by the * manager before anything else. */ void DoConfigure(); diff --git a/src/probabilistic/BitVector.h b/src/probabilistic/BitVector.h index a18ac1412a..8b59c60f21 100644 --- a/src/probabilistic/BitVector.h +++ b/src/probabilistic/BitVector.h @@ -298,7 +298,7 @@ private: block_type extra_bits() const; /** - * If the number of bits in the vector are not not a multiple of + * If the number of bits in the vector are not a multiple of * bitvector::bits_per_block, then the last block exhibits unused bits which * this function resets. */ diff --git a/src/probabilistic/CardinalityCounter.cc b/src/probabilistic/CardinalityCounter.cc index 8a58c4b25e..9e55732332 100644 --- a/src/probabilistic/CardinalityCounter.cc +++ b/src/probabilistic/CardinalityCounter.cc @@ -141,7 +141,7 @@ void CardinalityCounter::AddElement(uint64_t hash) } /** - * Estimate the size by using the the "raw" HyperLogLog estimate. Then, + * Estimate the size by using the "raw" HyperLogLog estimate. Then, * check if it's too "large" or "small" because the raw estimate doesn't * do well in those cases. * Thus, we correct for those errors as specified in the paper. diff --git a/src/probabilistic/CardinalityCounter.h b/src/probabilistic/CardinalityCounter.h index 8088f43f76..41913e1753 100644 --- a/src/probabilistic/CardinalityCounter.h +++ b/src/probabilistic/CardinalityCounter.h @@ -83,7 +83,7 @@ public: /** * Merges the argument cardinality counter with this one. The error - * margins of both counters have to be the same, otherwhise the merge + * margins of both counters have to be the same, otherwise the merge * operation will not be carried out. * * @param c Cardinality counter to merge into the current counter. diff --git a/src/probabilistic/CounterVector.h b/src/probabilistic/CounterVector.h index c70a509edd..f22184eba9 100644 --- a/src/probabilistic/CounterVector.h +++ b/src/probabilistic/CounterVector.h @@ -134,7 +134,7 @@ public: /** * Converts a counter vector into a BitVector. Each cell that has a value - * of 1 or more set is set in the BitVector; otherwhise the bit remains unset. + * of 1 or more set is set in the BitVector; otherwise the bit remains unset. * * @return The newly created BitVector */ diff --git a/src/probabilistic/Topk.cc b/src/probabilistic/Topk.cc index bc2232335d..cd327bcbd5 100644 --- a/src/probabilistic/Topk.cc +++ b/src/probabilistic/Topk.cc @@ -345,7 +345,7 @@ void TopkVal::Encountered(ValPtr encountered) // ok, we now have an element in e delete key; - IncrementCounter(e); // well, this certainly was anticlimatic. + IncrementCounter(e); // well, this certainly was anticlimactic. } // increment by count diff --git a/src/probabilistic/bloom-filter.bif b/src/probabilistic/bloom-filter.bif index aa83d30600..e92e17a40c 100644 --- a/src/probabilistic/bloom-filter.bif +++ b/src/probabilistic/bloom-filter.bif @@ -96,7 +96,7 @@ function bloomfilter_basic_init2%(k: count, cells: count, ## cells: The number of cells of the underlying counter vector. As there's ## no single answer to what's the best parameterization for a ## counting Bloom filter, we refer to the Bloom filter literature -## here for choosing an appropiate value. +## here for choosing an appropriate value. ## ## max: The maximum counter value associated with each element ## described by *w = ceil(log_2(max))* bits. Each bit in the underlying @@ -163,7 +163,7 @@ function bloomfilter_add%(bf: opaque of bloomfilter, x: any%): any ## Note that decrement operations can lead to false negatives if used on a counting bloom-filter ## that exceeded the width of its counter. ## -## bf: The coubting bloom filter handle. +## bf: The counting bloom filter handle. ## ## x: The element to decrement ## diff --git a/src/script_opt/CPP/Compile.h b/src/script_opt/CPP/Compile.h index afdb636531..6deccf7f10 100644 --- a/src/script_opt/CPP/Compile.h +++ b/src/script_opt/CPP/Compile.h @@ -10,7 +10,7 @@ #include "zeek/script_opt/ScriptOpt.h" // We structure the compiler for generating C++ versions of Zeek script -// bodies maily as a single large class. While we divide the compiler's +// bodies mainly as a single large class. While we divide the compiler's // functionality into a number of groups (see below), these interact with // one another, and in particular with various member variables, enough // so that it's not clear there's benefit to further splitting the @@ -385,7 +385,7 @@ private: // then the BiF is also used in a non-call context. void AddBiF(const ID* b, bool is_var); - // Register the given global name. "suffix" distinguishs particular + // Register the given global name. "suffix" distinguishes particular // types of globals, such as the names of bifs, global (non-function) // variables, or compiled Zeek functions. bool AddGlobal(const std::string& g, const char* suffix); @@ -413,7 +413,7 @@ private: std::string LocalName(const IDPtr& l) const { return LocalName(l.get()); } // Returns a canonicalized name, with various non-alphanumeric - // characters stripped or transformed, and guananteed not to + // characters stripped or transformed, and guaranteed not to // conflict with C++ keywords. std::string Canonicalize(const char* name) const; @@ -509,7 +509,7 @@ private: const IDPList* lambda_ids, const ProfileFunc* pf); // Inspects the given profile to find the i'th parameter (starting - // at 0). Returns nil if the profile indicates that that parameter + // at 0). Returns nil if the profile indicates that the parameter // is not used by the function. const ID* FindParam(int i, const ProfileFunc* pf); @@ -595,7 +595,7 @@ private: std::unordered_set compiled_funcs; // "Simple" functions that we've compiled, i.e., those that have - // a single body and thus can be called dirctly. Indexed by + // a single body and thus can be called directly. Indexed by // function name, and maps to the C++ name. std::unordered_map compiled_simple_funcs; diff --git a/src/script_opt/CPP/Exprs.cc b/src/script_opt/CPP/Exprs.cc index f8336b9365..3237037b87 100644 --- a/src/script_opt/CPP/Exprs.cc +++ b/src/script_opt/CPP/Exprs.cc @@ -1088,7 +1088,7 @@ string CPPCompile::GenAssign(const ExprPtr& lhs, const ExprPtr& rhs, const strin return GenListAssign(lhs, rhs); default: - reporter->InternalError("bad assigment node in CPPCompile::GenExpr"); + reporter->InternalError("bad assignment node in CPPCompile::GenExpr"); return "XXX"; } } diff --git a/src/script_opt/CPP/InitsInfo.h b/src/script_opt/CPP/InitsInfo.h index 7f4135f2fe..b9c15c1951 100644 --- a/src/script_opt/CPP/InitsInfo.h +++ b/src/script_opt/CPP/InitsInfo.h @@ -217,7 +217,7 @@ private: class CPP_BasicConstInitsInfo : public CPP_CustomInitsInfo { public: - // In the following, if "c_type" is non-empty then it specifes the + // In the following, if "c_type" is non-empty then it specifies the // C++ type used to directly represent the constant. If empty, it // indicates that we instead use an index into a separate vector. CPP_BasicConstInitsInfo(std::string _tag, std::string type, std::string c_type) @@ -519,7 +519,7 @@ protected: std::string wrapper_class; }; -// Information for registering the class/function assocaited with a lambda. +// Information for registering the class/function associated with a lambda. class LambdaRegistrationInfo : public CPP_InitInfo { public: diff --git a/src/script_opt/CPP/RuntimeInits.h b/src/script_opt/CPP/RuntimeInits.h index eeca75341d..1c6938770d 100644 --- a/src/script_opt/CPP/RuntimeInits.h +++ b/src/script_opt/CPP/RuntimeInits.h @@ -52,7 +52,7 @@ public: { } - // Providse generic access to Zeek constant values based on a single + // Provides generic access to Zeek constant values based on a single // index. ValPtr ConstVals(int offset) const { diff --git a/src/script_opt/CPP/RuntimeOps.cc b/src/script_opt/CPP/RuntimeOps.cc index 2fae492c28..68c536f039 100644 --- a/src/script_opt/CPP/RuntimeOps.cc +++ b/src/script_opt/CPP/RuntimeOps.cc @@ -157,7 +157,7 @@ SubNetValPtr addr_mask__CPP(const IPAddr& a, uint32_t mask) return make_intrusive(a, mask); } -// Helper function for reporting invalidation of interators. +// Helper function for reporting invalidation of iterators. static void check_iterators__CPP(bool invalid) { if ( invalid ) @@ -208,7 +208,7 @@ void remove_element__CPP(TableValPtr aggr, ListValPtr indices) // A helper function that takes a parallel vectors of attribute tags // and values and returns a collective AttributesPtr corresponding to // those instantiated attributes. For attributes that don't have -// associated expressions, the correspoinding value should be nil. +// associated expressions, the corresponding value should be nil. static AttributesPtr build_attrs__CPP(vector attr_tags, vector attr_vals) { vector attrs; diff --git a/src/script_opt/GenIDDefs.cc b/src/script_opt/GenIDDefs.cc index 440316019d..d12eb50afd 100644 --- a/src/script_opt/GenIDDefs.cc +++ b/src/script_opt/GenIDDefs.cc @@ -23,7 +23,7 @@ void GenIDDefs::TraverseFunction(const Func* f, ScopePtr scope, StmtPtr body) { func_flavor = f->Flavor(); - // Establish the outermost barrior and associated set of + // Establish the outermost barrier and associated set of // identifiers. barrier_blocks.push_back(0); modified_IDs.push_back({}); diff --git a/src/script_opt/ProfileFunc.cc b/src/script_opt/ProfileFunc.cc index 74f2ab28c8..c809a12edf 100644 --- a/src/script_opt/ProfileFunc.cc +++ b/src/script_opt/ProfileFunc.cc @@ -497,7 +497,7 @@ ProfileFuncs::ProfileFuncs(std::vector& funcs, is_compilable_pred pred // record attributes) for further analysis. Likewise, when // doing the profile merges above we may have noted lambda // expressions. Analyze these, and iteratively any further - // expressions that that analysis uncovers. + // expressions that the analysis uncovers. DrainPendingExprs(); // We now have all the information we need to form definitive, diff --git a/src/script_opt/ProfileFunc.h b/src/script_opt/ProfileFunc.h index ed839167b4..cc2605d1ec 100644 --- a/src/script_opt/ProfileFunc.h +++ b/src/script_opt/ProfileFunc.h @@ -42,7 +42,7 @@ namespace zeek::detail { // The type used to represent hashes. We use the mnemonic "p_hash" as -// short for "profile hash", to avoid confusion with hashes used elsehwere +// short for "profile hash", to avoid confusion with hashes used elsewhere // in Zeek (which are for the most part keyed, a property we explicitly // do not want). using p_hash_type = unsigned long long; diff --git a/src/script_opt/Reduce.h b/src/script_opt/Reduce.h index 931bf745fd..8876ee749e 100644 --- a/src/script_opt/Reduce.h +++ b/src/script_opt/Reduce.h @@ -303,7 +303,7 @@ public: } protected: - // Returns true if an assigment involving the given identifier on + // Returns true if an assignment involving the given identifier on // the LHS is in conflict with the given list of identifiers. bool CheckID(const std::vector& ids, const ID* id, bool ignore_orig) const; diff --git a/src/script_opt/Stmt.cc b/src/script_opt/Stmt.cc index 2e01d66002..869d42f071 100644 --- a/src/script_opt/Stmt.cc +++ b/src/script_opt/Stmt.cc @@ -306,9 +306,9 @@ bool IfStmt::NoFlowAfter(bool ignore_break) const if ( s1 && s2 ) return s1->NoFlowAfter(ignore_break) && s2->NoFlowAfter(ignore_break); - // Assuming the test isn't constant, the non-existent branch + // Assuming the test isn't constant, the nonexistent branch // could be picked, so flow definitely continues afterwards. - // (Constant branches will be pruned during reduciton.) + // (Constant branches will be pruned during reduction.) return false; } @@ -403,7 +403,7 @@ StmtPtr SwitchStmt::DoReduce(Reducer* rc) c->UpdateBody(c->Body()->Reduce(rc)); } - // Upate type cases. + // Update type cases. for ( auto& i : case_label_type_list ) { IDPtr idp = {NewRef{}, i.first}; @@ -624,7 +624,7 @@ StmtPtr ForStmt::DoReduce(Reducer* c) body = body->Reduce(c); if ( body->Tag() == STMT_NULL ) - Warn("empty \"for\" body leaves loop variables in indeterminant state"); + Warn("empty \"for\" body leaves loop variables in indeterminate state"); if ( red_e_stmt ) return TransformMe(make_intrusive(red_e_stmt, this), c); @@ -863,7 +863,7 @@ bool StmtList::ReduceStmt(int& s_i, StmtPList* f_stmts, Reducer* c) else // No need to Ref() because the StmtPList destructor - // doesn't Unref(), only the explict list-walking + // doesn't Unref(), only the explicit list-walking // in the ~StmtList destructor. f_stmts->append(stmt.release()); diff --git a/src/script_opt/UsageAnalyzer.cc b/src/script_opt/UsageAnalyzer.cc index 9085c2e5c9..c1b5f2d8cb 100644 --- a/src/script_opt/UsageAnalyzer.cc +++ b/src/script_opt/UsageAnalyzer.cc @@ -179,7 +179,7 @@ void UsageAnalyzer::Expand(const ID* id) // then again when actually analyzing that function. // // It might be tempting to special-case the seeding phase, but that - // gets hard if the global doesn't direclty refer to the function, + // gets hard if the global doesn't directly refer to the function, // but instead ultimately incorporates a type with an attribute that // uses the function. So instead we allow re-visiting of identifiers // and just suppress them once-per-analysis traversal (to save a bunch diff --git a/src/script_opt/UseDefs.h b/src/script_opt/UseDefs.h index f453a6f721..03bdcc4735 100644 --- a/src/script_opt/UseDefs.h +++ b/src/script_opt/UseDefs.h @@ -76,7 +76,7 @@ public: private: // Makes one pass over the statements, removing assignments - // corresponding to temporaries (because those can be propagted). + // corresponding to temporaries (because those can be propagated). // "iter" is the iteration count of how often we've done such passes, // with the first pass being numbered 1. // @@ -118,7 +118,7 @@ private: // Add an ID into an existing set of UDs. void AddID(UDs uds, const ID* id) const; - // Returns a new use-def corresonding to the given one, but + // Returns a new use-def corresponding to the given one, but // with the definition of "id" removed. UDs RemoveID(const ID* id, const UDs& uds); diff --git a/src/script_opt/ZAM/BuiltInSupport.cc b/src/script_opt/ZAM/BuiltInSupport.cc index 463e7e4e9b..8ab76909f3 100644 --- a/src/script_opt/ZAM/BuiltInSupport.cc +++ b/src/script_opt/ZAM/BuiltInSupport.cc @@ -26,7 +26,7 @@ FixedCatArg::FixedCatArg(const TypePtr& _t) : t(_t) case TYPE_DOUBLE: case TYPE_TIME: - max_size = 32; // from modp_dtoa2 documentatino + max_size = 32; // from modp_dtoa2 documentation break; case TYPE_ENUM: diff --git a/src/script_opt/ZAM/Ops.in b/src/script_opt/ZAM/Ops.in index f07328b524..05c65fd350 100644 --- a/src/script_opt/ZAM/Ops.in +++ b/src/script_opt/ZAM/Ops.in @@ -179,7 +179,7 @@ # field-op the operation is a direct assignment to a record field # # includes-field-op the operation should include a version -# that assigs to a record field as well as a +# that assigns to a record field as well as a # version for assigning to a frame variable # # indirect-call the operation represents an indirect call (through diff --git a/src/script_opt/ZAM/ZInst.h b/src/script_opt/ZAM/ZInst.h index a27ba054c2..ab7e614f83 100644 --- a/src/script_opt/ZAM/ZInst.h +++ b/src/script_opt/ZAM/ZInst.h @@ -76,7 +76,7 @@ public: const std::string& id4) const; // Returns the name to use in identifying one of the slots/integer - // values (designated by "n"). "inst_num" identifes the instruction + // values (designated by "n"). "inst_num" identifies the instruction // by its number within a larger set. "mappings" provides the // mappings used to translate raw slots to the corresponding // script variable(s). diff --git a/src/script_opt/ZAM/ZOp.h b/src/script_opt/ZAM/ZOp.h index 95c420e470..e52179d3b3 100644 --- a/src/script_opt/ZAM/ZOp.h +++ b/src/script_opt/ZAM/ZOp.h @@ -21,7 +21,7 @@ enum ZOp // V: one of the instruction's integer values, treated as a frame slot // C: the instruction's associated constant // I1/I2/I3/I4: the instruction's integer value, used directly (not as a slot) -// FRAME: a slot in the (intrepreter) Frame object +// FRAME: a slot in the (interpreter) Frame object // X: no operands enum ZAMOpType { diff --git a/src/strings.bif b/src/strings.bif index 26e20c5e78..225fc0f7f7 100644 --- a/src/strings.bif +++ b/src/strings.bif @@ -998,7 +998,7 @@ function find_all%(str: string, re: pattern%) : string_set %} ## Finds all occurrences of a pattern in a string. The order in which -## occurrences are found is preverved and the return value may contain +## occurrences are found is preserved and the return value may contain ## duplicate elements. ## ## str: The string to inspect. diff --git a/src/supervisor/Supervisor.cc b/src/supervisor/Supervisor.cc index d9eed4e69b..7de4680943 100644 --- a/src/supervisor/Supervisor.cc +++ b/src/supervisor/Supervisor.cc @@ -59,7 +59,7 @@ namespace struct Stem { /** - * State used to initalialize the Stem process. + * State used to initialize the Stem process. */ struct State { diff --git a/src/supervisor/Supervisor.h b/src/supervisor/Supervisor.h index 93520854c1..e691c3c868 100644 --- a/src/supervisor/Supervisor.h +++ b/src/supervisor/Supervisor.h @@ -169,7 +169,7 @@ public: static NodeConfig FromJSON(std::string_view json); /** - * Convert this object into JSON respresentation. + * Convert this object into JSON representation. * @return the JSON string representing the node config. */ std::string ToJSON() const; @@ -362,7 +362,7 @@ private: namespace detail { /** - * State used to initalialize and talk to the Supervisor Stem process. + * State used to initialize and talk to the Supervisor Stem process. */ struct SupervisorStemHandle { diff --git a/src/telemetry/Histogram.h b/src/telemetry/Histogram.h index 069c2fc38d..7e1d037db1 100644 --- a/src/telemetry/Histogram.h +++ b/src/telemetry/Histogram.h @@ -19,7 +19,7 @@ class IntHistogramFamily; class Manager; /** - * A handle to a metric that represents an aggregatable distribution of observed + * A handle to a metric that represents an aggregable distribution of observed * measurements with integer precision. Sorts individual measurements into * configurable buckets. */ @@ -124,7 +124,7 @@ private: }; /** - * A handle to a metric that represents an aggregatable distribution of observed + * A handle to a metric that represents an aggregable distribution of observed * measurements with floating point precision. Sorts individual measurements * into configurable buckets. */ diff --git a/src/telemetry/Manager.h b/src/telemetry/Manager.h index 49293fdff7..a0b00794df 100644 --- a/src/telemetry/Manager.h +++ b/src/telemetry/Manager.h @@ -331,7 +331,7 @@ public: } // Forces the compiler to use the type `Span` instead of trying to - // match paremeters to a `span`. + // match parameters to a `span`. template struct ConstSpanOracle { using Type = Span; diff --git a/src/threading/BasicThread.cc b/src/threading/BasicThread.cc index acb1b0087d..32c2504d3f 100644 --- a/src/threading/BasicThread.cc +++ b/src/threading/BasicThread.cc @@ -155,7 +155,7 @@ void BasicThread::Join() void BasicThread::Kill() { // We don't *really* kill the thread here because that leads to race - // conditions. Instead we set a flag that parts of the the code need + // conditions. Instead we set a flag that parts of the code need // to check and get out of any loops they might be in. terminating = true; killed = true; diff --git a/src/threading/BasicThread.h b/src/threading/BasicThread.h index 9d78e8dd05..539fabad79 100644 --- a/src/threading/BasicThread.h +++ b/src/threading/BasicThread.h @@ -209,7 +209,7 @@ private: uint32_t buf_len; char* buf; - // For implementating Strerror(). + // For implementing Strerror(). char* strerr_buffer; static uint64_t thread_counter; diff --git a/src/threading/Manager.h b/src/threading/Manager.h index 6e21a2e600..b72a86c298 100644 --- a/src/threading/Manager.h +++ b/src/threading/Manager.h @@ -29,7 +29,7 @@ protected: /** * The thread manager coordinates all child threads. Once a BasicThread is - * instantitated, it gets addedd to the manager, which will delete it later + * instantiated, it gets added to the manager, which will delete it later * once it has terminated. * * In addition to basic threads, the manager also provides additional @@ -79,7 +79,7 @@ public: /** * Returns the number of currently active threads. This counts all - * threads that are not yet joined, includingt any potentially in + * threads that are not yet joined, including any potentially in * Terminating() state. */ int NumThreads() const { return all_threads.size(); } diff --git a/src/threading/MsgThread.cc b/src/threading/MsgThread.cc index f4c0f94acb..c3ef4207c7 100644 --- a/src/threading/MsgThread.cc +++ b/src/threading/MsgThread.cc @@ -105,7 +105,7 @@ private: Type type; }; -// A message from the the child to the main process, requesting suicide. +// A message from the child to the main process, requesting suicide. class KillMeMessage final : public OutputMessage { public: diff --git a/src/threading/MsgThread.h b/src/threading/MsgThread.h index a846c20c68..c92a935b56 100644 --- a/src/threading/MsgThread.h +++ b/src/threading/MsgThread.h @@ -60,7 +60,7 @@ public: virtual ~MsgThread(); /** - * Sends a message to the child thread. The message will be proceesed + * Sends a message to the child thread. The message will be processed * once the thread has retrieved it from its incoming queue. * * Only the main thread may call this method. @@ -74,7 +74,7 @@ public: * * Only the child thread may call this method. * - * @param msg The mesasge. + * @param msg The message. */ void SendOut(BasicOutputMessage* msg) { return SendOut(msg, false); } @@ -107,7 +107,7 @@ public: * * Only the child thread may call this method. * - * Can be overriden in derived classed to hook into the error handling + * Can be overridden in derived classed to hook into the error handling * but must should generally also call the parent implementation. Note * that this method is always called by the child thread and must not access * data or datastructures of the main thread directly. @@ -123,7 +123,7 @@ public: * * Only the child thread may call this method. * - * Can be overriden in derived classed to hook into the error handling + * Can be overridden in derived classed to hook into the error handling * but must should generally also call the parent implementation. Note * that this method is always called by the child thread and must not access * data or datastructures of the main thread directly. @@ -242,7 +242,7 @@ protected: * * This is method is called regularly by the threading::Manager. * - * Can be overriden in derived classed to hook into the heart beat + * Can be overridden in derived classed to hook into the heart beat * sending, but must call the parent implementation. Note that this * method is always called by the main thread and must not access * data of the child thread directly. Implement OnHeartbeat() if you @@ -257,7 +257,7 @@ protected: bool Failed() const { return failed; } /** - * Regulatly triggered for execution in the child thread. + * Regularly triggered for execution in the child thread. * * network_time: The network_time when the heartbeat was trigger by * the main thread. @@ -273,7 +273,7 @@ protected: virtual bool OnFinish(double network_time) = 0; /** - * Overriden from BasicThread. + * Overridden from BasicThread. */ void Run() override; void OnWaitForStop() override; @@ -389,9 +389,9 @@ public: const char* Name() const { return name; } /** - * Callback that must be overriden for processing a message. + * Callback that must be overridden for processing a message. */ - virtual bool Process() = 0; // Thread will be terminated if returngin false. + virtual bool Process() = 0; // Thread will be terminated if returning false. protected: /** diff --git a/src/threading/Queue.h b/src/threading/Queue.h index 69d53f1606..2721857d86 100644 --- a/src/threading/Queue.h +++ b/src/threading/Queue.h @@ -23,7 +23,7 @@ namespace zeek::threading * * All Queue instances must be instantiated by Zeek's main thread. * - * TODO: Unclear how critical performance is for this qeueue. We could likely + * TODO: Unclear how critical performance is for this queue. We could likely * optimize it further if helpful. */ template class Queue @@ -33,7 +33,7 @@ public: * Constructor. * * reader, writer: The corresponding threads. This is for checking - * whether they have terminated so that we can abort I/O opeations. + * whether they have terminated so that we can abort I/O operations. * Can be left null for the main thread. */ Queue(BasicThread* arg_reader, BasicThread* arg_writer); @@ -233,7 +233,7 @@ template inline uint64_t Queue::Size() template inline void Queue::GetStats(Stats* stats) { - // To be safe, we look all queues. That's probably unneccessary, but + // To be safe, we look all queues. That's probably unnecessary, but // doesn't really hurt. auto locks = LocksForAllQueues(); diff --git a/src/threading/SerialTypes.h b/src/threading/SerialTypes.h index e432af565b..c463e7cecd 100644 --- a/src/threading/SerialTypes.h +++ b/src/threading/SerialTypes.h @@ -78,7 +78,7 @@ struct Field * @param fmt The serialization format to use. The format handles * low-level I/O. * - * @return False if an error occured. + * @return False if an error occurred. */ bool Read(zeek::detail::SerializationFormat* fmt); @@ -88,7 +88,7 @@ struct Field * @param fmt The serialization format to use. The format handles * low-level I/O. * - * @return False if an error occured. + * @return False if an error occurred. */ bool Write(zeek::detail::SerializationFormat* fmt) const; @@ -106,7 +106,7 @@ private: /** * Definition of a log value, i.e., a entry logged by a stream. * - * This struct essentialy represents a serialization of a Val instance (for + * This struct essentially represents a serialization of a Val instance (for * those Vals supported). */ struct Value @@ -211,7 +211,7 @@ struct Value * * @param fmt The serialization format to use. The format handles low-level I/O. * - * @return False if an error occured. + * @return False if an error occurred. */ bool Read(zeek::detail::SerializationFormat* fmt); @@ -221,7 +221,7 @@ struct Value * @param fmt The serialization format to use. The format handles * low-level I/O. * - * @return False if an error occured. + * @return False if an error occurred. */ bool Write(zeek::detail::SerializationFormat* fmt) const; diff --git a/src/threading/formatters/Ascii.cc b/src/threading/formatters/Ascii.cc index 515f5dcfbe..4f6f95704a 100644 --- a/src/threading/formatters/Ascii.cc +++ b/src/threading/formatters/Ascii.cc @@ -16,7 +16,7 @@ namespace zeek::threading::formatter { // If the value we'd write out would match exactly the a reserved string, we -// escape the first character so that the output won't be ambigious. If this +// escape the first character so that the output won't be ambiguous. If this // function returns true, it has added an escaped version of data to desc. static inline bool escapeReservedContent(ODesc* desc, const string& reserved, const char* data, int size) @@ -451,7 +451,7 @@ Value* Ascii::ParseValue(const string& s, const string& name, TypeTag type, Type for ( unsigned int i = 0; i < pos; i++ ) delete lvals[i]; - // and set the length of the set to 0, otherwhise the destructor will crash. + // and set the length of the set to 0, otherwise the destructor will crash. val->val.vector_val.size = 0; goto parse_error; diff --git a/src/util.h b/src/util.h index bdea606a8b..2a8d8ed2ff 100644 --- a/src/util.h +++ b/src/util.h @@ -86,7 +86,7 @@ using bro_uint_t [[deprecated("Remove in v6.1. Use zeek_uint_t.")]] = zeek_uint_ extern char* strcasestr(const char* s, const char* find); #endif -// This is used by the patricia code and so it remains outside of hte namespace. +// This is used by the patricia code and so it remains outside of the namespace. extern "C" void out_of_memory(const char* where); namespace zeek @@ -186,7 +186,7 @@ using SourceID = std::uintptr_t; constexpr SourceID SOURCE_LOCAL = 0; // TODO: This is a temporary marker to flag events coming in via Broker. -// Those are remote events but we don't have any further peer informationa +// Those are remote events but we don't have any further peer information // available for them (as the old communication code would have). Once we // remove RemoteSerializer, we can turn the SourceID into a simple boolean // indicating whether it's a local or remote event. @@ -261,7 +261,7 @@ void terminate_processing(); // Sets the current status of the Zeek process to the given string. // If the option --status-file has been set, this is written into -// the the corresponding file. Otherwise, the function is a no-op. +// the corresponding file. Otherwise, the function is a no-op. void set_processing_status(const char* status, const char* reason); // Renames the given file to a new temporary name, and opens a new file with diff --git a/src/zeek.bif b/src/zeek.bif index 11960435c2..7cde8ff023 100644 --- a/src/zeek.bif +++ b/src/zeek.bif @@ -1522,7 +1522,7 @@ function order%(v: any, ...%) : index_vec ## arguments can be of any type. For example, ``cat("foo", 3, T)`` returns ## ``"foo3T"``. ## -## Returns: A string concatentation of all arguments. +## Returns: A string concatenation of all arguments. function cat%(...%): string %{ zeek::ODesc d; @@ -4463,7 +4463,7 @@ function lookup_asn%(a: addr%) : count &deprecated="Remove in v6.1. Functionali return zeek::val_mgr->Count(0); %} -## Performs an lookup of AS numbe & organization of an IP address. +## Performs an lookup of AS number & organization of an IP address. ## Requires Zeek to be built with ``libmaxminddb``. ## ## a: The IP address to lookup. @@ -4532,7 +4532,7 @@ function lookup_autonomous_system%(a: addr%) : geo_autonomous_system ## Calculates distance between two geographic locations using the haversine ## formula. Latitudes and longitudes must be given in degrees, where southern -## hemispere latitudes are negative and western hemisphere longitudes are +## hemisphere latitudes are negative and western hemisphere longitudes are ## negative. ## ## lat1: Latitude (in degrees) of location 1. diff --git a/src/zeekygen/Manager.cc b/src/zeekygen/Manager.cc index d41282576e..c5c42a8bd0 100644 --- a/src/zeekygen/Manager.cc +++ b/src/zeekygen/Manager.cc @@ -36,7 +36,7 @@ static void WarnMissingScript(const char* type, const zeek::detail::ID* id, cons if ( script == "" ) return; - DbgAndWarn(util::fmt("Can't generate Zeekygen doumentation for %s %s, " + DbgAndWarn(util::fmt("Can't generate Zeekygen documentation for %s %s, " "lookup of %s failed", type, id->Name(), script.c_str())); } @@ -193,7 +193,7 @@ void Manager::ModuleUsage(const string& path, const string& module) return; if ( path == "" ) - // This is a moudle defined on the command line. + // This is a module defined on the command line. return; string name = normalize_script_path(path); @@ -249,7 +249,7 @@ void Manager::StartType(zeek::detail::IDPtr id) if ( id->GetLocationInfo() == &zeek::detail::no_location ) { - DbgAndWarn(util::fmt("Can't generate zeekygen doumentation for %s, " + DbgAndWarn(util::fmt("Can't generate zeekygen documentation for %s, " "no location available", id->Name())); return; @@ -341,7 +341,7 @@ void Manager::RecordField(const zeek::detail::ID* id, const TypeDecl* field, con if ( ! idd ) { - DbgAndWarn(util::fmt("Can't generate zeekygen doumentation for " + DbgAndWarn(util::fmt("Can't generate zeekygen documentation for " "record field %s, unknown record: %s", field->id, id->Name())); return; @@ -368,7 +368,7 @@ void Manager::Redef(const zeek::detail::ID* id, const string& path, zeek::detail if ( ! id_info ) { - DbgAndWarn(util::fmt("Can't generate zeekygen doumentation for " + DbgAndWarn(util::fmt("Can't generate zeekygen documentation for " "redef of %s, identifier lookup failed", id->Name())); return; diff --git a/src/zeekygen/Manager.h b/src/zeekygen/Manager.h index d51abf9a85..af096145b3 100644 --- a/src/zeekygen/Manager.h +++ b/src/zeekygen/Manager.h @@ -77,7 +77,7 @@ public: /** * Do initialization that needs to happen after scripts are parsed. - * This is primarly dependency resolution/filtering. + * This is primarily dependency resolution/filtering. */ void InitPostScript(); @@ -102,7 +102,7 @@ public: void ScriptDependency(const std::string& path, const std::string& dep); /** - * Register a module usage (script may export identifiers in to the + * Register a module usage (script may export identifiers into the * module namespace). * @param path Absolute path to a Zeek script. * @param module The module which script given by \a path is using. @@ -141,7 +141,7 @@ public: * @param id The identifier being redef'd. * @param path Absolute path to a Zeek script doing the redef. * @param ic The initialization class that was used (e.g. =, +=, -=). - * @param init_expr The intiialization expression that was used. + * @param init_expr The initialization expression that was used. */ void Redef(const zeek::detail::ID* id, const std::string& path, zeek::detail::InitClass ic, zeek::detail::ExprPtr init_expr); @@ -199,7 +199,7 @@ public: /** * @param name Name of a Zeek script package ("normalized" to be a path * relative to a component within ZEEKPATH). - * @return a package info object assocated with \a name or a null pointer + * @return a package info object associated with \a name or a null pointer * if it's not a known package name. */ PackageInfo* GetPackageInfo(const std::string& name) const { return packages.GetInfo(name); } diff --git a/testing/btest/Baseline/scripts.base.frameworks.input.errors/.stderr b/testing/btest/Baseline/scripts.base.frameworks.input.errors/.stderr index 1e885aad13..66a9626596 100644 --- a/testing/btest/Baseline/scripts.base.frameworks.input.errors/.stderr +++ b/testing/btest/Baseline/scripts.base.frameworks.input.errors/.stderr @@ -1,10 +1,10 @@ ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. -error: Incompatible type "file" in type definition for for field "s" in ReaderFrontend +error: Incompatible type "file" in type definition for field "s" in ReaderFrontend error: Input stream file: Problem unrolling The input framework does not support optional record fields: "r" error: Input stream optionalrecord: Problem unrolling Encountered incompatible type "file" in type definition for field "s" in ReaderFrontend. Ignoring optional field. -error: Incompatible type "file" in type definition for for field "s" in ReaderFrontend +error: Incompatible type "file" in type definition for field "s" in ReaderFrontend error: Input stream filetable: Problem unrolling The input framework does not support optional record fields: "r" error: Input stream optionalrecordtable: Problem unrolling