Patent ID: 8489665

Claim:
A communication apparatus, determining whether received data from another communication apparatus has a size being a multiple of an integer number represented by (2 α +2 β ) where α and β are natural numbers and α>α≧0, to determine whether the received data has a normal size, the communication apparatus comprising: a dividend setting unit that sets a value as a dividend; a first divisor setting unit that sets, as a divisor, 2 β (2 α-β +1) transformed from (2 α +2 β ); a remainder determining unit that determines whether a remainder found by dividing the dividend by 2 β which is a factor of 2 β (2 α-β +1) is 0; a second divisor setting unit that sets, as the divisor, 2 α-β found by subtracting 1 from (2 α-β +1) which is a factor of 2 β (2 α-β +1) when the remainder determining unit determines that the remainder found by dividing the dividend by 2 β is 0; a dividing unit that divides the dividend by the divisor to find a quotient and a remainder when the second divisor setting unit sets 2 α-β as the divisor; a positive number determining unit that determines whether a subtraction result of subtracting the remainder from the quotient, both found by the dividing unit, is a positive number; a matching determining unit that determines, when the positive number determining unit determines that the subtraction result is a non-positive number, whether the quotient and the remainder both found by the dividing unit match; and a data size determining unit that determines, when the matching determining unit finds a match between the quotient and the remainder, that the received data has a normal size, and determines, when the matching determining unit finds no match between the quotient and the remainder, that the received data has an abnormal size, wherein the remainder determining unit, when not determining that the remainder found by dividing the dividend by 2 β is 0, determines that the received data has an abnormal size, and the dividend setting unit sets the size of the received data as an initial value for the dividend, and sets the subtraction result to the dividend when the positive number determining unit determines that the subtraction result is a positive number.