[Mono-dev] Implementing support of MPTCP Socket API in mono

Antoine Cailliau antoinecailliau at gmail.com
Mon Nov 14 16:43:14 UTC 2016


Thanks Alex for the answer.

I lack documentation and/or example for my next problem.

I have a class similar to this:

> class MPTCPSubIds {
> ...
> MPTCPSubStatus[] SubStatus;
> ...
> }


and I need, in socket-io.c, to build the SubStatus array. I can create the
instance of MPTCPSubStatus without problem, but I do not find the
appropriate documentation/example to create the array and add the instances
in an array in my MPTCPSubIds object.

Any example or tips is warmly welcome :-)

Thanks in advance,

Antoine



On 14 November 2016 at 16:05, Alexander Köplinger <alkpli at microsoft.com>
wrote:

> Yes, you’re close :)
>
> The installed files in <prefix>/lib/mono/4.5-api are the wrong ones, you
> want the files in <prefix>/lib/mono/4.5. More details about the history
> behind that here: http://www.mono-project.com/docs/about-mono/releases/
> 4.4.0/#class-libraries
> So it seems your project is compiling against the .NET 4.5 profile, you
> need to change it to .NET 4.6 so it uses the files from the 4.5 folder
> which are the “latest” ones.
>
> - Alex
>
>
> On 14 Nov 2016, at 15:58, Antoine Cailliau <antoinecailliau at gmail.com>
> wrote:
>
> Hi,
>
> Thanks. I forgot to mention I did updated the .sources files. I moved my
> files to mcs/class but still does not work.
>
> In the folder with mono source, the following files have a match with my
> class
>
>> Binary file ./mcs/class/lib/basic/System.dll matches
>> Binary file ./mcs/class/lib/basic/secxml/System.dll matches
>> Binary file ./mcs/class/lib/net_4_x/Facades/System.Net.Sockets.dll
>> matches
>> Binary file ./mcs/class/lib/net_4_x/System.dll.mdb matches
>> Binary file ./mcs/class/lib/net_4_x/System.dll matches
>> Binary file ./mcs/class/lib/net_4_x/secxml/System.dll.mdb matches
>> Binary file ./mcs/class/lib/net_4_x/secxml/System.dll matches
>> Binary file ./mcs/class/lib/build/System.dll matches
>> Binary file ./mcs/class/lib/build/secxml/System.dll matches
>
>
> However, after "make install", the referenced dll when I build
> (/home/mininet/.mono/lib/mono/4.5-api/System.dll) does not have a hit on
> my class. The following files do match my class:
>
>> Binary file /home/mininet/.mono/lib/libmonosgen-2.0.a matches
>> Binary file /home/mininet/.mono/lib/libmonoboehm-2.0.a matches
>> Binary file /home/mininet/.mono/lib/libmonoboehm-2.0.so.1.0.0 matches
>> Binary file /home/mininet/.mono/lib/mono/gac/System/4.0.0.0__
>> b77a5c561934e089/System.dll.mdb matches
>> Binary file /home/mininet/.mono/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll
>> matches
>> Binary file /home/mininet/.mono/lib/mono/4.5/Facades/System.Net.Sockets.dll
>> matches
>> Binary file /home/mininet/.mono/lib/libmonosgen-2.0.so.1.0.0 matches
>> Binary file /home/mininet/.mono/bin/mono-sgen matches
>> Binary file /home/mininet/.mono/bin/monodis matches
>> Binary file /home/mininet/.mono/bin/mono-boehm matches
>> Binary file /home/mininet/.mono/bin/pedump matches
>
>
> I guess I'm close, but still :-)
>
> Antoine
>
> On 14 November 2016 at 15:07, Alexander Köplinger <alkpli at microsoft.com>
> wrote:
>
>> Hi!
>>
>> The .csproj files are auto-generated and not used by the Mono build. You
>> need to edit the .sources file, e.g. in mcs/class/System/System.dll.so
>> urces.
>> As a best practice, don’t add new classes in mcs/class/referencesource
>> since the folder contains code we copy in from the referencesource
>> repository. A better place is the mcs/class/System/System.Net
>> <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsystem.net&data=02%7C01%7Calkpli%40microsoft.com%7Cce06322c07be4732e2ad08d40c9ebe4a%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636147323382168171&sdata=2KeHG9tDFw4zdogJ3kzo%2Bj8psje4%2BhIi3ZklpP0rkTg%3D&reserved=0>
>>  folder.
>>
>> - Alex
>>
>> On 14 Nov 2016, at 14:41, Antoine Cailliau <antoinecailliau at gmail.com>
>> wrote:
>>
>> Hi,
>>
>> I'm patching mono to support MPTCP Socket API. I'll use this thread to
>> group my questions. My implementation is very similar to the one supporting
>> Linger options.
>>
>> I added new classes in /mono/mcs/class/referenceso
>> urce/System/net/System/Net/Sockets, for example MPTCPSubIds.cs. I
>> updated the cproj file to reference my class. I can't, however, reference
>> it in my code. Indeed, it is not present in the compiled System.dll.
>>
>> I can create an instance at runtime using mono_class_load_from_name and
>> mono_object_new_checked.
>>
>> My guess it that I miss a file to update in order to make it available in
>> System.dll.
>>
>> Thanks in advance,
>>
>> Antoine
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.dot.net
>> https://na01.safelinks.protection.outlook.com/?url=http%3A%
>> 2F%2Flists.dot.net%2Fmailman%2Flistinfo%2Fmono-devel-list&
>> data=02%7C01%7Calkpli%40microsoft.com%7C70cfcdf03d76
>> 4cf6286708d40c93f158%7C72f988bf86f141af91ab2d7cd011db47%7C1%
>> 7C0%7C636147276959188274&sdata=cB4fC0Kp7%2FrXGr9AltKxuXfHdF%2FeIqN8xoy8
>> cX7ytCg%3D&reserved=0
>>
>>
>>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.dot.net
> https://na01.safelinks.protection.outlook.com/?url=
> http%3A%2F%2Flists.dot.net%2Fmailman%2Flistinfo%2Fmono-
> devel-list&data=02%7C01%7Calkpli%40microsoft.com%
> 7Cce06322c07be4732e2ad08d40c9ebe4a%7C72f988bf86f141af91ab2d7cd011
> db47%7C1%7C0%7C636147323382168171&sdata=sYE%2FAn3fJDdTxeaaxBJrkM5%
> 2BNvM95qNT9I7T7gyQPWc%3D&reserved=0
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/mono-devel-list/attachments/20161114/2da7bb4d/attachment.html>


More information about the Mono-devel-list mailing list