Меню Рубрики

Getifaddrs linux failed err 11

Getifaddrs linux failed err 11

int getifaddrs(struct ifaddrs **ifap);
void freeifaddrs(struct ifaddrs *ifa);

ОПИСАНИЕ

В поле ifa_next содержится указатель на следующую структуру в списке или NULL, если это последний элемент в списке.

Поле ifa_name указывает на имя интерфейса (заканчивающееся null).

В поле ifa_flags содержатся флаги интерфейса, полученные операцией SIOCGIFFLAGS ioctl(2) (список флагов приведён в netdevice(7)).

Поле ifa_addr указывает на структуру, содержащую адрес интерфейса (для определения формата структуры адреса обратитесь к подполю sa_family). Это поле может содержать указатель null.

Поле ifa_netmask указывает на структуру, содержащую маску сети для ifa_addr (если она используется в адресном семействе). Это поле может содержать указатель null.

В зависимости от наличия флага IFF_BROADCAST или IFF_POINTOPOINT в ifa_flags (может быть установлен какой-то один), в ifa_broadaddr будет содержаться широковещательный адрес ifa_addr (если он используется в адресном семействе) или ifa_dstaddr будет содержать адрес назначения интерфейса типа точка-точка.

Поле ifa_data указывает на буфер, содержащий данные, присущие адресному семейству; это поле может быть равно NULL, если данных для этого интерфейса нет.

Память под структуру данных, возвращаемая getifaddrs(), выделяется динамически и должна освобождаться с помощью freeifaddrs(), когда больше не нужна.

Источник

Remote Agent for Linux (RALUS) crashes immediately after starting when Linux server has kernel version 3.x.

Problem

The Remote Agent for Linux (RALUS) crashes immediately after starting on Linux distributions running kernel version 3.x.

The error below is seen when loading the agent in debug mode (.\beremote —log-console).

Error Message

GetIfAddrs(LINUX): failed err = 11

Cause

Solution

The current solution is to install the following kernel patch: https://bugzilla.kernel.org/show_bug.cgi?id=33992.

Note: Support for kernel version 3.x was added with the release of Backup Exec 2014. Earlier versions of Backup Exec (prior to 2014) do not support kernel 3.x.

Ubuntu 10.0.4 (kernel 3.1.10)

Debian 6.0.3 (kernel 3.1.10)

Was this content helpful?

Rating submitted. Please provide additional feedback (optional):

You are using Microsoft Internet Explorer!

Article Languages

Translated Content

Please note that this document is a translation from English, and may have been machine-translated. It is possible that updates have been made to the original version after this document was translated and published. Veritas does not guarantee the accuracy regarding the completeness of the translation. You may also refer to the English Version of this knowledge base article for up-to-date information.

Источник

The Picky SysAdmin

In case you want to reach out via e-mail: eric((AT))pickysysadmin.ca

Like Google but probably worse


This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

We just deployed our first CentOS 7 machine and are trying to back it up using Backup Exec 2010 R3 and the RALUS agent.

After installing the missing compatibility libraries needed for the RALUS:

the agent installs and starts but once the Media Server connects to it the agent crashes.

Some log digging came up with this from /var/log/messages:

and running the agent in debug mode shows this:

I’ve opened a case with Symantec and their answer was that CentOS isn’t supported and neither is RHEL7.

Anyone else running into this? Have you fixed it?

I found a blog post where someone suggested hex editing the beremote binary which I’d rather not do. Plus our version of the agent is newer than the one he describes in his post: http://blog.redweb.at/2012/08/howto-backupexec-2012-linux-agent-and-kernel-3-0-debian/

6 thoughts on “ Symantec Backup Exec RALUS crashes on CentOS 7 ”

Did you ever find a solution to this? Have the same issue on a new box and came across your post with the same exact issue we have.

No not yet. We’re relying on Snapshots of the VM taken via vSphere and our NetApp Storage.

We did just recently upgrade to Backup Exec 2014. My co-worker told me the RALUS hasn’t been updated since 2012 though so I suspect the same problem exists.

I would try the libbesocket.so patch in that blog post you linked (now dead, try http://preview.tinyurl.com/j2le9ke instead) — the process for finding the place to change in newer versions of the library file is well-described in both the article and the comments there (i.e. find ‘$0x8938’ within the hex dump, find the offset of the nearest ‘jns’ op after that.

If you’ve already got an alternative (i.e. your snapshots) then it shouldn’t present too much risk, and its probably a lot easier to manage than the patched kernel recommended by https://www.veritas.com/support/en_US/article.TECH201095

I should have updated my post. The latest Linux Agent from BE 2014 works fine on CentOS 7.

I’ll double check at work tomorrow but I’m pretty sure that’s what we ended up doing.

Any idea how to put the file back together after objdump?

I do not. I never used the patching method. I just backed up the whole VM until we upgraded to BE2014 and the new RALUS supported CentOS 7

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Источник

MAC address with getifaddrs

Is there a way to get interface’s MAC address via getifaddrs() ?

I already have this, to get IP addresses, but I have kinda missed MAC . Ive tried to look for the information in getifaddrs() , but there is nothing about MAC addresses

7 Answers 7

On BSD systems you can use getifaddrs directly for retrieving MACs. Here’s an example of the complete macaddr.c tools:

getifaddrs() already provides the MAC address associated with each interface. On Linux, when you bump into a family == AF_PACKET that is the MAC address. Same thing on OSX / BSD but in that case the family will be AF_LINK.

On Linux, you’d do something like this

Though, there might be more members of the struct sockaddr_ll you’d want to inspect, see here for a description.

If you’re on Unix, you’re looking for ioctl SIOCGIFHWADDR :

Get or set the hardware address of a device using ifr_hwaddr. The hardware address is specified in a struct sockaddr. sa_family contains the ARPHRD_* device type, sa_data the L2 hardware address starting from byte 0. Setting the hardware address is a privileged operation.

Here is the code for getting IP and MAC addresses

Combining a couple answers, this works on both Linux and Mac/iOS/BSD

There is my experiments with different approaches to list interfaces

Источник

getifaddrs(3) — Linux man page

getifaddrs, freeifaddrs — get interface addresses

Synopsis

Description

The getifaddrs() function creates a linked list of structures describing the network interfaces of the local system, and stores the address of the first item of the list in *ifap. The list consists of ifaddrs structures, defined as follows: The ifa_next field contains a pointer to the next structure on the list, or NULL if this is the last item of the list.

The ifa_name points to the null-terminated interface name.

The ifa_flags field contains the interface flags, as returned by the SIOCGIFFLAGS ioctl(2) operation (see netdevice(7) for a list of these flags).

The ifa_addr field points to a structure containing the interface address. (The sa_family subfield should be consulted to determine the format of the address structure.) This field may contain a NULL pointer.

The ifa_netmask field points to a structure containing the netmask associated with ifa_addr, if applicable for the address family. This field may contain a NULL pointer.

Depending on whether the bit IFF_BROADCAST or IFF_POINTOPOINT is set in ifa_flags (only one can be set at a time), either ifa_broadaddr will contain the broadcast address associated with ifa_addr (if applicable for the address family) or ifa_dstaddr will contain the destination address of the point-to-point interface.

The ifa_data field points to a buffer containing address-family-specific data; this field may be NULL if there is no such data for this interface.

The data returned by getifaddrs() is dynamically allocated and should be freed using freeifaddrs() when no longer needed.

Return Value

On success, getifaddrs() returns zero; on error, -1 is returned, and errno is set appropriately.

Errors

Versions

The getifaddrs() function first appeared in glibc 2.3, but before glibc 2.3.3, the implementation only supported IPv4 addresses; IPv6 support was added in glibc 2.3.3. Support of address families other than IPv4 is only available on kernels that support netlink.

Conforming To

Not in POSIX.1-2001. This function first appeared in BSDi and is present on the BSD systems, but with slightly different semantics documented-returning one entry per interface, not per address. This means ifa_addr and other fields can actually be NULL if the interface has no address, and no link-level address is returned if the interface has an IP address assigned. Also, the way of choosing either ifa_broadaddr or ifa_dstaddr differs on various systems.

Notes

The addresses returned on Linux will usually be the IPv4 and IPv6 addresses assigned to the interface, but also one AF_PACKET address per interface containing lower-level details about the interface and its physical layer. In this case, the ifa_data field may contain a pointer to a struct rtnl_link_stats, defined in (in Linux 2.4 and earlier, struct net_device_stats, defined in ), which contains various interface attributes and statistics.

Example

The program below demonstrates the use of getifaddrs(), freeifaddrs(), and getnameinfo(3). Here is what we see when running this program on one system:

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

  • Mac os color picker
  • Mac os clone disk
  • Mac os clock screensaver
  • Mac os clipboard manager
  • Mac os clean memory