Sponsored Content
Operating Systems Linux What are the meaning of these macros.. Post 302283312 by otheus on Tuesday 3rd of February 2009 04:49:22 AM
Old 02-03-2009
You really need to download the Linux source code and use "grep -r" to find these things. Sometimes they are not documented.

I think these are the various types of protocols the mouse driver understands. Each mouse packet, or mouse initialization, will contain a bite of data which identifies the protocol. That's all I can say.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

troff macros

Hi, I'm going write a small handbook. The typesetting software I'm going to use is troff. There are -ms -me -mm macros for troff. Which one is the most suitable? Thanks! -Tony (2 Replies)
Discussion started by: tonyt
2 Replies

2. UNIX for Dummies Questions & Answers

saving macros for VIM

The question is , as the topic says, how does one save macros for VIM in the .vimrc. I had a look on web and it gave all this ****** about how to build turing machines in vim code or something but i just want to store a macro to like : if(){ } I know how to do it IN vim but .vimrc??????!?!?!... (3 Replies)
Discussion started by: yngwie
3 Replies

3. Programming

How do capability macros get named?

The following is taken from some production code: #ifdef LOCK_LOCKF #ifdef HAVE_SYS_FILE_H #include <sys/lockf.h> #endif #ifdef HAVE_SYS_FILE_H #include <sys/file.h> #endif #define LOCK(file) fseek(file, 0L, 0), lockf(file, 1, 0L) #define UNLOCK(file) fseek(file, 0L, 0),... (2 Replies)
Discussion started by: frequency8
2 Replies

4. Programming

One last question about capability macros

This might be poorly worded. In the header file, I have #ifdef LOCK_FCNTL #ifdef HAVE_FCNTL_H #include <fcntl.h> #endif #define LOCK(file) setlock(fileno(file), F_WRLCK); #define UNLOCK(file) setlock(fileno(file), F_UNLCK); #endif /* LOCK_FCNTL */ #ifdef LOCK_FLOCK #ifdef... (1 Reply)
Discussion started by: frequency8
1 Replies

5. Shell Programming and Scripting

Expect Terminal Macros

Hey people! I just started out working at an ISP as tech support and thought that I should ease the work load by scripting some small macros. I create different commands with Alias through .bashrc which are all directed to the same script file. Here I planned on using Expect to run different... (0 Replies)
Discussion started by: GhettoFish
0 Replies

6. UNIX for Dummies Questions & Answers

MAKE and its macros and variables

I want to build a Makefile that simply takes a template file and modifies it (sed or perl, probably) before installing the result in the right place - my problem is creating the variable for substitution... So I have SYSTEM = SYS1 SYS2 SYS1_CHANNELS = CHANNEL1 CHANNEL2 CHANNEL4... (1 Reply)
Discussion started by: JerryHone
1 Replies

7. UNIX for Advanced & Expert Users

Using Macros in sftp command

Hi, I've some existing scripts wherein am using ftp + .netrc. I've defined my macros in .netrc file. I want to switch to sftp now but it seems it doesn't support macros and .netrc and it gives "command invalid" error. Is there any other alternative? Note: I don't want help for... (1 Reply)
Discussion started by: ps51517
1 Replies

8. UNIX for Dummies Questions & Answers

Workaround for macros in sftp command

Hi, I've some existing scripts wherein am using ftp + .netrc. I've defined my macros in .netrc file. I want to switch to sftp now but it seems it doesn't support macros and .netrc and it gives "command invalid" error. Is there any other alternative? Note: I don't want help for... (1 Reply)
Discussion started by: ps51517
1 Replies

9. Programming

help with atoi and macros in C

I have a PORT_NUM macro (10 digits long number) in a server file, if i do htons(PORT_NUM) i get warning: this decimal constant is unsigned only in ISO C90 warning: large integer implicitly truncated to unsigned type whats wrong with this? (2 Replies)
Discussion started by: omega666
2 Replies

10. Shell Programming and Scripting

Macros how-to?

Hi, all I just came to new system with RH, and it has alot of macros I was told to use, but I can't find how to open it for display or for edit, can you help me please, is it all about make/makefile? let say I have macro <trx> like this, that does a lot of things: >$ trx ... creating new... (1 Reply)
Discussion started by: trento17
1 Replies
NETLINK(3)						     Linux Programmer's Manual							NETLINK(3)

NAME
netlink - Netlink macros SYNOPSIS
#include <asm/types.h> #include <linux/netlink.h> int NLMSG_ALIGN(size_t len); int NLMSG_LENGTH(size_t len); int NLMSG_SPACE(size_t len); void *NLMSG_DATA(struct nlmsghdr *nlh); struct nlmsghdr *NLMSG_NEXT(struct nlmsghdr *nlh, int len); int NLMSG_OK(struct nlmsghdr *nlh, int len); int NLMSG_PAYLOAD(struct nlmsghdr *nlh, int len); DESCRIPTION
<linux/netlink.h> defines several standard macros to access or create a netlink datagram. They are similar in spirit to the macros defined in cmsg(3) for auxiliary data. The buffer passed to and from a netlink socket should be accessed using only these macros. NLMSG_ALIGN() Round the length of a netlink message up to align it properly. NLMSG_LENGTH() Given the payload length, len, this macro returns the aligned length to store in the nlmsg_len field of the nlmsghdr. NLMSG_SPACE() Return the number of bytes that a netlink message with payload of len would occupy. NLMSG_DATA() Return a pointer to the payload associated with the passed nlmsghdr. NLMSG_NEXT() Get the next nlmsghdr in a multipart message. The caller must check if the current nlmsghdr didn't have the NLMSG_DONE set--this function doesn't return NULL on end. The len argument is an lvalue containing the remaining length of the message buffer. This macro decrements it by the length of the message header. NLMSG_OK() Return true if the netlink message is not truncated and is in a form suitable for parsing. NLMSG_PAYLOAD() Return the length of the payload associated with the nlmsghdr. CONFORMING TO
These macros are nonstandard Linux extensions. NOTES
It is often better to use netlink via libnetlink than via the low-level kernel interface. SEE ALSO
libnetlink(3), netlink(7) COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/. GNU
2014-03-20 NETLINK(3)
All times are GMT -4. The time now is 03:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy