binding to a specific local interface?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

binding to a specific local interface?

Bin Lu
Hi,

I am trying to bind the socket to a specific local network interface (address) when it make socket connection to the KDC. Does the library have a mechanism to do that? I briefly scanned through the code but it does not seem to have any. If not, then I try to add a new API to pass in the local binding address and do the binding when socket connection is established. My problem is that the newly added API (defined in krb5/krb5.h, and implemented in one of the source files) is always complained as undefined symbol at link time, even though 'nm' output shows it is defined ('t').  Is there any hidden trick that  prevents a new API to be added in this lib?

Thanks in advance,
-binlu
_______________________________________________
krbdev mailing list             [hidden email]
https://mailman.mit.edu/mailman/listinfo/krbdev
Reply | Threaded
Open this post in threaded view
|

Re: binding to a specific local interface?

Benjamin Kaduk-2
On Thu, 4 Sep 2014, Bin Lu wrote:

> Hi,
>
> I am trying to bind the socket to a specific local network interface
> (address) when it make socket connection to the KDC. Does the library
> have a mechanism to do that? I briefly scanned through the code but it
> does not seem to have any. If not, then I try to add a new API to pass
> in the local binding address and do the binding when socket connection
> is established. My problem is that the newly added API (defined in
> krb5/krb5.h, and implemented in one of the source files) is always
> complained as undefined symbol at link time, even though 'nm' output
> shows it is defined ('t').  Is there any hidden trick that prevents a
> new API to be added in this lib?

What platform are you on?  Some platforms enforce export symbol lists,
such as the one found at src/lib/krb5/libkrb5.exports.  In order to make
the symbol visible to consumers of the library, it would need to be added
to the export symbol list.

-Ben
_______________________________________________
krbdev mailing list             [hidden email]
https://mailman.mit.edu/mailman/listinfo/krbdev
Reply | Threaded
Open this post in threaded view
|

RE: binding to a specific local interface?

Bin Lu
Yeah, I just figured that out myself. It's on Linux.

Thanks,
-binlu

-----Original Message-----
From: Benjamin Kaduk [mailto:[hidden email]]
Sent: Friday, September 05, 2014 10:34 AM
To: Bin Lu
Cc: [hidden email]
Subject: Re: binding to a specific local interface?

On Thu, 4 Sep 2014, Bin Lu wrote:

> Hi,
>
> I am trying to bind the socket to a specific local network interface
> (address) when it make socket connection to the KDC. Does the library
> have a mechanism to do that? I briefly scanned through the code but it
> does not seem to have any. If not, then I try to add a new API to pass
> in the local binding address and do the binding when socket connection
> is established. My problem is that the newly added API (defined in
> krb5/krb5.h, and implemented in one of the source files) is always
> complained as undefined symbol at link time, even though 'nm' output
> shows it is defined ('t').  Is there any hidden trick that prevents a
> new API to be added in this lib?

What platform are you on?  Some platforms enforce export symbol lists, such as the one found at src/lib/krb5/libkrb5.exports.  In order to make the symbol visible to consumers of the library, it would need to be added to the export symbol list.

-Ben

_______________________________________________
krbdev mailing list             [hidden email]
https://mailman.mit.edu/mailman/listinfo/krbdev