Sponsored Content
Top Forums Programming Difference between system calls and normal functions in C Post 302571424 by jim mcnamara on Monday 7th of November 2011 10:37:13 AM
Old 11-07-2011
chmod() also is used to change permissions.

Depending on the UNIX, the standard system calls (ones required by POSIX standards)
all present the same interface for us to call. All open() calls present the same semantics for us to use, for example, on any standards conforming system. As long as the UNIX follows POSIX standards your code is portable.

What happens inside the call is never standard. Some UNIX implementions have a list of "syscalls" with entry points (function pointers). If you understand how those entry points work, you can call them directly - which you should only do in very clearly defined cases, such as system programming just for that OS and just for that version of the OS. Other systems do not support the idea of syscalls.

Then there is the system API. This is stuff which is specific to a particular OS. So it can't be used on another kinds of UNIX. Linux has loads of these. All UNIXes have them.
Sometimes these specific calls will "piggyback" on standard calls by adding extra flags or options. ioctl() often does this. So if you know everything about ioctl on HPUX, when you get to Linux there are some new things to learn.

An example of an altogether different function is Solaris' ustat(). Solaris also has seemingly odd "devices" like doors, that some other systems have not had up until now, so ioctl has to support them on Solaris. Linux had a door implementation, which I think is now deprecated. BTW all devices on a UNIX box are presented as files. No matter how odd the device might be, so there has to be a way to play with them.
This User Gave Thanks to jim mcnamara For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

System Calls

What does the system call "dup" do? What is the difference between dup and dup2 I have a fair idea of what it does but I am confused when its coming down to the exact details... Please help me!:confused: (2 Replies)
Discussion started by: clickonline1
2 Replies

2. UNIX for Dummies Questions & Answers

Any difference between the CLI of Mac OS X and normal UNIX?

Any? (11 Replies)
Discussion started by: edward
11 Replies

3. UNIX for Dummies Questions & Answers

System calls for cp and mv

Which system calls are made for operations cp and mv (2 Replies)
Discussion started by: gaurava99
2 Replies

4. Solaris

System calls ?

where can i find the differences in System calls between solaris and aix? also is it possible to find a comprehensive list of them? (1 Reply)
Discussion started by: TECHRAMESH
1 Replies

5. UNIX Desktop Questions & Answers

Using system calls

Hi, I'm new to UNIX system calls. Can someone share your knowledge as to how exactly system calls should be executed? Can they be typed like commands such as mkdir on the terminal itself? Also, are there any websites which will show me an example of the output to expect when a system call like... (1 Reply)
Discussion started by: ilavenil
1 Replies

6. BSD

system calls

what is the functions and relationship between fork,exec,wait system calls as i am a beginer just want the fundamentals. (1 Reply)
Discussion started by: sangramdas
1 Replies

7. Solaris

difference between RPATH and normal linking while building

while building in solaris and going for dynamic linking whats the difference or advantage or disadvantage in using RPATH vs while linking package and dependency libraries i need a little explanation about this RPATH option specially and the difference with normal linking using -L (0 Replies)
Discussion started by: mobydick
0 Replies

8. UNIX for Dummies Questions & Answers

About system calls.

Hi all, I am new here . I want to know about system call in detail. As system calls are also function .How system identifies it.:) (2 Replies)
Discussion started by: vishwasrao
2 Replies

9. UNIX for Dummies Questions & Answers

system calls in C

Hello, how would i be able to call ps in C programming? thanks, ---------- Post updated at 01:39 AM ---------- Previous update was at 01:31 AM ---------- here's the complete system call, ps -o pid -p %d, getpit() (2 Replies)
Discussion started by: l flipboi l
2 Replies

10. UNIX for Dummies Questions & Answers

Difference between normal Execute permission and GUID

Hi, Any can explain the difference between the normal execute permission for the file and GUID of the file. Since the normal execute permission has right to execute file why there is need of providing GUID for the same file. Also share some examples for SUID and SGID programs. Regards... (3 Replies)
Discussion started by: ksgnathan
3 Replies
aoe-interfaces(8)					      System Manager's Manual						 aoe-interfaces(8)

NAME
aoe-interfaces - restrict aoe driver to specified network interfaces SYNOPSIS
aoe-interfaces [dev1] [dev2 ...] aoe-interfaces -c DESCRIPTION
The aoe-interfaces command tells the aoe driver to ignore ATA over Ethernet (AoE) traffic on all but the specified network interfaces. It is analogous to the aoe_iflist module load option. If neither the aoe_iflist module load option nor the aoe-interfaces command are used, the aoe driver will use any network interface for AoE traffic. Using aoe-interfaces to limit AoE to only trusted networks prevents the case where a rogue AoE target appears on a public net- work, diverting data from the legitimate AoE target. Such an imposter target effectively corrupts the data on the legitimate target. If the aoe driver is a module, then calling aoe-interfaces without arguments will display the current interfaces list. If it hasn't been set then the output will be blank. It's good to run the aoe-discover command after setting the AoE interfaces list. OPTIONS
-c The -c flag will clear the interface access list, permitting any interface to be used. EXAMPLE
In this example, the root user on a host named nai loads the aoe module with only eth0 allowable for AoE traffic. After remembering that shelf 7 is on eth3, this sysadmin uses aoe-interfaces to add eth3 to the list of allowable network interfaces and then calls aoe-discover to ask the aoe driver to look for new AoE devices. nai:~# modprobe aoe aoe_iflist="eth0" nai:~# aoe-stat e10.9 eth0 up nai:~# aoe-interfaces eth0 eth3 nai:~# aoe-discover nai:~# aoe-stat e7.0 eth3 up e7.1 eth3 up e7.2 eth3 up e7.3 eth3 up e7.4 eth3 up e7.5 eth3 up e7.6 eth3 up e7.7 eth3 up e7.8 eth3 up e7.9 eth3 up e10.9 eth0 up nai:~# aoe-interfaces eth0 eth3 SEE ALSO
aoe-discover(8), aoe-stat(8), aoetools(8). AUTHOR
Ed L. Cashin (ecashin@coraid.com) aoe-interfaces(8)
All times are GMT -4. The time now is 11:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy