예제 #1
0
  /**
   * This method is called by the super class to construct a complete serialized stream of the
   * entry.
   *
   * @return Message that contains enough enformation to reconstruct the specific data.
   */
  protected Message getSpecific() {
    NEOFlowSpecificMessage nsm = new NEOFlowSpecificMessage();
    nsm.setAllowType(allowType);
    nsm.setAllowProto(allowProtocol);
    nsm.setDoFlagCheck(doFlagCheck);
    nsm.setTcpFlagRanges(tcpFlagRanges);

    return nsm;
  }
예제 #2
0
  /**
   * Called by the constructor to process the message and set the allowed types.
   *
   * @param msg The message that is generated by the <I>getSpecific()</I> method.
   */
  private void processSpecific(Message msg) {
    if (msg != null && msg instanceof NEOFlowSpecificMessage) {
      NEOFlowSpecificMessage nsm = (NEOFlowSpecificMessage) msg;

      System.arraycopy(nsm.getAllowType(), 0, allowType, 0, allowType.length);
      System.arraycopy(nsm.getAllowProto(), 0, allowProtocol, 0, allowProtocol.length);

      int[][] flags = nsm.getTcpFlagRanges();
      for (int i = 0; i < flags.length; i++) {
        tcpFlagRanges[i][0] = flags[i][0];
        tcpFlagRanges[i][1] = flags[i][1];
      }

      doFlagCheck = nsm.isDoFlagCheck();
    }
  }