Abstract:
The present invention relates to a technology where, in the state that start pointers for n transmit buffers each having Ethernet frame size are fixedly declared and thus fixed addresses are assigned to the transmit buffers, packets can be stably retransmitted utilizing the fixed addresses of the transmit buffers, without executing dynamic pointer operations in re-transmission.

Description:
CROSS-REFERENCE TO RELATED APPLICATION 
       [0001]    This application claims priority under 35 U.S.C. §119 from Korean Application No. 10-2010-0115086 filed on Nov. 18, 2010, the subject matter of which is incorporated herein by reference. 
       BACKGROUND 
       [0002]    1. Technical Field 
         [0003]    The present invention relates to a method for processing TCP re-transmission based on the fixed address, more specifically, a technology where, in the state that start pointers for n transmit buffers each having Ethernet frame size are fixedly declared, packets can be simply retransmitted based on the fixed addresses due to fixed start pointers, without executing dynamic pointer operations in re-transmission. 
         [0004]    2. Background Art 
         [0005]    As exemplary protocol for controlling information transmission of networks, TCP (Transmission Control Protocol) is present. The TCP is a communication protocol that connects computers having different systems from each other on the basis of IP (Internet Protocol) and is used for transmission of data. 
         [0006]    If transmitter terminal transmits the data dividing it into packet units, the TCP recombines the packets received by receiver terminal to restore the original data. If each packet is received, the receiver terminal transmits acknowledgement signal to the transmitter terminal, thereby informing that all packets for the relevant data have been successfully received. If the acknowledgement signal is not received, the transmitter terminal retransmits the packet until the acknowledgement signal is received from the receiver terminal. 
         [0007]    In general, the TCP is embodied by protocol stack and installed on a communication system. In the case that the TCP is installed on Linux and embedded system, the Linux and embedded system have a plurality of transmit buffers of Ethernet frame size for re-transmission. Since Ethernet frames corresponding to size of transmit buffer are stored in advance, if the acknowledgement signal is not received from the receiver terminal, the transmitter terminal may transmit the relevant packet in the transmit buffer to the receiver terminal. 
         [0008]    In the process of such re-transmission, scheduling algorithm for storing a plurality of transmitted data(packet) in the transmit buffers and transmitting the data stored in the transmit buffers, and dynamic start pointer operations for the transmit buffers are needed. The scheduling algorithm for the transmit buffers causes a complexity of the system to be increased and the dynamic pointer operations for the transmit buffers may increase unstable elements of the system due to the pointer operations. 
       SUMMARY OF THE INVENTION 
       [0009]    The present invention is devised in view of the above-mentioned situations, and its object is to simplify the scheduling algorithm for the transmit buffers and pointer operations of the transmit buffers to improve operation of the system by setting size of the n transmit buffers each having Ethernet frame size by n×Ethernet frame and fixedly declaring a point where n th  transmit buffer starts as a start pointer of n th  transmit buffer to thereby assign a fixed address to the n th  transmit buffer. 
         [0010]    A method for processing TCP re-transmission based on the fixed address according to the present invention may comprise (a) a step of setting a plurality of transmit buffers having a fixed address; (b) a step of storing the k th  data in the n th  transmit buffer of the transmit buffers where writing prohibition flag is cleared and setting the writing prohibition flag of the n th  transmit buffer; (c) a step of transmitting the k th  data to a receiver terminal and determining whether acknowledgement signal for the k th  data has been received; and (d) a step of clearing the writing prohibition flag of the n th  transmit buffer if the acknowledgement signal has been received and retransmitting the k th  data stored in the n th  transmit buffer if the acknowledgement signal has not been received within a predetermined period of time. 
         [0011]    Preferably, in the step (a) of the present invention, each transmit buffer is set by Ethernet frame size, and a start pointer of each of the transmit buffers is fixedly declared and thus each transmit buffer may have a fixed address. 
         [0012]    Preferably, the step (b) of the present invention may comprise a step of scanning each writing prohibition flag of the plurality of the transmit buffers to search a transmit buffer where the writing prohibition flag is cleared if the k th  data to be transmitted is inputted; a step of storing the k th  data in the n th  transmit buffer if the n th  transmit buffer is searched where the writing prohibition flag is cleared; and a step of setting the writing prohibition flag of the n th  transmit buffer. 
         [0013]    Preferably, in the step (d) of the present invention, if the acknowledgement signal for the k th  data has been received, the writing prohibition flag of the n th  transmit buffer may be cleared after searching n th  transmit buffer by use of the fixed address of the n th  transmit buffer. 
         [0014]    Preferably, in the step (d) of the present invention, if the acknowledgement signal for the k th  data has not been received, the k th  data stored in the n th  transmit buffer may be retransmitted after searching the n th  transmit buffer by use of the fixed address of the n th  transmit buffer. 
       ADVANTAGEOUS EFFECTS 
       [0015]    The present invention has an effect that it can simplify the scheduling algorithm for the transmit buffers and pointer operations of the transmit buffers to improve operation of the system by setting size of the n transmit buffers each having Ethernet frame size by n×Ethernet frame and fixedly declaring a point where n th  transmit buffer starts as a start pointer of n th  transmit buffer to thereby assign a fixed address to the n th  transmit buffer. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0016]    Arrangements and embodiments may be described in detail with reference to the following drawings in which like reference numerals refer to like elements and wherein 
           [0017]      FIG. 1  is a functional block diagram of a system carrying out a method for processing TCP re-transmission based on the fixed address according to the example of the present invention. 
           [0018]      FIG. 2  is a view exemplarily illustrating structure of transmit buffers and declaration of a start pointer applied to the method for processing TCP re-transmission based on the fixed address according to the example of the present invention. 
           [0019]      FIG. 3  is a flowchart exemplarily explaining the method for processing TCP re-transmission based on the fixed address according to the example of the present invention. 
           [0020]      FIG. 4  is a data flow diagram exemplarily explaining the method for processing TCP transmission based on the fixed address according to the example of the present invention. 
           [0021]      FIG. 5  is a view showing a conventional structure of TCP packet. 
           [0022]      FIG. 6  is a data flow diagram exemplarily explaining the method for processing TCP re-transmission based on the fixed address according to the example of the present invention. 
       
    
    
     LISTS OF REFERENCE NUMERALS IN THE DRAWINGS 
       [0000]    
       
         
           
               10 : transmit buffer initializing part 
               20 : transmit buffer scanning part 
               30 : transmit buffer data processing part 
               40 : transmit buffer lock controlling part 
               50 : data transmitting part 
               60 : acknowledgement processing part. 
           
         
       
     
       DETAILED DESCRIPTION OF THE INVENTION 
       [0029]    Hereinafter, an example of the present invention will be described in detail with reference to the attached drawings. 
         [0030]      FIG. 1  is a functional block diagram of a system carrying out a method for processing TCP re-transmission based on the fixed address according to the example of the present invention. 
         [0031]    As shown in  FIG. 1 , the system for processing TCP re-transmission based on the fixed address according to the example of the present invention comprises a transmit buffer initializing part ( 10 ), a transmit buffer scanning part ( 20 ), a transmit buffer data processing part ( 30 ), a transmit buffer lock controlling part ( 40 ), a data transmitting part ( 50 ) and an acknowledgement processing part ( 60 ). 
         [0032]    As shown in  FIG. 2 , the transmit buffer initializing part ( 10 ) initializes the size of the transmit buffer such that storage is made possible by division into n Ethernet frames taking Ethernet frame size as a unit. N transmit buffers (B) all have the same size, and a point where n th transmit buffer starts is declared as start pointer of n   th  transmit buffer. Therefore, the n th  transmit buffer has a fixed address (i.e., start pointer). In the example of the present invention, since the transmit buffer has the fixed address, it is not necessary to perform pointer operations by dynamically assigning the pointer, as opposed to prior art. The transmit buffer initializing part ( 10 ) transmits the fixed address of the declared n th  transmit buffer to the transmit buffer scanning part ( 20 ). 
         [0033]    The transmit buffer (B), in which the pointer is declared, is provided with writing prohibition flag for indicating a condition of writing prohibition. 
         [0034]    The transmit buffer scanning part ( 20 ) scans the n transmit buffers in order and then searches the writing prohibition flag of each transmit buffer. According to the result of the search, transmitted to the transmit buffer data processing part ( 30 ) is an information of the transmit buffer (i.e., the i th  transmit buffer) where the writing prohibition flag is cleared. 
         [0035]    If TCP data to be transmitted is received from upper class (i.e., TCP/IP 4 class), the transmit buffer data processing part ( 30 ) instructs the transmit buffer scanning part ( 20 ) to scan the transmit buffer. If information of the transmit buffer is received from the transmit buffer scanning part ( 20 ) as a response of the instruction, TCP data is stored in the i th  transmit buffer corresponding to the information of the transmit buffer. After TCP data has been stored, the transmit buffer data processing part ( 30 ) instructs the data transmitting part ( 50 ) to transmit the TCP data to the i th  transmit buffer. Furthermore, the transmit buffer data processing part ( 30 ) transmits information (for example, start pointer information) of the transmit buffer where the TCP data is stored and information (sequence number and acknowledgement number) about the TCP data to the acknowledgement processing part ( 60 ), and thereafter acknowledgement of the TCP data stored in the i th  received buffer is implemented by the acknowledgement processing part ( 60 ). 
         [0036]    The transmit buffer lock controlling part ( 40 ) sets the writing lock flag of the i th  transmit buffer to a lock based on the information of the i th  transmit buffer transmitted from the transmit buffer data processing part ( 30 ). Furthermore, if the information of the i th  transmit buffer is transmitted from the acknowledgement processing part ( 60 ), the transmit buffer lock controlling part ( 40 ) clears the writing lock flag of the i th  transmit buffer. That is, the transmit buffer lock controlling part ( 40 ) sets the writing lock flag of the transmit buffer (B) based on the information of the transmit buffer transmitted from the transmit buffer data processing part ( 30 ), and clears the writing lock flag of the transmit buffer (B) based on the information of the transmit buffer transmitted from the acknowledgement processing part ( 60 ). 
         [0037]    The data transmitting part ( 50 ) is a block that transmits the TCP data (i.e., Ethernet package) stored in the i th  transmit buffer according to the instruction of the transmit buffer data processing part ( 30 ), and reads the TCP data from the i th  transmit buffer to transmit to receiver side by using the information of the transmit buffer transmitted from the transmit buffer data processing part ( 30 ). Furthermore, the data transmitting part ( 50 ) performs re-transmission of the TCP data stored in a specific transmit buffer where acknowledgement signal is not received within a predetermined period of time according to instruction of the acknowledgement processing part ( 60 ). 
         [0038]    The acknowledgement processing part ( 60 ) determines whether the acknowledgement signal of the sent data has been received by utilizing the TCP data received from receiver terminal, and according to the result of the determination, controls the transmit buffer lock controlling part ( 40 ) and the data transmitting part ( 50 ). More specifically, the acknowledgement processing part ( 60 ) extracts the sequence number/acknowledgement number from the received TCP data and then compares it with the sequence number/acknowledgement number transmitted from the transmit buffer data processing part ( 30 ), and thereafter if coinciding numbers are present, transmits to the transmit buffer lock controlling part ( 40 ) the information of the transmit buffer where the TCP data corresponding to the relevant sequence number and acknowledgement number is stored, whereby the transmit buffer lock controlling part ( 40 ) clears the writing prohibition flag of the relevant specific transmit buffer. 
         [0039]    The acknowledgement processing part ( 60 ) incorporates a time-out processing part, and counts waiting time until the acknowledgement signal for the specific TCP data is received, and if the waiting time for acknowledgement signal exceeds a predetermined period of time, instructs the data transmitting part ( 50 ) to retransmit the TCP data. 
         [0040]    Next, referring to a flowchart illustrated in  FIG. 3 , detailed description will be made of the method for processing TCP re-transmission based on the fixed address according to an example of the present invention. 
         [0041]    The transmit buffer initializing part ( 10 ) sets n transmit buffers of Ethernet frame size in order to send TCP (S 10 ). For each transmit buffer set in step S 10 , the start pointer is declared such that the transmit buffer has a fixed data size. In this connection, the declared start pointer (i.e., fixed address) is fixed. The transmit buffer initializing part ( 10 ) transmits information about the set transmit buffer to the transmit buffer scanning part ( 20 ). 
         [0042]    If the TCP data (for example, the k th  data) to be transmitted is received from upper class i.e., TCP/IP class (S 20 ), the transmit buffer data processing part ( 30 ) instructs the transmit buffer scanning part ( 20 ) to scan the transmit buffer. 
         [0043]    Responding to the instruction, the transmit buffer scanning part ( 20 ) scans n transmit buffers in order and then searches the transmit buffer where the writing prohibition flag is cleared (S 30 ). As a result of the search, if the writing prohibition flags of all of the n transmit buffers are set and thus the cleared writing prohibition flag is not searched (‘No” in S 30 ), the transmit buffer scanning part ( 20 ) continues to execute the step S 30 . 
         [0044]    In contrast, as a result of the search in step S 30 , if the writing prohibition flag of the i th  transmit buffer of n transmit buffers is searched to be cleared (“Yes” in S 30 ), the transmit buffer scanning part ( 20 ) returns information (for example, fixed address) about the i th  transmit buffer to the transmit buffer data processing part ( 30 ). This transmit buffer data processing part ( 30 ) stores the TCP data corresponding to the k th  data from the start pointer of the selected i th  transmit buffer (S 40 ). 
         [0045]    If storage of the TCP data is completed, the transmit buffer data processing part ( 30 ) transmits the information about the i th  transmit buffer to the transmit buffer lock controlling part ( 40 ), and transmits to the acknowledgement processing part ( 60 ) the sequence number/acknowledgement number extracted from the TCP. Furthermore, the transmit buffer data processing part ( 30 ) instructs the data transmitting part ( 50 ) to transmit the TCP data stored in the i th  transmit buffer. For reference, the acknowledgement number is a value produced as a data length corresponding to the sequence number and TCP data. 
         [0046]    The transmit buffer lock controlling part ( 40 ) sets the writing prohibition flag of the i th  transmit buffer of the transmit buffers (B) based on the transmitted information about the i th  transmit buffer (S 50 ). 
         [0047]    Responding to the instruction, the data transmitting part ( 50 ) reads data from the start pointer of i th  transmit buffer of the transmit buffers (B) to transmit TCP packet corresponding to the read data to the receiver side (S 60 ). 
         [0048]    Meanwhile, the acknowledgement processing part ( 60 ) stores the sequence number and acknowledgement number transmitted from the transmit buffer data processing part ( 30 ), and if the TCP data is received, extracts the sequence number/acknowledgement number from the received TCP data and then compares it with the previously stored sequence number/acknowledgement number, thereby determining whether the acknowledgement signal for the k th  data has been received (S 70 ). 
         [0049]    In step S 70 , if sequence number/acknowledgement number from the received TCP data are present among the previously stored sequence number/acknowledgement, the acknowledgement processing part ( 60 ) determines that the acknowledgement signal for the k th  data has been received (“Yes” in S 70 ). In contrast, if the sequence number/acknowledgement number from the received TCP data are not present among the previously stored sequence number/acknowledgement, the acknowledgement processing part ( 60 ) determines that the acknowledgement signal for the k th  data has not been received (“No” in S 70 ). 
         [0050]    If the acknowledgement signal for the k th  data has not been received in step S 70 , the acknowledgement processing part ( 60 ) determines whether the time-out is occurred for re-transmission (S 80 ). As a result of the determination in S 80 , if it is determined that the time-out is occurred (“Yes” in S 80 ), the process proceeds to step S 60  to instruct the data transmitting part ( 50 ) to re-transmit the k th  data stored in the i th  transmit buffer. In contrast, as a result of the determination in S 80 , if it is determined that the time-out is not occurred (“No” in S 80 ), the process proceeds to step S 70  to determine whether the acknowledgement signal for the k th  data has been received. 
         [0051]    Meanwhile, if it is determined in S 70  that the acknowledgement signal for the k th  data has been received, the acknowledgement processing part ( 60 ) transmits information about the i th  transmit buffer storing the k th  data to the transmit buffer lock controlling part ( 40 ). The transmit buffer lock controlling part ( 40 ) clears the writing prohibition flag of the i th  transmit buffer (S 90 ). 
         [0052]    In the flowchart illustrated in  FIG. 3 , the case of the k th  data being inputted has been described as an example, but steps S 30  to S 90  can be carried out in parallel also for the next data following in order (for example, the k+1 th  data, the k+2 th  data and the k+3 th  data) inputted during a period when the steps S 30  to S 90  are carried out. 
         [0053]    In the above case, if the k+1 th  data is inputted with the writing prohibition flag of the n th  received buffer storing the k th  data being set, the k+1 th  data will not be able to be stored in the n th  received buffer. However, in the state that the acknowledgement for the k th  data has been completed and thus the writing prohibition flag of the n th  received buffer is cleared, if the k+2 th  data is inputted, the k+2 th  data may be stored in the n th  received buffer. 
         [0054]      FIG. 4  is a view exemplarily illustrating a process for transmitting the TCP data carried out in a method for processing TCP re-transmission based on the fixed address according to an example of the present invention. 
         [0055]    Referring to  FIG. 4 , if data # 1  is stored in the n th  transmit buffer, the sending terminal to which the present invention is applied transmits the data # 1  to a receiving terminal ({circle around ( 1 )}), and the writing prohibition flag is set for the n th  transmit buffer ({circle around ( 2 )}). At this time, the transmitter terminal stores the sequence number and acknowledgement number of the data # 1 . As shown in  FIG. 5 , these sequence number and acknowledgement number are defined for standard of the TCP packet, and the acknowledgement number is a value produced from the sequence number and data length. 
         [0056]    If the data # 1  is normally received, the receiving terminal transmits the acknowledgement signal for the data # 1  ({circle around ( 3 )}), the acknowledgement signal includes the sequence number and acknowledgement number. 
         [0057]    The sending terminal extracts the sequence number and acknowledgement number from the received acknowledgement signal, and then compares it with the stored sequence number/acknowledgement number, thereby determining whether the acknowledgement signal for the data # 1  has been received ({circle around ( 4 )}). 
         [0058]    If it is determined that the acknowledgement signal has been received, the sending terminal clears the writing prohibition glag of the n th  transmit buffer ({circle around ( 5 )}), and stores next inputted data # 2  following in order in the n th  transmit buffer and transmits the data # 2  to the receiving terminal ({circle around ( 6 )}). In  FIG. 4 , a case is taken as an example that after the data # 1  is stored in the n th  transmit buffer, the next data # 2  following in order is stored, but if the data # 2  has been inputted with the writing prohibition flag of the n th  transmit buffer being set, the data # 2  cannot be stored in the n th  transmit buffer, wherein after the writing prohibition flag of the n th  transmit buffer has been cleared, any inputted data will be stored in the n th  transmit buffer. 
         [0059]    Meanwhile, the writing prohibition flag of the n th  transmit buffer is set until acknowledgement for the data # 2  is carried out ({circle around ( 7 )}). 
         [0060]    According to  FIG. 4 , it can be seen that the n th  transmit buffer has the same address and fixed Ethernet frame size. As shown in  FIG. 4 , even if the data # 1  and data # 2  have different size from each other, they are transmitted to the receiving terminal by Ethernet frame of fixed size. Therefore, the present invention need not to assign position of the start pointer of the transmit buffer according to data size or perform complex operations for the pointer in scheduling of the transmit buffer. 
         [0061]      FIG. 6  is a view exemplarily illustrating procedure of re-transmitting the TCP data carried out in the method for processing TCP re-transmission based on the fixed address according to an example of the present invention. 
         [0062]    The procedure of re-transmitting the TCP data illustrated in  FIG. 6  is carried out in the case that the acknowledgement signal has not been received within a predetermined period of time in the step ({circle around ( 4 )}) of receiving acknowledgement signal for the data # 1  illustrated in  FIG. 4 . 
         [0063]    Referring to  FIG. 6 , after the data transmitting part ( 50 ) transmitted the data # 1  stored in the n th  transmit buffer ({circle around ( 1 )}), the acknowledgement processing part ( 60 ) operates a timer for the acknowledgement signal for the data # 1  to determine whether the acknowledgement signal for the data # 1  is received within a predetermined period of time. As a result of the determination, if time-out is occurred ({circle around ( 3 )}) as the acknowledgement signal for the data # 1  has not been received within a predetermined period of time, the acknowledgement processing part ( 60 ) instructs the data transmitting part ( 50 ) to re-transmit the data # 1  stored in the n th  transmit buffer. 
         [0064]    Responding to the instruction, the data transmitting part ( 50 ) re-transmits the data # 1  stored in the n th  transmit buffer ({circle around ( 4 )}). 
         [0065]    Meanwhile, for the transmit buffer storing the data # 1 , the writing prohibition flag is set until the acknowledgement signal is confirmed by the acknowledgement processing part ( 60 ) ({circle around ( 2 )}). 
         [0066]    The persons having ordinary skills in the art will understand that various altered or modified examples can be made through the matters described above without departing from the technical concept of the present invention. The scope of the present invention does not reside in the above description, rather in the following claims, and all differences within equivalents thereof should be intended to be included in the present invention.