-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add macOS methods and structures for processes, memory, networks #995
Add macOS methods and structures for processes, memory, networks #995
Conversation
9d3c2da
to
9d1c48a
Compare
I don't have access to Mac OS X and zero experience there, so I only gleamed at the bindings. In gernal they look sane, one thing I noticed, that sometimes |
OS X is my primary development environment and I've had those structures in my project reporting sane information for a few years now, just finally got around to submitting here. In general most of the time you see The only mappings I might not be 100% sure of are where I have used
Most of the |
OSX no longer distributes a 32-bit version, so I doubt you'll ever see
`long` mapped to `uint32_t`.
…On Sun, Aug 12, 2018 at 6:06 PM, dbwiddis ***@***.***> wrote:
OS X is my primary development environment and I've had those structures
in my project reporting sane information for a few years now, just finally
got around to submitting here. In general most of the time you see long
it's mapped from uint64_t. The Passwd structure pw_change and pw_expire
fields are time_t which is native long. Similarly the seconds field of
Timeval is __darwin_time_t which eventually is defined as a long.
The only mappings I might not be 100% sure of are where I have used String
for things like char *foo. I think that's correct on *nix but not on
Windows... Here's the actual header for Passwd:
struct passwd {
char *pw_name; /* user name */
char *pw_passwd; /* encrypted password */
uid_t pw_uid; /* user uid */
gid_t pw_gid; /* user gid */
time_t pw_change; /* password change time */
char *pw_class; /* user access class */
char *pw_gecos; /* Honeywell login info */
char *pw_dir; /* home directory */
char *pw_shell; /* default shell */
time_t pw_expire; /* account expiration */
int pw_fields; /* internal: fields filled in */
};
Most of the proc-* headers can be seen here
<https://opensource.apple.com/source/xnu/xnu-792.13.8/bsd/kern/proc_info.c>.
I can dig into my own machine's header files if you have any specific
questions...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#995 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAuMrYkt1wUVFCl5W3xhLqaV9vE6uhyPks5uQKbzgaJpZM4VvzOM>
.
|
The unittests run clean, the sample is sound, the reply is too. Thank you! |
No description provided.