public HipPacket handleTrigger(HipSadb sadb, HostIdentityTag srcHit,
			HostIdentityTag dstHit, InetAddress src, InetAddress dst,
			HostIdentity hi, PrivateKey key) {
		HipPacket i1 = null;
		SaEntry entry = null;
		HostIDParameter __ourHiParam = null;

		if (src == null || dst == null)
			return null;

		if ((src instanceof Inet4Address) != (dst instanceof Inet4Address)
				|| (src instanceof Inet6Address) != (dst instanceof Inet6Address))
			return null;

		if (sadb.find(dstHit) != null) {
			System.out.println("Already in I1-SENT state");
			return null;
		}

		entry = new HipSadb.SaEntry();

		if (src instanceof Inet4Address) {
			IPPacket packet = new IPPacket(DEFAULT_IPV4_LENGTH);
			// SET IP VERSION FIRST
			packet.setIPVersion(IPPacket.IP_VERSION4);
			packet.setIPHeaderLength(DEFAULT_IPV4_LENGTH / 4);
			packet.setTTL(DEFAULT_TTL);
			packet.setDestination(dst.getAddress());
			packet.setSource(src.getAddress());
			packet.setProtocol(HipPacket.HIP_PROTO);

			i1 = HipPacketFactoryImpl.getFactory().createI1Packet(packet,
					srcHit.getAsBytes(), dstHit.getAsBytes());

			i1.setHIPChecksum();

		} else {
			// TODO: IPv6 ...
		}

		__ourHiParam = (HostIDParameter) HipParameterFactoryImpl
				.createHipParameter(HostIDParameter.TYPE_HOST_ID);

		__ourHiParam.setHI(hi.getBytes());
		__ourHiParam.setHostIDLength(hi.getBytes().length);

		if (i1 != null) {
			try {
				entry.setState(SaEntry.HipState.I1_SENT);
				entry.setInnerSrc(srcHit.getAsAddress()); // Source HIT
				entry.setInnerDst(dstHit.getAsAddress()); // Source HIT
				entry.setOuterSrc(src);
				entry.setOuterDst(dst);
				entry.setLastPacket(i1);
				entry.setLocalHostID(__ourHiParam);
				entry.setLocalPrivateKey(key);
				entry.setSignatureAlgo(hi.getAlgo());
				entry.setTimer(System.currentTimeMillis());
				entry.setRetransmitCounter(0);
			} catch (Exception e) {
				return null;
			}
		}

		sadb.add(entry);

		return i1;
	}