Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/callout.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ int timer_setTimer(int delay, timer_f action, void *data) {
debugQueue();
return node->id;
} else {
// Continur to check nodes.
// Continue to check nodes.
delay -= ptr->time; node->time = delay;
prev = ptr;
ptr = ptr->next;
Expand Down
10 changes: 5 additions & 5 deletions src/ifvc.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void rebuildIfVc () {
continue;
}

// Get the interface adress...
// Get the interface address...
Dp->InAdr.s_addr = s_addr_from_sockaddr(&IfPt->ifr_addr);
addr = Dp->InAdr.s_addr;

Expand Down Expand Up @@ -161,7 +161,7 @@ void rebuildIfVc () {
Dp->state = IF_STATE_DOWNSTREAM;
}

// when IF become enabeld from downstream, addVIF to enable its VIF
// when IF become enabled from downstream, addVIF to enable its VIF
if (Dp->state == IF_STATE_HIDDEN) {
my_log(LOG_NOTICE, 0, "%s [Hidden -> Downstream]", Dp->Name);
Dp->state = IF_STATE_DOWNSTREAM;
Expand Down Expand Up @@ -267,7 +267,7 @@ void buildIfVc(void) {
continue;
}

// Get the interface adress...
// Get the interface address...
IfDescEp->InAdr.s_addr = s_addr_from_sockaddr(&IfPt->ifr_addr);
addr = IfDescEp->InAdr.s_addr;

Expand Down Expand Up @@ -367,7 +367,7 @@ struct IfDesc *getIfByIx( unsigned Ix ) {

/**
* Returns a pointer to the IfDesc whose subnet matches
* the supplied IP adress. The IP must match a interfaces
* the supplied IP address. The IP must match a interfaces
* subnet, or any configured allowed subnet on a interface.
*/
struct IfDesc *getIfByAddress( uint32_t ipaddr ) {
Expand All @@ -393,7 +393,7 @@ struct IfDesc *getIfByAddress( uint32_t ipaddr ) {

/**
* Returns a pointer to the IfDesc whose subnet matches
* the supplied IP adress. The IP must match a interfaces
* the supplied IP address. The IP must match a interfaces
* subnet, or any configured allowed subnet on a interface.
*/
struct IfDesc *getIfByVifIndex( unsigned vifindex ) {
Expand Down
10 changes: 5 additions & 5 deletions src/igmpproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ static int sighandled = 0;
#define GOT_SIGUSR1 0x04
#define GOT_SIGUSR2 0x08

// Holds the indeces of the upstream IF...
// Holds the indices of the upstream IF...
int upStreamIfIdx[MAX_UPS_VIFS];

/**
Expand Down Expand Up @@ -118,7 +118,7 @@ int main( int ArgCn, char *ArgVc[] ) {
}
char *configFilePath = ArgVc[optind];

// Chech that we are root
// Check that we are root
if (geteuid() != 0) {
fprintf(stderr, "igmpproxy: must be root\n");
exit(1);
Expand All @@ -137,7 +137,7 @@ int main( int ArgCn, char *ArgVc[] ) {
break;
}

// Initializes the deamon.
// Initializes the daemon.
if ( !igmpProxyInit() ) {
my_log(LOG_ERR, 0, "Unable to initialize IGMPproxy.");
break;
Expand Down Expand Up @@ -243,7 +243,7 @@ int igmpProxyInit(void) {
if(Dp->state == IF_STATE_UPSTREAM) {
if (upsvifcount < MAX_UPS_VIFS -1)
{
my_log(LOG_DEBUG, 0, "Found upstrem IF #%d, will assing as upstream Vif %d",
my_log(LOG_DEBUG, 0, "Found upstrem IF #%d, will assign as upstream Vif %d",
upsvifcount, Ix);
upStreamIfIdx[upsvifcount++] = Ix;
} else {
Expand Down Expand Up @@ -297,7 +297,7 @@ void igmpProxyRun(void) {
fd_set ReadFDS;
socklen_t dummy = 0;
struct timespec curtime, lasttime, difftime, tv;
// The timeout is a pointer in order to set it to NULL if nessecary.
// The timeout is a pointer in order to set it to NULL if necessary.
struct timespec *timeout = &tv;

// Initialize timer vars
Expand Down
2 changes: 1 addition & 1 deletion src/igmpproxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ struct Config {
char user[LOGIN_NAME_MAX];
};

// Holds the indeces of the upstream IF...
// Holds the indices of the upstream IF...
extern int upStreamIfIdx[MAX_UPS_VIFS];

/* ifvc.c
Expand Down
4 changes: 2 additions & 2 deletions src/mroute-api.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ int enableMRouter(void)
}

/*
** Diable the mrouted API and relases by this the lock.
** Disable the mrouted API and releases by this the lock.
**
*/
void disableMRouter(void)
Expand Down Expand Up @@ -242,7 +242,7 @@ int delMRoute( struct MRouteDesc *Dp )
/*
** Returns for the virtual interface index for '*IfDp'
**
** returns: - the vitrual interface index if the interface is registered
** returns: - the virtual interface index if the interface is registered
** - -1 if no virtual interface exists for the interface
**
*/
Expand Down
12 changes: 6 additions & 6 deletions src/request.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/**
* request.c
*
* Functions for recieveing and processing IGMP requests.
* Functions for receiving and processing IGMP requests.
*
*/

Expand All @@ -57,7 +57,7 @@ typedef struct {
void acceptGroupReport(uint32_t src, uint32_t group) {
struct IfDesc *sourceVif;

// Sanitycheck the group adress...
// Sanitycheck the group address...
if(!IN_MULTICAST( ntohl(group) )) {
my_log(LOG_WARNING, 0, "The group address %s is not a valid Multicast group.",
inetFmt(group, s1));
Expand Down Expand Up @@ -112,13 +112,13 @@ void acceptGroupReport(uint32_t src, uint32_t group) {
my_log(LOG_INFO, 0, "The group address %s may not be requested from this interface. Ignoring.", inetFmt(group, s1));
} else {
// Log the state of the interface the report was received on.
my_log(LOG_INFO, 0, "Mebership report was received on %s. Ignoring.",
my_log(LOG_INFO, 0, "Membership report was received on %s. Ignoring.",
sourceVif->state==IF_STATE_UPSTREAM?"the upstream interface":"a disabled interface");
}
}

/**
* Recieves and handles a group leave message.
* Receives and handles a group leave message.
*/
void acceptLeaveMessage(uint32_t src, uint32_t group) {
struct IfDesc *sourceVif;
Expand All @@ -127,7 +127,7 @@ void acceptLeaveMessage(uint32_t src, uint32_t group) {
"Got leave message from %s to %s. Starting last member detection.",
inetFmt(src, s1), inetFmt(group, s2));

// Sanitycheck the group adress...
// Sanitycheck the group address...
if(!IN_MULTICAST( ntohl(group) )) {
my_log(LOG_WARNING, 0, "The group address %s is not a valid Multicast group.",
inetFmt(group, s1));
Expand All @@ -151,7 +151,7 @@ void acceptLeaveMessage(uint32_t src, uint32_t group) {
// Tell the route table that we are checking for remaining members...
setRouteLastMemberMode(group, src);

// Call the group spesific membership querier...
// Call the group specific membership querier...
gvDesc->group = group;
// gvDesc->vifAddr = sourceVif->InAdr.s_addr;
gvDesc->started = 0;
Expand Down
10 changes: 5 additions & 5 deletions src/rttable.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ struct RouteTable {
struct RouteTable *nextroute; // Pointer to the next group in line.
struct RouteTable *prevroute; // Pointer to the previous group in line.
uint32_t group; // The group to route
uint32_t originAddrs[MAX_ORIGINS]; // The origin adresses (only set on activated routes)
uint32_t vifBits; // Bits representing recieving VIFs.
uint32_t originAddrs[MAX_ORIGINS]; // The origin addresses (only set on activated routes)
uint32_t vifBits; // Bits representing receiving VIFs.

// Keeps the upstream membership state...
short upstrState; // Upstream membership state.
Expand All @@ -59,7 +59,7 @@ struct RouteTable {
// These parameters contain aging details.
uint32_t ageVifBits; // Bits representing aging VIFs.
int ageValue; // Downcounter for death.
int ageActivity; // Records any acitivity that notes there are still listeners.
int ageActivity; // Records any activity that notes there are still listeners.

// Keeps downstream hosts information
uint32_t downstreamHostsHashSeed;
Expand Down Expand Up @@ -157,7 +157,7 @@ static void sendJoinLeaveUpstream(struct RouteTable* route, int join) {
my_log(LOG_ERR, 0 ,"FATAL: Unable to get Upstream IF.");
}

// Check if there is a black- or whitelist for the upstram VIF
// Check if there is a black- or whitelist for the upstream VIF
if (upstrIf->allowedgroups != NULL) {
bool allow_list = false;
struct SubnetList *match = NULL;
Expand Down Expand Up @@ -274,7 +274,7 @@ int insertRoute(uint32_t group, int ifx, uint32_t src) {
struct Config *conf = getCommonConfig();
struct RouteTable* croute;

// Sanitycheck the group adress...
// Sanitycheck the group address...
if( ! IN_MULTICAST( ntohl(group) )) {
my_log(LOG_WARNING, 0, "The group address %s is not a valid Multicast group. Table insert failed.",
inetFmt(group, s1));
Expand Down