Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - regarding mac address in devnp: (7 Items)
   
regarding mac address in devnp  
Hello,

I am using P1020RDB bsp.  In the devnp-receive.c file, I need to put a logical filter which compares the mac address 
with the target's configured mac address.  To do this, I need to know what is the configured mac address of each 
interface in the target.  Can anyone please guide me how to find the mac address in the devnp?  I know to get the mac 
address using getifaddress() api, but is there any other way to do in devnp itself, say by directly accessing the 
structures of devnp or interface.

Thanks in advance.

Warm regards,
Santhosh. A
Re: regarding mac address in devnp  
Are you wanting to modify the network driver to check the MAC address?




On 12-07-02 8:56 AM, "Santhosh A" <community-noreply@qnx.com> wrote:

>Hello,
>
>I am using P1020RDB bsp.  In the devnp-receive.c file, I need to put a
>logical filter which compares the mac address with the target's
>configured mac address.  To do this, I need to know what is the
>configured mac address of each interface in the target.  Can anyone
>please guide me how to find the mac address in the devnp?  I know to get
>the mac address using getifaddress() api, but is there any other way to
>do in devnp itself, say by directly accessing the structures of devnp or
>interface.
>
>Thanks in advance.
>
>Warm regards,
>Santhosh. A
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post93972
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: regarding mac address in devnp  
Yes,

I am trying to put a filter in the devnp driver such that if the mac address of the received packet  matches with the 
configured mac address of the interface, then only pass the packet to io-pkt layer, else drop it there itself in devnp. 
 In order to do that, i need to know which structure has the mac address info of the interface.  Please tell me how to 
know the mac address configured for the interface in the devnp driver.

I am trying to figure out where the mac address will be stored when i start the io-pkt driver and devnp driver in the 
bsh script. Can you please share some links that clarifies this?

Thanks and warm regards,
Santhosh. A
Re: regarding mac address in devnp  
The MAC address is stored in the cfg->current_address structure. Look in
detect.c.



On 12-07-04 3:24 AM, "Santhosh A" <community-noreply@qnx.com> wrote:

>Yes,
>
>I am trying to put a filter in the devnp driver such that if the mac
>address of the received packet  matches with the configured mac address
>of the interface, then only pass the packet to io-pkt layer, else drop it
>there itself in devnp.  In order to do that, i need to know which
>structure has the mac address info of the interface.  Please tell me how
>to know the mac address configured for the interface in the devnp driver.
>
>I am trying to figure out where the mac address will be stored when i
>start the io-pkt driver and devnp driver in the bsh script. Can you
>please share some links that clarifies this?
>
>Thanks and warm regards,
>Santhosh. A
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post94003
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: regarding mac address in devnp  
do you mean _nic_config structure?

there are several data elements in this structure, but no reference to mac address, which data element will be pointing 
to mac address???

Thanks and warm regards,
Santhosh. A
Re: regarding mac address in devnp  
Yes, nic_config.current_address.



On 12-07-04 7:56 AM, "Santhosh A" <community-noreply@qnx.com> wrote:

>
>do you mean _nic_config structure?
>
>there are several data elements in this structure, but no reference to
>mac address, which data element will be pointing to mac address???
>
>Thanks and warm regards,
>Santhosh. A
>
>
>
>_______________________________________________
>
>Networking Drivers
>http://community.qnx.com/sf/go/post94013
>To cancel your subscription to this discussion, please e-mail
>drivers-networking-unsubscribe@community.qnx.com

Re: regarding mac address in devnp  
Yeah, i am able to get the mac address properly as you mentioned, now i can implement filter in the receive.c with this 
mac address.

It was really helpful. Thank you.

Warm regards,
Santhosh. A