Using netlink connector in dotnet (c#)?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I am writing a dotnet core app and want to use the functionality provided by the linux netlink connector to listen to process fork events.



I'm not quite sure if this can be written in dotnet since this is linux kernel code in C. Should I use pinvoke to invoke C code? How would the events be sent back to my c# handler?










share|improve this question















migrated from unix.stackexchange.com Dec 7 at 8:49


This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.














  • I think this is probably a Stack Overflow question, rather than here (because it's programming, not because it's C#), but I don't know enough about netlink to know if there's a sysadmin element involved.
    – Michael Homer
    Dec 6 at 8:50










  • It seems to me that your question has some holes in it. Specifically: are you hoping to use an existing kernel module (to listen to process fork events), or are you planning to write your own?  Please do not respond in comments; edit your question to make it clearer and more complete. I'm not specifically familiar with what you're talking about, but I'm 75% confident that you can write your app in C#, as it would be interfacing with the kernel through a socket interface, and not direct code (function call) linkage.
    – G-Man
    Dec 6 at 21:15














up vote
1
down vote

favorite












I am writing a dotnet core app and want to use the functionality provided by the linux netlink connector to listen to process fork events.



I'm not quite sure if this can be written in dotnet since this is linux kernel code in C. Should I use pinvoke to invoke C code? How would the events be sent back to my c# handler?










share|improve this question















migrated from unix.stackexchange.com Dec 7 at 8:49


This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.














  • I think this is probably a Stack Overflow question, rather than here (because it's programming, not because it's C#), but I don't know enough about netlink to know if there's a sysadmin element involved.
    – Michael Homer
    Dec 6 at 8:50










  • It seems to me that your question has some holes in it. Specifically: are you hoping to use an existing kernel module (to listen to process fork events), or are you planning to write your own?  Please do not respond in comments; edit your question to make it clearer and more complete. I'm not specifically familiar with what you're talking about, but I'm 75% confident that you can write your app in C#, as it would be interfacing with the kernel through a socket interface, and not direct code (function call) linkage.
    – G-Man
    Dec 6 at 21:15












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I am writing a dotnet core app and want to use the functionality provided by the linux netlink connector to listen to process fork events.



I'm not quite sure if this can be written in dotnet since this is linux kernel code in C. Should I use pinvoke to invoke C code? How would the events be sent back to my c# handler?










share|improve this question















I am writing a dotnet core app and want to use the functionality provided by the linux netlink connector to listen to process fork events.



I'm not quite sure if this can be written in dotnet since this is linux kernel code in C. Should I use pinvoke to invoke C code? How would the events be sent back to my c# handler?







c# .net-core






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 19 hours ago









Amy

21.5k1773131




21.5k1773131










asked Dec 6 at 8:32









divyanshm

3,88772862




3,88772862




migrated from unix.stackexchange.com Dec 7 at 8:49


This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.






migrated from unix.stackexchange.com Dec 7 at 8:49


This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.













  • I think this is probably a Stack Overflow question, rather than here (because it's programming, not because it's C#), but I don't know enough about netlink to know if there's a sysadmin element involved.
    – Michael Homer
    Dec 6 at 8:50










  • It seems to me that your question has some holes in it. Specifically: are you hoping to use an existing kernel module (to listen to process fork events), or are you planning to write your own?  Please do not respond in comments; edit your question to make it clearer and more complete. I'm not specifically familiar with what you're talking about, but I'm 75% confident that you can write your app in C#, as it would be interfacing with the kernel through a socket interface, and not direct code (function call) linkage.
    – G-Man
    Dec 6 at 21:15
















  • I think this is probably a Stack Overflow question, rather than here (because it's programming, not because it's C#), but I don't know enough about netlink to know if there's a sysadmin element involved.
    – Michael Homer
    Dec 6 at 8:50










  • It seems to me that your question has some holes in it. Specifically: are you hoping to use an existing kernel module (to listen to process fork events), or are you planning to write your own?  Please do not respond in comments; edit your question to make it clearer and more complete. I'm not specifically familiar with what you're talking about, but I'm 75% confident that you can write your app in C#, as it would be interfacing with the kernel through a socket interface, and not direct code (function call) linkage.
    – G-Man
    Dec 6 at 21:15















I think this is probably a Stack Overflow question, rather than here (because it's programming, not because it's C#), but I don't know enough about netlink to know if there's a sysadmin element involved.
– Michael Homer
Dec 6 at 8:50




I think this is probably a Stack Overflow question, rather than here (because it's programming, not because it's C#), but I don't know enough about netlink to know if there's a sysadmin element involved.
– Michael Homer
Dec 6 at 8:50












It seems to me that your question has some holes in it. Specifically: are you hoping to use an existing kernel module (to listen to process fork events), or are you planning to write your own?  Please do not respond in comments; edit your question to make it clearer and more complete. I'm not specifically familiar with what you're talking about, but I'm 75% confident that you can write your app in C#, as it would be interfacing with the kernel through a socket interface, and not direct code (function call) linkage.
– G-Man
Dec 6 at 21:15




It seems to me that your question has some holes in it. Specifically: are you hoping to use an existing kernel module (to listen to process fork events), or are you planning to write your own?  Please do not respond in comments; edit your question to make it clearer and more complete. I'm not specifically familiar with what you're talking about, but I'm 75% confident that you can write your app in C#, as it would be interfacing with the kernel through a socket interface, and not direct code (function call) linkage.
– G-Man
Dec 6 at 21:15

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53666063%2fusing-netlink-connector-in-dotnet-c%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53666063%2fusing-netlink-connector-in-dotnet-c%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)