alias_irc.c (32377) | alias_irc.c (35314) |
---|---|
1/* Alias_irc.c intercepts packages contain IRC CTCP commands, and 2 changes DCC commands to export a port on the aliasing host instead 3 of an aliased host. 4 5 For this routine to work, the DCC command must fit entirely into a 6 single TCP packet. This will usually happen, but is not 7 guaranteed. 8 --- 215 unchanged lines hidden (view full) --- 224 u_short alias_port; /* Port given by aliasing */ 225 226 /* Generate firewall hole as appropriate */ 227 PunchFWHole(dcc_link); 228 229 alias_address = GetAliasAddress(link); 230 iCopy += snprintf(&newpacket[iCopy], 231 sizeof(newpacket)-iCopy, | 1/* Alias_irc.c intercepts packages contain IRC CTCP commands, and 2 changes DCC commands to export a port on the aliasing host instead 3 of an aliased host. 4 5 For this routine to work, the DCC command must fit entirely into a 6 single TCP packet. This will usually happen, but is not 7 guaranteed. 8 --- 215 unchanged lines hidden (view full) --- 224 u_short alias_port; /* Port given by aliasing */ 225 226 /* Generate firewall hole as appropriate */ 227 PunchFWHole(dcc_link); 228 229 alias_address = GetAliasAddress(link); 230 iCopy += snprintf(&newpacket[iCopy], 231 sizeof(newpacket)-iCopy, |
232 "%lu ", htonl(alias_address.s_addr)); | 232 "%lu ", (u_long)htonl(alias_address.s_addr)); |
233 if( iCopy >= sizeof(newpacket) ) { /* Truncated/fit exactly - bad news */ 234 DBprintf(("DCC constructed packet overflow.\n")); 235 goto lBAD_CTCP; 236 } 237 alias_port = GetAliasPort(dcc_link); 238 iCopy += snprintf(&newpacket[iCopy], 239 sizeof(newpacket)-iCopy, 240 "%u", htons(alias_port) ); --- 74 unchanged lines hidden --- | 233 if( iCopy >= sizeof(newpacket) ) { /* Truncated/fit exactly - bad news */ 234 DBprintf(("DCC constructed packet overflow.\n")); 235 goto lBAD_CTCP; 236 } 237 alias_port = GetAliasPort(dcc_link); 238 iCopy += snprintf(&newpacket[iCopy], 239 sizeof(newpacket)-iCopy, 240 "%u", htons(alias_port) ); --- 74 unchanged lines hidden --- |