alias_ftp.c (ed01a5821550bf9859165f24c95b30c5f1b69f22) alias_ftp.c (9fa0fd268273d90e765d9ebfe0be87ea4d64e138)
1/*-
2 * Copyright (c) 2001 Charles Mott <cm@linktel.net>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 100 unchanged lines hidden (view full) ---

109 (including headers) */ )
110{
111 int hlen, tlen, dlen, pflags;
112 char *sptr;
113 struct tcphdr *tc;
114 int ftp_message_type;
115
116/* Calculate data length of TCP packet */
1/*-
2 * Copyright (c) 2001 Charles Mott <cm@linktel.net>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 100 unchanged lines hidden (view full) ---

109 (including headers) */ )
110{
111 int hlen, tlen, dlen, pflags;
112 char *sptr;
113 struct tcphdr *tc;
114 int ftp_message_type;
115
116/* Calculate data length of TCP packet */
117 tc = (struct tcphdr *)((char *)pip + (pip->ip_hl << 2));
117 tc = (struct tcphdr *)ip_next(pip);
118 hlen = (pip->ip_hl + tc->th_off) << 2;
119 tlen = ntohs(pip->ip_len);
120 dlen = tlen - hlen;
121
122/* Place string pointer and beginning of data */
123 sptr = (char *)pip;
124 sptr += hlen;
125

--- 447 unchanged lines hidden (view full) ---

573 struct tcphdr *tc;
574
575#ifndef NO_FW_PUNCH
576 /* Punch hole in firewall */
577 PunchFWHole(ftp_lnk);
578#endif
579
580/* Calculate data length of TCP packet */
118 hlen = (pip->ip_hl + tc->th_off) << 2;
119 tlen = ntohs(pip->ip_len);
120 dlen = tlen - hlen;
121
122/* Place string pointer and beginning of data */
123 sptr = (char *)pip;
124 sptr += hlen;
125

--- 447 unchanged lines hidden (view full) ---

573 struct tcphdr *tc;
574
575#ifndef NO_FW_PUNCH
576 /* Punch hole in firewall */
577 PunchFWHole(ftp_lnk);
578#endif
579
580/* Calculate data length of TCP packet */
581 tc = (struct tcphdr *)((char *)pip + (pip->ip_hl << 2));
581 tc = (struct tcphdr *)ip_next(pip);
582 hlen = (pip->ip_hl + tc->th_off) << 2;
583 tlen = ntohs(pip->ip_len);
584 dlen = tlen - hlen;
585
586/* Create new FTP message. */
587 {
588 char stemp[MAX_MESSAGE_SIZE + 1];
589 char *sptr;

--- 86 unchanged lines hidden ---
582 hlen = (pip->ip_hl + tc->th_off) << 2;
583 tlen = ntohs(pip->ip_len);
584 dlen = tlen - hlen;
585
586/* Create new FTP message. */
587 {
588 char stemp[MAX_MESSAGE_SIZE + 1];
589 char *sptr;

--- 86 unchanged lines hidden ---