Skip to content

Commit

Permalink
snmpstats: removed trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Nov 13, 2023
1 parent ddb8fc5 commit dfa5771
Show file tree
Hide file tree
Showing 35 changed files with 261 additions and 261 deletions.
2 changes: 1 addition & 1 deletion src/modules/snmpstats/alarm_checks.h
@@ -1,5 +1,5 @@
/*
* SNMPStats Module
* SNMPStats Module
* Copyright (C) 2006 SOMA Networks, INC.
* Written by: Jeffrey Magder (jmagder@somanetworks.com)
*
Expand Down
16 changes: 8 additions & 8 deletions src/modules/snmpstats/hashTable.c
@@ -1,5 +1,5 @@
/*
* SNMPStats Module
* SNMPStats Module
* Copyright (C) 2006 SOMA Networks, INC.
* Written by: Jeffrey Magder (jmagder@somanetworks.com)
*
Expand Down Expand Up @@ -67,13 +67,13 @@ int calculateHashSlot(char *theString, int hashTableSize)

/*! Searches the hash table specified as theTable, of size 'size', for a record
* indexed with 'aor'. If a match is found, then an aorToIndextStruct_t
* structure is returned.
* structure is returned.
*
* This function is called to discover the map between Kamailio's "aor"
* This function is called to discover the map between Kamailio's "aor"
* (Address of Records) indexing scheme, and the SNMPStats modules integer
* indexing scheme for its contact/user data.
* indexing scheme for its contact/user data.
*
* Returns: the aorToIndexStruct_t mapping structure if a match was found,
* Returns: the aorToIndexStruct_t mapping structure if a match was found,
* or NULL otherwise.
*/
aorToIndexStruct_t *findHashRecord(hashSlot_t *theTable, char *aor, int size)
Expand Down Expand Up @@ -150,7 +150,7 @@ void insertHashRecord(

/*!
* This function will search the provided hash table for an entry indexed by
* 'aor'. If an entry is found then:
* 'aor'. If an entry is found then:
*
* - Its numContacts counter will be decremented.
* - If its numContacts counter reaches zero, then the entry will be removed
Expand Down Expand Up @@ -223,11 +223,11 @@ void deleteUser(hashSlot_t *theTable, char *aor, int hashTableSize)

/*! Returns an aorToIndexStruct_t, holding the given 'userIndex' and 'aor'. The
* structure is used to map between the "aor" (Kamailio's way of indexing
* users/contacts), and the SNMPStats user and contact integer indexes.
* users/contacts), and the SNMPStats user and contact integer indexes.
*
* NOTE: that this record does not make a copy of aor, but instead points
* directly to the parameter. Therefore make sure that aor is not on the stack,
* and is not going to disappear before this record is deleted.
* and is not going to disappear before this record is deleted.
*/
aorToIndexStruct_t *createHashRecord(int userIndex, char *aor)
{
Expand Down
22 changes: 11 additions & 11 deletions src/modules/snmpstats/hashTable.h
@@ -1,5 +1,5 @@
/*
* SNMPStats Module
* SNMPStats Module
* Copyright (C) 2006 SOMA Networks, INC.
* Written by: Jeffrey Magder (jmagder@somanetworks.com)
*
Expand Down Expand Up @@ -30,7 +30,7 @@
* between Kamailio's "aor" (Address of Record) and string indexing mechanisms,
* and the SNMPStats modules integer indexing scheme for users and contacts.
* While it would have been a more natural fit to use string indexes in the
* SNMPStats module, SNMP limitations precluded this.
* SNMPStats module, SNMP limitations precluded this.
*
* aorToIndexStruct: maps an aor to:
* - a userIndex, to uniquely identify each RegUserTable SNMP row
Expand All @@ -54,7 +54,7 @@

/*!
* Used to map between a 'contact' name (Kamailio's index) and a contact index.
* (SNMPStats Index)
* (SNMPStats Index)
*/
typedef struct contactToIndexStruct
{
Expand All @@ -70,7 +70,7 @@ typedef struct contactToIndexStruct
/*!
* Used to map between an 'aor' (Kamailio index) and a user index. (SNMPStats
* index). Since each user can have multiple contacts, the structure also has a
* 'contactIndex', and a reference to the contactToIndexStruct list.
* 'contactIndex', and a reference to the contactToIndexStruct list.
*/
typedef struct aorToIndexStruct
{
Expand Down Expand Up @@ -128,11 +128,11 @@ typedef struct hashSlot

/*! Returns an aorToIndexStruct_t, holding the given 'userIndex' and 'aor'. The
* structure is used to map between the "aor" (Kamailio's way of indexing
* users/contacts), and the SNMPStats user and contact integer indexes.
* users/contacts), and the SNMPStats user and contact integer indexes.
*
* \note This record does not make a copy of aor, but instead points
* directly to the parameter. Therefore make sure that aor is not on the stack,
* and is not going to disappear before this record is deleted.
* and is not going to disappear before this record is deleted.
*/
aorToIndexStruct_t *createHashRecord(int userIndex, char *aor);

Expand All @@ -151,13 +151,13 @@ int calculateHashSlot(char *theString, int hashTableSize);

/*! Searches the hash table specified as theTable, of size 'size', for a record
* indexed with 'aor'. If a match is found, then an aorToIndextStruct_t
* structure is returned.
* structure is returned.
*
* This function is called to discover the map between Kamailio's "aor"
* This function is called to discover the map between Kamailio's "aor"
* (Address of Records) indexing scheme, and the SNMPStats modules integer
* indexing scheme for its contact/user data.
* indexing scheme for its contact/user data.
*
* Returns: the aorToIndexStruct_t mapping structure if a match was found,
* Returns: the aorToIndexStruct_t mapping structure if a match was found,
* or NULL otherwise.
*/
aorToIndexStruct_t *findHashRecord(hashSlot_t *theTable, char *aor, int size);
Expand All @@ -178,7 +178,7 @@ int deleteHashRecord(hashSlot_t *theTable, char *aor, int hashTableSize);

/*!
* This function will search the provided hash table for an entry indexed by
* 'aor'. If an entry is found then:
* 'aor'. If an entry is found then:
*
* - Its numContacts counter will be decremented.
* - If its numContacts counter reaches zero, then the entry will be removed
Expand Down
20 changes: 10 additions & 10 deletions src/modules/snmpstats/interprocess_buffer.c
@@ -1,5 +1,5 @@
/*
* SNMPStats Module
* SNMPStats Module
* Copyright (C) 2006 SOMA Networks, INC.
* Written by: Jeffrey Magder (jmagder@somanetworks.com)
*
Expand Down Expand Up @@ -55,7 +55,7 @@
*
* 1) maps all aor's to snmp's UserIndex for help in deleting SNMP Rows.
*
* 2) maps a given aor to a contact list.
* 2) maps a given aor to a contact list.
*/
hashSlot_t *hashTable = NULL;

Expand All @@ -70,7 +70,7 @@ gen_lock_t *interprocessCBLock = NULL;
/*!
* This function takes an element of the interprocess buffer passed to it, and
* handles populating the respective user and contact tables with its contained
* data.
* data.
*/
static void executeInterprocessBufferCmd(interprocessBuffer_t *currentBuffer);

Expand Down Expand Up @@ -130,7 +130,7 @@ int initInterprocessBuffers(void)
* The callback type will be passed in 'type', and the contact the callback
* applies to will be supplied in 'contactInfo. This information will be copied
* into the interprocess buffer. The interprocess buffer will be consumed at a
* later time, when consumeInterprocessBuffer() is called.
* later time, when consumeInterprocessBuffer() is called.
*
* This callback is thread safe with respect to the consumeInterprocessBuffer()
* function. Specifically, the interprocess buffer should not be corrupted by
Expand All @@ -151,7 +151,7 @@ void handleContactCallbacks(ucontact_t *contactInfo, int type, void *param)
}

/* We need to maintain our own copies of the AOR and contact address to
* prevent the corruption of our internal data structures.
* prevent the corruption of our internal data structures.
*
* If we do not maintain our own copies, then the AOR and contact address
* pointed to could be removed and reallocated to another thread before
Expand Down Expand Up @@ -203,11 +203,11 @@ void handleContactCallbacks(ucontact_t *contactInfo, int type, void *param)
* \note This function is believed to be thread safe. Specifically, it protects
* corruption of the interprocess buffer through the interprocessCBLock.
* This ensures no corruption of the buffer by race conditions. The lock
* has been designed to be occupied for as short a period as possible, so
* as to prevent long waits. Specifically, once we start consumption of
* has been designed to be occupied for as short a period as possible, so
* as to prevent long waits. Specifically, once we start consumption of
* the list, other processes are free to continue even before we are done.
* This is made possible by simply changing the head of the interprocess
* buffer, and then releasing the lock.
* buffer, and then releasing the lock.
*/
void consumeInterprocessBuffer(void)
{
Expand Down Expand Up @@ -253,7 +253,7 @@ void consumeInterprocessBuffer(void)
/*!
* This function takes an element of the interprocess buffer passed to it, and
* handles populating the respective user and contact tables with its contained
* data.
* data.
*/
static void executeInterprocessBufferCmd(interprocessBuffer_t *currentBuffer)
{
Expand All @@ -262,7 +262,7 @@ static void executeInterprocessBufferCmd(interprocessBuffer_t *currentBuffer)
aorToIndexStruct_t *currentUser;

if(currentBuffer->callbackType == UL_CONTACT_INSERT) {
/* Add the user if the user doesn't exist, or increment its
/* Add the user if the user doesn't exist, or increment its
* contact index otherwise. */
updateUser(currentBuffer->stringName);
} else if(currentBuffer->callbackType != UL_CONTACT_EXPIRE) {
Expand Down
10 changes: 5 additions & 5 deletions src/modules/snmpstats/interprocess_buffer.h
@@ -1,5 +1,5 @@
/*
* SNMPStats Module
* SNMPStats Module
* Copyright (C) 2006 SOMA Networks, INC.
* Written by: Jeffrey Magder (jmagder@somanetworks.com)
*
Expand Down Expand Up @@ -92,7 +92,7 @@ int initInterprocessBuffers(void);
* The callback type will be passed in 'type', and the contact the callback
* applies to will be supplied in 'contactInfo. This information will be copied
* into the interprocess buffer. The interprocess buffer will beconsumed at a
* later time, when consumeInterprocessBuffer() is called.
* later time, when consumeInterprocessBuffer() is called.
*
* This callback is thread safe with respect to the consumeInterprocessBuffer()
* function. Specifically, the interprocess buffer should not be corrupted by
Expand All @@ -113,11 +113,11 @@ void handleContactCallbacks(ucontact_t *contactInfo, int type, void *param);
* Note: This function is believed to be thread safe. Specifically, it protects
* corruption of the interprocess buffer through the interprocessCBLock.
* This ensures no corruption of the buffer by race conditions. The lock
* has been designed to be occupied for as short a period as possible, so
* as to prevent long waits. Specifically, once we start consumption of
* has been designed to be occupied for as short a period as possible, so
* as to prevent long waits. Specifically, once we start consumption of
* the list, other processes are free to continue even before we are done.
* This is made possible by simply changing the head of the interprocess
* buffer, and then releasing the lock.
* buffer, and then releasing the lock.
*/
void consumeInterprocessBuffer(void);

Expand Down
2 changes: 1 addition & 1 deletion src/modules/snmpstats/kamailioNet.c
Expand Up @@ -22,7 +22,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
* Note: this file originally auto-generated by mib2c
* Note: this file originally auto-generated by mib2c
*
*/
/*!
Expand Down
2 changes: 1 addition & 1 deletion src/modules/snmpstats/kamailioNet.h
Expand Up @@ -22,7 +22,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
* Note: this file originally auto-generated by mib2c
* Note: this file originally auto-generated by mib2c
*
*/
#ifndef KAMAILIONET_H
Expand Down
4 changes: 2 additions & 2 deletions src/modules/snmpstats/kamailioNetConfig.c
Expand Up @@ -22,7 +22,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
* Note: this file originally auto-generated by mib2c
* Note: this file originally auto-generated by mib2c
*
*/
/*!
Expand Down Expand Up @@ -165,7 +165,7 @@ int handle_kamailioNetConfUdpDtlsTransport(netsnmp_mib_handler *handler,
{

/* Note: This transport is not supported in Kamailio. This OID is just a place holder
for future work.
for future work.
*/
int value = -1; /* Not implemented */

Expand Down
4 changes: 2 additions & 2 deletions src/modules/snmpstats/kamailioServer.h
@@ -1,5 +1,5 @@
/*
* SNMPStats Module
* SNMPStats Module
* Copyright (C) 2006 SOMA Networks, INC.
* Written by: Jeffrey Magder (jmagder@somanetworks.com)
*
Expand All @@ -24,7 +24,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
* Note: this file originally auto-generated by mib2c
* Note: this file originally auto-generated by mib2c
*
*/
#ifndef KAMAILIOSERVER_H
Expand Down
6 changes: 3 additions & 3 deletions src/modules/snmpstats/snmpMIBNotifications.c
@@ -1,5 +1,5 @@
/*
* SNMPStats Module
* SNMPStats Module
* Copyright (C) 2006 SOMA Networks, INC.
* Written by: Jeffrey Magder (jmagder@somanetworks.com)
*
Expand All @@ -24,7 +24,7 @@
* : mib2c.notify.conf,v 5.3 2004/04/15 12:29:19 dts12 Exp $
*
* This file contains functions for sending all traps supported by the SNMPStats
* module.
* module.
*/

#include <net-snmp/net-snmp-config.h>
Expand All @@ -38,7 +38,7 @@

static oid snmptrap_oid[] = {1, 3, 6, 1, 6, 3, 1, 1, 4, 1, 0};

/*
/*
* Sends off a kamailioMsgQueueDepthMinorEvent trap to the master agent,
* assigning the following variable bindings:
*
Expand Down
8 changes: 4 additions & 4 deletions src/modules/snmpstats/snmpMIBNotifications.h
@@ -1,5 +1,5 @@
/*
* SNMPStats Module
* SNMPStats Module
* Copyright (C) 2006 SOMA Networks, INC.
* Written by: Jeffrey Magder (jmagder@somanetworks.com)
*
Expand All @@ -20,20 +20,20 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA
*
*
*
* Note: this file originally auto-generated by mib2c using
* : mib2c.notify.conf,v 5.3 2004/04/15 12:29:19 dts12 Exp $
*
* This file contains function prototypes for sending all traps supported by the
* SNMPStats module.
* SNMPStats module.
*
*/

#ifndef KAMAILIOMIBNOTIFICATIONS_H
#define KAMAILIOMIBNOTIFICATIONS_H


/*
/*
* Sends off a kamailioMsgQueueDepthMinorEvent trap to the master agent,
* assigning the following variable bindings:
*
Expand Down
14 changes: 7 additions & 7 deletions src/modules/snmpstats/snmpObjects.c
Expand Up @@ -210,18 +210,18 @@ void init_kamailioObjects(void)
}


/*
/*
* The following are thresholds used by:
*
* - The alarm monitoring process, to decide when to send out traps.
*
* - The alarm monitoring process, to decide when to send out traps.
* - All scalars involving alarm status' and thresholds.
*
* By default they are initialized to -1, which disables alarm checks.
* These are set through the kamailio.cfg file with the following modparams to
* the snmpstats module:
*
* - dlg_minor_threshold
* - dlg_major_threshold
* - dlg_minor_threshold
* - dlg_major_threshold
*
* - MsgQueueMinorThreshold
* - MsgQueueMajorThreshold
Expand Down Expand Up @@ -456,7 +456,7 @@ int handle_kamailioDialogUsageState(netsnmp_mib_handler *handler,
netsnmp_handler_registration *reginfo,
netsnmp_agent_request_info *reqinfo, netsnmp_request_info *requests)
{
/* Return value follows the X731UsageState Textual Convention
/* Return value follows the X731UsageState Textual Convention
*
* We default to 'unknown' */
int usage_state = TC_USAGE_STATE_UNKNOWN;
Expand Down Expand Up @@ -580,7 +580,7 @@ static int set_if_valid_threshold(
return 0;
}

/*
/*
* Parameter Configuration Functions
*/

Expand Down
2 changes: 1 addition & 1 deletion src/modules/snmpstats/snmpObjects.h
@@ -1,5 +1,5 @@
/*
* SNMPStats Module
* SNMPStats Module
* Copyright (C) 2006 SOMA Networks, INC.
* Written by: Jeffrey Magder (jmagder@somanetworks.com)
*
Expand Down

0 comments on commit dfa5771

Please sign in to comment.