我有以下结构,我想在此Map中插入值。如果有tcp数据包即将到来,我想将Ip地址和所有数据包编号插入到那些MultivaluedMap中 “
public static MultivaluedMap<String,Integer> srcip_map;
public static MultivaluedMap<String,Integer> destip_map;
public static HashMap<Integer,PacketData> alldata_map = new HashMap<Integer,PacketData>();
count=0;
while (true) {
Packet info = captor.getPacket();
if (info != null){
if(cap_packet instanceof TCPPacket){
TCPPacket tc = (TCPPacket) cap_packet;
mapStore.srcip_map.put(tc.src_ip, count);
count++;
}
}