Hi Edison,

It looks like some other codes are also dependent on this code, I have got some 
other compilation error after removing these codes and the jar.

Error:
compile-agent:
    [mkdir] Created dir: 
/home/pradeep/workspaces/cloudstack-oss/target/classes/cloud-agent.jar
     [echo] Compiling /home/pradeep/workspaces/cloudstack-oss/agent/src
    [javac] Compiling 41 source files to 
/home/pradeep/workspaces/cloudstack-oss/target/classes/cloud-agent.jar
    [javac] 
/home/pradeep/workspaces/cloudstack-oss/agent/src/com/cloud/agent/resource/computing/CloudZonesComputingResource.java:42:
 cannot find symbol
    [javac] symbol  : class DhcpSnooperImpl
    [javac] location: package com.cloud.agent.dhcp
    [javac] import com.cloud.agent.dhcp.DhcpSnooperImpl;
    [javac]                            ^
    [javac] 
/home/pradeep/workspaces/cloudstack-oss/agent/src/com/cloud/agent/resource/computing/CloudZonesComputingResource.java:75:
 cannot find symbol
    [javac] symbol  : class DhcpSnooperImpl
    [javac] location: class 
com.cloud.agent.resource.computing.CloudZonesComputingResource
    [javac]             _dhcpSnooper = new DhcpSnooperImpl(bridgeName, 
_dhcpTimeout);
    [javac]                                ^
    [javac] Note: 
/home/pradeep/workspaces/cloudstack-oss/agent/src/com/cloud/agent/resource/computing/LibvirtVMDef.java
 uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 2 errors


Thanks,
Pradeep.S


-----Original Message-----
From: Edison Su [mailto:edison...@citrix.com] 
Sent: Friday, June 15, 2012 10:38 PM
To: cloudstack-dev@incubator.apache.org
Subject: RE: Moving third party dependencies to ASF approved licenses - jnetpcap



> -----Original Message-----
> From: David Nalley [mailto:da...@gnsa.us]
> Sent: Friday, June 15, 2012 6:32 AM
> To: cloudstack-dev@incubator.apache.org
> Subject: Re: Moving third party dependencies to ASF approved licenses 
> - jnetpcap
> 
> On Fri, Jun 15, 2012 at 1:58 AM, Pradeep Soundararajan 
> <pradeep.soundarara...@citrix.com> wrote:
> > CloudStack uses a significant amount of third party software.  As
> part of the move to ASF there is a certain set of licenses that are 
> compatible with ASF policy.  We need to make sure that every 
> dependency we have is in that set.  If it's not we have to remove it.
> >
> > As part of this initiative we are in the process of removing third
> party dependencies from Citrix code base. We have listed JnetPcap 
> package is one among that and it is a part of LGPLv3 (license). So we 
> are planning to remove the same from our source code.
> >
> > I have checked out my private branch from ASF master to perform this
> task.
> >
> > I have noticed, that we are importing the classes of 'jnetpcap' in
> these java files:
> >
> > DhcpSnooperImpl.java
> > DhcpPacketParser.java
> > HttpTemplateDownloader.java
> >
> > I am not seeing this has been used extensively in
> "HttpTemplateDownloader.java" except for the import section. So I have 
> removed it very easily.  But for the other two, I have noticed, many 
> other classes of jnetpcap have been used in different places.
> >
> > For an example in DhcpSnooperImpl.java:
> >
> > import org.jnetpcap.Pcap;
> > import org.jnetpcap.PcapBpfProgram;
> > import org.jnetpcap.PcapIf;
> > import org.jnetpcap.packet.PcapPacket; import 
> > org.jnetpcap.packet.PcapPacketHandler;
> > import org.jnetpcap.protocol.tcpip.Udp; .........................
> > .........................
> > .........................
> > PcapBpfProgram program = new PcapBpfProgram();
> >                           String expr = "dst port 68 or 67";
> >                           int optimize = 0;
> >                           int netmask = 0xFFFFFF00;
> >                           if (pcap.compile(program, expr, optimize,
> netmask) != Pcap.OK) {
> >                                  s_logger.debug("Pcap: can't compile
> BPF");
> >                                  return null;
> >                           }
> > ...................................
> > So on..........
> > .................................
> >
> > Also, I have noticed "DhcpListener"
> in  "DhcpProtocolParserServer.java" and "DhcpSnooperImpl.java". Could 
> anyone please elaborate how do you say "DhcpListener"  is deprecated?
> What would you mean by that?.  I was thinking it is a separate java 
> file, we have to remove it but it seems to be my understanding is 
> incorrect.
> >
> > I was trying to execute a build for each and every changes but 
> > facing
> some Java compilation issues most of the time. Could anyone let me 
> know how to remove these dependencies from all the files and how to 
> overcome this issue?
> >
> > I am planning to send a patch to ASF once I am done with the final
> validation for "JnetPcap"...
> >
> > Thanks,
> > Pradeep.S
> >
> >
> >
> >
> >
> 
> Pradeep:
> 
> Thanks for starting this work, I know it is less than fun.
> 
> WRT to DhcpListener, see this message from Edison who notes that is 
> deprecated.
> http://mail-archives.apache.org/mod_mbox/incubator-cloudstack-
> dev/201206.mbox/%3CC66C814C1ABFA8449FF65CB44953A8B4012CB890BC8B%40SJCP
> M
> AILBOX01.citrite.net%3E
> 
> I assume that means the entire idea of listening on the wire for a 
> DHCP response is deprecated, which should mean the other two are as 
> well. Edison, care to comment?

Yah, it tries to get IP address of User VM by snooping the bridge. It's used by 
the project for other purpose, and don't use it anymore... It's ok the remove 
this java files.

> 
> --David

Reply via email to