code: public static int getTPDUService(final byte[] tpdu)
  	{
  		final int ctrl = tpdu[0] & 0xff;
  		if ((ctrl & 0xFC) == 0)
  			return 0;
  		// 0x04 is tag_group service code, not used by us
  		if ((ctrl & 0xFC) == 0x04)
  			return 0x04;
  		if ((ctrl & 0xC0) == 0x40)
  			return T_DATA_CONNECTED;
  		if (ctrl == T_CONNECT)
  			return T_CONNECT;
  		if (ctrl == T_DISCONNECT)
  			return T_DISCONNECT;
  		if ((ctrl & 0xC3) == T_ACK)
  			return T_ACK;
  		if ((ctrl & 0xC3) == T_NAK)
  			return T_NAK;
  		logger.warn("unknown TPCI service code 0x" + Integer.toHexString(ctrl));
  		return ctrl;
  	}
docs: Returns the transport layer service of a given protocol data unit.
  
  @param tpdu transport layer protocol data unit
  @return TPDU service code