I am using setcontext / getcontext for creating coroutines in C. The current software is implemented for ARMv7 using Linux 3.18 Kernel. Since these apis are deprecated, i couldn't find proper information regarding to their development status. I have read that they are reimplemented for ARM but deprecated on x86 oses. However, i can still find up-to-date Man pages for FreeBSD and Linux. There aren't any warnings or notices regarding to their use.
Is it a reliable choice to continue using them ? Why do they still exists in libc ? What is the status in Linux kernel 4 ?
Thanks
Related
I am going through the CXL support in Linux Kernel and I found that there is no function or support for cxl.cache. I'm confused if the cache part is not yet implemented in linux kernel or if the kernel should not have access to the cache commands?
(I have seen up to the latest Kernel release, 5.19)
I found my WD MyPassport Wireless is running Buildroot Linaro linux with busybox; It doesn't have aptitude package manager. I don't know much about busybox; I came to know the commands provided by the busybox are called defined functions. How can I install Transmission BitTorrent client? I came across something called patch that i think provides Transmission function for the Buildroot busybox
http://buildroot-busybox.2317881.n4.nabble.com/PATCH-introducing-transmission-bittorrent-client-td7898.html
Is this the thing that does the thing? If so, how to go forward?
# uname -a
Linux Mammoth 3.2.0 #1 Tue Sep 8 14:42:47 CST 2015 armv7l GNU/Linux
You're confusing many things here. First "Buildroot Linaro" doesn't mean anything. Buildroot (http://buildroot.org) is an open-source project that provides an embedded Linux build system, Linaro (http://linaro.org) is a non-profit organization that enhances the support of the ARM architecture in the Linux eco-system. The main interaction between the two is that Buildroot can use a Linaro toolchain as the cross-compiler.
Indeed, there is nothing like "aptitude" on a Buildroot generated system, because we don't support binary packages. See http://buildroot.org/downloads/manual/manual.html#faq-no-binary-packages for details.
Finally, you're confusing Buildroot and Busybox. Busybox is a userspace application that provides a lightweight implementation of many basic Linux utilities. It is one of the 1600+ userspace packages provided by Buildroot.
Busybox definitely doesn't provide a Bittorent client. However, Buildroot indeed has a package for transmission.
So if you want to move forward, you need to get the source of the Buildroot that WD used to generate the firmware to your device, modify this Buildroot to add transmission, then re-build the filesystem using Buildrot, and finally flash it on your device.
I'm trying to compile a C program that uses libpcap in statistical mode on OSX. The original code was written for Windows, using the winpcap library. The version of libpcap on my Mac has never heard of the pcap_setmode function that it uses - I've got a nasty feeling that it might be Windows-specific.
Is there any way to capture in stats-mode on OSX? If not, is there something about the architecture/capabilities of the OS that prevents this, or is this an extra feature added to WinPcap which has never been a feature of the main library?
pcap_setmode() only has a definition in the Win32 port, because the WinPcap driver for Windows is the only packet capture mechanism that supports statistical mode; BPF in Mac OS X and *BSD and AIX and Solaris 11 don't support it, PF_PACKET sockets in Linux don't support it, DLPI in Solaris and HP-UX don't support it, etc..
UN*Xes generally come with a mechanism that supports capturing packets, so libpcap can just use that, without adding its own kernel-mode code; this means it can't control what facilities those capture mechanisms have - if a capture mechanism doesn't have it, libpcap can't add it. Windows doesn't come with such a mechanism; it does come with NDIS, which can support such a mechanism, so WinPcap comes with a kernel-mode driver that uses NDIS to implement such a mechanism, and thus has some more control over what features it offers.
pcap_setmode() only has a definition in the Win32 port (for unknown reasons to me).
What kind of SCTP support is there on various Windows versions?
Out of the box, there are none, on any versions of Windows.(Microsoft has claimed there is no customer demand, so I always encourage anyone looking for SCTP on windows contact Microsoft and express their need for one..)
There are 3rd party implementations, e.g.
sctplib
SctpDrv
Recently, Windows support has been added to this userspace SCTP stack:
http://sctp.fh-muenster.de/sctp-user-land-stack.html
It will have a paper in 2012 ICCCN describing its implementation.
From the Wikipedia article:
The following operating systems implement SCTP:
AIX Version 5
Generic BSD with external patch at KAME project
Cisco IOS 12
DragonFly BSD since version 1.4
FreeBSD, version 7 and above
HP-UX, 11i v2 and above
Operating systems using Linux kernel 2.4 and newer
QNX Neutrino Realtime OS, 6.3.0 and above
Sun Solaris 10 and above
Various third-party implementations of SCTP exist for other operating systems. FreeBSD contains the SCTP reference implementation.
Userspace library:
The SCTP library (sctplib), with a Windows XP port.
So apparently there is no native support in Windows at all. Only through 3rd-party software or libraries.
What is kernel's KMS(kernel mode setting) API?
ModeSetting does refer to the graphic stack. It is the process of setting up the clocks and scanout buffers, initialize the chips, lighting up the displays and so on.
The kernel subsystem responsible for this is the DRM subsystem. It has a userspace library that is developed in lock-step with the kernel part and allows i.e. Xorg access to the userland facing part of the interface (normally called ABI). The hardware-facing side of the kernel interface is usually referred to as the API.
Specifically you can use the 'xrandr' binary to instruct XOrg via the randr-protocol to instruct the kernel to change the mode. That binary is installed alongside the X server and also gives you some information about the graphics card and the current mode.
The DRM ModeSetting API is IOCTL based and the following site gives an technical overview: http://dri.freedesktop.org/wiki/DrmModesetting
Also the documentation in the current linux-3.7 releases is quite improved. To check that out, you have to fetch the latest kernel sources, and then, in the kernel sourcetree do
$ make htmldocs
and then look at the generated file Documentation/DocBook/drm/index.html .
Hth
Mode setting is usually related to Graphics setup.
A reference article dated April 19, 2008 notes,
kernel mode-setting involves moving the mode-setting code for video adapters from the user-space X server drivers into the Linux kernel. This may seem like an uninteresting topic for end-users, but having the mode-setting done in the kernel allows for a cleaner and richer boot process, improved suspend and resume support, and more reliable VT switching (along with other advantages). Kernel mode-setting isn't yet in the mainline Linux kernel nor is the API for it frozen, but Fedora 9 shipping next month will be the first major distribution carrying this initial support. In this article we're looking more closely at kernel mode-setting with the Intel X.Org driver as well as showing videos of kernel-based mode-setting in action.
Here is a Fedora wiki KernelModesetting page.