-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1055 from ApexAI/iox-#1054-unix-platform-support
Iox #1054 unix platform support
- Loading branch information
Showing
49 changed files
with
1,040 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 102 additions & 0 deletions
102
iceoryx_hoofs/platform/unix/include/iceoryx_hoofs/platform/acl.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. | ||
// Copyright (c) 2021 by Apex.AI Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
#ifndef IOX_HOOFS_UNIX_PLATFORM_ACL_HPP | ||
#define IOX_HOOFS_UNIX_PLATFORM_ACL_HPP | ||
|
||
#include "iceoryx_hoofs/platform/types.hpp" | ||
|
||
#define ACL_USER_OBJ 0 | ||
#define ACL_USER 1 | ||
#define ACL_GROUP_OBJ 2 | ||
#define ACL_GROUP 3 | ||
#define ACL_OTHER 4 | ||
#define ACL_READ 5 | ||
#define ACL_WRITE 6 | ||
#define ACL_MASK 7 | ||
|
||
struct __acl_ext | ||
{ | ||
}; | ||
|
||
using acl_t = struct __acl_ext*; | ||
using acl_permset_t = int; | ||
using acl_perm_t = int; | ||
using acl_entry_t = int; | ||
using acl_tag_t = int; | ||
|
||
inline int acl_valid(acl_t) | ||
{ | ||
return 0; | ||
} | ||
|
||
inline int acl_set_fd(int, acl_t) | ||
{ | ||
return 0; | ||
} | ||
|
||
inline acl_t acl_init(int) | ||
{ | ||
static struct __acl_ext stub; | ||
return &stub; | ||
} | ||
|
||
inline int acl_free(void*) | ||
{ | ||
return 0; | ||
} | ||
|
||
inline int acl_create_entry(acl_t*, acl_entry_t*) | ||
{ | ||
return 0; | ||
} | ||
|
||
inline int acl_set_tag_type(acl_entry_t, acl_tag_t) | ||
{ | ||
return 0; | ||
} | ||
|
||
inline int acl_set_qualifier(acl_entry_t, const void*) | ||
{ | ||
return 0; | ||
} | ||
|
||
inline int acl_get_permset(acl_entry_t, acl_permset_t*) | ||
{ | ||
return 0; | ||
} | ||
|
||
inline int acl_add_perm(acl_permset_t, acl_perm_t) | ||
{ | ||
return 0; | ||
} | ||
|
||
inline char* acl_to_text(acl_t, ssize_t*) | ||
{ | ||
return nullptr; | ||
} | ||
|
||
inline acl_t acl_from_text(const char*) | ||
{ | ||
return acl_t(); | ||
} | ||
|
||
inline acl_t acl_get_fd(int) | ||
{ | ||
return acl_t(); | ||
} | ||
|
||
#endif // IOX_HOOFS_UNIX_PLATFORM_ACL_HPP |
22 changes: 22 additions & 0 deletions
22
iceoryx_hoofs/platform/unix/include/iceoryx_hoofs/platform/dlfcn.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. | ||
// Copyright (c) 2021 by Apex.AI Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
#ifndef IOX_HOOFS_UNIX_PLATFORM_DLFCN_HPP | ||
#define IOX_HOOFS_UNIX_PLATFORM_DLFCN_HPP | ||
|
||
#include <dlfcn.h> | ||
|
||
#endif // IOX_HOOFS_UNIX_PLATFORM_DLFCN_HPP |
21 changes: 21 additions & 0 deletions
21
iceoryx_hoofs/platform/unix/include/iceoryx_hoofs/platform/errno.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright (c) 2021 by Apex.AI Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
#ifndef IOX_HOOFS_UNIX_PLATFORM_ERRNO_HPP | ||
#define IOX_HOOFS_UNIX_PLATFORM_ERRNO_HPP | ||
|
||
#include <errno.h> | ||
|
||
#endif // IOX_HOOFS_UNIX_PLATFORM_ERRNO_HPP |
24 changes: 24 additions & 0 deletions
24
iceoryx_hoofs/platform/unix/include/iceoryx_hoofs/platform/fcntl.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. | ||
// Copyright (c) 2021 by Apex.AI Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
#ifndef IOX_HOOFS_UNIX_PLATFORM_FCNTL_HPP | ||
#define IOX_HOOFS_UNIX_PLATFORM_FCNTL_HPP | ||
|
||
#include <fcntl.h> | ||
|
||
int iox_open(const char* pathname, int flags, mode_t mode); | ||
|
||
#endif // IOX_HOOFS_UNIX_PLATFORM_FCNTL_HPP |
24 changes: 24 additions & 0 deletions
24
iceoryx_hoofs/platform/unix/include/iceoryx_hoofs/platform/file.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. | ||
// Copyright (c) 2021 by Apex.AI Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
#ifndef IOX_HOOFS_UNIX_PLATFORM_FILE_HPP | ||
#define IOX_HOOFS_UNIX_PLATFORM_FILE_HPP | ||
|
||
#include <sys/file.h> | ||
|
||
int iox_flock(int fd, int op); | ||
|
||
#endif // IOX_HOOFS_UNIX_PLATFORM_FILE_HPP |
22 changes: 22 additions & 0 deletions
22
iceoryx_hoofs/platform/unix/include/iceoryx_hoofs/platform/getopt.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. | ||
// Copyright (c) 2021 by Apex.AI Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
#ifndef IOX_HOOFS_UNIX_PLATFORM_GETOPT_HPP | ||
#define IOX_HOOFS_UNIX_PLATFORM_GETOPT_HPP | ||
|
||
#include <getopt.h> | ||
|
||
#endif // IOX_HOOFS_UNIX_PLATFORM_GETOPT_HPP |
24 changes: 24 additions & 0 deletions
24
iceoryx_hoofs/platform/unix/include/iceoryx_hoofs/platform/grp.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. | ||
// Copyright (c) 2021 by Apex.AI Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
#ifndef IOX_HOOFS_UNIX_PLATFORM_GRP_HPP | ||
#define IOX_HOOFS_UNIX_PLATFORM_GRP_HPP | ||
|
||
#include <grp.h> | ||
|
||
int iox_getgrouplist(const char* user, gid_t group, gid_t* groups, int* ngroups); | ||
|
||
#endif // IOX_HOOFS_UNIX_PLATFORM_GRP_HPP |
22 changes: 22 additions & 0 deletions
22
iceoryx_hoofs/platform/unix/include/iceoryx_hoofs/platform/inet.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. | ||
// Copyright (c) 2021 by Apex.AI Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
#ifndef IOX_HOOFS_UNIX_PLATFORM_INET_HPP | ||
#define IOX_HOOFS_UNIX_PLATFORM_INET_HPP | ||
|
||
#include <arpa/inet.h> | ||
|
||
#endif // IOX_HOOFS_UNIX_PLATFORM_INET_HPP |
Oops, something went wrong.